[gjs: 1/3] importer: Remove usage of deprecated G_CONST_RETURN



commit a89c49b917257cdfc7fab85fb7af99bca33ffe16
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Jun 19 18:55:43 2019 -0700

    importer: Remove usage of deprecated G_CONST_RETURN
    
    This should be replaced by regular old const.

 gjs/importer.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 722cbbb1..8d0d7401 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -870,15 +870,13 @@ importer_new(JSContext *context,
 }
 
 GJS_USE
-static G_CONST_RETURN char * G_CONST_RETURN *
-gjs_get_search_path(void)
-{
+static const char* const* gjs_get_search_path(void) {
     char **search_path;
 
     /* not thread safe */
 
     if (!gjs_search_path) {
-        G_CONST_RETURN gchar* G_CONST_RETURN * system_data_dirs;
+        const char* const* system_data_dirs;
         const char *envstr;
         GPtrArray *path;
         gsize i;
@@ -929,7 +927,7 @@ gjs_get_search_path(void)
         search_path = gjs_search_path;
     }
 
-    return (G_CONST_RETURN char * G_CONST_RETURN *)search_path;
+    return const_cast<const char* const*>(search_path);
 }
 
 GJS_JSAPI_RETURN_CONVENTION


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