diff options
| author | Ted Ross <tross@apache.org> | 2012-01-04 16:24:33 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2012-01-04 16:24:33 +0000 |
| commit | b8a1bf274969d3b58c58ddd9af2ac9481ff9a8d8 (patch) | |
| tree | 0272ff0614510e16ca1f138b6ce8bbd0e0947629 /cpp/bindings | |
| parent | 7727bf93637c64c874be048e42fa676d1e0162be (diff) | |
| download | qpid-python-b8a1bf274969d3b58c58ddd9af2ac9481ff9a8d8.tar.gz | |
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/qpid@1227208 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings')
| -rw-r--r-- | cpp/bindings/swig_ruby_typemaps.i | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/bindings/swig_ruby_typemaps.i b/cpp/bindings/swig_ruby_typemaps.i index 326d607c8d..1a07cc86b0 100644 --- a/cpp/bindings/swig_ruby_typemaps.i +++ b/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); |
