Created
February 23, 2011 19:50
-
-
Save springmeyer/841027 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
on osx with g++ i686-apple-darwin10-g++-4.2.1 I get: | |
lots of: | |
In file included from ../src/sqlite3.cc:8: | |
../src/database.h:48: error: a storage class can only be specified for objects and functions | |
../src/database.h:55: error: a storage class can only be specified for objects and functions | |
which can be fixed with: | |
<pre> | |
diff --git a/src/database.h b/src/database.h | |
index a41ad8d..30ae03a 100644 | |
--- a/src/database.h | |
+++ b/src/database.h | |
@@ -29,7 +29,7 @@ public: | |
return constructor_template->HasInstance(obj); | |
} | |
- static struct Baton { | |
+ struct Baton { | |
Database* db; | |
Persistent<Function> callback; | |
int status; | |
@@ -47,7 +47,7 @@ public: | |
} | |
}; | |
- static struct OpenBaton : Baton { | |
+ struct OpenBaton : Baton { | |
std::string filename; | |
int mode; | |
diff --git a/src/statement.h b/src/statement.h | |
index 54abb83..745b1cc 100644 | |
--- a/src/statement.h | |
+++ b/src/statement.h | |
@@ -78,7 +78,7 @@ public: | |
static void Init(Handle<Object> target); | |
static Handle<Value> New(const Arguments& args); | |
- static struct Baton { | |
+ struct Baton { | |
Statement* stmt; | |
Persistent<Function> callback; | |
Data::Parameters parameters; | |
@@ -95,26 +95,26 @@ public: | |
} | |
}; | |
- static struct RowBaton : Baton { | |
+ struct RowBaton : Baton { | |
RowBaton(Statement* stmt_, Handle<Function> cb_) : | |
Baton(stmt_, cb_) {} | |
Data::Row row; | |
}; | |
- static struct RunBaton : Baton { | |
+ struct RunBaton : Baton { | |
RunBaton(Statement* stmt_, Handle<Function> cb_) : | |
Baton(stmt_, cb_), inserted_id(0), changes(0) {} | |
sqlite3_int64 inserted_id; | |
int changes; | |
}; | |
- static struct RowsBaton : Baton { | |
+ struct RowsBaton : Baton { | |
RowsBaton(Statement* stmt_, Handle<Function> cb_) : | |
Baton(stmt_, cb_) {} | |
Data::Rows rows; | |
}; | |
- static struct PrepareBaton : Database::Baton { | |
+ struct PrepareBaton : Database::Baton { | |
Statement* stmt; | |
std::string sql; | |
PrepareBaton(Database* db_, Handle<Function> cb_, Statement* stmt_) : | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment