List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:May 8 2007 6:08pm
Subject:Rev 117: Added reference counting to async transactions for Perl. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
------------------------------------------------------------
revno: 117
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Tue 2007-05-08 11:08:10 -0700
message:
  Added reference counting to async transactions for Perl.
modified:
  perl/swig/perl_extend_ndbtransaction_async.i
perl_extend_ndbtrans-20070323110355-zppwqruk69m5t3hz-2
=== modified file 'perl/swig/perl_extend_ndbtransaction_async.i'
--- a/perl/swig/perl_extend_ndbtransaction_async.i	2007-04-26 15:30:02 +0000
+++ b/perl/swig/perl_extend_ndbtransaction_async.i	2007-05-08 18:08:10 +0000
@@ -1,7 +1,22 @@
+%feature("shadow") executeAsynchPrepare(ExecType execType,
+                            SV*                  pFcn,
+                            AbortOption          abortOption = AbortOnError)
+%{
+    sub executeAsynchPrepare {
+        my $self=shift;
+        my $exec=shift;
+        my $sub=shift;
+        my $abort=shift; 
+
+mysql::cluster::ndbapic::NdbTransaction_executeAsynchPrepare($self, $exec,
+            sub { $sub->(); $self; }, $abort);
+    }
+%} 
+
 %extend NdbTransaction { 
-  void executeAsynchPrepare(ExecType          execType,
-                            SV*         	pFcn,
-                            AbortOption       abortOption = AbortOnError)
+  void executeAsynchPrepare(ExecType    execType,
+                            SV*         pFcn,
+                            AbortOption abortOption = AbortOnError)
   {
     self->executeAsynchPrepare(execType,PerlCallBack,(void *)pFcn,abortOption);
SvREFCNT_inc(pFcn);
   };

Thread
Rev 117: Added reference counting to async transactions for Perl. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor8 May