]> git.draconx.ca Git - gob-dx.git/commitdiff
Release 2.0.10 v2.0.10
authorGeorge Lebl <jirka@5z.com>
Thu, 23 Sep 2004 10:27:00 +0000 (02:27 -0800)
committerNick Bowler <nbowler@draconx.ca>
Tue, 19 Feb 2019 17:33:58 +0000 (12:33 -0500)
20 files changed:
ChangeLog
Makefile.in
NEWS
configure
configure.in
doc/Makefile.in
doc/gob2.1.in
examples/Makefile.in
gob2.spec
src/Makefile.am
src/Makefile.in
src/main.c
src/parse.c
src/parse.h
src/parse.y
src/test.gob
src/treefuncs.c
src/treefuncs.def
src/treefuncs.h
src/util.c

index 84563a2703a72c4c4ff2630a8710fb76949e9c71..82b8b2ff0bcc9890c314900e0d4ca15ead3bca14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+Wed Sep 22 17:12:25 2004  George Lebl <jirka@5z.com>
+
+       * Release 2.0.10
+
+Wed Sep 22 17:07:35 2004  George Lebl <jirka@5z.com>
+
+       * src/main.c: Apply patch from "K. Haley"
+         <haleykd@users.sourceforge.net> to play nice with glibs private
+         stuff and have the private structure be allocated by glib
+
+       * src/main.c, src/util.c: Apply patch from
+         Pierre Gay <gay-pierre@wanadoo.fr> to add the --file-sep=c option
+         which allows one to change the file separator character.
+
+       * doc/gob2.1.in: update docs
+
+       * src/parse.y: apply patch from debian bug#270546 by Frank
+         Lichtenheld <djpig@debian.org> to fix c++ compilation of linked
+         POINTER types by adding a proper cast at the right place
+
+       * src/main.c: always add string.h since it doesn't hurt and we missed
+         it on some occasions
+
+       * src/main.c: destroywith and unrefwith function get cast with
+         reinterpret_cast when using --for-cpp and don't get cast at all
+         for C, but for C we cast the pointer going into the function
+         to (gpointer).
+
+Tue Aug 10 16:32:00 2004  George Lebl <jirka@5z.com>
+
+       * src/main.c, src/parse.y, src/treefuncs.def: Apply patch from
+         Jean-Yves Lefort <jylefort@brutele.be> to support overriding
+         properties (g_object_class_override_property)
+       
+       * doc/gob2.1.in: update
+
+Thu Jul 29 10:47:31 2004  George Lebl <jirka@5z.com>
+
+       * configure.in, src/Makefile.am: Apply patch from "K. Haley"
+         <haleykd@users.sourceforge.net> to fix handling of NOINSTGOB
+         on certain platforms (apparently windows).
+
 Mon Jul 19 09:37:21 2004  George Lebl <jirka@5z.com>
 
        * Release 2.0.9
index 019664db22a15386e44b25877a30ca5629a8f286..a2838bfcd8c52266e209fe056b872c1f27fabd9d 100644 (file)
@@ -89,7 +89,6 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-DOINSTGOB = @DOINSTGOB@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -113,7 +112,8 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
 MV = @MV@
-NOINSTGOB = @NOINSTGOB@
+NOINSTGOB_FALSE = @NOINSTGOB_FALSE@
+NOINSTGOB_TRUE = @NOINSTGOB_TRUE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/NEWS b/NEWS
index f5af94dcfbb617e8e6aa1b7149cf0745c508f786..484e960708527a60c8c10b1a0a6e7e520a965cb3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+2.0.10:
+       * Support for overriding properties (Jean-Yves Lefort)
+       * Some M4 fixage with respect to NOINSTGOB (K. Haley)
+       * Make the private structure allocation play nice with glib (K. Haley)
+       * Add --file-sep=c option to allow changing the file separator
+         character (Pierre Gay) 
+       * Fix C++ compilation of linked POINTER types by casting properly
+         (Frank Lichtenheld) debian bug #270546
+       * Always add string.h as it was missing sometimes when memset was used
+       * In C++ mode cast the destroywith/unrefwith function with
+         reinterpret_cast to avoid C++ nonsense (should fix compilation with
+         gcc 3.4 I think)
+       * Update the docs
+
 2.0.9:
        * Lots of fixes for gcc warnings, objects should now compile with
          very pedantic warnings set.
index 8352cf31daaa364d475c2d25ca7bb8d90c7ca34e..038527cc9627305c39bcee96b7a1ceebed2a7578 100755 (executable)
--- a/configure
+++ b/configure
@@ -272,7 +272,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 
 ac_unique_file="src/treefuncs.h"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT SUBDIRS DOINSTGOB NOINSTGOB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP YACC LEX LEXLIB LEX_OUTPUT_ROOT RM MV TAR PKG_CONFIG GLIB_CFLAGS GLIB_LIBS YFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT NOINSTGOB_TRUE NOINSTGOB_FALSE SUBDIRS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP YACC LEX LEXLIB LEX_OUTPUT_ROOT RM MV TAR PKG_CONFIG GLIB_CFLAGS GLIB_LIBS YFLAGS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -1561,7 +1561,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=gob2
- VERSION=2.0.9
+ VERSION=2.0.10
 
 
 cat >>confdefs.h <<_ACEOF
@@ -1714,22 +1714,27 @@ fi
 
 GLIB_REQUIRED=2.0.0
 
+
+
+
+if test -f ../NOINST_GOB; then
+  NOINSTGOB_TRUE=
+  NOINSTGOB_FALSE='#'
+else
+  NOINSTGOB_TRUE='#'
+  NOINSTGOB_FALSE=
+fi
+
+
 if test -f ../NOINST_GOB ; then
-  DOINSTGOB=
-  NOINSTGOB=gob2
   echo "$as_me:$LINENO: result: *** NOT Going to install GOB ***" >&5
 echo "${ECHO_T}*** NOT Going to install GOB ***" >&6
   SUBDIRS="src examples"
-
 else
-  DOINSTGOB=gob2
-  NOINSTGOB=
   SUBDIRS="src examples doc"
-
 fi
 
 
-
 DEPDIR="${am__leading_dot}deps"
 
           ac_config_commands="$ac_config_commands depfiles"
@@ -5173,6 +5178,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${NOINSTGOB_TRUE}" && test -z "${NOINSTGOB_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"NOINSTGOB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"NOINSTGOB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -5754,9 +5766,9 @@ s,@am__leading_dot@,$am__leading_dot,;t t
 s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
 s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
 s,@MAINT@,$MAINT,;t t
+s,@NOINSTGOB_TRUE@,$NOINSTGOB_TRUE,;t t
+s,@NOINSTGOB_FALSE@,$NOINSTGOB_FALSE,;t t
 s,@SUBDIRS@,$SUBDIRS,;t t
-s,@DOINSTGOB@,$DOINSTGOB,;t t
-s,@NOINSTGOB@,$NOINSTGOB,;t t
 s,@CC@,$CC,;t t
 s,@CFLAGS@,$CFLAGS,;t t
 s,@LDFLAGS@,$LDFLAGS,;t t
index d513a47543c2acee4b9e42a13a3ec03700d55a79..57ceb8f0b1a363adacbcf7925d5c94d8e1e274e1 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.2)
 AC_INIT(src/treefuncs.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gob2,2.0.9)
+AM_INIT_AUTOMAKE(gob2,2.0.10)
 AM_MAINTAINER_MODE
 
 GLIB_REQUIRED=2.0.0
@@ -12,20 +12,17 @@ dnl  An utter hack to allow embedding of gob inside other packages.
 dnl  if a file is found in the parent directory named NOINST_GOB, then
 dnl  gob is not installed
 dnl
+
+AM_CONDITIONAL(NOINSTGOB, test -f ../NOINST_GOB)
+
+dnl Is there a way to test NOINSTGOB here ?
 if test -f ../NOINST_GOB ; then
-  DOINSTGOB=
-  NOINSTGOB=gob2
   AC_MSG_RESULT([*** NOT Going to install GOB ***])
   SUBDIRS="src examples"
-  AC_SUBST(SUBDIRS)
 else
-  DOINSTGOB=gob2
-  NOINSTGOB=
   SUBDIRS="src examples doc"
-  AC_SUBST(SUBDIRS)
 fi
-AC_SUBST(DOINSTGOB)
-AC_SUBST(NOINSTGOB)
+AC_SUBST(SUBDIRS)
 
 dnl Checks for programs.
 AC_ISC_POSIX
index cfb4c753b3afa20ee89c932070e5ee0e3258d985..99ee9ccb0a22dd772f4324d7b6a9e62289e1a342 100644 (file)
@@ -75,7 +75,6 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-DOINSTGOB = @DOINSTGOB@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -99,7 +98,8 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
 MV = @MV@
-NOINSTGOB = @NOINSTGOB@
+NOINSTGOB_FALSE = @NOINSTGOB_FALSE@
+NOINSTGOB_TRUE = @NOINSTGOB_TRUE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
index 67c6f55d89aa7c967c540add399bbe716398122e..0a591df2cdb61a090d6f54ecf3b57773c4d2445a 100644 (file)
@@ -97,12 +97,16 @@ some private data members without breaking binary compatibility.
 .TP
 .B -o --output-dir
 The directory into which output should be placed.
