[gjs: 8/9] gtype: Remove unused function



commit 886a9a17927e17160778b61ad82131b650a2579b
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Dec 22 22:32:16 2018 -0700

    gtype: Remove unused function
    
    With the new GI wrapper framework, this function is now not used.

 gi/gtype.cpp | 22 ----------------------
 gi/gtype.h   |  5 -----
 2 files changed, 27 deletions(-)
---
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index 4f46f367..d89e4377 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -235,25 +235,3 @@ gjs_typecheck_gtype (JSContext             *context,
 {
     return do_base_typecheck(context, obj, throw_error);
 }
-
-const char *
-gjs_get_names_from_gtype_and_gi_info(GType        gtype,
-                                     GIBaseInfo  *info,
-                                     const char **constructor_name)
-{
-    const char *ns;
-    /* ns is only used to set the JSClass->name field (exposed by
-     * Object.prototype.toString).
-     * We can safely set "unknown" if there is no info, as in that case
-     * the name is globally unique (it's a GType name). */
-    if (info) {
-        ns = g_base_info_get_namespace((GIBaseInfo*) info);
-        if (constructor_name)
-            *constructor_name = g_base_info_get_name((GIBaseInfo*) info);
-    } else {
-        ns = "unknown";
-        if (constructor_name)
-            *constructor_name = g_type_name(gtype);
-    }
-    return ns;
-}
diff --git a/gi/gtype.h b/gi/gtype.h
index d6f52582..b53ac5ce 100644
--- a/gi/gtype.h
+++ b/gi/gtype.h
@@ -47,11 +47,6 @@ bool        gjs_typecheck_gtype         (JSContext             *context,
                                          JS::HandleObject       obj,
                                          bool                   throw_error);
 
-GJS_USE
-const char *gjs_get_names_from_gtype_and_gi_info(GType        gtype,
-                                                 GIBaseInfo  *info,
-                                                 const char **constructor_name);
-
 G_END_DECLS
 
 #endif  /* __GJS_INTERFACE_H__ */


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