X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=typemap;h=7bd56b6718e5826286c03fbad200a58b7a39959b;hb=c33b3e442b6363baa3d8dab66363f08da7f2d050;hp=956a2b5656059e5469d373c21bd752463d53dee4;hpb=3a31be99c1d620523dc98a752ae2c665054d46cb;p=ZOOM-Perl-moved-to-github.git diff --git a/typemap b/typemap index 956a2b5..7bd56b6 100644 --- a/typemap +++ b/typemap @@ -1,5 +1,3 @@ -# $Id: typemap,v 1.4 2005-10-13 16:01:48 mike Exp $ - ZOOM_connection T_PTROBJ ZOOM_connection * T_PTROBJ ZOOM_options T_PTROBJ @@ -28,6 +26,7 @@ const __sigset_t * T_PTROBJ # longer have to discard the "const" qualfiers from the arguments to # the functions in the .xs file. const char * T_PV +opaquechar * T_OPAQUECHAR const char ** T_PTROBJ const struct timespec * T_PTROBJ div_t T_OPAQUE_STRUCT @@ -50,7 +49,8 @@ unsigned short int * T_PTROBJ void ( * __func ) ( int __status, void * __arg ) T_PTROBJ void ( * __func ) ( void ) T_PTROBJ void ** T_PTROBJ -############################################################################# +struct datachunk T_DATACHUNK +# --------------------------------------------------------------------------- INPUT T_OPAQUE_STRUCT if (sv_derived_from($arg, \"${ntype}\")) { @@ -64,7 +64,13 @@ T_OPAQUE_STRUCT } else croak(\"$var is not of type ${ntype}\") -############################################################################# +T_OPAQUECHAR + { STRLEN _unused_len; + $var = ($type) SvPV($arg, _unused_len); } + +# --------------------------------------------------------------------------- OUTPUT T_OPAQUE_STRUCT sv_setref_pvn($arg, \"${ntype}\", (char *)&$var, sizeof($var)); +T_DATACHUNK + sv_setpvn($arg, $var.data, $var.len);