Re: [PATCH] Typemap testing
authorTim Jenness <tjenness@cpan.org>
Tue, 27 Mar 2001 16:34:03 +0000 (06:34 -1000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 28 Mar 2001 14:43:59 +0000 (14:43 +0000)
Message-ID: <Pine.LNX.4.30.0103271633030.21198-100000@lapaki.jach.hawaii.edu>

p4raw-id: //depot/perl@9402

ext/XS/Typemap/Typemap.pm
ext/XS/Typemap/Typemap.xs
ext/XS/Typemap/typemap
t/lib/xs-typemap.t

index f14a0d2..ccfdfb1 100644 (file)
@@ -67,7 +67,7 @@ $VERSION = '0.01';
           T_REF_IV_PTR_IN T_REF_IV_PTR_OUT
           T_PTROBJ_IN T_PTROBJ_OUT
           T_OPAQUE_IN T_OPAQUE_array
-          T_OPAQUEPTR_IN T_OPAQUEPTR_OUT
+          T_OPAQUEPTR_IN T_OPAQUEPTR_OUT T_OPAQUEPTR_OUT_short
           T_ARRAY
           T_STDIO_open T_STDIO_close T_STDIO_print
           /);
index 7c24c44..ce8bb7c 100644 (file)
@@ -584,6 +584,14 @@ T_OPAQUEPTR_OUT( ptr )
  OUTPUT:
   RETVAL
 
+short
+T_OPAQUEPTR_OUT_short( ptr )
+  shortOPQ * ptr
+ CODE:
+  RETVAL = *ptr;
+ OUTPUT:
+  RETVAL
+
 =item T_OPAQUE
 
 This can be used to store pointers to non-pointer types in an SV. It
index 909221d..12928c4 100644 (file)
@@ -15,3 +15,4 @@ intArray *      T_ARRAY
 intOpq          T_IV
 intOpq   *      T_OPAQUEPTR
 shortOPQ          T_OPAQUE
+shortOPQ *      T_OPAQUEPTR
index a3e85da..131c32e 100644 (file)
@@ -240,7 +240,7 @@ print "# T_OPAQUE\n";
 
 $t = 48;
 $ptr = T_OPAQUE_IN( $t );
-ok(T_OPAQUEPTR_OUT( $ptr ), $t);
+ok(T_OPAQUEPTR_OUT_short( $ptr ), $t);
 
 # T_OPAQUE_array
 my @opq = (2,4,8);