diff options
author | Chad Austin <chad@imvu.com> | 2013-02-01 18:52:37 -0800 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:23:55 +0300 |
commit | aef932e3a9278087e96b15c1d02e10e28ce58f47 (patch) | |
tree | f8eb1635c600d276583a8db9a694ef9686342d4b /system/lib | |
parent | 848c186df3a8f1eff6e7b1af0b08df25aefae0e3 (diff) |
Bring back EMSCRIPTEN_KEEPALIVE
Diffstat (limited to 'system/lib')
-rwxr-xr-x | system/lib/embind/bind.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/lib/embind/bind.cpp b/system/lib/embind/bind.cpp index cbb4b183..5e82bb7e 100755 --- a/system/lib/embind/bind.cpp +++ b/system/lib/embind/bind.cpp @@ -138,7 +138,7 @@ namespace emscripten { return derivationPath;
}
- void* __staticPointerCast(void* p, int from, int to) {
+ void* EMSCRIPTEN_KEEPALIVE __staticPointerCast(void* p, int from, int to) {
std::vector<std::vector<const __cxxabiv1::__class_type_info*>> paths;
int direction = 1;
@@ -176,7 +176,7 @@ namespace emscripten { // __getDynamicPointerType returns (for polymorphic types only!) the type of the instance actually
// pointed to.
- int __getDynamicPointerType(int p) {
+ int EMSCRIPTEN_KEEPALIVE __getDynamicPointerType(int p) {
void** vtable = *(void***)p;
return (int)static_cast<const std::type_info*>(vtable[-1]);
}
@@ -189,7 +189,7 @@ namespace emscripten { // __dynamicPointerCast performs a C++ dynamic_cast<>() operation, but allowing run-time specification of
// the from and to pointer types.
- int __dynamicPointerCast(int p, int to) {
+ int EMSCRIPTEN_KEEPALIVE __dynamicPointerCast(int p, int to) {
int ret = (int)__staticPointerCast((void *)p, __getDynamicPointerType(p), to);
if (ret < 0) {
return 0;
@@ -197,7 +197,7 @@ namespace emscripten { return ret;
}
- const char* __typeName(int p) {
+ const char* EMSCRIPTEN_KEEPALIVE __typeName(int p) {
const std::type_info* ti = (const std::type_info*)p;
size_t nameLen = std::min(strlen(ti->name()), (unsigned int)1024);
char* name = (char *)malloc(nameLen+1);
@@ -221,7 +221,7 @@ namespace emscripten { return bases;
}
- int __peek32(int p) {
+ int EMSCRIPTEN_KEEPALIVE __peek32(int p) {
return *(int *)p;
}
|