From ec28b4e54d22479bcc37f4e236722c25f9f48147 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 31 Oct 2009 03:46:56 +0000 Subject: [PATCH] Fixed a FreeBSD gcc bug: function pointer variables can't begin with a dollar. --- Library.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library.cpp b/Library.cpp index cccd69b..a981b2b 100644 --- a/Library.cpp +++ b/Library.cpp @@ -1302,7 +1302,7 @@ static JSStaticFunction Type_staticFunctions[4] = { {NULL, NULL, 0} }; -static JSObjectRef (*$JSObjectMakeArray)(JSContextRef, size_t, const JSValueRef[], JSValueRef *); +static JSObjectRef (*JSObjectMakeArray$)(JSContextRef, size_t, const JSValueRef[], JSValueRef *); void CYSetArgs(int argc, const char *argv[]) { JSContextRef context(CYGetJSContext()); @@ -1311,9 +1311,9 @@ void CYSetArgs(int argc, const char *argv[]) { args[i] = CYCastJSValue(context, argv[i]); JSObjectRef array; - if ($JSObjectMakeArray != NULL) { + if (JSObjectMakeArray$ != NULL) { JSValueRef exception(NULL); - array = (*$JSObjectMakeArray)(context, argc, args, &exception); + array = (*JSObjectMakeArray$)(context, argc, args, &exception); CYThrow(context, exception); } else { JSValueRef value(CYCallAsFunction(context, Array_, NULL, argc, args)); @@ -1382,7 +1382,7 @@ void CYInitialize() { _aprcall(apr_pool_create(&Pool_, NULL)); _sqlcall(sqlite3_open("/usr/lib/libcycript.db", &Bridge_)); - $JSObjectMakeArray = reinterpret_cast(dlsym(RTLD_DEFAULT, "JSObjectMakeArray")); + JSObjectMakeArray$ = reinterpret_cast(dlsym(RTLD_DEFAULT, "JSObjectMakeArray")); } apr_pool_t *CYGetGlobalPool() { -- 2.47.2