List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:July 26 2007 8:14pm
Subject:Rev 132: First step in handling C# input strings properly. Still not happy with it though. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connecto...
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------
revno: 132
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Thu 2007-07-26 13:14:25 -0700
message:
  First step in handling C# input strings properly. Still not happy with it though.
modified:
  csharp/ndbapi.i               
svn-v2:10@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-csharp%2fndb.i
=== modified file 'csharp/ndbapi.i'
--- a/csharp/ndbapi.i	2007-07-26 18:58:43 +0000
+++ b/csharp/ndbapi.i	2007-07-26 20:14:25 +0000
@@ -71,18 +71,15 @@
 }
   %}
 
-//%typemap(in) (const char* anInputString, size_t len) {
-  /* Check that we are getting a string */
- /* if (PyString_Check($input)) {
-    // We are going to try not copying this string, since it's not going to 
-    // be modified and we're going to copy it in the main function
-    $1=PyString_AsString($input); 
-    $2=PyString_Size($input);
-  } else { 
-    NDB_exception(NdbApiException,"Couldn't convert argument");
-  }
+//%typemap(cstype) (const char* anInputString, size_t len) "string";
+//%typemap(imtype) (const char* anInputString, size_t len) "string";
+//%typemap(csin) (const char* anInputString, size_t len) "$csinput, $csinput.Length"
+ 
+%typemap(in) (const char* anInputString, size_t len) { 
+  $1=$input; 
+  $2=strlen($input);
  }
-*/
+ 
 %typemap(freearg) (MYSQL_TIME *) {
   free((MYSQL_TIME *) $1);
  }

Thread
Rev 132: First step in handling C# input strings properly. Still not happy with it though. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connecto...Monty Taylor26 Jul