You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2002/05/24 00:19:34 UTC
cvs commit: modperl-2.0/xs typemap
dougm 02/05/23 15:19:34
Modified: xs typemap
Log:
add T_UVOBJ typemap
Revision Changes Path
1.7 +15 -0 modperl-2.0/xs/typemap
Index: typemap
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/typemap,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- typemap 9 Apr 2002 20:19:25 -0000 1.6
+++ typemap 23 May 2002 22:19:34 -0000 1.7
@@ -17,12 +17,27 @@
T_APR_TIME
sv_setnv($arg, (NV)($var / APR_USEC_PER_SEC));
+T_UVOBJ
+ sv_setref_uv($arg, \"${ntype}\", (UV)$var);
+
######################################################################
INPUT
T_PTROBJ
if (SvROK($arg) && sv_derived_from($arg, \"${ntype}\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
+ }
+ else {
+ Perl_croak(aTHX_ SvROK($arg) ?
+ \"$var is not of type ${ntype}\" :
+ \"$var is not a blessed reference\");
+ }
+
+INPUT
+T_UVOBJ
+ if (SvROK($arg) && sv_derived_from($arg, \"${ntype}\")) {
+ UV tmp = SvUV((SV*)SvRV($arg));
+ $var = ($type)tmp;
}
else {
Perl_croak(aTHX_ SvROK($arg) ?