[gjs] Fix return values of some functions which should return a pointer
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] Fix return values of some functions which should return a pointer
- Date: Mon, 29 Dec 2014 01:18:14 +0000 (UTC)
commit aa70bf06c904f5dda877fdd9057dd7756e3860fa
Author: Ting-Wei Lan <lantw src gnome org>
Date: Fri Sep 19 22:54:41 2014 +0800
Fix return values of some functions which should return a pointer
https://bugzilla.gnome.org/show_bug.cgi?id=736979
gi/boxed.cpp | 2 +-
gi/ns.cpp | 2 +-
gi/repo.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 0c8e6bd..aeb5702 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -548,7 +548,7 @@ get_field_info (JSContext *context,
jsval id_val;
if (!JS_IdToValue(context, id, &id_val))
- return JS_FALSE;
+ return NULL;
if (!JSVAL_IS_INT (id_val)) {
gjs_throw(context, "Field index for %s is not an integer",
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 12ec27e..a7ae813 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -185,7 +185,7 @@ ns_new(JSContext *context,
global = gjs_get_import_global(context);
if (!JS_HasProperty(context, global, gjs_ns_class.name, &found))
- return JS_FALSE;
+ return NULL;
if (!found) {
JSObject *prototype;
prototype = JS_InitClass(context, global,
diff --git a/gi/repo.cpp b/gi/repo.cpp
index a085a96..f44cb40 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -301,7 +301,7 @@ repo_new(JSContext *context)
repo = JS_NewObject(context, &gjs_repo_class, NULL, global);
if (repo == NULL) {
gjs_throw(context, "No memory to create repo object");
- return JS_FALSE;
+ return NULL;
}
priv = g_slice_new0(Repo);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]