summaryrefslogtreecommitdiff
path: root/Lib/pike
diff options
context:
space:
mode:
authorLogan Johnson <ljohnson@users.sourceforge.net>2003-05-01 16:04:10 +0000
committerLogan Johnson <ljohnson@users.sourceforge.net>2003-05-01 16:04:10 +0000
commit4695928b57033f9da1834e17f0bc3dbe0ecbae44 (patch)
tree8059d4fe9eae54bff79ca60250efc5bf22051096 /Lib/pike
parentc478c13cf03fe993bb0affa5f462b664da046675 (diff)
downloadswig-4695928b57033f9da1834e17f0bc3dbe0ecbae44.tar.gz
Fix SWIGTYPE output typemaps for Pike module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/pike')
-rw-r--r--Lib/pike/pike.swg9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/pike/pike.swg b/Lib/pike/pike.swg
index 125a8edca..9b73d2193 100644
--- a/Lib/pike/pike.swg
+++ b/Lib/pike/pike.swg
@@ -111,8 +111,7 @@ extern "C" {
%typemap(out, pikedesc="tStr") char * "push_text($1);";
/* Pointers, references, and arrays */
-%typemap(out) SWIGTYPE*, SWIGTYPE &, SWIGTYPE []
- "$result = SWIG_NewPointerObj((void *) $1, $1_descriptor, $owner);";
+%typemap(out, pikedesc="tObj") SWIGTYPE*, SWIGTYPE &, SWIGTYPE [] "push_object(SWIG_NewPointerObj((void *) $1, $1_descriptor, $owner));";
/* Void return value; don't push anything */
%typemap(out, pikedesc="tVoid") void "";
@@ -128,19 +127,19 @@ extern "C" {
%typemap(out, pikedesc="tStr") char [ANY], const char [ANY] "push_text($1);";
/* Primitive types--return by value */
-%typemap(out) SWIGTYPE
+%typemap(out, "tObj") SWIGTYPE
#ifdef __cplusplus
{
$&1_ltype resultptr;
resultptr = new $1_ltype(($1_ltype &) $1);
- $result = SWIG_NewPointerObj((void *) resultptr, $&1_descriptor, 1);
+ push_object(SWIG_NewPointerObj((void *) resultptr, $&1_descriptor, 1));
}
#else
{
$&1_ltype resultptr;
resultptr = ($&1_ltype) malloc(sizeof($1_type));
memmove(resultptr, &$1, sizeof($1_type));
- $result = SWIG_NewPointerObj((void *) resultptr, $&1_descriptor, 1);
+ push_object(SWIG_NewPointerObj((void *) resultptr, $&1_descriptor, 1));
}
#endif