[Freeswitch-svn] [commit] r5437 - freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db
Freeswitch SVN
anthm at freeswitch.org
Thu Jun 21 21:55:48 EDT 2007
Author: anthm
Date: Thu Jun 21 21:55:48 2007
New Revision: 5437
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
Log:
fix core db for js
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c Thu Jun 21 21:55:48 2007
@@ -242,6 +242,16 @@
};
+static JSBool db_setProperty(JSContext * cx, JSObject * obj, jsval id, jsval *vp)
+{
+ char *name = JS_GetStringBytes(JS_ValueToString(cx, id));
+
+ if (strcmp(name, "_dB_RoW_DaTa_")) {
+ *vp = BOOLEAN_TO_JSVAL(JS_FALSE);
+ }
+ return JS_TRUE;
+}
+
static JSBool db_getProperty(JSContext * cx, JSObject * obj, jsval id, jsval * vp)
{
JSBool res = JS_TRUE;
@@ -268,7 +278,7 @@
JSClass db_class = {
modname, JSCLASS_HAS_PRIVATE,
- JS_PropertyStub, JS_PropertyStub, db_getProperty, DEFAULT_SET_PROPERTY,
+ JS_PropertyStub, JS_PropertyStub, db_getProperty, db_setProperty,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, db_destroy, NULL, NULL, NULL,
db_construct
};
More information about the Freeswitch-svn
mailing list