From 83bf85f1931d370ff7ea9e127f7ed592561aa51a Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Wed, 4 Jan 2012 16:24:33 +0000 Subject: QPID-3718 - Added Ruby typemaps for uint8_t and int8_t. Applied patch from Darryl Pierce. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1227208 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/bindings/swig_ruby_typemaps.i | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/qpid/cpp/bindings/swig_ruby_typemaps.i b/qpid/cpp/bindings/swig_ruby_typemaps.i index 326d607c8d..1a07cc86b0 100644 --- a/qpid/cpp/bindings/swig_ruby_typemaps.i +++ b/qpid/cpp/bindings/swig_ruby_typemaps.i @@ -168,6 +168,26 @@ $result = (VALUE) $1; } +%typemap (in) uint8_t +{ + $1 = NUM2UINT ($input); +} + +%typemap (out) uint8_t +{ + $result = UINT2NUM((uint8_t) $1); +} + +%typemap (in) int8_t +{ + $1 = NUM2INT ($input); +} + +%typemap (out) int8_t +{ + $result = INT2NUM((int8_t) $1); +} + %typemap (in) uint16_t { $1 = NUM2UINT ($input); -- cgit v1.2.1