List:Commits« Previous MessageNext Message »
From:Monty Taylor Date:August 7 2008 10:50pm
Subject:bzr commit into NDB/Bindings:trunk branch (monty:412)
View as plain text  
#At https://bazaar.launchpad.net/~ndb-bindings/ndb-bindings/trunk

  412 Monty Taylor	2008-08-07
      Added ndb_init to runtime init function.
modified:
  ruby/ndbapi.i

=== modified file 'ruby/ndbapi.i'
--- a/ruby/ndbapi.i	2008-07-09 20:42:18 +0000
+++ b/ruby/ndbapi.i	2008-08-07 22:50:43 +0000
@@ -76,6 +76,18 @@
 }
 %{ 
 
+/* Override the SWIG_InitRuntime macro with our own, so we can inject
+   ndb_init() into the init sequence */
+#undef SWIG_InitRuntime
+#define SWIG_InitRuntime()                              NDB_Ruby_InitRuntime() 
+
+void
+NDB_Ruby_InitRuntime()
+{
+  SWIG_Ruby_InitRuntime();
+  ndb_init();
+}
+
 #define NDB_exception(code,msg) do { ndb_raise_exception(code, msg); SWIG_fail; } while(0);
 #define NDB_exception_err(code,err) do { ndb_raise_exception(code, err.message); SWIG_fail; } while(0);
 

Thread
bzr commit into NDB/Bindings:trunk branch (monty:412) Monty Taylor8 Aug