[seed] GType can be bigger than int32; use seed_value_to_long for now



commit 7d21ff802d08154fe222742ed8b61b1a92bebe16
Author: Tim Horton <hortont424 gmail com>
Date:   Sun Jan 3 22:11:03 2010 -0500

    GType can be bigger than int32; use seed_value_to_long for now
    
    This is probably not correct, since the size of the type is variable, and all...

 libseed/seed-gtype.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libseed/seed-gtype.c b/libseed/seed-gtype.c
index 839e689..4812cb8 100644
--- a/libseed/seed-gtype.c
+++ b/libseed/seed-gtype.c
@@ -906,7 +906,8 @@ seed_gtype_constructor_invoked (JSContextRef ctx,
     }
 
 
-  parent_type = (GType) seed_value_to_int (ctx, parent_ref, exception);
+  // TODO: GType is of variable length, so this is an incorrect fix
+  parent_type = (GType) seed_value_to_long (ctx, parent_ref, exception);
 
   SEED_NOTE (GTYPE, "Registering new GType with name: %s as child of %s.",
 	     new_name, g_type_name (parent_type));



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