[gjs: 19/26] arg: Remove unused argument



commit 94c95433990ce8a62be7ea4dda7f05f025e5f4b6
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 24 20:00:47 2019 -0700

    arg: Remove unused argument
    
    Rename gjs_g_argument_init_default() to gjs_gi_argument_... since the
    GArgument type was also renamed to GIArgument, and remove the unused
    JSContext argument from it.

 gi/arg.cpp      | 6 +-----
 gi/arg.h        | 4 +---
 gi/function.cpp | 3 ++-
 3 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 4b6b892b..9f980a7e 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -2047,11 +2047,7 @@ _Pragma("GCC diagnostic pop")
  * branch of GArgument. (Currently it appears that the return buffer
  * has a fixed size large enough for the union of all types.)
  */
-void
-gjs_g_argument_init_default(JSContext      *context,
-                            GITypeInfo     *type_info,
-                            GArgument      *arg)
-{
+void gjs_gi_argument_init_default(GITypeInfo* type_info, GIArgument* arg) {
     GITypeTag type_tag;
 
     type_tag = g_type_info_get_tag( (GITypeInfo*) type_info);
diff --git a/gi/arg.h b/gi/arg.h
index 76b8fe67..b60d4108 100644
--- a/gi/arg.h
+++ b/gi/arg.h
@@ -57,9 +57,7 @@ bool gjs_value_to_explicit_array(JSContext       *context,
                                  GIArgument      *arg,
                                  size_t          *length_p);
 
-void gjs_g_argument_init_default (JSContext      *context,
-                                  GITypeInfo     *type_info,
-                                  GArgument      *arg);
+void gjs_gi_argument_init_default(GITypeInfo* type_info, GIArgument* arg);
 
 GJS_JSAPI_RETURN_CONVENTION
 bool gjs_value_to_g_argument (JSContext      *context,
diff --git a/gi/function.cpp b/gi/function.cpp
index fffb3178..5859fcf7 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -453,7 +453,8 @@ out:
 
         /* Fill in the result with some hopefully neutral value */
         g_callable_info_load_return_type(trampoline->info, &ret_type);
-        gjs_g_argument_init_default (context, &ret_type, (GArgument *) result);
+        gjs_gi_argument_init_default(&ret_type,
+                                     static_cast<GIArgument*>(result));
 
         /* If the callback has a GError** argument and invoking the closure
          * returned an error, try to make a GError from it */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]