diff options
| author | Darryl L. Pierce <mcpierce@apache.org> | 2013-10-04 19:21:00 +0000 |
|---|---|---|
| committer | Darryl L. Pierce <mcpierce@apache.org> | 2013-10-04 19:21:00 +0000 |
| commit | 6f05c50f75c055104275dee247e86f85e7f2711d (patch) | |
| tree | 6d4a050b2c04c0c33688665c63f00065d6118580 /qpid/cpp/include | |
| parent | 85a7c6b63293cc6c12c4fe7ad2e01c97e55abc1b (diff) | |
| download | qpid-python-6f05c50f75c055104275dee247e86f85e7f2711d.tar.gz | |
QPID-4730: Losing object references in Perl.
Contributed by Hao Chang Yu <hyu@redhat.com>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1529269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include')
| -rw-r--r-- | qpid/cpp/include/qpid/swig_perl_typemaps.i | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/qpid/cpp/include/qpid/swig_perl_typemaps.i b/qpid/cpp/include/qpid/swig_perl_typemaps.i index da24bfe402..f1425ebd67 100644 --- a/qpid/cpp/include/qpid/swig_perl_typemaps.i +++ b/qpid/cpp/include/qpid/swig_perl_typemaps.i @@ -192,8 +192,10 @@ } %typemap (out) uint8_t, uint16_t, uint32_t, uint64_t { - sv_setuv($result, (UV)$1); - argvi++; + SV* tmp = sv_newmortal(); + sv_setuv(tmp, (UV)$1); + $result = tmp; + argvi++; } %typemap (in) int8_t, int16_t, int32_t, int64_t { @@ -206,8 +208,10 @@ } %typemap (out) int8_t, int16_t, int32_t, int64_t { - sv_setiv($result, (IV)$1); - argvi++; + SV* tmp = sv_newmortal(); + sv_setiv(tmp, (IV)$1); + $result = tmp; + argvi++; } %typemap(in) bool { |
