seed r134 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r134 - trunk/libseed
- Date: Thu, 6 Nov 2008 00:52:33 +0000 (UTC)
Author: racarr
Date: Thu Nov 6 00:52:32 2008
New Revision: 134
URL: http://svn.gnome.org/viewvc/seed?rev=134&view=rev
Log:
Dear racarr, read patches before you apply them. Thanks, racarr.
Modified:
trunk/libseed/seed-builtins.c
trunk/libseed/seed-types.c
Modified: trunk/libseed/seed-builtins.c
==============================================================================
--- trunk/libseed/seed-builtins.c (original)
+++ trunk/libseed/seed-builtins.c Thu Nov 6 00:52:32 2008
@@ -308,10 +308,10 @@
//if (!g_main_loop_is_running(loop))
// return JSValueMakeBoolean(ctx, 0);
- if (argumentCount != 1)
+ if (argumentCount != 2)
{
gchar *mes =
- g_strdup_printf("Seed.set_timeout Expected 1 argument, "
+ g_strdup_printf("Seed.set_timeout expected 2 arguments, "
"got %d", argumentCount);
seed_make_exception(exception, "ArgumentError", mes);
g_free(mes);
Modified: trunk/libseed/seed-types.c
==============================================================================
--- trunk/libseed/seed-types.c (original)
+++ trunk/libseed/seed-types.c Thu Nov 6 00:52:32 2008
@@ -976,7 +976,7 @@
gchar *seed_value_to_string(JSValueRef val, JSValueRef * exception)
{
- JSStringRef jsstr;
+ JSStringRef jsstr = 0;
JSValueRef func, str;
gchar *buf;
gint length;
@@ -1005,10 +1005,10 @@
jsstr = JSValueToStringCopy(eng->context, val, NULL);
length = JSStringGetMaximumUTF8CStringSize(jsstr);
-
buf = g_malloc(length * sizeof(gchar));
JSStringGetUTF8CString(jsstr, buf, length);
- JSStringRelease(jsstr);
+ if (jsstr)
+ JSStringRelease(jsstr);
}
return buf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]