seed r635 - in trunk: . libseed modules/Multiprocessing
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r635 - in trunk: . libseed modules/Multiprocessing
- Date: Sun, 4 Jan 2009 06:33:40 +0000 (UTC)
Author: racarr
Date: Sun Jan 4 06:33:40 2009
New Revision: 635
URL: http://svn.gnome.org/viewvc/seed?rev=635&view=rev
Log:
-Wall...apparently this got switched off at some point.
Modified:
trunk/libseed/Makefile.am
trunk/libseed/seed-api.c
trunk/libseed/seed-builtins.c
trunk/libseed/seed-closure.c
trunk/libseed/seed-engine.c
trunk/libseed/seed-exceptions.c
trunk/libseed/seed-gtype.c
trunk/libseed/seed-signals.c
trunk/libseed/seed-structs.c
trunk/libseed/seed-types.c
trunk/ltmain.sh
trunk/modules/Multiprocessing/bi.js
Modified: trunk/libseed/Makefile.am
==============================================================================
--- trunk/libseed/Makefile.am (original)
+++ trunk/libseed/Makefile.am Sun Jan 4 06:33:40 2009
@@ -38,7 +38,7 @@
EXTRA_DIST = \
$(seedheaders_HEADERS)
-LIBSEED_CFLAGS+=-Werror $(SEED_DEBUG_CFLAGS) $(SEED_PROFILE_CFLAGS)
+LIBSEED_CFLAGS+= -Wall -Werror $(SEED_DEBUG_CFLAGS) $(SEED_PROFILE_CFLAGS)
AM_LDFLAGS=$(SEED_PROFILE_LDFLAGS)
## File created by the gnome-build tools
Modified: trunk/libseed/seed-api.c
==============================================================================
--- trunk/libseed/seed-api.c (original)
+++ trunk/libseed/seed-api.c Sun Jan 4 06:33:40 2009
@@ -53,11 +53,11 @@
return JSObjectMake(ctx, class, private);
}
-gboolean seed_object_set_property_at_index(JSContextRef ctx,
- JSObjectRef object,
- gint index,
- JSValueRef value,
- JSValueRef * exception)
+void seed_object_set_property_at_index(JSContextRef ctx,
+ JSObjectRef object,
+ gint index,
+ JSValueRef value,
+ JSValueRef * exception)
{
JSObjectSetPropertyAtIndex(ctx, object, index, value, exception);
}
@@ -133,7 +133,7 @@
JSStringRef seed_string_ref(JSStringRef string)
{
- JSStringRetain(string);
+ return JSStringRetain(string);
}
void seed_string_unref(JSStringRef string)
Modified: trunk/libseed/seed-builtins.c
==============================================================================
--- trunk/libseed/seed-builtins.c (original)
+++ trunk/libseed/seed-builtins.c Sun Jan 4 06:33:40 2009
@@ -19,6 +19,7 @@
* Copyright (C) Matthew Arsenault 2008 <arsenm2 rpi edu>
*/
+#include <unistd.h>
#include <stdio.h>
#include "seed-private.h"
#include <string.h>
Modified: trunk/libseed/seed-closure.c
==============================================================================
--- trunk/libseed/seed-closure.c (original)
+++ trunk/libseed/seed-closure.c Sun Jan 4 06:33:40 2009
@@ -23,7 +23,7 @@
static ffi_type *get_ffi_type(GITypeInfo * info)
{
- ffi_type *rettype;
+ ffi_type *rettype = NULL;
if (g_type_info_is_pointer(info))
rettype = &ffi_type_pointer;
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Sun Jan 4 06:33:40 2009
@@ -73,7 +73,8 @@
}
ret = seed_construct_struct_type_with_parameters(ctx, info,
parameters, exception);
-
+
+ return (JSObjectRef) ret;
}
static JSObjectRef
@@ -95,7 +96,6 @@
JSPropertyNameArrayRef jsprops = 0;
JSStringRef jsprop_name;
JSValueRef jsprop_value;
- gboolean sunk = TRUE;
type = (GType) JSObjectGetPrivate(constructor);
if (!type)
@@ -360,15 +360,10 @@
else
{
GIBaseInfo *interface;
- GIInfoType type;
gboolean sunk = FALSE;
if (tag == GI_TYPE_TAG_INTERFACE)
{
- GIFunctionInfoFlags flags =
- g_function_info_get_flags((GIFunctionInfo *) info);
-
- GIBaseInfo *interface;
GIInfoType interface_type;
interface = g_type_info_get_interface(type_info);
@@ -579,7 +574,8 @@
GType *interfaces;
GIFunctionInfo *function;
GIBaseInfo *interface;
- gint n_functions, k, i, n;
+ gint n_functions, k, i;
+ guint n;
interfaces = g_type_interfaces(type, &n);
for (i = 0; i < n; i++)
Modified: trunk/libseed/seed-exceptions.c
==============================================================================
--- trunk/libseed/seed-exceptions.c (original)
+++ trunk/libseed/seed-exceptions.c Sun Jan 4 06:33:40 2009
@@ -20,6 +20,7 @@
*/
#include "seed-private.h"
+#include <string.h>
void
seed_make_exception(JSContextRef ctx,
Modified: trunk/libseed/seed-gtype.c
==============================================================================
--- trunk/libseed/seed-gtype.c (original)
+++ trunk/libseed/seed-gtype.c Sun Jan 4 06:33:40 2009
@@ -210,7 +210,7 @@
if (argumentCount != 1)
{
gchar *mes =
- g_strdup_printf("Property installation expected 1 argument",
+ g_strdup_printf("Property installation expected 1 argument"
" got %d \n", (unsigned int) argumentCount);
seed_make_exception(ctx, exception, "ArgumentError", mes);
g_free(mes);
@@ -251,7 +251,7 @@
JSValueRef * exception)
{
// TODO: class_closure, and accumlator. Not useful until we have structs.
- JSValueRef jsname, jstype, jsflags, jsreturn_type, jsparams, ret;
+ JSValueRef jsname, jstype, jsflags, jsreturn_type, jsparams;
GType itype, return_type;
guint n_params = 0;
GType *param_types = 0;
@@ -262,7 +262,7 @@
/* Sanity check */
if (argumentCount != 1)
{
- gchar *mes = g_strdup_printf("Signal constructor expected 1 argument",
+ gchar *mes = g_strdup_printf("Signal constructor expected 1 argument"
" got %d \n", (unsigned int) argumentCount);
seed_make_exception(ctx, exception, "ArgumentError", mes);
g_free(mes);
@@ -386,7 +386,7 @@
{
gchar *mes = seed_exception_to_string(ctx,
exception);
- g_warning("Exception in class init closure. %s \n", mes, 0);
+ g_warning("Exception in class init closure. %s \n", mes);
}
JSGlobalContextRelease((JSGlobalContextRef) ctx);
@@ -417,7 +417,7 @@
{
gchar *mes = seed_exception_to_string(ctx,
exception);
- g_warning("Exception in instance init closure. %s \n", mes, 0);
+ g_warning("Exception in instance init closure. %s \n", mes);
}
JSGlobalContextRelease((JSGlobalContextRef) ctx);
@@ -429,8 +429,6 @@
ffi_cif *cif;
ffi_closure *closure;
ffi_type **arg_types;;
- ffi_arg result;
- ffi_status status;
// Might need to protect function.
@@ -454,8 +452,6 @@
ffi_cif *cif;
ffi_closure *closure;
ffi_type **arg_types;;
- ffi_arg result;
- ffi_status status;
// Might need to protect function.
@@ -481,7 +477,7 @@
const JSValueRef arguments[],
JSValueRef * exception)
{
- JSValueRef class_init, instance_init, name, parent_ref, set_property_ref;
+ JSValueRef class_init, instance_init, name, parent_ref;
GType parent_type, new_type;
gchar *new_name;
GTypeInfo type_info = {
@@ -563,7 +559,7 @@
type_info.instance_init = (GInstanceInitFunc) instance_init_closure;
constructor_ref = JSObjectMake(ctx, gobject_constructor_class,
- (gpointer) new_type);
+ (gpointer) 0);
JSValueProtect(ctx, constructor_ref);
type_info.class_data = constructor_ref;
Modified: trunk/libseed/seed-signals.c
==============================================================================
--- trunk/libseed/seed-signals.c (original)
+++ trunk/libseed/seed-signals.c Sun Jan 4 06:33:40 2009
@@ -171,8 +171,8 @@
{
user_data = (JSObjectRef) arguments[2];
}
-
- signal_name = seed_value_to_string(ctx, arguments[0], NULL);
+
+ signal_name = seed_value_to_string(ctx, arguments[0], exception);
obj = (GObject *) JSObjectGetPrivate(thisObject);
obj_type = G_OBJECT_TYPE(obj);
@@ -180,6 +180,8 @@
(JSObjectRef) arguments[1], NULL, user_data);
g_free(signal_name);
+
+ return seed_value_from_boolean(ctx, TRUE, exception);
}
void seed_add_signals_to_object(JSContextRef ctx,
@@ -260,7 +262,7 @@
{
gchar *mes = seed_exception_to_string(ctx,
exception);
- g_warning("Exception in signal handler. %s \n", mes, 0);
+ g_warning("Exception in signal handler. %s \n", mes);
g_free(mes);
exception = 0;
}
@@ -275,7 +277,7 @@
if (exception)
{
gchar *mes = seed_exception_to_string(ctx, exception);
- g_warning("Exception in signal handler return value. %s \n", mes, 0);
+ g_warning("Exception in signal handler return value. %s \n", mes);
g_free(mes);
}
@@ -345,7 +347,6 @@
{
JSObjectRef this_obj;
signal_privates *privates;
- GClosure *closure;
privates = (signal_privates *) JSObjectGetPrivate(thisObject);
if (!privates)
Modified: trunk/libseed/seed-structs.c
==============================================================================
--- trunk/libseed/seed-structs.c (original)
+++ trunk/libseed/seed-structs.c Sun Jan 4 06:33:40 2009
@@ -170,14 +170,10 @@
JSObjectRef object,
JSStringRef property_name, JSValueRef * exception)
{
- gpointer pointer;
gchar *cproperty_name;
- int i;
int length;
seed_struct_privates *priv = JSObjectGetPrivate(object);
GIFieldInfo *field = 0;
- GITypeInfo *field_type = 0;
- GArgument field_value;
JSValueRef ret;
length = JSStringGetMaximumUTF8CStringSize(property_name);
@@ -207,11 +203,11 @@
JSStringRef property_name,
JSValueRef value, JSValueRef * exception)
{
- gint length, i, n;
+ gint length;
GArgument field_value;
GIFieldInfo *field;
+ gchar * cproperty_name;
GITypeInfo *field_type;
- gchar *cproperty_name;
seed_struct_privates *priv =
(seed_struct_privates *) JSObjectGetPrivate(object);
gboolean ret;
@@ -238,6 +234,8 @@
g_base_info_unref((GIBaseInfo *) field_type);
g_base_info_unref((GIBaseInfo *) field);
+
+ return TRUE;
}
static JSValueRef
@@ -245,14 +243,10 @@
JSObjectRef object,
JSStringRef property_name, JSValueRef * exception)
{
- gpointer pointer;
gchar *cproperty_name;
- int i, n;
int length;
seed_struct_privates *priv = JSObjectGetPrivate(object);
GIFieldInfo *field = 0;
- GITypeInfo *field_type = 0;
- GArgument field_value;
JSValueRef ret;
length = JSStringGetMaximumUTF8CStringSize(property_name);
@@ -284,7 +278,7 @@
{
GIFieldInfo *field;
gint i, n;
- guchar type;
+ guchar type = 0;
seed_struct_privates *priv =
(seed_struct_privates *) JSObjectGetPrivate(object);
GIBaseInfo *info = priv->info;
@@ -305,7 +299,6 @@
for (i = 0; i < n; i++)
{
- const gchar *cname;
JSStringRef jname;
(type == 1) ?
@@ -480,7 +473,6 @@
JSObjectRef seed_make_boxed(JSContextRef ctx, gpointer boxed, GIBaseInfo * info)
{
JSObjectRef object;
- gint i, n_methods;
seed_struct_privates *priv = g_slice_alloc(sizeof(seed_struct_privates));
priv->info = info ? g_base_info_ref(info) : 0;
@@ -550,7 +542,7 @@
gpointer object;
GIInfoType type = g_base_info_get_type(info);
JSObjectRef ret;
- gint nparams, i, length;
+ gint nparams, i = 0, length;
GIFieldInfo *field = 0;
JSPropertyNameArrayRef jsprops;
JSStringRef jsprop_name;
Modified: trunk/libseed/seed-types.c
==============================================================================
--- trunk/libseed/seed-types.c (original)
+++ trunk/libseed/seed-types.c Sun Jan 4 06:33:40 2009
@@ -64,9 +64,8 @@
JSValueRef user_data;
JSValueRef js_ref;
JSClassRef class;
- GType type, *interfaces;
+ GType type;
JSValueRef prototype;
- guint i, n;
type = G_OBJECT_TYPE(object);
@@ -130,7 +129,6 @@
if (arg->v_pointer)
{
GIBaseInfo *interface_info;
- GType interface_type;
interface_info = g_type_info_get_interface(type_info);
@@ -181,7 +179,7 @@
GITypeTag type_tag;
if (transfer == GI_TRANSFER_EVERYTHING)
- return;
+ return TRUE;
type_tag = g_type_info_get_tag((GITypeInfo *) type_info);
@@ -190,6 +188,8 @@
case GI_TYPE_TAG_UTF8:
return seed_release_arg(GI_TRANSFER_EVERYTHING,
type_info, type_tag, arg);
+ default:
+ break;
}
return TRUE;
@@ -688,7 +688,7 @@
info = g_irepository_find_by_gtype(0, G_VALUE_TYPE(gval));
if (!info)
- return;
+ return FALSE;
type = g_base_info_get_type(info);
if (type == GI_INFO_TYPE_UNION)
Modified: trunk/ltmain.sh
==============================================================================
--- trunk/ltmain.sh (original)
+++ trunk/ltmain.sh Sun Jan 4 06:33:40 2009
@@ -65,7 +65,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.4 Debian-2.2.4-0ubuntu4
+# $progname: (GNU libtool) 2.2.4 Debian-2.2.4-0ubuntu5
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -73,7 +73,7 @@
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION="2.2.4 Debian-2.2.4-0ubuntu4"
+VERSION="2.2.4 Debian-2.2.4-0ubuntu5"
TIMESTAMP=""
package_revision=1.2976
Modified: trunk/modules/Multiprocessing/bi.js
==============================================================================
--- trunk/modules/Multiprocessing/bi.js (original)
+++ trunk/modules/Multiprocessing/bi.js Sun Jan 4 06:33:40 2009
@@ -10,12 +10,14 @@
mine.add_watch(1,
function()
{
- Seed.print("Child Got: " + mine.read());
- mine.write("Pong");
+ var message = {type: "PING",
+ data: "Hello!"};
+ mine.write(JSON.stringify(message));
return true;
});
Gtk.main();
}
mine = pipes[1];
mine.write("Ping");
-Seed.print("Parent Got: " + mine.read());
\ No newline at end of file
+message = JSON.parse(mine.read());
+Seed.print("Parent Got: " + message.type + ": " + message.data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]