1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

Change smjs_get_elinks_object to use smjs_global_object instead of

an argument.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-24 03:43:53 +00:00 committed by Miciah Dashiel Butler Masters
parent d6ecf895ce
commit 60dd7515f9
3 changed files with 6 additions and 5 deletions

View File

@ -112,7 +112,7 @@ init_smjs(struct module *module)
smjs_init_global_object();
smjs_elinks_object = smjs_get_elinks_object(smjs_global_object);
smjs_elinks_object = smjs_get_elinks_object();
smjs_load_hooks();
}

View File

@ -10,6 +10,7 @@
#include "scripting/scripting.h"
#include "scripting/smjs/core.h"
#include "scripting/smjs/elinks_object.h"
#include "scripting/smjs/global_object.h"
static JSBool
@ -45,12 +46,12 @@ static const JSFunctionSpec elinks_funcs[] = {
};
JSObject *
smjs_get_elinks_object(JSObject *global_object)
smjs_get_elinks_object(void)
{
assert(smjs_ctx);
assert(global_object);
assert(smjs_global_object);
return JS_InitClass(smjs_ctx, global_object, NULL,
return JS_InitClass(smjs_ctx, smjs_global_object, NULL,
(JSClass *) &elinks_class, NULL, 0, NULL,
(JSFunctionSpec *) elinks_funcs, NULL, NULL);
}

View File

@ -3,7 +3,7 @@
#include "ecmascript/spidermonkey/util.h"
JSObject *smjs_get_elinks_object(JSObject *global_object);
JSObject *smjs_get_elinks_object(void);
JSBool smjs_invoke_elinks_object_method(unsigned char *method,
jsval argv[], int argc, jsval *rval);