[gjs/473-fix-types: 1/2] value: Fix compilation error on Darwin




commit ddcf2886fbd2ab63afc0144b729336f8dbf88817
Author: Evan Miller <emmiller gmail com>
Date:   Fri Mar 18 17:56:00 2022 -0700

    value: Fix compilation error on Darwin
    
    It looks like this is due to a gint64/int64_t type mismatch on Darwin
    (long vs long long), at least using GLib 2.66. This patch seems to fix
    the immediate issue.
    
    Closes: #473

 gi/value.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/value.cpp b/gi/value.cpp
index a524cce95..f53ff75e1 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -479,7 +479,7 @@ gjs_value_to_g_value_internal(JSContext      *context,
             return throw_expect_type(context, value, "integer");
         }
     } else if (gtype == G_TYPE_INT64) {
-        gint64 i;
+        int64_t i;
         if (Gjs::js_value_to_c_checked<int64_t>(context, value, &i,
                                                 &out_of_range) &&
             !out_of_range) {
@@ -512,7 +512,7 @@ gjs_value_to_g_value_internal(JSContext      *context,
             return throw_expect_type(context, value, "unsigned integer");
         }
     } else if (gtype == G_TYPE_UINT64) {
-        guint64 i;
+        uint64_t i;
         if (Gjs::js_value_to_c_checked<uint64_t>(context, value, &i,
                                                  &out_of_range) &&
             !out_of_range) {


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