[seed] Allow null struct return values
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seed] Allow null struct return values
- Date: Mon, 11 Jan 2010 22:27:06 +0000 (UTC)
commit 22c6df348844cb1e56bf9389fb1cdd51865b1a46
Author: Ryan Brown <r nodr org>
Date: Sun Jan 10 21:46:09 2010 -0600
Allow null struct return values
libseed/seed-structs.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libseed/seed-structs.c b/libseed/seed-structs.c
index f9ea40c..73d0e48 100644
--- a/libseed/seed-structs.c
+++ b/libseed/seed-structs.c
@@ -627,6 +627,12 @@ JSObjectRef
seed_make_struct (JSContextRef ctx, gpointer strukt, GIBaseInfo * info)
{
JSObjectRef object, proto;
+
+ if (strukt == NULL)
+ {
+ return JSValueMakeNull (ctx);
+ }
+
seed_struct_privates *priv = g_slice_alloc (sizeof (seed_struct_privates));
priv->info = info ? g_base_info_ref (info) : 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]