Change null into a warning for the time being, due to gir's need to catch up
authorAlan Knowles <alan@alanfast.akbkhome.com>
Mon, 1 Mar 2010 09:06:01 +0000 (17:06 +0800)
committerAlan Knowles <alan@alanfast.akbkhome.com>
Mon, 1 Mar 2010 09:06:01 +0000 (17:06 +0800)
Introspection tells us which arguments can be null, however the gir's for most packages have not been
updated to show this (Gtk had a big patchfest last week to add this, but it will not be reflected on end users
desktop gir's for a while) - until then we issue g_warnings.

libseed/seed-engine.c

index b941414..5caa79f 100644 (file)
@@ -537,14 +537,16 @@ seed_gobject_method_invoked (JSContextRef ctx,
 
               if (is_null) 
                 {
-                  seed_make_exception (ctx, exception,
-                                  "ArgumentError",
+                  // RE-INSTATE THIS CODE LATER.. - when gtk etc. has be release with fixes
+                 //seed_make_exception (ctx, exception,
+                 //   "ArgumentError",
+                  g_warning(      "ArgumentError - probably due to incorrect gir file (which may be fixed upstream)"
                                   " argument %d must not be null for"
                                   " function: %s. \n",
                                   i + 1,
                                   g_base_info_get_name ((GIBaseInfo *)
                                                         info));
-                  goto arg_error;
+                  //goto arg_error;
                 }
             }
 
@@ -558,7 +560,9 @@ seed_gobject_method_invoked (JSContextRef ctx,
                                   i + 1,
                                   g_base_info_get_name ((GIBaseInfo *)
                                                         info));
- arg_error:
+
+// FIXME - SEE NOTE ABOVE ABOUT gtk allow_null bugs
+// arg_error:
              g_base_info_unref ((GIBaseInfo *) type_info);
              g_base_info_unref ((GIBaseInfo *) arg_info);
              g_free (in_args);