List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:November 15 2007 6:51pm
Subject:Rev 253: Fixed memory allocation for voidint return types. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 253
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Thu 2007-11-15 10:49:30 -0800
message:
  Fixed memory allocation for voidint return types. 
modified:
  java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
=== modified file 'java/ndbj.i'
--- a/java/ndbj.i	2007-11-06 22:59:00 +0000
+++ b/java/ndbj.i	2007-11-15 18:49:30 +0000
@@ -132,7 +132,12 @@
 //    jclass callablecls = jenv->GetObjectClass(($1->obj));    
 //    printf("Registering callback: env==%p .. obj==%p ..
callbackcls==%p\n",jenv,$1->obj,callablecls);
  %}
-
+/*
+%typemap(freearg) asynch_callback_t * cb
+%{
+  delete $1; 
+  %}
+*/
 %typemap(in) event_callback_t * cb
 %{ 
   
@@ -143,17 +148,22 @@
     $1 = callback_data;
  %}
 
+
 %typemap(jni) asynch_callback_t * "jobject" 
 %typemap(jtype) asynch_callback_t * "Object"
 %typemap(jstype) asynch_callback_t * "BaseCallback"
 %typemap(javain) asynch_callback_t * "(Object)$javainput"
 
+//We're replacing this return val with an exception
+%typemap(out) voidint ""; 
 %typemap(jtype) voidint "void";
 %typemap(jstype) voidint "void";
+%typemap(jni) voidint "void";
 %typemap(javaout) voidint { 
   $jnicall; 
 }
 
+
 %typemap(jni) MYSQL_TIME * "jobject"
 %typemap(jtype) MYSQL_TIME * "Object"
 %typemap(jstype) MYSQL_TIME * "java.util.Calendar"

Thread
Rev 253: Fixed memory allocation for voidint return types. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor15 Nov