[gjs: 6/10] native: Fix signature of gjs_is_registered_native_module()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 6/10] native: Fix signature of gjs_is_registered_native_module()
- Date: Tue, 26 Feb 2019 10:03:50 +0000 (UTC)
commit 304d92198d2828c42c63223733a7be87cada7bd5
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Feb 24 12:47:34 2019 -0800
native: Fix signature of gjs_is_registered_native_module()
There were a bunch of unused parameters in here.
gjs/importer.cpp | 3 +--
gjs/native.cpp | 8 +-------
gjs/native.h | 4 +---
3 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 4b4963f3..aa6b80e9 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -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;
diff --git a/gjs/native.cpp b/gjs/native.cpp
index 2232e29a..be77dec1 100644
--- a/gjs/native.cpp
+++ b/gjs/native.cpp
@@ -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;
diff --git a/gjs/native.h b/gjs/native.h
index 9856671a..a0b4369e 100644
--- a/gjs/native.h
+++ b/gjs/native.h
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]