[Freeswitch-svn] [commit] r4240 - freeswitch/trunk/src/mod/languages/mod_spidermonkey

Freeswitch SVN mikej at freeswitch.org
Tue Feb 13 15:59:17 EST 2007


Author: mikej
Date: Tue Feb 13 15:59:17 2007
New Revision: 4240

Modified:
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

Log:
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.

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Tue Feb 13 15:59:17 2007
@@ -460,7 +460,7 @@
 		}
 
 		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 @@
 		}
 
 		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;
 		}
 	}



More information about the Freeswitch-svn mailing list