[gjs: 8/9] native: rename file name as parse_name
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 8/9] native: rename file name as parse_name
- Date: Tue, 6 Nov 2018 04:06:32 +0000 (UTC)
commit e0f0707078a1aae5d62452134da4b73bbbe2319c
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Sun Nov 4 21:20:57 2018 -0600
native: rename file name as parse_name
To make it clear that it should be of the same format of g_file_get_parse_name
gjs/native.cpp | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gjs/native.cpp b/gjs/native.cpp
index c7f6dcb9..2232e29a 100644
--- a/gjs/native.cpp
+++ b/gjs/native.cpp
@@ -77,8 +77,9 @@ gjs_is_registered_native_module(JSContext *context,
/**
* gjs_load_native_module:
* @context: the #JSContext
- * @name: Name under which the module was registered with
- * gjs_register_native_module()
+ * @parse_name: Name under which the module was registered with
+ * gjs_register_native_module(), should be in the format as returned by
+ * g_file_get_parse_name()
* @module_out: Return location for a #JSObject
*
* Loads a builtin native-code module called @name into @module_out.
@@ -87,24 +88,24 @@ gjs_is_registered_native_module(JSContext *context,
*/
bool
gjs_load_native_module(JSContext *context,
- const char *name,
+ const char *parse_name,
JS::MutableHandleObject module_out)
{
GjsDefineModuleFunc func;
gjs_debug(GJS_DEBUG_NATIVE,
"Defining native module '%s'",
- name);
+ parse_name);
if (modules != NULL)
- func = (GjsDefineModuleFunc) g_hash_table_lookup(modules, name);
+ func = (GjsDefineModuleFunc) g_hash_table_lookup(modules, parse_name);
else
func = NULL;
if (!func) {
gjs_throw(context,
"No native module '%s' has registered itself",
- name);
+ parse_name);
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]