List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 28 2007 12:47am
Subject:Rev 197: Merged in configure changes. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3

------------------------------------------------------------
revno: 197
revision-id: mtaylor@stripped
parent: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: telco-6.3
timestamp: Sun 2007-10-28 01:46:51 +0100
message:
  Merged in configure changes. 
  Fixed NdbClusterConnection finalize.
modified:
  configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
  java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
  swig/NdbClusterConnection.i    ndb_cluster_connecti-20070228021421-qkr4cbpxymyqdrf3-6
    ------------------------------------------------------------
    revno: 192.1.22
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: ndbjmerge
    timestamp: Sun 2007-10-28 01:17:55 +0100
    message:
      Made configure die if SWIG cannot be found.
    modified:
      configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
=== modified file 'configure.in'
--- a/configure.in	2007-10-27 10:38:56 +0000
+++ b/configure.in	2007-10-28 00:17:55 +0000
@@ -30,8 +30,8 @@
     AC_MSG_ERROR([php support requires at least swig version 1.3.32])
   fi
 fi 
-if test "x$SWIG" == "x"  ; then 
-  AC_MSG_ERROR([Couldn't find swig.])
+if `echo $SWIG | grep "SWIG is not installed." 2>&1` ; then 
+  AC_MSG_ERROR([NDB/Connectors cannot build without SWIG.])
 fi
 
 SWIG_ENABLE_CXX

=== modified file 'java/ndbj.i'
--- a/java/ndbj.i	2007-10-28 00:08:56 +0000
+++ b/java/ndbj.i	2007-10-28 00:46:51 +0000
@@ -356,6 +356,13 @@
 
 
 %typemap(javainterfaces) Ndb_cluster_connection "NdbClusterConnection";
+%javamethodmodifiers Ndb_cluster_connection::deleteAllNdbObjects "protected";
+%typemap(javafinalize) Ndb_cluster_connection %{ 
+protected void finalize() { 
+  deleteAllNdbObjects();
+  delete();
+}
+%}
 
 %include "NdbClusterConnection.i"
 

=== modified file 'swig/NdbClusterConnection.i'
--- a/swig/NdbClusterConnection.i	2007-10-28 00:08:56 +0000
+++ b/swig/NdbClusterConnection.i	2007-10-28 00:46:51 +0000
@@ -80,15 +80,17 @@
 %delobject Ndb_cluster_connection::close;
 
 %extend Ndb_cluster_connection {
-public:
-  ~Ndb_cluster_connection { 
-    Ndb * tmpNdb = NULL; 
+
+%ndbnoexception; 
+
+  void deleteAllNdbObjects() { 
+    const Ndb * tmpNdb = NULL; 
 
     self->lock_ndb_objects();
 
     tmpNdb = self->get_next_ndb_object(NULL);
     while (tmpNdb != NULL) { 
-      Ndb * delNdb = tmpNdb; 
+      const Ndb * delNdb = tmpNdb; 
       tmpNdb = self->get_next_ndb_object(tmpNdb);
       delete delNdb;
     }
@@ -100,6 +102,7 @@
 
   }
 
+public:
   %ndbexception("NdbApiException") createNdb {
     $action
       if (result==NULL) { 

Thread
Rev 197: Merged in configure changes. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3Monty Taylor28 Oct