[gjs: 1/6] jsapi-util-args: Fix obsolete comments




commit 13c1beb1991a60be3c3252936c82a839762b093a
Author: Philip Chimento <philip chimento gmail com>
Date:   Thu Jul 1 21:53:28 2021 -0700

    jsapi-util-args: Fix obsolete comments
    
    Remove one comment; we do not want to box primitive types if a JSNative
    function is expecting an object. That would be very confusing.
    The other is a doc comment with the parameters out of order.

 gjs/jsapi-util-args.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gjs/jsapi-util-args.h b/gjs/jsapi-util-args.h
index c1db289a..e80495ae 100644
--- a/gjs/jsapi-util-args.h
+++ b/gjs/jsapi-util-args.h
@@ -51,8 +51,6 @@ static inline void assign(JSContext*, char c, bool nullable,
     *ref = value.toBoolean();
 }
 
-/* This preserves the previous behaviour of gjs_parse_args(), but maybe we want
- * to box primitive types instead of throwing? */
 GJS_ALWAYS_INLINE
 static inline void assign(JSContext*, char c, bool nullable,
                           JS::HandleValue value, JS::MutableHandleObject ref) {
@@ -287,8 +285,8 @@ GJS_JSAPI_RETURN_CONVENTION [[maybe_unused]] static bool gjs_parse_call_args(
  * gjs_parse_call_args:
  * @context:
  * @function_name: The name of the function being called
- * @format: Printf-like format specifier containing the expected arguments
  * @args: #JS::CallArgs from #JSNative function
+ * @format: Printf-like format specifier containing the expected arguments
  * @params: for each character in @format, a pair of const char * which is the
  * name of the argument, and a location to store the value. The type of
  * location argument depends on the format character, as described below.


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