[gjs] Don't use deprecated types



commit 6c3b08843bf1bffb41666c6330b9dd3e43b817e0
Author: Tim Lunn <tim feathertop org>
Date:   Thu Jan 3 12:20:09 2013 +1100

    Don't use deprecated types
    
    Mozilla have removed jsdouble and int64 from js188, these are
    replaced with double and int64_t respectively. These changes
    are safe on js185 however.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690982

 gi/arg.c       |    2 +-
 gjs/profiler.c |   16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 8fd162f..7796225 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -658,7 +658,7 @@ gjs_array_to_floatarray(JSContext   *context,
 
     for (i = 0; i < length; ++i) {
         jsval elem;
-        jsdouble val;
+        double val;
         JSBool success;
 
         elem = JSVAL_VOID;
diff --git a/gjs/profiler.c b/gjs/profiler.c
index 51b80f1..3dc140f 100644
--- a/gjs/profiler.c
+++ b/gjs/profiler.c
@@ -47,21 +47,21 @@ struct _GjsProfiler {
     GHashTable *by_file;    /* GjsProfileFunctionKey -> GjsProfileFunction */
 
     GjsProfileData *last_function_entered; /* weak ref to by_file */
-    int64           last_function_exit_time;
+    int64_t         last_function_exit_time;
 };
 
 struct _GjsProfileData {
     /* runtime state tracking */
     GjsProfileData *caller;
-    int64 enter_time;
-    int64 runtime_so_far;
+    int64_t enter_time;
+    int64_t runtime_so_far;
     unsigned recurse_depth;
 
     /* final statistics */
     unsigned call_count;
 
-    int64 total_time;
-    int64 self_time;
+    int64_t total_time;
+    int64_t self_time;
 };
 
 typedef struct {
@@ -203,7 +203,7 @@ gjs_profiler_log_call(GjsProfiler  *self,
 {
     GjsProfileFunction *function;
     GjsProfileData *p;
-    int64 now;
+    int64_t now;
 
     function = gjs_profiler_lookup_function(self, cx, fp, before);
     if (!function)
@@ -218,7 +218,7 @@ gjs_profiler_log_call(GjsProfiler  *self,
 
             /* we just exited the caller so account for the time spent */
             if (p->caller) {
-                int64 delta;
+                int64_t delta;
 
                 if (self->last_function_exit_time != 0) {
                     delta = now - self->last_function_exit_time;
@@ -241,7 +241,7 @@ gjs_profiler_log_call(GjsProfiler  *self,
 
         p->recurse_depth += 1;
     } else {
-        int64 delta;
+        int64_t delta;
 
         g_assert(p->recurse_depth > 0);
 



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