we can't cast from apr_dso_sym_t directly to a function pointer (c99 says no no) so we must cast to intptr_t first.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4240 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
64c3ecf288
commit
681b8e94eb
|
@ -460,7 +460,7 @@ static switch_status_t sm_load_file(char *filename)
|
|||
}
|
||||
|
||||
status = apr_dso_sym(&function_handle, dso, "spidermonkey_init");
|
||||
spidermonkey_init = (spidermonkey_init_t) function_handle;
|
||||
spidermonkey_init = (spidermonkey_init_t)(intptr_t) function_handle;
|
||||
|
||||
if (spidermonkey_init == NULL) {
|
||||
err = "Cannot Load";
|
||||
|
@ -2209,12 +2209,12 @@ static JSBool js_log(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsva
|
|||
}
|
||||
|
||||
if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[1])))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char*) file, "console_log", line, level, "%s", msg);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "console_log", line, level, "%s", msg);
|
||||
return JS_TRUE;
|
||||
}
|
||||
} else if (argc > 0) {
|
||||
if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char*) file, "console_log", line, level, "%s", msg);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "console_log", line, level, "%s", msg);
|
||||
return JS_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue