List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:December 11 2007 7:23pm
Subject:Rev 361: Fixed c# typemaps to make it actually build. 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: 361
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Tue 2007-12-11 17:23:02 -0200
message:
  Fixed c# typemaps to make it actually build.
modified:
  configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
  csharp/mgmapi.i                mgmapi.i-20071125232130-9b1hlszp987p1mhb-1
=== modified file 'configure.in'
--- a/configure.in	2007-12-07 10:40:58 +0000
+++ b/configure.in	2007-12-11 19:23:02 +0000
@@ -1,4 +1,4 @@
-AC_INIT([ndb-connectors], [0.5.1.22.13])
+AC_INIT([ndb-connectors], [0.5.1.22.15])
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE([1.9 tar-ustar])
 AM_CONFIG_HEADER(config.h)

=== modified file 'csharp/mgmapi.i'
--- a/csharp/mgmapi.i	2007-12-11 17:11:11 +0000
+++ b/csharp/mgmapi.i	2007-12-11 19:23:02 +0000
@@ -20,7 +20,6 @@
 
 %include "enumtypesafe.swg"
 
-%include "typemaps.swg"
 
 %include "mgmapi/mgmglobals.i"
 
@@ -32,8 +31,24 @@
 %typemap(ctype) (BaseEventWrapper *) "ndb_logevent *";
 
 %typemap(csout) (BaseEventWrapper *) {
-  long cPtr = $imcall;
-  return (cPtr == 0) ? null :  new NdbLogEvent(cPtr,true);
+  IntPtr cPtr = $imcall;
+  NdbLogEvent ret = (cPtr == IntPtr.Zero) ? null :  new NdbLogEvent(cPtr,true);
+  if (mgmapiPINVOKE.SWIGPendingException.Pending) throw
mgmapiPINVOKE.SWIGPendingException.Retrieve();
+  return ret;
+
+ }
+
+%typemap(out) (BackupWrapper *) {
+  $result=$1->backupId;
+  free($1->theReply);
+  free($1);
+ }
+%typemap(imtype) (BackupWrapper *) "long";
+%typemap(cstype) (BackupWrapper *) "long";
+%typemap(ctype) (BackupWrapper *) "unsigned int";
+
+%typemap(csout) (BackupWrapper *) {
+  return $imcall;
  }
 
 

Thread
Rev 361: Fixed c# typemaps to make it actually build. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor11 Dec