develooper Front page | perl.perl5.porters | Postings from August 2001

[PATCH] remove PL_na from typemap

From:
James
Date:
August 6, 2001 20:28
Subject:
[PATCH] remove PL_na from typemap
Message ID:
3B6F5F23.A31A81B1@rf.net
PP:

Here's a patch against the typemap in 5.6.1
to change PL_na to SvPV_nolen.

The Perl Wrappers for Unicode project seems to be
giving XS a workout.

James.

# perl -v
 
This is perl, v5.6.1 built for i586-linux
 
Copyright 1987-2001, Larry Wall
 
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
 
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page. 

# diff -u typemap typemap.new

--- typemap     Mon Aug  6 20:01:02 2001
+++ typemap.new Mon Aug  6 20:01:35 2001
@@ -95,7 +95,7 @@
 T_U_LONG
        $var = (unsigned long)SvUV($arg)
 T_CHAR
-       $var = (char)*SvPV($arg,PL_na)
+       $var = (char)*SvPV_nolen($arg)
 T_U_CHAR
        $var = (unsigned char)SvUV($arg)
 T_FLOAT
@@ -105,7 +105,7 @@
 T_DOUBLE
        $var = (double)SvNV($arg)
 T_PV
-       $var = ($type)SvPV($arg,PL_na)
+       $var = ($type)SvPV_nolen($arg)
 T_PTR
        $var = INT2PTR($type,SvIV($arg))
 T_PTRREF
@@ -161,7 +161,7 @@
 T_OPAQUE
        $var NOT IMPLEMENTED
 T_OPAQUEPTR
-       $var = ($type)SvPV($arg,PL_na)
+       $var = ($type)SvPV_nolen($arg)
 T_PACKED
        $var = XS_unpack_$ntype($arg)
 T_PACKEDARRAY

The End



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About