From d0955e5e8dee6ac8182f72d977a7a90f72bd30a7 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 1 Mar 2006 23:50:07 +0000 Subject: [PATCH] fix windows build and load for mod_spidermonkey. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@723 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 6bb8408b99..1e9ce2fc23 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -591,9 +591,9 @@ static JSBool session_wait_for_answer(JSContext *cx, JSObject *obj, uintN argc, switch_channel *channel; switch_time_t started; unsigned int elapsed; + int32 timeout = 60; channel = switch_core_session_get_channel(jss->session); assert(channel != NULL); - int32 timeout = 60; started = switch_time_now(); if (argc > 0) { @@ -1608,16 +1608,16 @@ static void js_exec(switch_core_session *session, char *data) } } -static void *js_thread_run(switch_thread *thread, void *obj) +static void *SWITCH_THREAD_FUNC js_thread_run(switch_thread *thread, void *obj) { JSContext *cx = NULL; JSObject *javascript_global_object = NULL; - cx = JS_NewContext(globals.rt, globals.gStackChunkSize); char buf[1024]; char *code, *next, *arg, *nextarg; jsval rval; int x = 0; char *input_code = obj; + cx = JS_NewContext(globals.rt, globals.gStackChunkSize); javascript_global_object = JS_NewObject(cx, &global_class, NULL, NULL); env_init(cx, javascript_global_object); @@ -1718,7 +1718,7 @@ static switch_loadable_module_interface spidermonkey_module_interface = { /*.directory_interface */ NULL }; -switch_status switch_module_load(const switch_loadable_module_interface **interface, char *filename) +SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename) { switch_status status;