diff options
Diffstat (limited to 'cpp/bindings/qmf/ruby/ruby.i')
| -rw-r--r-- | cpp/bindings/qmf/ruby/ruby.i | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cpp/bindings/qmf/ruby/ruby.i b/cpp/bindings/qmf/ruby/ruby.i new file mode 100644 index 0000000000..fae7184143 --- /dev/null +++ b/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" + |
