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 | 8620f760b69bfb4fd8d555b9f89f259fd8a7192b (patch) | |
| tree | 88579cc9953d2303c177754f086c4664afbb2ee1 /cpp | |
| parent | 185ab2ff646b21460bf1a0afcd79659ae73f60ba (diff) | |
| download | qpid-python-8620f760b69bfb4fd8d555b9f89f259fd8a7192b.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/qpid@1529269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/include/qpid/swig_perl_typemaps.i | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpp/include/qpid/swig_perl_typemaps.i b/cpp/include/qpid/swig_perl_typemaps.i index da24bfe402..f1425ebd67 100644 --- a/cpp/include/qpid/swig_perl_typemaps.i +++ b/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 { |
