[gjs/april-maintenance: 14/14] importer: Remove outdated comment



commit 515517b36fa236538bc3fab34b1325e8e7018f05
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Apr 7 18:03:35 2020 -0700

    importer: Remove outdated comment

 gjs/importer.cpp | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 5a15b3ee..cdf19cc4 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -213,18 +213,13 @@ import_directory(JSContext          *context,
                  const char         *name,
                  const char * const *full_paths)
 {
-    JSObject *importer;
-
     gjs_debug(GJS_DEBUG_IMPORTER,
               "Importing directory '%s'",
               name);
 
-    /* We define a sub-importer that has only the given directories on
-     * its search path. gjs_define_importer() exits if it fails, so
-     * this always succeeds.
-     */
-    importer = gjs_define_importer(context, obj, name, full_paths, false);
-    return importer != nullptr;
+    // We define a sub-importer that has only the given directories on its
+    // search path.
+    return !!gjs_define_importer(context, obj, name, full_paths, false);
 }
 
 /* Make the property we set in gjs_module_import() permanent;


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