Created
March 16, 2009 11:53
-
-
Save nahi/79843 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- sqlite3_api.i.org 2008-05-25 12:52:41.000000000 +0900 | |
+++ sqlite3_api.i 2009-03-16 20:45:51.000000000 +0900 | |
@@ -159,9 +159,9 @@ typedef void RUBY_VALBLOB; | |
} | |
-%typemap(in) (const char * sql,int,sqlite3_stmt**,const char**) (sqlite3_stmt *stmt, char *errmsg) { | |
+%typemap(in) (const char * sql,int,sqlite3_stmt**,const char**) (sqlite3_stmt *stmt, char *remainder = NULL) { | |
$1 = RSTRING_PTR($input); | |
$2 = RSTRING_LEN($input); | |
$3 = &stmt2; | |
- $4 = &errmsg2; | |
+ $4 = &remainder2; | |
} | |
@@ -171,13 +171,13 @@ typedef void RUBY_VALBLOB; | |
rb_ary_push( ary, $result ); | |
rb_ary_push( ary, SWIG_NewPointerObj( stmt2, SWIGTYPE_p_sqlite3_stmt, 0 ) ); | |
- rb_ary_push( ary, errmsg2 ? rb_str_new2( errmsg2 ) : Qnil ); | |
+ rb_ary_push( ary, remainder2 ? rb_str_new2( remainder2 ) : Qnil ); | |
$result = ary; | |
} | |
-%typemap(in) (const void* sql,int,sqlite3_stmt**,const void**) (sqlite3_stmt *stmt, void *errmsg) { | |
+%typemap(in) (const void* sql,int,sqlite3_stmt**,const void**) (sqlite3_stmt *stmt, void *remainder = NULL) { | |
$1 = RSTRING_PTR($input); | |
$2 = RSTRING_LEN($input); | |
$3 = &stmt2; | |
- $4 = &errmsg2; | |
+ $4 = &remainder2; | |
} | |
@@ -186,10 +186,10 @@ typedef void RUBY_VALBLOB; | |
int i; | |
- for( i = 0; ((char*)errmsg2)[i]; i += 2 ); | |
+ for( i = 0; ((char*)remainder2)[i]; i += 2 ); | |
ary = rb_ary_new2(3); | |
rb_ary_push( ary, $result ); | |
rb_ary_push( ary, SWIG_NewPointerObj( stmt2, SWIGTYPE_p_sqlite3_stmt, 0 ) ); | |
- rb_ary_push( ary, errmsg2 ? rb_str_new( (char*)errmsg2, i ) : Qnil ); | |
+ rb_ary_push( ary, remainder2 ? rb_str_new( (char*)remainder2, i ) : Qnil ); | |
$result = ary; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment