lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] svn commit: r1059112 - in /incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl: Constructor.pm Method.pm
Date Fri, 14 Jan 2011 19:00:06 GMT
Author: marvin
Date: Fri Jan 14 19:00:06 2011
New Revision: 1059112

URL: http://svn.apache.org/viewvc?rev=1059112&view=rev
Log:
Always call XSRETURN at the end of a bound method/function.  Remove PUTBACK
calls which are now *always* unreachable rather than sometimes unreachable.
Note that all PUTBACK does is update the global var holding the Perl stack
pointer from the local copy; XSRETURN also sets this global var.

Modified:
    incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Constructor.pm
    incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Method.pm

Modified: incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Constructor.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Constructor.pm?rev=1059112&r1=1059111&r2=1059112&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Constructor.pm (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Constructor.pm Fri Jan 14 19:00:06
2011
@@ -147,7 +147,6 @@ XS($c_name)
         sv_2mortal( ST(0) );
         XSRETURN(1);
     }
-    PUTBACK;
 }
 
 END_STUFF

Modified: incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Method.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Method.pm?rev=1059112&r1=1059111&r2=1059112&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Method.pm (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Method.pm Fri Jan 14 19:00:06
2011
@@ -80,7 +80,7 @@ sub _xsub_body {
 
     if ( $method->void ) {
         # Invoke method in void context.
-        $body .= qq|$full_func_sym($name_list);|;
+        $body .= qq|$full_func_sym($name_list);\n| . qq|        XSRETURN(0);|;
     }
     else {
         # Return a value for method invoked in a scalar context.
@@ -179,7 +179,6 @@ XS($c_name)
         /* Execute */
         $body
     }
-    PUTBACK;
 }
 END_STUFF
 }
@@ -268,7 +267,6 @@ XS($c_name)
         /* Execute */
         $body
     }
-    PUTBACK;
 }
 END_STUFF
 }



Mime
View raw message