List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:May 8 2007 6:33pm
Subject:Rev 118: Added reference counting to createNdb. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
------------------------------------------------------------
revno: 118
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Tue 2007-05-08 11:32:56 -0700
message:
  Added reference counting to createNdb.
modified:
  perl/ndbapi.i                  ndb.i-20070225155255-5ief7aicto319mbu-1
  perl/swig/perl_extend_ndbtransaction_async.i
perl_extend_ndbtrans-20070323110355-zppwqruk69m5t3hz-2
=== modified file 'perl/ndbapi.i'
--- a/perl/ndbapi.i	2007-05-01 22:50:04 +0000
+++ b/perl/ndbapi.i	2007-05-08 18:32:56 +0000
@@ -10,7 +10,22 @@
 %}
 %include "perl_callback_typemap.i"
 %include "NdbFactory.i"
+
+%feature("shadow") Ndb_cluster_connection::createNdb(const char* aCatalogName="", const
char* aSchemaName="def")
+%{
+   sub createNdb {
+        my $self=$_[0];
+        my $ndb=mysql::cluster::ndbapic::NdbClusterConnection_createNdb(@_);
+        my $t=tied(%{$ndb});
+        $mysql::cluster::ndbapi::ndb_connectors_owned{$t}=$self;
+        return $ndb;
+    } 
+%}
 %include "NdbClusterConnection.i"
+
+
+
+
 %include "../swig/Ndb.i"
 %include "NdbTransaction.i"
 %include "perl_extend_ndbtransaction_async.i"

=== modified file 'perl/swig/perl_extend_ndbtransaction_async.i'
--- a/perl/swig/perl_extend_ndbtransaction_async.i	2007-05-08 18:08:10 +0000
+++ b/perl/swig/perl_extend_ndbtransaction_async.i	2007-05-08 18:32:56 +0000
@@ -1,3 +1,5 @@
+%extend NdbTransaction { 
+
 %feature("shadow") executeAsynchPrepare(ExecType execType,
                             SV*                  pFcn,
                             AbortOption          abortOption = AbortOnError)
@@ -8,12 +10,12 @@
         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)

Thread
Rev 118: Added reference counting to createNdb. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor8 May