perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angus Lees <...@inodes.org>
Subject Various Embperl patches from the Debian package [3/3]
Date Fri, 03 Dec 2004 08:26:56 GMT
These compiler warning fixes:

--- libembperl-perl-2.0rc2.orig/xs/Embperl/Req/Config/Config.xs
+++ libembperl-perl-2.0rc2/xs/Embperl/Req/Config/Config.xs
@@ -134,8 +134,8 @@
 MODULE = Embperl::Req::Config    PACKAGE = Embperl::Req::Config 
 
 char
-mult_field_sep(obj, val=NULL)
+mult_field_sep(obj, val=0)
     Embperl::Req::Config obj
     char val
   PREINIT:
--- libembperl-perl-2.0rc2.orig/xs/typemap
+++ libembperl-perl-2.0rc2/xs/typemap
@@ -83,7 +83,7 @@
 T_MAGICHASH_SV
     {
     MAGIC * mg ;
-    if (mg = mg_find (SvRV($arg), '~'))
+    if ((mg = mg_find (SvRV($arg), '~')))
         $var = *(($type *)(mg -> mg_ptr)) ;
     else
         croak (\"$var is not of type $type\") ;


which actually come from these changes to ExtUtils::XSBuilder:

--- libextutils-xsbuilder-perl-0.27.orig/XSBuilder/TypeMap.pm
+++ libextutils-xsbuilder-perl-0.27/XSBuilder/TypeMap.pm
@@ -165,6 +165,9 @@
     if ($class =~ /^[INU]V/) {
         return '0';
     }
+    elsif ($class =~ /^(U_)?CHAR$/) {
+        return '0'; # xsubpp seems to mangle q{'\0'}
+    }
     else {
         return 'NULL';
     }
@@ -803,7 +806,7 @@
             'INPUT' =>
 q[    {
     MAGIC * mg ;
-    if (mg = mg_find (SvRV($arg), '~'))
+    if ((mg = mg_find (SvRV($arg), '~')))
         $var = *(($type *)(mg -> mg_ptr)) ;
     else
         croak (\"$var is not of type $type\") ;


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message