From 38947ae384fd2fb0d0e379f13e28392a15a54e5d Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Mon, 1 Jun 2009 21:24:31 +0000 Subject: QPID-1874 - Patch from Ian Main This patch provides the Ruby binding for QMF Agent and the framework for the Python bindings. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@780837 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/bindings/qmf/ruby/ruby.i | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 qpid/cpp/bindings/qmf/ruby/ruby.i (limited to 'qpid/cpp/bindings/qmf/ruby/ruby.i') diff --git a/qpid/cpp/bindings/qmf/ruby/ruby.i b/qpid/cpp/bindings/qmf/ruby/ruby.i new file mode 100644 index 0000000000..fae7184143 --- /dev/null +++ b/qpid/cpp/bindings/qmf/ruby/ruby.i @@ -0,0 +1,46 @@ +%include stl.i +%trackobjects; + +%module qmfengine + +%typemap (in) void * +{ + $1 = (void *) $input; +} + +%typemap (out) void * +{ + $result = (VALUE) $1; +} + +%typemap (in) uint32_t +{ + $1 = FIX2UINT ((uint32_t) $input); +} + +%typemap (out) uint32_t +{ + $result = UINT2NUM((unsigned int) $1); +} + +%typemap (typecheck, precedence=SWIG_TYPECHECK_INTEGER) uint32_t { + $1 = FIXNUM_P($input); +} + +%typemap (in) uint64_t +{ + $1 = FIX2ULONG ((uint64_t) $input); +} + +%typemap (out) uint64_t +{ + $result = ULONG2NUM((unsigned long) $1); +} + +%typemap (typecheck, precedence=SWIG_TYPECHECK_INTEGER) uint64_t { + $1 = FIXNUM_P($input); +} + + +%include "../qmfengine.i" + -- cgit v1.2.1