[gjs/wip/ptomato/mozjs31: 10/26] js: Remove remaining usage of JSBool



commit 3764f697be808433e154e2e35246255c8fa16ed7
Author: Philip Chimento <philip endlessm com>
Date:   Wed Sep 7 18:00:06 2016 -0700

    js: Remove remaining usage of JSBool
    
    Since mozjs31 does away with JSBool entirely, we can now replace the
    remaining occurrences of it in the API with C++ bool.

 gi/arg.cpp                        |    4 ++--
 gi/boxed.cpp                      |    8 ++++----
 gi/function.cpp                   |    8 ++++----
 gi/fundamental.cpp                |    2 +-
 gi/gerror.cpp                     |   10 +++++-----
 gi/gtype.cpp                      |    4 ++--
 gi/keep-alive.cpp                 |    2 +-
 gi/ns.cpp                         |    4 ++--
 gi/object.cpp                     |   26 +++++++++++++-------------
 gi/repo.cpp                       |    2 +-
 gi/union.cpp                      |    2 +-
 gi/value.cpp                      |    2 +-
 gjs/byteArray.cpp                 |   14 +++++++-------
 gjs/context.cpp                   |    8 ++++----
 gjs/coverage.cpp                  |    8 ++++----
 gjs/importer.cpp                  |    6 +++---
 gjs/jsapi-util-string.cpp         |    4 ++--
 gjs/jsapi-util.h                  |    6 +++---
 gjs/runtime.cpp                   |   10 +++++-----
 modules/cairo-context.cpp         |   32 ++++++++++++++++----------------
 modules/cairo-gradient.cpp        |    4 ++--
 modules/cairo-image-surface.cpp   |   10 +++++-----
 modules/cairo-pattern.cpp         |    2 +-
 modules/cairo-region.cpp          |    8 ++++----
 modules/cairo-solid-pattern.cpp   |    4 ++--
 modules/cairo-surface-pattern.cpp |    8 ++++----
 modules/cairo-surface.cpp         |    4 ++--
 modules/console.cpp               |    2 +-
 modules/system.cpp                |   12 ++++++------
 test/gjs-test-call-args.cpp       |    2 +-
 30 files changed, 109 insertions(+), 109 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 1ad0dd9..ef320a3 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -1252,7 +1252,7 @@ gjs_array_to_explicit_array_internal(JSContext       *context,
 {
     bool ret = false;
     GITypeInfo *param_info;
-    JSBool found_length;
+    bool found_length;
 
     param_info = g_type_info_get_param_type(type_info, 0);
 
@@ -1798,7 +1798,7 @@ gjs_value_to_g_argument(JSContext      *context,
          * JavaScript.
          */
         if (value.isObject()) {
-            JSBool found_length;
+            bool found_length;
             JS::RootedObject array_obj(context, &value.toObject());
             JS::RootedId length_name(context,
                 gjs_context_get_const_string(context, GJS_STRING_LENGTH));
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 60b3337..2b95d0a 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -615,7 +615,7 @@ get_nested_interface_object (JSContext   *context,
     return true;
 }
 
-static JSBool
+static bool
 boxed_field_getter (JSContext              *context,
                     JS::HandleObject        obj,
                     JS::HandleId            id,
@@ -793,11 +793,11 @@ out:
     return success;
 }
 
-static JSBool
+static bool
 boxed_field_setter (JSContext              *context,
                     JS::HandleObject        obj,
                     JS::HandleId            id,
-                    JSBool                  strict,
+                    bool                    strict,
                     JS::MutableHandleValue  value)
 {
     Boxed *priv;
@@ -872,7 +872,7 @@ define_boxed_class_fields (JSContext       *context,
     return true;
 }
 
-static JSBool
+static bool
 to_string_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
diff --git a/gi/function.cpp b/gi/function.cpp
index 9cca448..f1e0ffe 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1305,7 +1305,7 @@ release:
     }
 }
 
-static JSBool
+static bool
 function_call(JSContext *context,
               unsigned   js_argc,
               JS::Value *vp)
@@ -1368,7 +1368,7 @@ function_finalize(JSFreeOp *fop,
     g_slice_free(Function, priv);
 }
 
-static JSBool
+static bool
 get_num_arguments (JSContext *context,
                    unsigned   argc,
                    JS::Value *vp)
@@ -1397,7 +1397,7 @@ get_num_arguments (JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 function_to_string (JSContext *context,
                     guint      argc,
                     JS::Value *vp)
@@ -1649,7 +1649,7 @@ function_new(JSContext      *context,
              GICallableInfo *info)
 {
     Function *priv;
-    JSBool found;
+    bool found;
 
     /* put constructor for GIRepositoryFunction() in the global namespace */
     JS::RootedObject global(context, gjs_get_import_global(context));
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index d2a4cce..d18e4a9 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -494,7 +494,7 @@ fundamental_finalize(JSFreeOp  *fop,
     }
 }
 
-static JSBool
+static bool
 to_string_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index a70466b..bdac87c 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -144,7 +144,7 @@ error_finalize(JSFreeOp *fop,
     g_slice_free(Error, priv);
 }
 
-static JSBool
+static bool
 error_get_domain(JSContext *context,
                  unsigned   argc,
                  JS::Value *vp)
@@ -158,7 +158,7 @@ error_get_domain(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 error_get_message(JSContext *context,
                   unsigned   argc,
                   JS::Value *vp)
@@ -177,7 +177,7 @@ error_get_message(JSContext *context,
     return gjs_string_from_utf8(context, priv->gerror->message, -1, args.rval());
 }
 
-static JSBool
+static bool
 error_get_code(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -197,7 +197,7 @@ error_get_code(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 error_to_string(JSContext *context,
                 unsigned   argc,
                 JS::Value *vp)
@@ -239,7 +239,7 @@ error_to_string(JSContext *context,
     return retval;
 }
 
-static JSBool
+static bool
 error_constructor_value_of(JSContext *context,
                            unsigned   argc,
                            JS::Value *vp)
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index bc2eadb..12fa471 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -65,7 +65,7 @@ gjs_gtype_finalize(JSFreeOp *fop,
     g_type_set_qdata(gtype, gjs_get_gtype_wrapper_quark(), NULL);
 }
 
-static JSBool
+static bool
 to_string_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -87,7 +87,7 @@ to_string_func(JSContext *context,
     return ret;
 }
 
-static JSBool
+static bool
 get_name_func (JSContext *context,
                unsigned   argc,
                JS::Value *vp)
diff --git a/gi/keep-alive.cpp b/gi/keep-alive.cpp
index 00701f4..78bc23c 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -176,7 +176,7 @@ static JSObject *
 gjs_keep_alive_new(JSContext *context)
 {
     KeepAlive *priv;
-    JSBool found;
+    bool found;
 
     /* This function creates an unattached KeepAlive object; following our
      * general strategy, we have a single KeepAlive class with a constructor
diff --git a/gi/ns.cpp b/gi/ns.cpp
index c727aab..a6b99c8 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -126,7 +126,7 @@ ns_new_resolve(JSContext *context,
     return ret;
 }
 
-static JSBool
+static bool
 get_name (JSContext *context,
           unsigned   argc,
           JS::Value *vp)
@@ -193,7 +193,7 @@ ns_new(JSContext    *context,
        const char   *ns_name)
 {
     Ns *priv;
-    JSBool found;
+    bool found;
 
     /* put constructor in the global namespace */
     JS::RootedObject global(context, gjs_get_import_global(context));
diff --git a/gi/object.cpp b/gi/object.cpp
index 6000473..2ccb823 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -253,7 +253,7 @@ proto_priv_from_js(JSContext       *context,
 /* a hook on getting a property; set value_p to override property's value.
  * Return value is false on OOM/exception.
  */
-static JSBool
+static bool
 object_instance_get_prop(JSContext              *context,
                          JS::HandleObject        obj,
                          JS::HandleId            id,
@@ -323,11 +323,11 @@ object_instance_get_prop(JSContext              *context,
 /* a hook on setting a property; set value_p to override property value to
  * be set. Return value is false on OOM/exception.
  */
-static JSBool
+static bool
 object_instance_set_prop(JSContext              *context,
                          JS::HandleObject        obj,
                          JS::HandleId            id,
-                         JSBool                  strict,
+                         bool                    strict,
                          JS::MutableHandleValue  value_p)
 {
     ObjectInstance *priv;
@@ -1617,7 +1617,7 @@ real_connect_func(JSContext *context,
     return ret;
 }
 
-static JSBool
+static bool
 connect_after_func(JSContext *context,
                    unsigned   argc,
                    JS::Value *vp)
@@ -1625,7 +1625,7 @@ connect_after_func(JSContext *context,
     return real_connect_func(context, argc, vp, true);
 }
 
-static JSBool
+static bool
 connect_func(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
@@ -1633,7 +1633,7 @@ connect_func(JSContext *context,
     return real_connect_func(context, argc, vp, false);
 }
 
-static JSBool
+static bool
 emit_func(JSContext *context,
           unsigned   argc,
           JS::Value *vp)
@@ -1743,7 +1743,7 @@ emit_func(JSContext *context,
     return ret;
 }
 
-static JSBool
+static bool
 to_string_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -1780,7 +1780,7 @@ struct JSClass gjs_object_instance_class = {
     
 };
 
-static JSBool
+static bool
 init_func (JSContext *context,
            unsigned   argc,
            JS::Value *vp)
@@ -2222,7 +2222,7 @@ find_vfunc_info (JSContext *context,
     g_base_info_unref(struct_info);
 }
 
-static JSBool
+static bool
 gjs_hook_up_vfunc(JSContext *cx,
                   unsigned   argc,
                   JS::Value *vp)
@@ -2471,7 +2471,7 @@ gjs_object_set_gproperty (GObject      *object,
     jsobj_set_gproperty(context, js_obj, value, pspec);
 }
 
-static JSBool
+static bool
 gjs_override_property(JSContext *cx,
                       unsigned   argc,
                       JS::Value *vp)
@@ -2734,7 +2734,7 @@ save_properties_for_class_init(JSContext       *cx,
     return true;
 }
 
-static JSBool
+static bool
 gjs_register_interface(JSContext *cx,
                        unsigned   argc,
                        JS::Value *vp)
@@ -2816,7 +2816,7 @@ gjs_register_interface(JSContext *cx,
     return true;
 }
 
-static JSBool
+static bool
 gjs_register_type(JSContext *cx,
                   unsigned   argc,
                   JS::Value *vp)
@@ -2918,7 +2918,7 @@ gjs_register_type(JSContext *cx,
     return true;
 }
 
-static JSBool
+static bool
 gjs_signal_new(JSContext *cx,
                unsigned   argc,
                JS::Value *vp)
diff --git a/gi/repo.cpp b/gi/repo.cpp
index 09ef1f0..9eaa4f4 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -246,7 +246,7 @@ repo_new(JSContext *context)
     Repo *priv;
     JSObject *versions;
     JSObject *private_ns;
-    JSBool found;
+    bool found;
     jsid versions_name, private_ns_name;
 
     JS::RootedObject global(context, gjs_get_import_global(context));
diff --git a/gi/union.cpp b/gi/union.cpp
index 2229d6d..c319b19 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -280,7 +280,7 @@ union_finalize(JSFreeOp *fop,
     g_slice_free(Union, priv);
 }
 
-static JSBool
+static bool
 to_string_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
diff --git a/gi/value.cpp b/gi/value.cpp
index bb27e1c..635a5e6 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -485,7 +485,7 @@ gjs_value_to_g_value_internal(JSContext      *context,
 
         g_value_set_object(gvalue, gobj);
     } else if (gtype == G_TYPE_STRV) {
-        JSBool found_length;
+        bool found_length;
         JS::RootedId length_name(context,
             gjs_context_get_const_string(context, GJS_STRING_LENGTH));
 
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index d4b77d8..ed8e590 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -219,7 +219,7 @@ byte_array_get_prop(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 byte_array_length_getter(JSContext *context,
                          unsigned   argc,
                          JS::Value *vp)
@@ -238,7 +238,7 @@ byte_array_length_getter(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 byte_array_length_setter(JSContext *context,
                          unsigned   argc,
                          JS::Value *vp)
@@ -401,7 +401,7 @@ byte_array_finalize(JSFreeOp *fop,
 }
 
 /* implement toString() with an optional encoding arg */
-static JSBool
+static bool
 to_string_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -489,7 +489,7 @@ to_string_func(JSContext *context,
     }
 }
 
-static JSBool
+static bool
 to_gbytes_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -547,7 +547,7 @@ byte_array_new(JSContext *context)
 }
 
 /* fromString() function implementation */
-static JSBool
+static bool
 from_string_func(JSContext *context,
                  unsigned   argc,
                  JS::Value *vp)
@@ -643,7 +643,7 @@ from_string_func(JSContext *context,
 }
 
 /* fromArray() function implementation */
-static JSBool
+static bool
 from_array_func(JSContext *context,
                 unsigned   argc,
                 JS::Value *vp)
@@ -704,7 +704,7 @@ from_array_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 from_gbytes_func(JSContext *context,
                  unsigned   argc,
                  JS::Value *vp)
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 87d9960..3f55610 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -102,7 +102,7 @@ enum {
 static GMutex contexts_lock;
 static GList *all_contexts = NULL;
 
-static JSBool
+static bool
 gjs_log(JSContext *context,
         unsigned   argc,
         JS::Value *vp)
@@ -146,7 +146,7 @@ gjs_log(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_log_error(JSContext *context,
               unsigned   argc,
               JS::Value *vp)
@@ -233,7 +233,7 @@ gjs_print_parse_args(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_print(JSContext *context,
           unsigned   argc,
           JS::Value *vp)
@@ -252,7 +252,7 @@ gjs_print(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_printerr(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index f016137..1338ed9 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1306,7 +1306,7 @@ gjs_context_eval_file_in_compartment(GjsContext      *context,
     return true;
 }
 
-static JSBool
+static bool
 coverage_log(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
@@ -1365,7 +1365,7 @@ get_filename_from_filename_as_js_string(JSContext    *context,
     return filename;
 }
 
-static JSBool
+static bool
 coverage_get_file_modification_time(JSContext *context,
                                     unsigned  argc,
                                     JS::Value *vp)
@@ -1398,7 +1398,7 @@ out:
     return ret;
 }
 
-static JSBool
+static bool
 coverage_get_file_checksum(JSContext *context,
                            unsigned  argc,
                            JS::Value *vp)
@@ -1426,7 +1426,7 @@ coverage_get_file_checksum(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 coverage_get_file_contents(JSContext *context,
                            unsigned   argc,
                            JS::Value *vp)
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 1b7f9cc..edb78d2 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -157,7 +157,7 @@ seal_import(JSContext  *context,
             JSObject   *obj,
             const char *name)
 {
-    JSBool found;
+    bool found;
     unsigned attrs;
 
     if (!JS_GetPropertyAttributes(context, obj, name,
@@ -297,7 +297,7 @@ load_module_init(JSContext       *context,
                  JS::HandleObject in_object,
                  const char      *full_path)
 {
-    JSBool found;
+    bool found;
     GFile *file;
 
     /* First we check if js module has already been loaded  */
@@ -918,7 +918,7 @@ importer_new(JSContext *context,
              bool       is_root)
 {
     Importer *priv;
-    JSBool found;
+    bool found;
 
     JS::RootedObject global(context, gjs_get_import_global(context));
 
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index e2e325a..421f582 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -28,7 +28,7 @@
 #include "jsapi-util.h"
 #include "jsapi-wrapper.h"
 
-JSBool
+bool
 gjs_string_to_utf8 (JSContext      *context,
                     const JS::Value value,
                     char          **utf8_string_p)
@@ -104,7 +104,7 @@ gjs_string_from_utf8(JSContext             *context,
     return str != NULL;
 }
 
-JSBool
+bool
 gjs_string_to_filename(JSContext      *context,
                        const JS::Value filename_val,
                        char          **filename_string_p)
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 50980b0..95be91d 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -244,7 +244,7 @@ gjs_##cname##_create_proto(JSContext *context,                                 \
  * Prototype a constructor.
  */
 #define GJS_NATIVE_CONSTRUCTOR_DECLARE(name)            \
-static JSBool                                           \
+static bool                                             \
 gjs_##name##_constructor(JSContext  *context,           \
                          unsigned    argc,              \
                          JS::Value  *vp)
@@ -392,7 +392,7 @@ void        gjs_error_reporter               (JSContext       *context,
                                               const char      *message,
                                               JSErrorReport   *report);
 
-JSBool      gjs_string_to_utf8               (JSContext       *context,
+bool        gjs_string_to_utf8               (JSContext       *context,
                                               const JS::Value  string_val,
                                               char           **utf8_string_p);
 bool gjs_string_from_utf8(JSContext             *context,
@@ -400,7 +400,7 @@ bool gjs_string_from_utf8(JSContext             *context,
                           ssize_t                n_bytes,
                           JS::MutableHandleValue value_p);
 
-JSBool      gjs_string_to_filename           (JSContext       *context,
+bool        gjs_string_to_filename           (JSContext       *context,
                                               const JS::Value  string_val,
                                               char           **filename_string_p);
 bool gjs_string_from_filename(JSContext             *context,
diff --git a/gjs/runtime.cpp b/gjs/runtime.cpp
index 512733c..6fd9467 100644
--- a/gjs/runtime.cpp
+++ b/gjs/runtime.cpp
@@ -45,7 +45,7 @@ gjs_runtime_is_sweeping (JSRuntime *runtime)
  * to UTF-8, using the appropriate GLib functions, and converting
  * back if necessary.
  */
-static JSBool
+static bool
 gjs_locale_to_upper_case (JSContext *context,
                           JS::HandleString src,
                           JS::MutableHandleValue retval)
@@ -71,7 +71,7 @@ out:
     return success;
 }
 
-static JSBool
+static bool
 gjs_locale_to_lower_case (JSContext *context,
                           JS::HandleString src,
                           JS::MutableHandleValue retval)
@@ -97,7 +97,7 @@ out:
     return success;
 }
 
-static JSBool
+static bool
 gjs_locale_compare (JSContext *context,
                     JS::HandleString src_1,
                     JS::HandleString src_2,
@@ -121,7 +121,7 @@ out:
     return success;
 }
 
-static JSBool
+static bool
 gjs_locale_to_unicode (JSContext  *context,
                        const char *src,
                        JS::MutableHandleValue retval)
@@ -168,7 +168,7 @@ static JSLocaleCallbacks gjs_locale_callbacks =
 static void
 gjs_finalize_callback(JSFreeOp         *fop,
                       JSFinalizeStatus  status,
-                      JSBool            isCompartment)
+                      bool              isCompartment)
 {
   JSRuntime *runtime;
   RuntimeData *data;
diff --git a/modules/cairo-context.cpp b/modules/cairo-context.cpp
index 288b74e..24ec1b6 100644
--- a/modules/cairo-context.cpp
+++ b/modules/cairo-context.cpp
@@ -33,7 +33,7 @@
 #include "cairo-private.h"
 
 #define _GJS_CAIRO_CONTEXT_DEFINE_FUNC_BEGIN(mname) \
-static JSBool                                       \
+static bool                                         \
 mname##_func(JSContext *context,                    \
               unsigned   argc,                      \
               JS::Value *vp)                        \
@@ -389,7 +389,7 @@ _GJS_CAIRO_CONTEXT_DEFINE_FUNC2FFAFF(userToDevice, cairo_user_to_device, "x", "y
 _GJS_CAIRO_CONTEXT_DEFINE_FUNC2FFAFF(userToDeviceDistance, cairo_user_to_device_distance, "x", "y")
 
 
-static JSBool
+static bool
 dispose_func(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
@@ -404,7 +404,7 @@ dispose_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 appendPath_func(JSContext *context,
                 unsigned   argc,
                 JS::Value *vp)
@@ -429,7 +429,7 @@ appendPath_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 copyPath_func(JSContext *context,
               unsigned   argc,
               JS::Value *vp)
@@ -446,7 +446,7 @@ copyPath_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 copyPathFlat_func(JSContext *context,
                   unsigned   argc,
                   JS::Value *vp)
@@ -463,7 +463,7 @@ copyPathFlat_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 mask_func(JSContext *context,
           unsigned   argc,
           JS::Value *vp)
@@ -492,7 +492,7 @@ mask_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 maskSurface_func(JSContext *context,
                  unsigned   argc,
                  JS::Value *vp)
@@ -524,7 +524,7 @@ maskSurface_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 setDash_func(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
@@ -579,7 +579,7 @@ setDash_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 setSource_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -609,7 +609,7 @@ setSource_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 setSourceSurface_func(JSContext *context,
                       unsigned   argc,
                       JS::Value *vp)
@@ -642,7 +642,7 @@ setSourceSurface_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 showText_func(JSContext *context,
               unsigned   argc,
               JS::Value *vp)
@@ -666,7 +666,7 @@ showText_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 selectFontFace_func(JSContext *context,
                     unsigned   argc,
                     JS::Value *vp)
@@ -693,7 +693,7 @@ selectFontFace_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 popGroup_func(JSContext *context,
               unsigned   argc,
               JS::Value *vp)
@@ -723,7 +723,7 @@ popGroup_func(JSContext *context,
 
     return true;
 }
-static JSBool
+static bool
 getSource_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -754,7 +754,7 @@ getSource_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getTarget_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -785,7 +785,7 @@ getTarget_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getGroupTarget_func(JSContext *context,
                     unsigned   argc,
                     JS::Value *vp)
diff --git a/modules/cairo-gradient.cpp b/modules/cairo-gradient.cpp
index 3fd5e14..7bd6999 100644
--- a/modules/cairo-gradient.cpp
+++ b/modules/cairo-gradient.cpp
@@ -43,7 +43,7 @@ JSPropertySpec gjs_cairo_gradient_proto_props[] = {
 
 /* Methods */
 
-static JSBool
+static bool
 addColorStopRGB_func(JSContext *context,
                      unsigned   argc,
                      JS::Value *vp)
@@ -70,7 +70,7 @@ addColorStopRGB_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 addColorStopRGBA_func(JSContext *context,
                       unsigned   argc,
                       JS::Value *vp)
diff --git a/modules/cairo-image-surface.cpp b/modules/cairo-image-surface.cpp
index ee0e4d2..c35ebc6 100644
--- a/modules/cairo-image-surface.cpp
+++ b/modules/cairo-image-surface.cpp
@@ -69,7 +69,7 @@ JSPropertySpec gjs_cairo_image_surface_proto_props[] = {
     JS_PS_END
 };
 
-static JSBool
+static bool
 createFromPNG_func(JSContext *context,
                    unsigned   argc,
                    JS::Value *vp)
@@ -100,7 +100,7 @@ createFromPNG_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getFormat_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -124,7 +124,7 @@ getFormat_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getWidth_func(JSContext *context,
               unsigned   argc,
               JS::Value *vp)
@@ -148,7 +148,7 @@ getWidth_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getHeight_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -172,7 +172,7 @@ getHeight_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getStride_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
diff --git a/modules/cairo-pattern.cpp b/modules/cairo-pattern.cpp
index 7d00ffe..5c3ef12 100644
--- a/modules/cairo-pattern.cpp
+++ b/modules/cairo-pattern.cpp
@@ -57,7 +57,7 @@ JSPropertySpec gjs_cairo_pattern_proto_props[] = {
 
 /* Methods */
 
-static JSBool
+static bool
 getType_func(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
diff --git a/modules/cairo-region.cpp b/modules/cairo-region.cpp
index 5aa5f39..f53ca60 100644
--- a/modules/cairo-region.cpp
+++ b/modules/cairo-region.cpp
@@ -63,7 +63,7 @@ fill_rectangle(JSContext             *context,
     return gjs_cairo_check_status(context, cairo_region_status(this_region), "region");
 
 #define REGION_DEFINE_REGION_FUNC(method)                       \
-    static JSBool                                               \
+    static bool                                                 \
     method##_func(JSContext *context,                           \
                   unsigned argc,                                \
                   JS::Value *vp)                                \
@@ -83,7 +83,7 @@ fill_rectangle(JSContext             *context,
     }
 
 #define REGION_DEFINE_RECT_FUNC(method)                         \
-    static JSBool                                               \
+    static bool                                                 \
     method##_rectangle_func(JSContext *context,                 \
                             unsigned argc,                      \
                             JS::Value *vp)                      \
@@ -166,7 +166,7 @@ make_rectangle(JSContext *context,
     return rect_obj;
 }
 
-static JSBool
+static bool
 num_rectangles_func(JSContext *context,
                     unsigned argc,
                     JS::Value *vp)
@@ -182,7 +182,7 @@ num_rectangles_func(JSContext *context,
     RETURN_STATUS;
 }
 
-static JSBool
+static bool
 get_rectangle_func(JSContext *context,
                    unsigned argc,
                    JS::Value *vp)
diff --git a/modules/cairo-solid-pattern.cpp b/modules/cairo-solid-pattern.cpp
index 39b2c34..bfab26b 100644
--- a/modules/cairo-solid-pattern.cpp
+++ b/modules/cairo-solid-pattern.cpp
@@ -40,7 +40,7 @@ JSPropertySpec gjs_cairo_solid_pattern_proto_props[] = {
     JS_PS_END
 };
 
-static JSBool
+static bool
 createRGB_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -68,7 +68,7 @@ createRGB_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 createRGBA_func(JSContext *context,
                 unsigned   argc,
                 JS::Value *vp)
diff --git a/modules/cairo-surface-pattern.cpp b/modules/cairo-surface-pattern.cpp
index 4df6c6a..136f348 100644
--- a/modules/cairo-surface-pattern.cpp
+++ b/modules/cairo-surface-pattern.cpp
@@ -74,7 +74,7 @@ JSPropertySpec gjs_cairo_surface_pattern_proto_props[] = {
 };
 
 
-static JSBool
+static bool
 setExtend_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -97,7 +97,7 @@ setExtend_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getExtend_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -122,7 +122,7 @@ getExtend_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 setFilter_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -145,7 +145,7 @@ setFilter_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getFilter_func(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
diff --git a/modules/cairo-surface.cpp b/modules/cairo-surface.cpp
index 2eb8614..7288032 100644
--- a/modules/cairo-surface.cpp
+++ b/modules/cairo-surface.cpp
@@ -57,7 +57,7 @@ JSPropertySpec gjs_cairo_surface_proto_props[] = {
 };
 
 /* Methods */
-static JSBool
+static bool
 writeToPNG_func(JSContext *context,
                 unsigned   argc,
                 JS::Value *vp)
@@ -84,7 +84,7 @@ writeToPNG_func(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 getType_func(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
diff --git a/modules/console.cpp b/modules/console.cpp
index f183269..6c563a8 100644
--- a/modules/console.cpp
+++ b/modules/console.cpp
@@ -153,7 +153,7 @@ gjs_console_readline(JSContext *cx, char **bufp, FILE *file, const char *prompt)
 }
 #endif
 
-static JSBool
+static bool
 gjs_console_interact(JSContext *context,
                      unsigned   argc,
                      JS::Value *vp)
diff --git a/modules/system.cpp b/modules/system.cpp
index f898166..37faef5 100644
--- a/modules/system.cpp
+++ b/modules/system.cpp
@@ -34,7 +34,7 @@
 #include "gjs/jsapi-util-args.h"
 #include "system.h"
 
-static JSBool
+static bool
 gjs_address_of(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -56,7 +56,7 @@ gjs_address_of(JSContext *context,
     return ret;
 }
 
-static JSBool
+static bool
 gjs_refcount(JSContext *context,
              unsigned   argc,
              JS::Value *vp)
@@ -80,7 +80,7 @@ gjs_refcount(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_breakpoint(JSContext *context,
                unsigned   argc,
                JS::Value *vp)
@@ -93,7 +93,7 @@ gjs_breakpoint(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_gc(JSContext *context,
        unsigned   argc,
        JS::Value *vp)
@@ -106,7 +106,7 @@ gjs_gc(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_exit(JSContext *context,
          unsigned   argc,
          JS::Value *vp)
@@ -120,7 +120,7 @@ gjs_exit(JSContext *context,
     return true;
 }
 
-static JSBool
+static bool
 gjs_clear_date_caches(JSContext *context,
                       unsigned   argc,
                       JS::Value *vp)
diff --git a/test/gjs-test-call-args.cpp b/test/gjs-test-call-args.cpp
index 66326be..2a6636b 100644
--- a/test/gjs-test-call-args.cpp
+++ b/test/gjs-test-call-args.cpp
@@ -30,7 +30,7 @@ typedef enum _test_signed_enum {
 } test_signed_enum_t;
 
 #define JSNATIVE_TEST_FUNC_BEGIN(name)                      \
-    static JSBool                                           \
+    static bool                                             \
     name(JSContext *cx,                                     \
          unsigned   argc,                                   \
          JS::Value *vp)                                     \


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