+.TP
+.B --file-sep[=c]
+Replace default \`-\' file name separator.  If no separator character
+is given then none is used.  Only one character can be used.
 
 .SH TYPENAMES
 .PP
 Because we need to parse out different parts of the typename, sometimes you
 need to specify the typename with some special syntax.  Types are specified in
-capitalized form and words are separated by \':\'.  The first word of the type
+capitalized form and words are separated by \`:\'.  The first word of the type
 (which can be empty) is the "namespace".  This fact is for example used for the
 type checking macro and the type macro.  For "Gtk:New:Button", the macros will
 be GTK_IS_NEW_BUTTON and GTK_TYPE_NEW_BUTTON.  This colon separated format of
@@ -112,7 +116,8 @@ types.
 .SH OUTPUT FILES
 .PP
 The filenames are created from the typename.  The words are
-separated by \'-\' and all in lower case.  For example for an object named
+separated by \`-\' (this can be changed with
+\fB--file-sep\fR option) and all in lower case.  For example for an object named
 "Gtk:New:Button", the files are \fBgtk-new-button.c\fR and
 \fBgtk-new-button.h\fR.
 If you are using C++ mode, the output .c file will in fact be a .cc file.
@@ -522,6 +527,21 @@ To get bettery type safety on some of the property types, you can specify
 the \'type\' attribute which will add casts where appropriate in code dealing
 with this property.  This is especially useful for POINTER and OBJECT types.
 But even for others.
+.PP
+You can also override properties from parent objects (that is override their
+implementation, not their attributes).  Do this by adding the
+special \'override\' attribute.  For example if the parent object
+had a \'height\' property then you could override it by
+.nf
+
+  private int height;
+  property INT height
+         (override)
+        set { self->_priv->height = g_value_get_int (VAL); }
+        get { g_value_set_int (VAL, self->_priv->height); };
+
+.fi
+Overriding is supported since gob 2.0.10.
 
 .SH METHODS
 .PP
index 0ea5f33ed5d9e64b11f34457fc273eb012bab724..72358539a5dcca1bb632b4e190df8883c288589f 100644 (file)
@@ -70,7 +70,6 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-DOINSTGOB = @DOINSTGOB@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -94,7 +93,8 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
 MV = @MV@
-NOINSTGOB = @NOINSTGOB@
+NOINSTGOB_FALSE = @NOINSTGOB_FALSE@
+NOINSTGOB_TRUE = @NOINSTGOB_TRUE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
index 2549a2bb1788f7fc81b7ba5f6872e21874022e2c..86d18656aca5590e670e4e50928f4c351471971b 100644 (file)
--- a/gob2.spec
+++ b/gob2.spec
@@ -1,4 +1,4 @@
-%define  ver     2.0.9
+%define  ver     2.0.10
 %define  rel     1
 %define  prefix  /usr
 
index 74e60a14ebf91be65f319244dc34ba8e33fa1260..cb2594e9ee522f81bb55b2a225ea95d23280c60c 100644 (file)
@@ -20,9 +20,11 @@ INCLUDES = \
        -I$(top_srcdir)/src     \
        -I$(includedir)
 
-bin_PROGRAMS = @DOINSTGOB@
-noinst_PROGRAMS = @NOINSTGOB@
-EXTRA_PROGRAMS = gob2
+if NOINSTGOB
+noinst_PROGRAMS = gob2
+else
+bin_PROGRAMS = gob2
+endif
 
 BUILT_SOURCES = parse.h parse.c lexer.c
 
index 72bc515036feb82b7f6196c930f19fd49742cd7c..2d447260eb33487c662f999d51ae75a12e753f8e 100644 (file)
@@ -36,9 +36,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-bin_PROGRAMS = @DOINSTGOB@
-noinst_PROGRAMS = @NOINSTGOB@
-EXTRA_PROGRAMS = gob2$(EXEEXT)
+@NOINSTGOB_TRUE@noinst_PROGRAMS = gob2$(EXEEXT)
+@NOINSTGOB_FALSE@bin_PROGRAMS = gob2$(EXEEXT)
 subdir = src
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in lexer.c \
        parse.c parse.h
@@ -108,7 +107,6 @@ DEFS = @DEFS@ \
        -DPKGDATADIR=\"$(pkgdatadir)\"
 
 DEPDIR = @DEPDIR@
-DOINSTGOB = @DOINSTGOB@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -132,7 +130,8 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
 MV = @MV@
-NOINSTGOB = @NOINSTGOB@
+NOINSTGOB_FALSE = @NOINSTGOB_FALSE@
+NOINSTGOB_TRUE = @NOINSTGOB_TRUE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
index dfd87d0a60b7e3d365e382860171af3a56996e66..39bc2165c24ca715904fe9e2378bba815292c59b 100644 (file)
@@ -66,6 +66,8 @@ static char *ptypebase;
 
 char *output_dir = NULL;
 
+static char file_sep = '-';
+
 static int signals = 0; /* number of signals */
 static int set_properties = 0; /* number of named (set) properties */
 static int get_properties = 0; /* number of named (get) properties */
@@ -122,7 +124,7 @@ int method_unique_id = 1;
 static void
 make_bases (void)
 {
-       filebase = replace_sep (((Class *)class)->otype, '-');
+       filebase = replace_sep (((Class *)class)->otype, file_sep);
        gob_strdown (filebase);
 
        if (output_dir != NULL &&
@@ -1584,367 +1586,397 @@ make_argument (Argument *a)
 static void
 make_property (Property *p)
 {
-       GString *flags;
-       GList *l;
        char *s;
-       char *argflags[] = {
-               "CONSTRUCT",
-               "CONSTRUCT_ONLY",
-               "CHILD_ARG",
-               "MASK",
-               NULL
-       };
-
-       flags = g_string_new ("(GParamFlags)(");
-
-       if (p->get != NULL && p->set != NULL)
-               g_string_append (flags, "G_PARAM_READABLE | G_PARAM_WRITABLE");
-       else if (p->get != NULL)
-               g_string_append (flags, "G_PARAM_READABLE");
-       else
-               g_string_append (flags, "G_PARAM_WRITABLE");
 
        if (p->get == NULL && p->set == NULL) {
                error_print (GOB_ERROR, p->line_no,
                             "Property has no getter nor setter");
        }
 
-       for (l = p->flags; l != NULL; l = l->next) {
-               char *flag = l->data;
-               int i;
-               if(strcmp (flag, "READABLE") == 0 ||
-                  strcmp (flag, "WRITABLE") == 0) {
-                       error_print(GOB_WARN, p->line_no,
-                                   "READABLE and "
-                                   "WRITABLE argument flags are "
-                                   "set automatically");
-                       continue;
-               }
-               for(i = 0; argflags[i]; i++) {
-                       if(strcmp(argflags[i], flag)==0)
-                               break;
+       if (p->override) {
+               if (p->flags != NULL)
+                       error_print (GOB_WARN, p->line_no,
+                                    "Overriden property, flags ignored");
+               if (p->nick != NULL)
+                       error_print (GOB_WARN, p->line_no,
+                                    "Overriden property, nick ignored");
+               if (p->blurb != NULL)
+                       error_print (GOB_WARN, p->line_no,
+                                    "Overriden property, blurb ignored");
+               if (p->minimum != NULL)
+                       error_print (GOB_WARN, p->line_no,
+                                    "Overriden property, minimum ignored");
+               if (p->maximum != NULL)
+                       error_print (GOB_WARN, p->line_no,
+                                    "Overriden property, maximum ignored");
+               if (p->default_value != NULL)
+                       error_print (GOB_WARN, p->line_no,
+                                    "Overriden property, default_value ignored");
+
+               s = g_strdup (p->name);
+               gob_strup (s);
+               out_printf (out, "\tg_object_class_override_property (g_object_class,\n"
+                           "\t\tPROP_%s,\n"
+                           "\t\t\"%s\");\n", s, p->name);
+               g_free (s);
+       } else {
+               GString *flags;
+               GList *l;
+               char *argflags[] = {
+                       "CONSTRUCT",
+                       "CONSTRUCT_ONLY",
+                       "CHILD_ARG",
+                       "MASK",
+                       NULL
+               };
+
+               flags = g_string_new ("(GParamFlags)(");
+
+               if (p->get != NULL && p->set != NULL)
+                       g_string_append (flags, "G_PARAM_READABLE | G_PARAM_WRITABLE");
+               else if (p->get != NULL)
+                       g_string_append (flags, "G_PARAM_READABLE");
+               else
+                       g_string_append (flags, "G_PARAM_WRITABLE");
+
+
+               for (l = p->flags; l != NULL; l = l->next) {
+                       char *flag = l->data;
+                       int i;
+                       if(strcmp (flag, "READABLE") == 0 ||
+                          strcmp (flag, "WRITABLE") == 0) {
+                               error_print(GOB_WARN, p->line_no,
+                                           "READABLE and "
+                                           "WRITABLE argument flags are "
+                                           "set automatically");
+                               continue;
+                       }
+                       for(i = 0; argflags[i]; i++) {
+                               if(strcmp(argflags[i], flag)==0)
+                                       break;
+                       }
+                       /* if we haven't found it in our list */
+                       if( ! argflags[i]) {
+                               error_printf(GOB_WARN, p->line_no,
+                                            "Unknown flag '%s' used, "
+                                            "perhaps it was misspelled", flag);
+                       }
+                       g_string_sprintfa(flags, " | G_PARAM_%s", flag);
                }
-               /* if we haven't found it in our list */
-               if( ! argflags[i]) {
-                       error_printf(GOB_WARN, p->line_no,
-                                    "Unknown flag '%s' used, "
-                                    "perhaps it was misspelled", flag);
+
+               g_string_append (flags, ")");
+
+               if (strcmp (p->gtktype, "CHAR") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_char\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "-128"),
+                                   value_for_print (p->maximum, "127"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "UCHAR") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_uchar\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "0"),
+                                   value_for_print (p->maximum, "0xFF"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "BOOLEAN") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_boolean\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->default_value, "FALSE"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "INT") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_int\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "G_MININT"),
+                                   value_for_print (p->maximum, "G_MAXINT"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "UINT") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_uint\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "0"),
+                                   value_for_print (p->maximum, "G_MAXUINT"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "LONG") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_long\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "G_MINLONG"),
+                                   value_for_print (p->maximum, "G_MAXLONG"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "ULONG") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_ulong\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "0"),
+                                   value_for_print (p->maximum, "G_MAXULONG"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "INT64") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_int64\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "G_MININT64"),
+                                   value_for_print (p->maximum, "G_MAXINT64"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "UINT64") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_uint64\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "0"),
+                                   value_for_print (p->maximum, "G_MAXUINT64"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "UNICHAR") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_unichar\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "ENUM") == 0) {
+                       char *type = make_me_type (p->extra_gtktype,
+                                                  "G_TYPE_ENUM");
+                       out_printf (out, "\tparam_spec = g_param_spec_enum\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* enum_type */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   type,
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+                       g_free (type);
+               } else if (strcmp (p->gtktype, "FLAGS") == 0) {
+                       char *type = make_me_type (p->extra_gtktype,
+                                                  "G_TYPE_FLAGS");
+                       out_printf (out, "\tparam_spec = g_param_spec_flags\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* flags_type */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   type,
+                                   value_for_print (p->default_value, "0"),
+                                   flags->str);
+                       g_free (type);
+               } else if (strcmp (p->gtktype, "FLOAT") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_float\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "G_MINFLOAT"),
+                                   value_for_print (p->maximum, "G_MAXFLOAT"),
+                                   value_for_print (p->default_value, "0.0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "DOUBLE") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_double\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* minimum */,\n"
+                                   "\t\t %s /* maximum */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->minimum, "G_MINDOUBLE"),
+                                   value_for_print (p->maximum, "G_MAXDOUBLE"),
+                                   value_for_print (p->default_value, "0.0"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "STRING") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_string\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* default_value */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   value_for_print (p->default_value, "NULL"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "PARAM") == 0) {
+                       char *type = make_me_type (p->extra_gtktype,
+                                                  "G_TYPE_PARAM");
+                       out_printf (out, "\tparam_spec = g_param_spec_param\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* param_type */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   type,
+                                   flags->str);
+                       g_free (type);
+               } else if (strcmp (p->gtktype, "BOXED") == 0) {
+                       char *type = make_me_type (p->extra_gtktype,
+                                                  "G_TYPE_BOXED");
+                       out_printf (out, "\tparam_spec = g_param_spec_boxed\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* boxed_type */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   type,
+                                   flags->str);
+                       g_free (type);
+               } else if (strcmp (p->gtktype, "POINTER") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_pointer\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   flags->str);
+               /* FIXME: VALUE_ARRAY */
+               } else if (strcmp (p->gtktype, "CLOSURE") == 0) {
+                       out_printf (out, "\tparam_spec = g_param_spec_pointer\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   flags->str);
+               } else if (strcmp (p->gtktype, "OBJECT") == 0) {
+                       char *type = make_me_type (p->extra_gtktype,
+                                                  "G_TYPE_BOXED");
+                       out_printf (out, "\tparam_spec = g_param_spec_object\n"
+                                   "\t\t(\"%s\" /* name */,\n"
+                                   "\t\t %s /* nick */,\n"
+                                   "\t\t %s /* blurb */,\n"
+                                   "\t\t %s /* object_type */,\n"
+                                   "\t\t %s);\n",
+                                   p->name,
+                                   value_for_print (p->nick, "NULL"),
+                                   value_for_print (p->blurb, "NULL"),
+                                   type,
+                                   flags->str);
+                       g_free (type);
+               } else {
+                       error_printf (GOB_ERROR, p->line_no,
+                                     "%s type is not supported by properties",
+                                     p->gtktype);
                }
-               g_string_sprintfa(flags, " | G_PARAM_%s", flag);
-       }
 
-       g_string_append (flags, ")");
+               s = g_strdup (p->name);
+               gob_strup (s);
+               out_printf (out, "\tg_object_class_install_property (g_object_class,\n"
+                           "\t\tPROP_%s,\n"
+                           "\t\tparam_spec);\n", s);
+               g_free (s);
 
-       if (strcmp (p->gtktype, "CHAR") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_char\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "-128"),
-                           value_for_print (p->maximum, "127"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "UCHAR") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_uchar\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "0"),
-                           value_for_print (p->maximum, "0xFF"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "BOOLEAN") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_boolean\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->default_value, "FALSE"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "INT") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_int\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "G_MININT"),
-                           value_for_print (p->maximum, "G_MAXINT"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "UINT") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_uint\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "0"),
-                           value_for_print (p->maximum, "G_MAXUINT"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "LONG") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_long\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "G_MINLONG"),
-                           value_for_print (p->maximum, "G_MAXLONG"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "ULONG") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_ulong\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "0"),
-                           value_for_print (p->maximum, "G_MAXULONG"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "INT64") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_int64\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "G_MININT64"),
-                           value_for_print (p->maximum, "G_MAXINT64"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "UINT64") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_uint64\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "0"),
-                           value_for_print (p->maximum, "G_MAXUINT64"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "UNICHAR") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_unichar\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "ENUM") == 0) {
-               char *type = make_me_type (p->extra_gtktype,
-                                          "G_TYPE_ENUM");
-               out_printf (out, "\tparam_spec = g_param_spec_enum\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* enum_type */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           type,
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-               g_free (type);
-       } else if (strcmp (p->gtktype, "FLAGS") == 0) {
-               char *type = make_me_type (p->extra_gtktype,
-                                          "G_TYPE_FLAGS");
-               out_printf (out, "\tparam_spec = g_param_spec_flags\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* flags_type */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           type,
-                           value_for_print (p->default_value, "0"),
-                           flags->str);
-               g_free (type);
-       } else if (strcmp (p->gtktype, "FLOAT") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_float\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "G_MINFLOAT"),
-                           value_for_print (p->maximum, "G_MAXFLOAT"),
-                           value_for_print (p->default_value, "0.0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "DOUBLE") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_double\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* minimum */,\n"
-                           "\t\t %s /* maximum */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->minimum, "G_MINDOUBLE"),
-                           value_for_print (p->maximum, "G_MAXDOUBLE"),
-                           value_for_print (p->default_value, "0.0"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "STRING") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_string\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* default_value */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           value_for_print (p->default_value, "NULL"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "PARAM") == 0) {
-               char *type = make_me_type (p->extra_gtktype,
-                                          "G_TYPE_PARAM");
-               out_printf (out, "\tparam_spec = g_param_spec_param\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* param_type */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           type,
-                           flags->str);
-               g_free (type);
-       } else if (strcmp (p->gtktype, "BOXED") == 0) {
-               char *type = make_me_type (p->extra_gtktype,
-                                          "G_TYPE_BOXED");
-               out_printf (out, "\tparam_spec = g_param_spec_boxed\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* boxed_type */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           type,
-                           flags->str);
-               g_free (type);
-       } else if (strcmp (p->gtktype, "POINTER") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_pointer\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           flags->str);
-       /* FIXME: VALUE_ARRAY */
-       } else if (strcmp (p->gtktype, "CLOSURE") == 0) {
-               out_printf (out, "\tparam_spec = g_param_spec_pointer\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           flags->str);
-       } else if (strcmp (p->gtktype, "OBJECT") == 0) {
-               char *type = make_me_type (p->extra_gtktype,
-                                          "G_TYPE_BOXED");
-               out_printf (out, "\tparam_spec = g_param_spec_object\n"
-                           "\t\t(\"%s\" /* name */,\n"
-                           "\t\t %s /* nick */,\n"
-                           "\t\t %s /* blurb */,\n"
-                           "\t\t %s /* object_type */,\n"
-                           "\t\t %s);\n",
-                           p->name,
-                           value_for_print (p->nick, "NULL"),
-                           value_for_print (p->blurb, "NULL"),
-                           type,
-                           flags->str);
-               g_free (type);
-       } else {
-               error_printf (GOB_ERROR, p->line_no,
-                             "%s type is not supported by properties",
-                             p->gtktype);
+               g_string_free (flags, TRUE);
        }
-
-       s = g_strdup (p->name);
-       gob_strup (s);
-       out_printf (out, "\tg_object_class_install_property (g_object_class,\n"
-                   "\t\tPROP_%s,\n"
-                   "\t\tparam_spec);\n", s);
-       g_free (s);
-
-       g_string_free (flags, TRUE);
 }
 
 static void
@@ -1955,8 +1987,15 @@ make_arguments(Class *c)
                out_printf(out, "\tg_object_class->get_property = ___object_get_property;\n");
        if (set_properties > 0)
                out_printf(out, "\tg_object_class->set_property = ___object_set_property;\n");
-       out_printf (out, "    {\n"
-                   "\tGParamSpec   *param_spec;\n\n");
+       out_printf (out, "    {\n");
+       for (li = c->nodes; li != NULL; li = li->next) {
+               Node *n = li->data;
+               if ((n->type == PROPERTY_NODE && ! ((Property *) n)->override)
+                   || n->type == ARGUMENT_NODE) {
+                       out_printf(out, "\tGParamSpec   *param_spec;\n\n");
+                       break;
+               }
+       }
 
        for (li = c->nodes; li != NULL; li = li->next) {
                Node *n = li->data;
@@ -2011,11 +2050,19 @@ print_destructor (Variable *v)
                if(v->destructor_line > 0)
                        out_addline_infile(out, v->destructor_line);
 
-               out_printf(out, "\tif(%s->%s) { "
-                          "((*(void (*)(void *))%s)) (%s->%s); "
-                          "%s->%s = NULL; }\n",
-                          root, v->id, v->destructor, root, v->id,
-                          root, v->id);
+               if (for_cpp) {
+                       out_printf(out, "\tif(%s->%s) { "
+                                  "(reinterpret_cast<void (*)(void *)>(%s)) ((gpointer)%s->%s); "
+                                  "%s->%s = NULL; }\n",
+                                  root, v->id, v->destructor, root, v->id,
+                                  root, v->id);
+               } else {
+                       out_printf(out, "\tif(%s->%s) { "
+                                  "%s ((gpointer) %s->%s); "
+                                  "%s->%s = NULL; }\n",
+                                  root, v->id, v->destructor, root, v->id,
+                                  root, v->id);
+               }
 
                if(v->destructor_line > 0)
                        out_addline_outfile(out);
@@ -2102,11 +2149,15 @@ add_finalize (Class *c)
                const char *unused = "";
                if ( ! no_gnu)
                        unused = " G_GNUC_UNUSED";
-               out_printf(out, "\t%s *self %s = %s (obj_self);\n",
+               out_printf(out, "\t%s *self%s = %s (obj_self);\n",
                           typebase, unused, macrobase);
        }
        if (privates > 0) {
-               out_printf(out, "\tgpointer priv = self->_priv;\n");
+               const char *unused = "";
+               if ( ! no_gnu)
+                       unused = " G_GNUC_UNUSED";
+               out_printf(out, "\tgpointer priv%s = self->_priv;\n",
+                          unused);
        }
 
        if(finalize_handler) {
@@ -2137,10 +2188,6 @@ add_finalize (Class *c)
                }
        }
 
-       if (privates > 0) {
-               out_printf(out, "\tg_free (priv);\n");
-       }
-
        out_printf(out, "}\n"
                   "#undef __GOB_FUNCTION__\n\n");
 }
@@ -2201,11 +2248,12 @@ add_inits(Class *c)
                        out_printf(out, "{\n"
                                   "#define __GOB_FUNCTION__ \"%s::init\"\n",
                                   c->otype);
-                       if(privates > 0) {
+                       if (privates > 0) {
                                out_printf(out, "\t%s->_priv = "
-                                          "g_new0 (%sPrivate, 1);\n",
-                                          ((FuncArg *)m->args->data)->name,
-                                          typebase);
+                                               "G_TYPE_INSTANCE_GET_PRIVATE(%s,TYPE_SELF,%sPrivate);\n",
+                                               ((FuncArg *)m->args->data)->name,
+                                               ((FuncArg *)m->args->data)->name,
+                                               typebase);
                        } else if(always_private_struct) {
                                out_printf(out, "\t%s->_priv = NULL;\n",
                                           ((FuncArg *)m->args->data)->name);
@@ -2249,6 +2297,12 @@ add_inits(Class *c)
                                did_base_obj = TRUE;
                        }
 
+                       if (privates > 0)
+                               out_printf (out,
+                                           "\n\tg_type_class_add_private(%s,sizeof(%sPrivate));\n",
+                                           ((FuncArg *)m->args->data)->name,
+                                           typebase);
+                       
                        if (overrides > 0)
                                add_overrides (c,
                                               ((FuncArg *)m->args->data)->name,
@@ -2973,10 +3027,14 @@ open_files(void)
 
        if ((privates > 0 || protecteds > 0 ||
             private_header == PRIVATE_HEADER_ALWAYS) &&
-           private_header != PRIVATE_HEADER_NEVER)
-               outfileph = g_strconcat (fullfilebase, "-private.h", NULL);
-       else
+           private_header != PRIVATE_HEADER_NEVER) {
+               char sep[2] = {0,0};
+               if (file_sep != 0)
+                       sep[0] = file_sep;
+               outfileph = g_strconcat (fullfilebase, sep, "private.h", NULL);
+       } else {
                outfileph = NULL;
+       }
 
        
        if (no_write) {
@@ -3563,8 +3621,7 @@ print_includes(void)
        char *p;
 
        /* We may need string.h for memset */
-       if(destructors > 0 &&
-          ! g_list_find_custom(include_files, "string.h", (GCompareFunc)strcmp)) {
+       if ( ! g_list_find_custom(include_files, "string.h", (GCompareFunc)strcmp)) {
                out_printf(out, "#include <string.h> /* memset() */\n\n");
        }
 
@@ -3971,7 +4028,9 @@ print_help(void)
                                          "aliases\n"
                "\t--no-kill-underscores   Ignored for compatibility\n"
                "\t-o,--output-dir         The directory where output "
-                                         "should be placed\n");
+                                         "should be placed\n"
+               "\t--file-sep[=c]          replace default \'-\' file "
+                                         "name separator\n");
 }
 
 static void
@@ -4088,6 +4147,19 @@ parse_options(int argc, char *argv[])
                        char *p = strchr (argv[i], '=');
                        g_assert (p != NULL);
                        output_dir = g_strdup (p+1);
+               } else if (strncmp (argv[i], "--file-sep=",
+                                    strlen ("--file-sep=")) == 0) {
+                       char *p = strchr (argv[i], '=');
+                       g_assert (p != NULL);
+                       file_sep = *(p+1);
+               } else if (strncmp (argv[i], "--file-sep",
+                                    strlen ("--file-sep")) == 0) {
+                       if (i+1 < argc) {
+                               file_sep = (argv[i+1])[0];
+                               i++;
+                       } else {
+                               file_sep = 0;
+                       }
                } else if(strcmp(argv[i], "--")==0) {
                        /*further arguments are files*/
                        no_opts = TRUE;
index c9e2c5c3ddb1f3cd4062569e0d4a546e34ddae3a..762e14c4b3010cabfc31573d7c10b460cb106833 100644 (file)
@@ -703,6 +703,11 @@ property_link_and_export (Node *node)
                                        setcast = "(gint) ";
                                        getcast = to_free =
                                                get_prop_enum_flag_cast (prop);
+                               }  else if (strcmp (prop->gtktype, "POINTER") == 0) {
+                                       setcast = "(gpointer) ";
+                                       getcast = g_strdup_printf ("(%s%s) ",
+                                                                 prop->ptype->name,
+                                                                 prop->ptype->pointer ? prop->ptype->pointer : "");
                                }
                        }
 
@@ -775,7 +780,7 @@ ensure_property (void)
 #endif
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 623 "parse.y"
+#line 628 "parse.y"
 typedef union YYSTYPE {
        char *id;
        GString *cbuf;
@@ -784,7 +789,7 @@ typedef union YYSTYPE {
        int sigtype;
 } YYSTYPE;
 /* Line 191 of yacc.c.  */
-#line 788 "parse.c"
+#line 793 "parse.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -796,7 +801,7 @@ typedef union YYSTYPE {
 
 
 /* Line 214 of yacc.c.  */
-#line 800 "parse.c"
+#line 805 "parse.c"
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
 
@@ -1061,25 +1066,25 @@ static const yysigned_char yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const unsigned short yyrline[] =
 {
-       0,   644,   644,   645,   646,   647,   650,   659,   668,   677,
-     686,   695,   706,   707,   708,   709,   710,   711,   712,   713,
-     716,   721,   728,   742,   743,   755,   764,   778,   779,   782,
-     783,   792,   804,   805,   806,   807,   810,   811,   812,   813,
-     816,   836,   860,   864,   872,   873,   874,   875,   876,   882,
-     885,   890,   958,  1012,  1101,  1109,  1114,  1162,  1198,  1214,
-    1215,  1218,  1219,  1222,  1223,  1235,  1236,  1239,  1245,  1251,
-    1257,  1263,  1269,  1275,  1282,  1288,  1294,  1300,  1306,  1312,
-    1318,  1324,  1330,  1336,  1342,  1362,  1371,  1377,  1378,  1381,
-    1384,  1390,  1397,  1406,  1409,  1412,  1416,  1420,  1424,  1429,
-    1437,  1441,  1446,  1450,  1453,  1457,  1460,  1465,  1466,  1467,
-    1468,  1469,  1470,  1471,  1472,  1473,  1476,  1477,  1478,  1481,
-    1482,  1483,  1487,  1494,  1506,  1512,  1524,  1536,  1539,  1545,
-    1550,  1553,  1558,  1559,  1563,  1579,  1595,  1611,  1627,  1638,
-    1644,  1654,  1677,  1688,  1707,  1713,  1714,  1720,  1721,  1732,
-    1743,  1754,  1764,  1774,  1784,  1787,  1788,  1791,  1792,  1795,
-    1798,  1801,  1809,  1819,  1820,  1823,  1840,  1847,  1854,  1861,
-    1868,  1875,  1884,  1893,  1904,  1905,  1908,  1928,  1938,  1947,
-    1958,  1961,  1966,  1975,  1986,  1989,  1995,  1996,  2000,  2001
+       0,   649,   649,   650,   651,   652,   655,   664,   673,   682,
+     691,   700,   711,   712,   713,   714,   715,   716,   717,   718,
+     721,   726,   733,   747,   748,   760,   769,   783,   784,   787,
+     788,   797,   809,   810,   811,   812,   815,   816,   817,   818,
+     821,   841,   865,   869,   877,   878,   879,   880,   881,   887,
+     890,   895,   963,  1017,  1106,  1114,  1119,  1167,  1203,  1219,
+    1220,  1223,  1224,  1227,  1228,  1240,  1241,  1244,  1250,  1256,
+    1262,  1268,  1274,  1280,  1287,  1293,  1299,  1305,  1311,  1317,
+    1323,  1329,  1335,  1341,  1347,  1372,  1381,  1387,  1388,  1391,
+    1394,  1400,  1407,  1416,  1419,  1422,  1426,  1430,  1434,  1439,
+    1447,  1451,  1456,  1460,  1463,  1467,  1470,  1475,  1476,  1477,
+    1478,  1479,  1480,  1481,  1482,  1483,  1486,  1487,  1488,  1491,
+    1492,  1493,  1497,  1504,  1516,  1522,  1534,  1546,  1549,  1555,
+    1560,  1563,  1568,  1569,  1573,  1589,  1605,  1621,  1637,  1648,
+    1654,  1664,  1687,  1698,  1717,  1723,  1724,  1730,  1731,  1742,
+    1753,  1764,  1774,  1784,  1794,  1797,  1798,  1801,  1802,  1805,
+    1808,  1811,  1819,  1829,  1830,  1833,  1850,  1857,  1864,  1871,
+    1878,  1885,  1894,  1903,  1914,  1915,  1918,  1938,  1948,  1957,
+    1968,  1971,  1976,  1985,  1996,  1999,  2005,  2006,  2010,  2011
 };
 #endif
 
@@ -2072,27 +2077,27 @@ yyreduce:
   switch (yyn)
     {
         case 2:
-#line 644 "parse.y"
+#line 649 "parse.y"
     { ; }
     break;
 
   case 3:
-#line 645 "parse.y"
+#line 650 "parse.y"
     { ; }
     break;
 
   case 4:
-#line 646 "parse.y"
+#line 651 "parse.y"
     { ; }
     break;
 
   case 5:
-#line 647 "parse.y"
+#line 652 "parse.y"
     { ; }
     break;
 
   case 6:
-#line 650 "parse.y"
+#line 655 "parse.y"
     {
                        Node *node = node_new (CCODE_NODE,
                                               "cctype", C_CCODE,
@@ -2105,7 +2110,7 @@ yyreduce:
     break;
 
   case 7:
-#line 659 "parse.y"
+#line 664 "parse.y"
     {
                        Node *node = node_new (CCODE_NODE,
                                               "cctype", H_CCODE,
@@ -2118,7 +2123,7 @@ yyreduce:
     break;
 
   case 8:
-#line 668 "parse.y"
+#line 673 "parse.y"
     {
                        Node *node = node_new (CCODE_NODE,
                                               "cctype", HT_CCODE,
@@ -2131,7 +2136,7 @@ yyreduce:
     break;
 
   case 9:
-#line 677 "parse.y"
+#line 682 "parse.y"
     {
                        Node *node = node_new (CCODE_NODE,
                                               "cctype", PH_CCODE,
@@ -2144,7 +2149,7 @@ yyreduce:
     break;
 
   case 10:
-#line 686 "parse.y"
+#line 691 "parse.y"
     {
                        Node *node = node_new (CCODE_NODE,
                                               "cctype", A_CCODE,
@@ -2157,7 +2162,7 @@ yyreduce:
     break;
 
   case 11:
-#line 695 "parse.y"
+#line 700 "parse.y"
     {
                        Node *node = node_new (CCODE_NODE,
                                               "cctype", AT_CCODE,
@@ -2170,47 +2175,47 @@ yyreduce:
     break;
 
   case 12:
-#line 706 "parse.y"
+#line 711 "parse.y"
     { ; }
     break;
 
   case 13:
-#line 707 "parse.y"
+#line 712 "parse.y"
     { ; }
     break;
 
   case 14:
-#line 708 "parse.y"
+#line 713 "parse.y"
     { ; }
     break;
 
   case 15:
-#line 709 "parse.y"
+#line 714 "parse.y"
     { ; }
     break;
 
   case 16:
-#line 710 "parse.y"
+#line 715 "parse.y"
     { ; }
     break;
 
   case 17:
-#line 711 "parse.y"
+#line 716 "parse.y"
     { ; }
     break;
 
   case 18:
-#line 712 "parse.y"
+#line 717 "parse.y"
     { ; }
     break;
 
   case 19:
-#line 713 "parse.y"
+#line 718 "parse.y"
     { ; }
     break;
 
   case 20:
-#line 716 "parse.y"
+#line 721 "parse.y"
     {
                        ((Class *)class)->nodes = class_nodes;
                        class_nodes = NULL;
@@ -2219,7 +2224,7 @@ yyreduce:
     break;
 
   case 21:
-#line 721 "parse.y"
+#line 726 "parse.y"
     {
                        ((Class *)class)->nodes = NULL;
                        class_nodes = NULL;
@@ -2228,7 +2233,7 @@ yyreduce:
     break;
 
   case 22:
-#line 728 "parse.y"
+#line 733 "parse.y"
     {
                        class = node_new (CLASS_NODE,
                                          "otype:steal", yyvsp[-3].id,
@@ -2244,7 +2249,7 @@ yyreduce:
     break;
 
   case 24:
-#line 743 "parse.y"
+#line 748 "parse.y"
     {
                        if(strcmp(yyvsp[-3].id,"chunks") == 0) {
                                g_free (chunk_size);
@@ -2260,7 +2265,7 @@ yyreduce:
     break;
 
   case 25:
-#line 755 "parse.y"
+#line 760 "parse.y"
     {
                        if (strcmp (yyvsp[-3].id, "interface") == 0) {
                                interfaces = g_list_append (interfaces,
@@ -2273,7 +2278,7 @@ yyreduce:
     break;
 
   case 26:
-#line 764 "parse.y"
+#line 769 "parse.y"
     {
                        if(strcmp(yyvsp[-3].id,"chunks") == 0) {
                                g_free (chunk_size);
@@ -2289,22 +2294,22 @@ yyreduce:
     break;
 
   case 27:
-#line 778 "parse.y"
+#line 783 "parse.y"
     { ; }
     break;
 
   case 28:
-#line 779 "parse.y"
+#line 784 "parse.y"
     { ; }
     break;
 
   case 29:
-#line 782 "parse.y"
+#line 787 "parse.y"
     { ; }
     break;
 
   case 30:
-#line 783 "parse.y"
+#line 788 "parse.y"
     {
                        if (strcmp (yyvsp[-1].id, "BonoboObject") != 0) {
                                g_free (yyvsp[-1].id);
@@ -2317,7 +2322,7 @@ yyreduce:
     break;
 
   case 31:
-#line 792 "parse.y"
+#line 797 "parse.y"
     {
                        if (strcmp (yyvsp[-2].id, "interface") != 0) {
                                g_free (yyvsp[-2].id);
@@ -2333,47 +2338,47 @@ yyreduce:
     break;
 
   case 32:
-#line 804 "parse.y"
+#line 809 "parse.y"
     { ; }
     break;
 
   case 33:
-#line 805 "parse.y"
+#line 810 "parse.y"
     { ; }
     break;
 
   case 34:
-#line 806 "parse.y"
+#line 811 "parse.y"
     { ; }
     break;
 
   case 35:
-#line 807 "parse.y"
+#line 812 "parse.y"
     { ; }
     break;
 
   case 36:
-#line 810 "parse.y"
+#line 815 "parse.y"
     { the_scope = PUBLIC_SCOPE; }
     break;
 
   case 37:
-#line 811 "parse.y"
+#line 816 "parse.y"
     { the_scope = PRIVATE_SCOPE; }
     break;
 
   case 38:
-#line 812 "parse.y"
+#line 817 "parse.y"
     { the_scope = PROTECTED_SCOPE; }
     break;
 
   case 39:
-#line 813 "parse.y"
+#line 818 "parse.y"
     { the_scope = CLASS_SCOPE; }
     break;
 
   case 40:
-#line 816 "parse.y"
+#line 821 "parse.y"
     {
                        if (strcmp (yyvsp[-1].id, "destroywith") == 0) {
                                g_free (yyvsp[-1].id);
@@ -2397,7 +2402,7 @@ yyreduce:
     break;
 
   case 41:
-#line 836 "parse.y"
+#line 841 "parse.y"
     {
                        if (strcmp (yyvsp[-2].id, "destroy") == 0) {
                                g_free(yyvsp[-2].id);
@@ -2423,7 +2428,7 @@ yyreduce:
     break;
 
   case 42:
-#line 860 "parse.y"
+#line 865 "parse.y"
     {
                        initializer = yyvsp[0].id;
                        initializer_line = ccode_line;
@@ -2431,7 +2436,7 @@ yyreduce:
     break;
 
   case 43:
-#line 864 "parse.y"
+#line 869 "parse.y"
     {
                        initializer = (yyvsp[0].cbuf)->str;
                        initializer_line = ccode_line;
@@ -2440,27 +2445,27 @@ yyreduce:
     break;
 
   case 44:
-#line 872 "parse.y"
+#line 877 "parse.y"
     { ; }
     break;
 
   case 45:
-#line 873 "parse.y"
+#line 878 "parse.y"
     { ; }
     break;
 
   case 46:
-#line 874 "parse.y"
+#line 879 "parse.y"
     { destructor = NULL; }
     break;
 
   case 47:
-#line 875 "parse.y"
+#line 880 "parse.y"
     { initializer = NULL; }
     break;
 
   case 48:
-#line 876 "parse.y"
+#line 881 "parse.y"
     {
                        destructor = NULL;
                        initializer = NULL;
@@ -2468,21 +2473,21 @@ yyreduce:
     break;
 
   case 49:
-#line 882 "parse.y"
+#line 887 "parse.y"
     {
                        push_variable(yyvsp[-2].id, the_scope,yyvsp[-4].line, NULL);
                                                }
     break;
 
   case 50:
-#line 885 "parse.y"
+#line 890 "parse.y"
     {
                        push_variable(yyvsp[-3].id, the_scope, yyvsp[-5].line, yyvsp[-2].id);
                                                }
     break;
 
   case 51:
-#line 890 "parse.y"
+#line 895 "parse.y"
     {
                        Node *node = NULL;
                        if(strcmp(yyvsp[-6].id,"get")==0 &&
@@ -2554,7 +2559,7 @@ yyreduce:
     break;
 
   case 52:
-#line 958 "parse.y"
+#line 963 "parse.y"
     {
                        Node *node = NULL;
                        if(strcmp(yyvsp[-3].id, "get") == 0) {
@@ -2612,7 +2617,7 @@ yyreduce:
     break;
 
   case 53:
-#line 1012 "parse.y"
+#line 1017 "parse.y"
     {
                        Node *node;
                        char *get, *set = NULL;
@@ -2703,7 +2708,7 @@ yyreduce:
     break;
 
   case 54:
-#line 1101 "parse.y"
+#line 1106 "parse.y"
     {
                        if (strcmp (yyvsp[-1].id, "export")!=0) {
                                g_free (yyvsp[-1].id); 
@@ -2715,14 +2720,14 @@ yyreduce:
     break;
 
   case 55:
-#line 1109 "parse.y"
+#line 1114 "parse.y"
     {
                        yyval.id = NULL;
                                                }
     break;
 
   case 56:
-#line 1114 "parse.y"
+#line 1119 "parse.y"
     {
                        ensure_property ();
                        node_set ((Node *)property,
@@ -2774,7 +2779,7 @@ yyreduce:
     break;
 
   case 57:
-#line 1162 "parse.y"
+#line 1167 "parse.y"
     {
                        ensure_property ();
                        node_set ((Node *)property,
@@ -2814,7 +2819,7 @@ yyreduce:
     break;
 
   case 58:
-#line 1198 "parse.y"
+#line 1203 "parse.y"
     {
                        ensure_property ();
                        node_set ((Node *)property,
@@ -2832,32 +2837,32 @@ yyreduce:
     break;
 
   case 59:
-#line 1214 "parse.y"
+#line 1219 "parse.y"
     { ; }
     break;
 
   case 60:
-#line 1215 "parse.y"
+#line 1220 "parse.y"
     { ; }
     break;
 
   case 61:
-#line 1218 "parse.y"
+#line 1223 "parse.y"
     { ; }
     break;
 
   case 62:
-#line 1219 "parse.y"
+#line 1224 "parse.y"
     { ; }
     break;
 
   case 63:
-#line 1222 "parse.y"
+#line 1227 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
   case 64:
-#line 1223 "parse.y"
+#line 1228 "parse.y"
     {
                        if (strcmp (yyvsp[-3].id, "_") != 0) {
                                g_free (yyvsp[-3].id);
@@ -2871,17 +2876,17 @@ yyreduce:
     break;
 
   case 65:
-#line 1235 "parse.y"
+#line 1240 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
   case 66:
-#line 1236 "parse.y"
+#line 1241 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
   case 67:
-#line 1239 "parse.y"
+#line 1244 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2891,7 +2896,7 @@ yyreduce:
     break;
 
   case 68:
-#line 1245 "parse.y"
+#line 1250 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2901,7 +2906,7 @@ yyreduce:
     break;
 
   case 69:
-#line 1251 "parse.y"
+#line 1256 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2911,7 +2916,7 @@ yyreduce:
     break;
 
   case 70:
-#line 1257 "parse.y"
+#line 1262 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2921,7 +2926,7 @@ yyreduce:
     break;
 
   case 71:
-#line 1263 "parse.y"
+#line 1268 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2931,7 +2936,7 @@ yyreduce:
     break;
 
   case 72:
-#line 1269 "parse.y"
+#line 1274 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2941,7 +2946,7 @@ yyreduce:
     break;
 
   case 73:
-#line 1275 "parse.y"
+#line 1280 "parse.y"
     {
                Type *type = pop_type ();
                ensure_property ();
@@ -2952,7 +2957,7 @@ yyreduce:
     break;
 
   case 74:
-#line 1282 "parse.y"
+#line 1287 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2962,7 +2967,7 @@ yyreduce:
     break;
 
   case 75:
-#line 1288 "parse.y"
+#line 1293 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2972,7 +2977,7 @@ yyreduce:
     break;
 
   case 76:
-#line 1294 "parse.y"
+#line 1299 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2982,7 +2987,7 @@ yyreduce:
     break;
 
   case 77:
-#line 1300 "parse.y"
+#line 1305 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -2992,7 +2997,7 @@ yyreduce:
     break;
 
   case 78:
-#line 1306 "parse.y"
+#line 1311 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -3002,7 +3007,7 @@ yyreduce:
     break;
 
   case 79:
-#line 1312 "parse.y"
+#line 1317 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -3012,7 +3017,7 @@ yyreduce:
     break;
 
   case 80:
-#line 1318 "parse.y"
+#line 1323 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -3022,7 +3027,7 @@ yyreduce:
     break;
 
   case 81:
-#line 1324 "parse.y"
+#line 1329 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -3032,7 +3037,7 @@ yyreduce:
     break;
 
   case 82:
-#line 1330 "parse.y"
+#line 1335 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -3042,7 +3047,7 @@ yyreduce:
     break;
 
   case 83:
-#line 1336 "parse.y"
+#line 1341 "parse.y"
     {
                ensure_property ();
                node_set ((Node *)property,
@@ -3052,10 +3057,15 @@ yyreduce:
     break;
 
   case 84:
-#line 1342 "parse.y"
+#line 1347 "parse.y"
     {
                ensure_property ();
-               if (strcmp (yyvsp[0].id, "link") == 0) {
+               if (strcmp (yyvsp[0].id, "override") == 0) {
+                       g_free(yyvsp[0].id);
+                       node_set ((Node *)property,
+                                 "override", TRUE,
+                                 NULL);
+               } else if (strcmp (yyvsp[0].id, "link") == 0) {
                        g_free(yyvsp[0].id);
                        node_set ((Node *)property,
                                  "link", TRUE,
@@ -3074,7 +3084,7 @@ yyreduce:
     break;
 
   case 85:
-#line 1362 "parse.y"
+#line 1372 "parse.y"
     {
                        if(strcmp(yyvsp[-2].id,"type")!=0) {
                                g_free(yyvsp[-4].id);
@@ -3087,7 +3097,7 @@ yyreduce:
     break;
 
   case 86:
-#line 1371 "parse.y"
+#line 1381 "parse.y"
     {
                        yyval.id = debool (yyvsp[0].id);
                        typestack = g_list_prepend(typestack,NULL);
@@ -3095,31 +3105,31 @@ yyreduce:
     break;
 
   case 87:
-#line 1377 "parse.y"
+#line 1387 "parse.y"
     { yyval.list = yyvsp[-1].list; }
     break;
 
   case 88:
-#line 1378 "parse.y"
+#line 1388 "parse.y"
     { yyval.list = NULL; }
     break;
 
   case 89:
-#line 1381 "parse.y"
+#line 1391 "parse.y"
     {
                        yyval.list = g_list_append(yyvsp[0].list,yyvsp[-2].id);
                                                }
     break;
 
   case 90:
-#line 1384 "parse.y"
+#line 1394 "parse.y"
     {
                        yyval.list = g_list_append(NULL,yyvsp[0].id);
                                                }
     break;
 
   case 91:
-#line 1390 "parse.y"
+#line 1400 "parse.y"
     {
                        Node *node = node_new (TYPE_NODE, 
                                               "name:steal", yyvsp[-1].id,
@@ -3130,7 +3140,7 @@ yyreduce:
     break;
 
   case 92:
-#line 1397 "parse.y"
+#line 1407 "parse.y"
     {
                        Node *node = node_new (TYPE_NODE, 
                                               "name:steal", yyvsp[0].id,
@@ -3140,21 +3150,21 @@ yyreduce:
     break;
 
   case 93:
-#line 1406 "parse.y"
+#line 1416 "parse.y"
     {
                        yyval.id = yyvsp[0].id;
                                                        }
     break;
 
   case 94:
-#line 1409 "parse.y"
+#line 1419 "parse.y"
     {
                        yyval.id = yyvsp[0].id;
                                                        }
     break;
 
   case 95:
-#line 1412 "parse.y"
+#line 1422 "parse.y"
     {
                        yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
@@ -3162,7 +3172,7 @@ yyreduce:
     break;
 
   case 96:
-#line 1416 "parse.y"
+#line 1426 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
@@ -3170,7 +3180,7 @@ yyreduce:
     break;
 
   case 97:
-#line 1420 "parse.y"
+#line 1430 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
@@ -3178,7 +3188,7 @@ yyreduce:
     break;
 
   case 98:
-#line 1424 "parse.y"
+#line 1434 "parse.y"
     {
                        yyval.id = g_strconcat("const ", yyvsp[-1].id, " ",
                                             yyvsp[0].id, NULL);
@@ -3187,7 +3197,7 @@ yyreduce:
     break;
 
   case 99:
-#line 1429 "parse.y"
+#line 1439 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-2].id, " ",
                                             yyvsp[-1].id, " const", NULL);
@@ -3196,7 +3206,7 @@ yyreduce:
     break;
 
   case 100:
-#line 1437 "parse.y"
+#line 1447 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
@@ -3204,7 +3214,7 @@ yyreduce:
     break;
 
   case 101:
-#line 1441 "parse.y"
+#line 1451 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
                        g_free(yyvsp[-1].id);
@@ -3213,7 +3223,7 @@ yyreduce:
     break;
 
   case 102:
-#line 1446 "parse.y"
+#line 1456 "parse.y"
     {
                        yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
                        g_free(yyvsp[0].id);
@@ -3221,14 +3231,14 @@ yyreduce:
     break;
 
   case 103:
-#line 1450 "parse.y"
+#line 1460 "parse.y"
     {
                        yyval.id = yyvsp[0].id;
                                                        }
     break;
 
   case 104:
-#line 1453 "parse.y"
+#line 1463 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                        g_free(yyvsp[-1].id);
@@ -3236,91 +3246,91 @@ yyreduce:
     break;
 
   case 105:
-#line 1457 "parse.y"
+#line 1467 "parse.y"
     {
                        yyval.id = g_strdup(yyvsp[0].id);
                                                        }
     break;
 
   case 106:
-#line 1460 "parse.y"
+#line 1470 "parse.y"
     {
                        yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
                                                        }
     break;
 
   case 107:
-#line 1465 "parse.y"
+#line 1475 "parse.y"
     { yyval.id = "void"; }
     break;
 
   case 108:
-#line 1466 "parse.y"
+#line 1476 "parse.y"
     { yyval.id = "char"; }
     break;
 
   case 109:
-#line 1467 "parse.y"
+#line 1477 "parse.y"
     { yyval.id = "short"; }
     break;
 
   case 110:
-#line 1468 "parse.y"
+#line 1478 "parse.y"
     { yyval.id = "int"; }
     break;
 
   case 111:
-#line 1469 "parse.y"
+#line 1479 "parse.y"
     { yyval.id = "long"; }
     break;
 
   case 112:
-#line 1470 "parse.y"
+#line 1480 "parse.y"
     { yyval.id = "float"; }
     break;
 
   case 113:
-#line 1471 "parse.y"
+#line 1481 "parse.y"
     { yyval.id = "double"; }
     break;
 
   case 114:
-#line 1472 "parse.y"
+#line 1482 "parse.y"
     { yyval.id = "signed"; }
     break;
 
   case 115:
-#line 1473 "parse.y"
+#line 1483 "parse.y"
     { yyval.id = "unsigned"; }
     break;
 
   case 116:
-#line 1476 "parse.y"
+#line 1486 "parse.y"
     { yyval.id = "struct"; }
     break;
 
   case 117:
-#line 1477 "parse.y"
+#line 1487 "parse.y"
     { yyval.id = "union"; }
     break;
 
   case 118:
-#line 1478 "parse.y"
+#line 1488 "parse.y"
     { yyval.id = "enum"; }
     break;
 
   case 119:
-#line 1481 "parse.y"
+#line 1491 "parse.y"
     { yyval.id = g_strdup("*"); }
     break;
 
   case 120:
-#line 1482 "parse.y"
+#line 1492 "parse.y"
     { yyval.id = g_strdup("* const"); }
     break;
 
   case 121:
-#line 1483 "parse.y"
+#line 1493 "parse.y"
     {
                                yyval.id = g_strconcat("*", yyvsp[0].id, NULL);
                                g_free(yyvsp[0].id);
@@ -3328,7 +3338,7 @@ yyreduce:
     break;
 
   case 122:
-#line 1487 "parse.y"
+#line 1497 "parse.y"
     {
                                yyval.id = g_strconcat("* const", yyvsp[0].id, NULL);
                                g_free(yyvsp[0].id);
@@ -3336,7 +3346,7 @@ yyreduce:
     break;
 
   case 123:
-#line 1494 "parse.y"
+#line 1504 "parse.y"
     {
                        if(strcmp(yyvsp[-1].id, "first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
@@ -3352,14 +3362,14 @@ yyreduce:
     break;
 
   case 124:
-#line 1506 "parse.y"
+#line 1516 "parse.y"
     {
                        yyval.sigtype = SIGNAL_LAST_METHOD;
                                        }
     break;
 
   case 125:
-#line 1512 "parse.y"
+#line 1522 "parse.y"
     {
                        if(strcmp(yyvsp[-1].id,"first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
@@ -3375,7 +3385,7 @@ yyreduce:
     break;
 
   case 126:
-#line 1524 "parse.y"
+#line 1534 "parse.y"
     {
                        if(strcmp(yyvsp[-2].id,"first")==0)
                                yyval.sigtype = SIGNAL_FIRST_METHOD;
@@ -3391,14 +3401,14 @@ yyreduce:
     break;
 
   case 127:
-#line 1536 "parse.y"
+#line 1546 "parse.y"
     {
                        yyval.sigtype = SIGNAL_LAST_METHOD;
                                        }
     break;
 
   case 128:
-#line 1539 "parse.y"
+#line 1549 "parse.y"
     {
                        /* the_scope was default thus public */
                        the_scope = PUBLIC_SCOPE;
@@ -3406,38 +3416,38 @@ yyreduce:
     break;
 
   case 129:
-#line 1545 "parse.y"
+#line 1555 "parse.y"
     {
                        gtktypes = g_list_prepend(gtktypes, debool (yyvsp[-3].id));
                                                }
     break;
 
   case 130:
-#line 1550 "parse.y"
+#line 1560 "parse.y"
     {
                        gtktypes = g_list_append(gtktypes, debool (yyvsp[0].id));
                                                }
     break;
 
   case 131:
-#line 1553 "parse.y"
+#line 1563 "parse.y"
     { 
                        gtktypes = g_list_append(gtktypes, debool (yyvsp[0].id));
                                                        }
     break;
 
   case 132:
-#line 1558 "parse.y"
+#line 1568 "parse.y"
     { yyval.cbuf = yyvsp[0].cbuf; }
     break;
 
   case 133:
-#line 1559 "parse.y"
+#line 1569 "parse.y"
     { yyval.cbuf = NULL; }
     break;
 
   case 134:
-#line 1563 "parse.y"
+#line 1573 "parse.y"
     {
                        if(!has_self) {
                                yyerror(_("signal without 'self' as "
@@ -3457,7 +3467,7 @@ yyreduce:
     break;
 
   case 135:
-#line 1579 "parse.y"
+#line 1589 "parse.y"
     {
                        if(!has_self) {
                                yyerror(_("signal without 'self' as "
@@ -3477,7 +3487,7 @@ yyreduce:
     break;
 
   case 136:
-#line 1595 "parse.y"
+#line 1605 "parse.y"
     {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
@@ -3497,7 +3507,7 @@ yyreduce:
     break;
 
   case 137:
-#line 1611 "parse.y"
+#line 1621 "parse.y"
     {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
@@ -3517,7 +3527,7 @@ yyreduce:
     break;
 
   case 138:
-#line 1627 "parse.y"
+#line 1637 "parse.y"
     {
                        if(!has_self) {
                                yyerror(_("virtual method without 'self' as "
@@ -3532,7 +3542,7 @@ yyreduce:
     break;
 
   case 139:
-#line 1638 "parse.y"
+#line 1648 "parse.y"
     {
                        push_function(NO_SCOPE, OVERRIDE_METHOD, yyvsp[-8].id,
                                      yyvsp[-5].id, yyvsp[0].cbuf,
@@ -3542,7 +3552,7 @@ yyreduce:
     break;
 
   case 140:
-#line 1644 "parse.y"
+#line 1654 "parse.y"
     {
                        if(the_scope == CLASS_SCOPE) {
                                yyerror(_("a method cannot be of class scope"));
@@ -3556,7 +3566,7 @@ yyreduce:
     break;
 
   case 141:
-#line 1654 "parse.y"
+#line 1664 "parse.y"
     {
                        if(strcmp(yyvsp[-4].id, "init")==0) {
                                push_init_arg(yyvsp[-2].id,FALSE);
@@ -3581,7 +3591,7 @@ yyreduce:
     break;
 
   case 142:
-#line 1677 "parse.y"
+#line 1687 "parse.y"
     {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
@@ -3596,7 +3606,7 @@ yyreduce:
     break;
 
   case 143:
-#line 1688 "parse.y"
+#line 1698 "parse.y"
     {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
@@ -3619,7 +3629,7 @@ yyreduce:
     break;
 
   case 144:
-#line 1707 "parse.y"
+#line 1717 "parse.y"
     {
                        g_free(onerror); onerror = NULL;
                        g_free(defreturn); defreturn = NULL;
@@ -3627,12 +3637,12 @@ yyreduce:
     break;
 
   case 145:
-#line 1713 "parse.y"
+#line 1723 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
   case 146:
-#line 1714 "parse.y"
+#line 1724 "parse.y"
     {
                        yyval.id = (yyvsp[0].cbuf)->str;
                        g_string_free(yyvsp[0].cbuf, FALSE);
@@ -3640,12 +3650,12 @@ yyreduce:
     break;
 
   case 147:
-#line 1720 "parse.y"
+#line 1730 "parse.y"
     { vararg = FALSE; has_self = FALSE; }
     break;
 
   case 148:
-#line 1721 "parse.y"
+#line 1731 "parse.y"
     {
                        vararg = FALSE;
                        has_self = TRUE;
@@ -3660,7 +3670,7 @@ yyreduce:
     break;
 
   case 149:
-#line 1732 "parse.y"
+#line 1742 "parse.y"
     {
                        vararg = FALSE;
                        has_self = TRUE;
@@ -3675,7 +3685,7 @@ yyreduce:
     break;
 
   case 150:
-#line 1743 "parse.y"
+#line 1753 "parse.y"
     {
                        vararg = FALSE;
                        has_self = TRUE;
@@ -3690,7 +3700,7 @@ yyreduce:
     break;
 
   case 151:
-#line 1754 "parse.y"
+#line 1764 "parse.y"
     {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-2].id,"self")==0)
@@ -3704,7 +3714,7 @@ yyreduce:
     break;
 
   case 152:
-#line 1764 "parse.y"
+#line 1774 "parse.y"
     {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-3].id,"self")==0)
@@ -3718,7 +3728,7 @@ yyreduce:
     break;
 
   case 153:
-#line 1774 "parse.y"
+#line 1784 "parse.y"
     {
                        has_self = TRUE;
                        if(strcmp(yyvsp[-2].id,"self")==0)
@@ -3732,46 +3742,46 @@ yyreduce:
     break;
 
   case 154:
-#line 1784 "parse.y"
+#line 1794 "parse.y"
     { has_self = FALSE; }
     break;
 
   case 155:
-#line 1787 "parse.y"
+#line 1797 "parse.y"
     { vararg = TRUE; }
     break;
 
   case 156:
-#line 1788 "parse.y"
+#line 1798 "parse.y"
     { vararg = FALSE; }
     break;
 
   case 157:
-#line 1791 "parse.y"
+#line 1801 "parse.y"
     { ; }
     break;
 
   case 158:
-#line 1792 "parse.y"
+#line 1802 "parse.y"
     { ; }
     break;
 
   case 159:
-#line 1795 "parse.y"
+#line 1805 "parse.y"
     {
                        push_funcarg(yyvsp[0].id,NULL);
                                                                }
     break;
 
   case 160:
-#line 1798 "parse.y"
+#line 1808 "parse.y"
     {
                        push_funcarg(yyvsp[-1].id,yyvsp[0].id);
                                                                }
     break;
 
   case 161:
-#line 1801 "parse.y"
+#line 1811 "parse.y"
     {
                        if(strcmp(yyvsp[-2].id,"check")!=0) {
                                yyerror(_("parse error"));
@@ -3783,7 +3793,7 @@ yyreduce:
     break;
 
   case 162:
-#line 1809 "parse.y"
+#line 1819 "parse.y"
     {
                        if(strcmp(yyvsp[-2].id,"check")!=0) {
                                yyerror(_("parse error"));
@@ -3795,17 +3805,17 @@ yyreduce:
     break;
 
   case 163:
-#line 1819 "parse.y"
+#line 1829 "parse.y"
     { ; }
     break;
 
   case 164:
-#line 1820 "parse.y"
+#line 1830 "parse.y"
     { ; }
     break;
 
   case 165:
-#line 1823 "parse.y"
+#line 1833 "parse.y"
     {
                        if(strcmp(yyvsp[0].id,"type")==0) {
                                Node *node = node_new (CHECK_NODE,
@@ -3826,7 +3836,7 @@ yyreduce:
     break;
 
   case 166:
-#line 1840 "parse.y"
+#line 1850 "parse.y"
     {
                        Node *node = node_new (CHECK_NODE,
                                               "chtype", GT_CHECK,
@@ -3837,7 +3847,7 @@ yyreduce:
     break;
 
   case 167:
-#line 1847 "parse.y"
+#line 1857 "parse.y"
     {
                        Node *node = node_new (CHECK_NODE,
                                               "chtype", LT_CHECK,
@@ -3848,7 +3858,7 @@ yyreduce:
     break;
 
   case 168:
-#line 1854 "parse.y"
+#line 1864 "parse.y"
     {
                        Node *node = node_new (CHECK_NODE,
                                               "chtype", GE_CHECK,
@@ -3859,7 +3869,7 @@ yyreduce:
     break;
 
   case 169:
-#line 1861 "parse.y"
+#line 1871 "parse.y"
     {
                        Node *node = node_new (CHECK_NODE,
                                               "chtype", LE_CHECK,
@@ -3870,7 +3880,7 @@ yyreduce:
     break;
 
   case 170:
-#line 1868 "parse.y"
+#line 1878 "parse.y"
     {
                        Node *node = node_new (CHECK_NODE,
                                               "chtype", EQ_CHECK,
@@ -3881,7 +3891,7 @@ yyreduce:
     break;
 
   case 171:
-#line 1875 "parse.y"
+#line 1885 "parse.y"
     {
                        Node *node = node_new (CHECK_NODE,
                                               "chtype", NE_CHECK,
@@ -3892,7 +3902,7 @@ yyreduce:
     break;
 
   case 172:
-#line 1884 "parse.y"
+#line 1894 "parse.y"
     {
                        Node *node = node_new (ENUMDEF_NODE,
                                               "etype:steal", yyvsp[-1].id,
@@ -3905,7 +3915,7 @@ yyreduce:
     break;
 
   case 173:
-#line 1893 "parse.y"
+#line 1903 "parse.y"
     {
                        Node *node = node_new (ENUMDEF_NODE,
                                               "etype:steal", yyvsp[-1].id,
@@ -3918,17 +3928,17 @@ yyreduce:
     break;
 
   case 174:
-#line 1904 "parse.y"
+#line 1914 "parse.y"
     {;}
     break;
 
   case 175:
-#line 1905 "parse.y"
+#line 1915 "parse.y"
     {;}
     break;
 
   case 176:
-#line 1908 "parse.y"
+#line 1918 "parse.y"
     {
                        Node *node;
                        char *num = yyvsp[0].id;
@@ -3952,7 +3962,7 @@ yyreduce:
     break;
 
   case 177:
-#line 1928 "parse.y"
+#line 1938 "parse.y"
     {
                        Node *node;
 
@@ -3964,7 +3974,7 @@ yyreduce:
     break;
 
   case 178:
-#line 1938 "parse.y"
+#line 1948 "parse.y"
     {
                        Node *node = node_new (FLAGS_NODE,
                                               "ftype:steal", yyvsp[-1].id,
@@ -3977,7 +3987,7 @@ yyreduce:
     break;
 
   case 179:
-#line 1947 "parse.y"
+#line 1957 "parse.y"
     {
                        Node *node = node_new (FLAGS_NODE,
                                               "ftype:steal", yyvsp[-1].id,
@@ -3990,21 +4000,21 @@ yyreduce:
     break;
 
   case 180:
-#line 1958 "parse.y"
+#line 1968 "parse.y"
     {
                        flag_vals = g_list_append (flag_vals, yyvsp[0].id);
                }
     break;
 
   case 181:
-#line 1961 "parse.y"
+#line 1971 "parse.y"
     {
                        flag_vals = g_list_append (flag_vals, yyvsp[0].id);
                }
     break;
 
   case 182:
-#line 1966 "parse.y"
+#line 1976 "parse.y"
     {
                        Node *node = node_new (ERROR_NODE,
                                               "etype:steal", yyvsp[-1].id,
@@ -4017,7 +4027,7 @@ yyreduce:
     break;
 
   case 183:
-#line 1975 "parse.y"
+#line 1985 "parse.y"
     {
                        Node *node = node_new (ERROR_NODE,
                                               "etype:steal", yyvsp[-1].id,
@@ -4030,26 +4040,26 @@ yyreduce:
     break;
 
   case 184:
-#line 1986 "parse.y"
+#line 1996 "parse.y"
     {
                        error_vals = g_list_append (error_vals, yyvsp[0].id);
                }
     break;
 
   case 185:
-#line 1989 "parse.y"
+#line 1999 "parse.y"
     {
                        error_vals = g_list_append (error_vals, yyvsp[0].id);
                }
     break;
 
   case 186:
-#line 1995 "parse.y"
+#line 2005 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
   case 187:
-#line 1996 "parse.y"
+#line 2006 "parse.y"
     {
                        yyval.id = g_strconcat("-",yyvsp[0].id,NULL);
                        g_free(yyvsp[0].id);
@@ -4057,12 +4067,12 @@ yyreduce:
     break;
 
   case 188:
-#line 2000 "parse.y"
+#line 2010 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
   case 189:
-#line 2001 "parse.y"
+#line 2011 "parse.y"
     { yyval.id = yyvsp[0].id; }
     break;
 
@@ -4070,7 +4080,7 @@ yyreduce:
     }
 
 /* Line 1000 of yacc.c.  */
-#line 4074 "parse.c"
+#line 4084 "parse.c"
 \f
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -4295,6 +4305,6 @@ yyreturn:
 }
 
 
-#line 2004 "parse.y"
+#line 2014 "parse.y"
 
 
index 8454d8a6cf450d092d3703cd387f490721d823dc..4e8ea24f432655aba5893594e37a11e7bb0b7019 100644 (file)
 
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 623 "parse.y"
+#line 628 "parse.y"
 typedef union YYSTYPE {
        char *id;
        GString *cbuf;
index ded33fd4bc9e361e8f64f77845aa5b97da5d32a3..a6471cec26a3716f7374fd2d22b39119e8682fab 100644 (file)
@@ -562,6 +562,11 @@ property_link_and_export (Node *node)
                                        setcast = "(gint) ";
                                        getcast = to_free =
                                                get_prop_enum_flag_cast (prop);
+                               }  else if (strcmp (prop->gtktype, "POINTER") == 0) {
+                                       setcast = "(gpointer) ";
+                                       getcast = g_strdup_printf ("(%s%s) ",
+                                                                 prop->ptype->name,
+                                                                 prop->ptype->pointer ? prop->ptype->pointer : "");
                                }
                        }
 
@@ -1341,7 +1346,12 @@ param_spec_value: NICK '=' string                {
                  }
        |       TOKEN           {
                ensure_property ();
-               if (strcmp ($<id>1, "link") == 0) {
+               if (strcmp ($<id>1, "override") == 0) {
+                       g_free($<id>1);
+                       node_set ((Node *)property,
+                                 "override", TRUE,
+                                 NULL);
+               } else if (strcmp ($<id>1, "link") == 0) {
                        g_free($<id>1);
                        node_set ((Node *)property,
                                  "link", TRUE,
index a885f4fc7fadd844a6d7958d6db5293f33e43f8e..b900902b9ec945a5544d5a50a7a325d09fd14320 100644 (file)
@@ -124,6 +124,10 @@ class Test:Object from G:Object
                unrefwith g_object_unref;
        argument POINTER testingobj objectlink;
 
+       public Test:Object * testingobjllll
+               unrefwith gtk_widget_destroy;
+       argument POINTER testingobjllll objectlink;
+
        public Test:Object * testingobjfoo
                unref { if (VAR) g_object_unref (VAR); };
        argument POINTER testingobjfoo objectlink;
@@ -221,6 +225,13 @@ class Test:Object from G:Object
                               boxed_type=PACKAGE_TYPE_BOXED,
                               link);
 
+       private char ov_prop;
+       property CHAR ov_prop
+               (export,
+                override)
+               set { self->_priv->ov_prop = g_value_get_char (VAL); }
+               get { g_value_set_char (VAL, self->_priv->ov_prop); };
+
 
        private int j;
        public GObject * h;
index 6f77f47da1185b8b87f1dac1097b497da972060c..100e1f41699bb06b8035a74aea8d37cf2afea798 100644 (file)
@@ -143,6 +143,7 @@ enum {
        QUARK_default_value_STEAL,
        QUARK_extra_gtktype,
        QUARK_extra_gtktype_STEAL,
+       QUARK_override,
        QUARK_link,
        QUARK_export,
        QUARK_scope,
@@ -246,6 +247,7 @@ ensure_quarks (void)
        g_hash_table_insert (quark_ht, "default_value:steal", GINT_TO_POINTER (QUARK_default_value_STEAL));
        g_hash_table_insert (quark_ht, "extra_gtktype", GINT_TO_POINTER (QUARK_extra_gtktype));
        g_hash_table_insert (quark_ht, "extra_gtktype:steal", GINT_TO_POINTER (QUARK_extra_gtktype_STEAL));
+       g_hash_table_insert (quark_ht, "override", GINT_TO_POINTER (QUARK_override));
        g_hash_table_insert (quark_ht, "link", GINT_TO_POINTER (QUARK_link));
        g_hash_table_insert (quark_ht, "export", GINT_TO_POINTER (QUARK_export));
        g_hash_table_insert (quark_ht, "scope", GINT_TO_POINTER (QUARK_scope));
@@ -469,6 +471,7 @@ copy_property (Property * self)
        new->maximum = g_strdup (self->maximum);
        new->default_value = g_strdup (self->default_value);
        new->extra_gtktype = g_strdup (self->extra_gtktype);
+       new->override = self->override;
        new->link = self->link;
        new->export = self->export;
        new->get = g_strdup (self->get);
@@ -1485,6 +1488,11 @@ setv_property (Property * self, va_list __ap)
                        self->extra_gtktype = extra_gtktype;
                        break;
                }
+               case QUARK_override: {
+                       gboolean override = va_arg (__ap, gboolean);
+                       self->override = override;
+                       break;
+               }
                case QUARK_link: {
                        gboolean link = va_arg (__ap, gboolean);
                        self->link = link;
index d4107721b77600a9fc33ea4fec3076af43e18b61..b5c693ff383ef8c0153c47dc640007f4ff976ee3 100644 (file)
@@ -103,6 +103,7 @@ CLASS Property
   STRING       maximum
   STRING       default_value
   STRING       extra_gtktype
+  BOOL         override
   BOOL         link
   BOOL         export
   STRING       get
index 33801d83fe324271575d7c1fd2de588a4ec0c66c..e134553c75353b955121c7d466fe3007bbe191c6 100644 (file)
@@ -186,6 +186,7 @@ struct _Property {
        char * maximum;
        char * default_value;
        char * extra_gtktype;
+       gboolean override;
        gboolean link;
        gboolean export;
        char * get;
index de1d008f9be49aa955741b92f1245a092af8d1d7..84ed63e482aec2a0b36cc1f0f3ecf7ad75ca70c9 100644 (file)
@@ -101,8 +101,18 @@ replace_sep(const char *base, char r)
        if (for_cpp && strstr (s, "::") != NULL)
                return s;
 
-       while((p=strchr(s,':')))
-               *p = r;
+       if (r == '\0') {
+               while ((p=strchr(s,':')) != NULL) {
+                       char *t = p;
+                       while (*t != '\0') {
+                               *t = *(t+1);
+                               t++;
+                       }
+               }
+       } else {
+               while ((p=strchr(s,':')) != NULL)
+                       *p = r;
+       }
        if(*s == r) {
                p = g_strdup(s+1);
                g_free(s);