diff options
author | Rob Holland <rob@inversepath.com> | 2008-05-19 19:03:34 +0100 |
---|---|---|
committer | Rob Holland <rob@inversepath.com> | 2008-05-19 19:03:34 +0100 |
commit | 2310a487c78d2a1f27462c59181ac743612bd650 (patch) | |
tree | e4ede91a74db34fc876fb5d5758295b64169d61a | |
parent | e0791352124317682105e341b3ab11aadb6a9414 (diff) | |
download | third_party-sqlite3-ruby-2310a487c78d2a1f27462c59181ac743612bd650.tar.gz third_party-sqlite3-ruby-2310a487c78d2a1f27462c59181ac743612bd650.tar.xz third_party-sqlite3-ruby-2310a487c78d2a1f27462c59181ac743612bd650.zip |
rename data structures to avoid collion on win32. based on patch by: Luis Lavena
-rw-r--r-- | ext/sqlite3_api/sqlite3_api.i | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/sqlite3_api/sqlite3_api.i b/ext/sqlite3_api/sqlite3_api.i index 0cf74f4..b21e3c8 100644 --- a/ext/sqlite3_api/sqlite3_api.i +++ b/ext/sqlite3_api/sqlite3_api.i @@ -13,8 +13,8 @@ struct CallbackData { }; typedef struct CallbackData CallbackData; -typedef void BLOB; -typedef void VALBLOB; +typedef void RUBY_BLOB; +typedef void RUBY_VALBLOB; int Sqlite3_ruby_busy_handler(void* data,int value) { VALUE result; @@ -139,14 +139,14 @@ struct CallbackData { $result = ary; } -typedef void BLOB; -%typemap(out) const BLOB * { +typedef void RUBY_BLOB; +%typemap(out) const RUBY_BLOB * { $result = $1 ? rb_str_new( (char*)$1, sqlite3_column_bytes( arg1, arg2 ) ) : Qnil; } -typedef void VALBLOB; -%typemap(out) const VALBLOB * { +typedef void RUBY_VALBLOB; +%typemap(out) const RUBY_VALBLOB * { $result = $1 ? rb_str_new( (char*)$1, sqlite3_value_bytes( arg1 ) ) : Qnil; } @@ -304,7 +304,7 @@ int sqlite3_step(sqlite3_stmt*); int sqlite3_data_count(sqlite3_stmt*); -const BLOB *sqlite3_column_blob(sqlite3_stmt*,int); +const RUBY_BLOB *sqlite3_column_blob(sqlite3_stmt*,int); int sqlite3_column_bytes(sqlite3_stmt*,int); int sqlite3_column_bytes16(sqlite3_stmt*,int); double sqlite3_column_double(sqlite3_stmt*,int); @@ -323,7 +323,7 @@ int sqlite3_create_function16(sqlite3*,const void*str,int,int,void*,void(*func)( int sqlite3_aggregate_count(sqlite3_context*); -const VALBLOB *sqlite3_value_blob(sqlite3_value*); +const RUBY_VALBLOB *sqlite3_value_blob(sqlite3_value*); int sqlite3_value_bytes(sqlite3_value*); int sqlite3_value_bytes16(sqlite3_value*); double sqlite3_value_double(sqlite3_value*); |