Commit 304d9219 authored by Philip Chimento's avatar Philip Chimento

native: Fix signature of gjs_is_registered_native_module()

There were a bunch of unused parameters in here.
parent e86788f1
......@@ -503,8 +503,7 @@ static bool do_import(JSContext* context, JS::HandleObject obj, Importer* priv,
}
/* First try importing an internal module like gi */
if (priv->is_root &&
gjs_is_registered_native_module(context, obj, name.get())) {
if (priv->is_root && gjs_is_registered_native_module(name.get())) {
if (!gjs_import_native_module(context, obj, name.get()))
return false;
......
......@@ -55,19 +55,13 @@ gjs_register_native_module (const char *module_id,
/**
* gjs_is_registered_native_module:
* @context:
* @parent: the parent object defining the namespace
* @name: name of the module
*
* Checks if a native module corresponding to @name has already
* been registered. This is used to check to see if a name is a
* builtin module without starting to try and load it.
*/
bool
gjs_is_registered_native_module(JSContext *context,
JSObject *parent,
const char *name)
{
bool gjs_is_registered_native_module(const char* name) {
if (modules == NULL)
return false;
......
......@@ -41,9 +41,7 @@ void gjs_register_native_module (const char *module_id,
/* called by importer.c to to check for already loaded modules */
GJS_USE
bool gjs_is_registered_native_module(JSContext *context,
JSObject *parent,
const char *name);
bool gjs_is_registered_native_module(const char* name);
/* called by importer.cpp to load a statically linked native module */
GJS_JSAPI_RETURN_CONVENTION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment