platform/upstream/gobject-introspection.git
16 years agoAdd initial python bindings for the scanner and depend on python 2.5.
Johan Dahlin [Tue, 25 Mar 2008 21:47:47 +0000 (21:47 +0000)]
Add initial python bindings for the scanner and depend on python 2.5.

2008-03-25  Johan Dahlin  <johan@gnome.org>

        * configure.ac:
        * giscanner:
        * giscanner/__init__.py:
        * giscanner/giscannermodule.c:
        * giscanner/Makefile.am:

        Add initial python bindings for the scanner and
        depend on python 2.5.

svn path=/trunk/; revision=165

16 years agoMove the scanner to a separate library.
Johan Dahlin [Tue, 25 Mar 2008 20:53:32 +0000 (20:53 +0000)]
Move the scanner to a separate library.

2008-03-25  Johan Dahlin  <johan@gnome.org>

* Makefile.am:
* configure.ac:
* giscanner/Makefile.am:
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h:
* tools/Makefile.am:
* tools/grealpath.h:
* tools/sourcescanner.c:
* tools/sourcescanner.h:

Move the scanner to a separate library.

svn path=/trunk/; revision=164

16 years agoSplit out the source scanner from the generator. Rename the symbols used
Johan Dahlin [Sun, 23 Mar 2008 21:55:17 +0000 (21:55 +0000)]
Split out the source scanner from the generator. Rename the symbols used

2008-03-23  Johan Dahlin  <johan@gnome.org>

* tools/Makefile.am:
* tools/scanner.c:
* tools/scanner.h:
* tools/scannerlexer.l:
* tools/scannerparser.y:
* tools/sourcescanner.c:
* tools/sourcescanner.h:
Split out the source scanner from the generator.
Rename the symbols used in the scanner to use the gi_ prefix.
This should make it possible to use the raw C parser from
other programs.

svn path=/trunk/; revision=163

16 years agoPass in the gobject.gidl since we're defining a GObject.
Johan Dahlin [Sun, 23 Mar 2008 21:51:56 +0000 (21:51 +0000)]
Pass in the gobject.gidl since we're defining a GObject.

2008-03-23  Johan Dahlin  <johan@gnome.org>

* tests/parser/Makefile.am (utility.gidl):
* tests/parser/utility-expected.gidl:
Pass in the gobject.gidl since we're defining a GObject.

svn path=/trunk/; revision=162

16 years agoInclude gobject-2.0 gidl, since we include a GObject class
Johan Dahlin [Sun, 23 Mar 2008 21:13:39 +0000 (21:13 +0000)]
Include gobject-2.0 gidl, since we include a GObject class

svn path=/trunk/; revision=161

16 years agoAdd a releaxng in relaxng we can use to validate the relaxngs schemas
Johan Dahlin [Wed, 12 Mar 2008 18:14:12 +0000 (18:14 +0000)]
Add a releaxng in relaxng we can use to validate the relaxngs schemas

2008-03-12  Johan Dahlin  <johan@gnome.org>

        * relaxng/relaxng.rng:
        Add a releaxng in relaxng we can use to validate the relaxngs
        schemas

svn path=/trunk/; revision=160

16 years agoFix compiler warnings.
Juerg Billeter [Wed, 12 Mar 2008 15:08:27 +0000 (15:08 +0000)]
Fix compiler warnings.

2008-03-12  Juerg Billeter  <j@bitron.ch>

* tools/scanner.c: (g_igenerator_new):
* tools/scannerparser.y:
Fix compiler warnings.

svn path=/trunk/; revision=159

16 years agoStart fixing memory management in g-idl-scanner.
Juerg Billeter [Wed, 12 Mar 2008 11:45:28 +0000 (11:45 +0000)]
Start fixing memory management in g-idl-scanner.

2008-03-12  Juerg Billeter  <j@bitron.ch>

* tools/scanner.c:
* tools/scanner.h:
* tools/scannerparser.y:
Start fixing memory management in g-idl-scanner.

svn path=/trunk/; revision=158

16 years agoFix critical warning when no shlib passed to g-idl-compiler.
Rob Taylor [Wed, 12 Mar 2008 01:16:24 +0000 (01:16 +0000)]
Fix critical warning when no shlib passed to g-idl-compiler.

2008-03-12  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/gidlcompilercontext.c: (write_compiled):
Fix critical warning when no shlib passed to g-idl-compiler.

svn path=/trunk/; revision=157

16 years agoAdd a get_type-function, so the scanner actually parses it as an object.
Johan Dahlin [Tue, 11 Mar 2008 23:32:36 +0000 (23:32 +0000)]
Add a get_type-function, so the scanner actually parses it as an object.

2008-03-12  Johan Dahlin  <johan@gnome.org>

* tests/parser/utility-expected.gidl:
* tests/parser/utility.h:
Add a get_type-function, so the scanner actually
parses it as an object.

svn path=/trunk/; revision=156

16 years agoAdd missing trailing quote. Bad Philip!
Johan Dahlin [Tue, 11 Mar 2008 23:27:24 +0000 (23:27 +0000)]
Add missing trailing quote. Bad Philip!

2008-03-12  Johan Dahlin  <johan@gnome.org>

        * tools/gidlwriter.c (function_generate): Add missing trailing quote.
        Bad Philip!

svn path=/trunk/; revision=155

16 years agoAdd a new gidl test. 'utility.gidl', which is used to be able to test
Johan Dahlin [Tue, 11 Mar 2008 23:22:55 +0000 (23:22 +0000)]
Add a new gidl test. 'utility.gidl', which is used to be able to test

2008-03-12  Johan Dahlin  <johan@gnome.org>

        * tests/parser/Foo-expected.gidl:
        * tests/parser/Makefile.am:
        * tests/parser/foo-object.h:
        * tests/parser/foo.c:
        * tests/parser/utility-expected.gidl:
        * tests/parser/utility.c:
        * tests/parser/utility.h:

        Add a new gidl test. 'utility.gidl', which is used to be able
        to test external type references. Add a reference to UtilityObject*
        in the idl file.

svn path=/trunk/; revision=154

16 years agoRemove most global variables
Johan Dahlin [Tue, 11 Mar 2008 14:25:08 +0000 (14:25 +0000)]
Remove most global variables

2008-03-11  Johan Dahlin  <johan@gnome.org>

        * tools/compiler.c:
        * tools/generate.c:
        Remove most global variables

svn path=/trunk/; revision=153

16 years agoRemove unused imports
Johan Dahlin [Tue, 11 Mar 2008 14:19:48 +0000 (14:19 +0000)]
Remove unused imports

svn path=/trunk/; revision=152

16 years agoAdded a few extra tests. Which resulted in finding a few bugs. Which
Philip Van Hoof [Tue, 11 Mar 2008 14:01:20 +0000 (14:01 +0000)]
Added a few extra tests. Which resulted in finding a few bugs. Which

2008-03-11  Philip Van Hoof  <me@pvanhoof.be>

        * tools/scannerlexer.l:
        * tools/scanner.c:
        * tests/parser/Foo-expected.gidl:
        * tests/parser/foo.c:
        * tests/parser/Makefile.am:
        * tests/parser/foo-object.h:

        Added a few extra tests. Which resulted in finding a few
        bugs. Which resulted in me fixing those bugs

svn path=/trunk/; revision=151

16 years agoAdd some comments for strings into generated output for easier debugging.
Rob Taylor [Tue, 11 Mar 2008 13:29:21 +0000 (13:29 +0000)]
Add some comments for strings into generated output for easier debugging.

2008-03-11  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
(g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
Add some comments for strings into generated output for
easier debugging.

svn path=/trunk/; revision=149

16 years agoWrite out the shlibs variable before writing out the strings length. Fixes
Rob Taylor [Tue, 11 Mar 2008 13:29:18 +0000 (13:29 +0000)]
Write out the shlibs variable before writing out the strings length. Fixes

2008-03-11  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/gidlcompilercontext.c: (write_compiled):
Write out the shlibs variable before writing out the strings
length. Fixes compiler warning when using '-l' flag with
g-idl-compiler

svn path=/trunk/; revision=148

16 years agoAdd support for parsing return arguments. Add support for caller-owns
Johan Dahlin [Tue, 11 Mar 2008 13:18:56 +0000 (13:18 +0000)]
Add support for parsing return arguments. Add support for caller-owns

2008-03-11  Johan Dahlin  <johan@gnome.org>

* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tools/scanner.c:
* tools/scanner.h:
* tools/scannerlexer.l:
Add support for parsing return arguments. Add support for
caller-owns return types.
Patch by Philip Van Hoof.

svn path=/trunk/; revision=146

16 years agoRemove parsing of the @deprecated syntax used in headers. We will support
Johan Dahlin [Tue, 11 Mar 2008 12:47:30 +0000 (12:47 +0000)]
Remove parsing of the @deprecated syntax used in headers. We will support

2008-03-11  Johan Dahlin  <johan@gnome.org>

        * tests/parser/Foo-expected.gidl:
        * tests/parser/foo-object.h:
        * tools/scanner.c:
        * tools/scanner.h:
        * tools/scannerlexer.l:
        * tools/scannerparser.y:
        Remove parsing of the @deprecated syntax used in headers.
        We will support gtk-doc deprecation in the future instead.

svn path=/trunk/; revision=145

16 years agoCoding style fixes
Johan Dahlin [Tue, 11 Mar 2008 08:59:16 +0000 (08:59 +0000)]
Coding style fixes

2008-03-11  Johan Dahlin  <johan@gnome.org>

* tools/compiler.c (main): Coding style fixes

svn path=/trunk/; revision=144

16 years agorevert back to 1.7.2 of automake
Johan Dahlin [Mon, 10 Mar 2008 22:57:13 +0000 (22:57 +0000)]
revert back to 1.7.2 of automake

svn path=/trunk/; revision=143

16 years agoRequire automake 1.10 Add GCOV_LIBS to GILIBS
Johan Dahlin [Mon, 10 Mar 2008 22:25:26 +0000 (22:25 +0000)]
Require automake 1.10 Add GCOV_LIBS to GILIBS

2008-03-10  Johan Dahlin  <johan@gnome.org>

        * autogen.sh:
        Require automake 1.10
        * configure.ac:
        Add GCOV_LIBS to GILIBS

svn path=/trunk/; revision=142

16 years agoRename null-ok to direction=out
Johan Dahlin [Mon, 10 Mar 2008 22:24:13 +0000 (22:24 +0000)]
Rename null-ok to direction=out

2008-03-10  Johan Dahlin  <johan@gnome.org>

        * tests/parser/Foo-expected.gidl:
        * tests/parser/foo.c:
        Rename null-ok to direction=out

svn path=/trunk/; revision=141

16 years agoreviewed and extensively tested by Johan
Philip Van Hoof [Mon, 10 Mar 2008 22:08:49 +0000 (22:08 +0000)]
reviewed and extensively tested by Johan

2008-03-10  Philip Van Hoof  <me@pvanhoof.be>

        reviewed and extensively tested by Johan

        * tests/parser/Foo-expected.gidl:
        * tests/parser/foo-object.h:
        * tests/parser/foo.c:
        * tools/gidlnode.c:
        * tools/gidlnode.h:
        * tools/gidlwriter.c:
        * tools/scanner.c:
        * tools/scanner.h:
        * tools/scannerlexer.l:
        * tools/scannerparser.y:

        Add support for scanning for gtk-doc comments inside
        C source files. Add tests

svn path=/trunk/; revision=140

16 years agoAdd an api to lex filenames. Lex all source .c files passed in on the
Johan Dahlin [Mon, 10 Mar 2008 18:43:36 +0000 (18:43 +0000)]
Add an api to lex filenames. Lex all source .c files passed in on the

2008-03-10  Johan Dahlin  <johan@gnome.org>

        * tests/parser/Makefile.am:
        * tests/parser/foo.c:
        * tools/scanner.c:
        * tools/scanner.h:
        * tools/scannerparser.y:
        Add an api to lex filenames.
        Lex all source .c files passed in on the command line.
        Scan sources in a test and a couple of private structures
        which should not be included in the generated gidl

svn path=/trunk/; revision=139

16 years agoMake the generated metadata depend on the g-idl-compiler
Johan Dahlin [Mon, 10 Mar 2008 18:12:45 +0000 (18:12 +0000)]
Make the generated metadata depend on the g-idl-compiler

2008-03-10  Johan Dahlin  <johan@gnome.org>

* tests/invoke/Makefile.am: Make the generated metadata
depend on the g-idl-compiler

svn path=/trunk/; revision=138

16 years agoand the ChangeLog
Johan Dahlin [Mon, 10 Mar 2008 17:52:14 +0000 (17:52 +0000)]
and the ChangeLog

svn path=/trunk/; revision=137

16 years agotools/gidlmodule.c tools/gidlmodule.h tools/gidlnode.c tools/gidlnode.h
Mark Doffman [Mon, 10 Mar 2008 17:47:31 +0000 (17:47 +0000)]
tools/gidlmodule.c tools/gidlmodule.h tools/gidlnode.c tools/gidlnode.h

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

    * tools/gidlmodule.c
    * tools/gidlmodule.h
    * tools/gidlnode.c
    * tools/gidlnode.h

      Remove the old g-idl-compiler code.

svn path=/trunk/; revision=136

16 years agotools/quote-file.sh tools/compiler.c tools/generate.c
Mark Doffman [Mon, 10 Mar 2008 17:47:29 +0000 (17:47 +0000)]
tools/quote-file.sh tools/compiler.c tools/generate.c

2008-02-22  Mark Doffman  <mark.doffman@codethink.co.uk>

    * tools/quote-file.sh
    * tools/compiler.c
    * tools/generate.c

      Move to using the 'C' struct compiler code.

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=135

16 years agogirepository/ginfo.c tools/generate.c
Mark Doffman [Mon, 10 Mar 2008 17:47:26 +0000 (17:47 +0000)]
girepository/ginfo.c tools/generate.c

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

    * girepository/ginfo.c
    * tools/generate.c

    Change the way that external references with no namespace
    are dealt with. External references with no namespace
    are placed into the XML as-if they are a local reference.
    This is temporary, but helps with roundtrip tests.

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=134

16 years agogirepository/ginfo.c
Mark Doffman [Mon, 10 Mar 2008 17:47:24 +0000 (17:47 +0000)]
girepository/ginfo.c

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

    * girepository/ginfo.c

      Add the ability to get the value of a constant of
      type TYPE_TAG_SYMBOL. In the case of a symbol the value
      is provided as a string.

      This would deal properly with:
      typedef char* random;
      const random = "A string";

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=133

16 years agogirepository/ginfo.c girepository/girepository.h tools/generate.c
Mark Doffman [Mon, 10 Mar 2008 17:47:20 +0000 (17:47 +0000)]
girepository/ginfo.c girepository/girepository.h tools/generate.c

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

    * girepository/ginfo.c
    * girepository/girepository.h
    * tools/generate.c

      Add a function to check if an enum is registered or not.
      Previously anything testing this relied on the g-type
      string offset having a value of 0.

    * girepository/gmetadata.c
    * girepository/gmetadata.h
    * tools/generate.c

      Remove unneccesary or erroneous checks. There were two
      metadata validation checks which made sure that the blob
      sizes were the same as some magic numbers compiled into the code.
      This is wrong as it breaks any forwards compatibility that may
      be possible.

      Checks were also present that made sure that unregistered type
      blobs had a value of 0 in the g-type offset field. This is
      unneccessary. If a type blob is unregistered then any value
      in its g-type field is simply invalid.

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=132

16 years agogirepository/ginfo.c girepository/gmetadata.c girepository/gmetadata.h
Mark Doffman [Mon, 10 Mar 2008 17:46:58 +0000 (17:46 +0000)]
girepository/ginfo.c girepository/gmetadata.c girepository/gmetadata.h

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

        * girepository/ginfo.c
        * girepository/gmetadata.c
        * girepository/gmetadata.h

          Change the metadata format to have a standard header
          for all the type blobs. Merge the SimpleTypeBlob
          and InterfaceTypeBlob into a union. A union of these
          two blobs existed previously but was not explicit
          in the metadata format.

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=131

16 years agotools/gidlcompilercontext.c tools/gidlcompilercontext.h
Mark Doffman [Mon, 10 Mar 2008 17:45:59 +0000 (17:45 +0000)]
tools/gidlcompilercontext.c tools/gidlcompilercontext.h

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

    * tools/gidlcompilercontext.c
    * tools/gidlcompilercontext.h
    * tools/gidlcompilerentrynode.c
    * tools/gidlcompilerentrynode.h
    * tools/gidlcompilertypenode.c
    * tools/gidlcompilertypenode.h

    Add code to compile a tree of GIdlNodes to
    a 'C' struct representing the metadata.
    This is to aid cross-compiling. Previously
    the g-idl-compiler created a binary blob with
    data written in the byte order and alignment
    of the tool rather than the intended target.

    Cleaned up and improved by Johan and Robert :-)

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=130

16 years agogirepository/ginvoke.c girepository/girepository.h
Mark Doffman [Mon, 10 Mar 2008 17:44:06 +0000 (17:44 +0000)]
girepository/ginvoke.c girepository/girepository.h

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

    * girepository/ginvoke.c
    * girepository/girepository.h
    * girepository/gmetadata.c
    * girepository/gmetadata.h
    * tools/generate.c
    * tools/gidlparser.c

      Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
      to avoid confusion with the interface blob.

    * tools/generate.c
    * tools/gidlparser.c

      Remove magic numbers and replace with type-tag
      enumeration symbols.

    * girepository/gmetadata.c
      Add validate declaration.

WARNING: This commit does not compile. It is a partial change.

svn path=/trunk/; revision=129

16 years agoSupport C99 _Bool type in scanner.
Juerg Billeter [Mon, 10 Mar 2008 15:36:56 +0000 (15:36 +0000)]
Support C99 _Bool type in scanner.

2008-03-10  Juerg Billeter  <j@bitron.ch>

* tools/gidlparser.c: (parse_type_internal):
* tools/scannerlexer.l:
* tools/scannerparser.y:
Support C99 _Bool type in scanner.

svn path=/trunk/; revision=128

16 years agoDon't skip functions that are defined in the namespace of a type that
Juerg Billeter [Mon, 10 Mar 2008 15:03:03 +0000 (15:03 +0000)]
Don't skip functions that are defined in the namespace of a type that

2008-03-10  Juerg Billeter  <j@bitron.ch>

* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c: (foo_enum_method):
* tools/scanner.c: (g_igenerator_process_function_symbol):
Don't skip functions that are defined in the namespace of a type
that doesn't support methods, as for example enums.

svn path=/trunk/; revision=127

16 years agoRemove, we're using relaxng now
Johan Dahlin [Mon, 10 Mar 2008 10:46:54 +0000 (10:46 +0000)]
Remove, we're using relaxng now

2008-03-10  Johan Dahlin  <johan@gnome.org>

* gidl.dtd: Remove, we're using relaxng now

svn path=/trunk/; revision=125

16 years agoRename the enum/flags get_type functions to include the whole type.
Johan Dahlin [Mon, 10 Mar 2008 09:56:39 +0000 (09:56 +0000)]
Rename the enum/flags get_type functions to include the whole type.

2008-03-10  Johan Dahlin  <johan@gnome.org>

        * tests/parser/Foo-expected.gidl:
        * tests/parser/foo-object.h:
        * tests/parser/foo.c:
        Rename the enum/flags get_type functions to include the whole type.

svn path=/trunk/; revision=124

16 years agoadded "type-name", "get-type" and "deprecated" missing arguments.
Marc-Andre Lureau [Sat, 8 Mar 2008 22:48:30 +0000 (22:48 +0000)]
added "type-name", "get-type" and "deprecated" missing arguments.

2008-03-08  Marc-Andre Lureau  <marcandre.lureau@gmail.com>

        * tools/gidlwriter.c (enum_generate): added "type-name",
        "get-type" and "deprecated" missing arguments.
        * tests/parser/Foo-expected.gidl:
        * tests/parser/foo-object.h: test enum type, and no type.

svn path=/trunk/; revision=123

16 years agoConsistent checks, add missing 'test'
Johan Dahlin [Fri, 7 Mar 2008 00:16:48 +0000 (00:16 +0000)]
Consistent checks, add missing 'test'

2008-03-06  Johan Dahlin  <jdahlin@async.com.br>

    * configure.ac:
    Consistent checks, add missing 'test'

svn path=/trunk/; revision=122

16 years agoTake advantage of a libffi.pc if one exists, as it does on Fedora 8. Make
Havoc Pennington [Wed, 5 Mar 2008 17:10:28 +0000 (17:10 +0000)]
Take advantage of a libffi.pc if one exists, as it does on Fedora 8. Make

2008-03-05  Havoc Pennington  <hp@redhat.com>

* configure.ac: Take advantage of a libffi.pc if one exists, as it
does on Fedora 8. Make libffi a hard requirement, since it was in
practice anyway (was not really conditional in the code or
makefile, only in configure).

svn path=/trunk/; revision=121

16 years agoreviewed by: Rob Taylor <rob.taylor@codethink.co.uk> reviewed by: Johan
Mark Doffman [Thu, 28 Feb 2008 00:37:01 +0000 (00:37 +0000)]
reviewed by: Rob Taylor <rob.taylor@codethink.co.uk> reviewed by: Johan

2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>

reviewed by: Rob Taylor  <rob.taylor@codethink.co.uk>
reviewed by: Johan Dahlin  <johan@gnome.org>

* tests/Makefile.am:
* tests/roundtrips.sh:
Modify the roundtrips test so that they do not use the
--raw option of the gidl compiler but instead compile a
shared library to use with g_module.

* tests/invoke/Makefile.am:
* tests/invoke/invoke.c:
Modify the invoke tests to build a shared library rather
than use the --raw option.

* tests/invoke/invoke-namespace-find.sh: Removed:
Noone knows why this was here, so removed.

svn path=/trunk/; revision=120

16 years agoMove g_idl_node_can_have_member test later, as it broke spotting
Rob Taylor [Tue, 19 Feb 2008 16:24:29 +0000 (16:24 +0000)]
Move g_idl_node_can_have_member test later, as it broke spotting

2008-02-19  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/scanner.c: (g_igenerator_process_function_symbol):
Move g_idl_node_can_have_member test later, as it broke spotting
get_type's for nodes that can't have members.

svn path=/trunk/; revision=119

16 years agoAdd g_idl_node_can_have_member.
Rob Taylor [Mon, 18 Feb 2008 16:42:14 +0000 (16:42 +0000)]
Add g_idl_node_can_have_member.

2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/gidlnode.h:
* tools/gidlnode.c: (g_idl_node_can_have_member):
Add g_idl_node_can_have_member.

* tools/scanner.c: (g_igenerator_process_function_symbol):
Use g_idl_node_can_have_member to test if we should add a function
as a member of the type node.

svn path=/trunk/; revision=118

16 years agoRenamed to gidl/gobject-2.0.gidl:
Rob Taylor [Mon, 18 Feb 2008 16:39:13 +0000 (16:39 +0000)]
Renamed to gidl/gobject-2.0.gidl:

2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>

* gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
* gidl/Makefile.am:
* tests/parser/Makefile.am:
Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.

svn path=/trunk/; revision=117

16 years agoIgnore -pthread when passed to g-idl-scanner.
Rob Taylor [Mon, 18 Feb 2008 16:29:45 +0000 (16:29 +0000)]
Ignore -pthread when passed to g-idl-scanner.

2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/scanner.c: (main):
Ignore -pthread when passed to g-idl-scanner.

svn path=/trunk/; revision=116

16 years agoAdded:
Rob Taylor [Mon, 18 Feb 2008 16:25:29 +0000 (16:25 +0000)]
Added:

2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>

* tools/grealpath.h: Added:
* tools/scanner.c: (main):
* tools/scannerlexer.l:
* tools/Makefile.am:
Always use absolute paths with symbolic links resolved when
comparing filenames.

svn path=/trunk/; revision=115

16 years agoProvide variables for g-idl-parser, scanner and compiler in the pkgconfig
Rob Taylor [Mon, 18 Feb 2008 16:14:54 +0000 (16:14 +0000)]
Provide variables for g-idl-parser, scanner and compiler in the pkgconfig

2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>

* gobject-introspection.pc.in:
Provide variables for g-idl-parser, scanner and compiler in the
pkgconfig file.

svn path=/trunk/; revision=114

16 years agoRename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
Rob Taylor [Wed, 13 Feb 2008 17:31:59 +0000 (17:31 +0000)]
Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.

2008-02-13  Rob Taylor  <rob.taylor@codethink.co.uk>

* gcov.mak:
* girepository/Makefile.am:
* tools/Makefile.am:
Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.

svn path=/trunk/; revision=113

16 years agoAdd boxed test.
Johan Dahlin [Sun, 10 Feb 2008 22:14:25 +0000 (22:14 +0000)]
Add boxed test.

2008-02-10  Johan Dahlin  <johan@gnome.org>

* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
(foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
Add boxed test.

svn path=/trunk/; revision=112

16 years agoAdd enum and flags test.
Johan Dahlin [Sun, 10 Feb 2008 21:54:31 +0000 (21:54 +0000)]
Add enum and flags test.

2008-02-10  Johan Dahlin  <johan@gnome.org>

* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
Add enum and flags test.

svn path=/trunk/; revision=111

16 years agoMake 'make distcheck' work again.
Johan Dahlin [Sun, 10 Feb 2008 19:19:15 +0000 (19:19 +0000)]
Make 'make distcheck' work again.

2008-02-10  Johan Dahlin  <johan@gnome.org>

* Makefile.am:
* configure.ac:
* girepository/Makefile.am:
Make 'make distcheck' work again.

svn path=/trunk/; revision=110

16 years agoits called as-compiler-flag.m4, not as-compiler.m4.
Johan Dahlin [Sun, 10 Feb 2008 19:11:21 +0000 (19:11 +0000)]
its called as-compiler-flag.m4, not as-compiler.m4.

2008-02-10  Johan Dahlin  <johan@gnome.org>

* m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
not as-compiler.m4.

svn path=/trunk/; revision=109

16 years agoOnly create Foo.gidl when running make check, eg exclude it from
Johan Dahlin [Sun, 10 Feb 2008 19:10:22 +0000 (19:10 +0000)]
Only create Foo.gidl when running make check, eg exclude it from

2008-02-10  Johan Dahlin  <johan@gnome.org>

* tests/parser/Makefile.am: Only create Foo.gidl when running make
check, eg exclude it from BUILT_SOURCES.

svn path=/trunk/; revision=108

16 years agoRemove empty src/ directory
Johan Dahlin [Sun, 10 Feb 2008 19:01:47 +0000 (19:01 +0000)]
Remove empty src/ directory

svn path=/trunk/; revision=107

16 years agoAdded:
Rob Taylor [Fri, 8 Feb 2008 18:09:05 +0000 (18:09 +0000)]
Added:

2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>

* Makefile.am:
* configure.ac:
* gcov.mak: Added:
* girepository/Makefile.am:
* m4/Makefile.am: Added:
* m4/as-compiler-flag.m4: Added:
* m4/gcov.m4: Added:
* tools/Makefile.am:
Add ability to generate a coverage report.
Adds configure option --enable-gcov and make rule 'check-coverage'.

svn path=/trunk/; revision=105

16 years agoAdded: Added: Renamed to tools/Makefile.am: Renamed to tools/compiler.c:
Rob Taylor [Fri, 8 Feb 2008 15:31:03 +0000 (15:31 +0000)]
Added: Added: Renamed to tools/Makefile.am: Renamed to tools/compiler.c:

2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>

* Makefile.am:
* configure.ac:
* gidl/Makefile.am: Added:
* girepository/Makefile.am: Added:
* src/Makefile.am: Renamed to tools/Makefile.am:
* src/compiler.c: Renamed to tools/compiler.c:
* src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
* src/generate.c: Renamed to tools/generate.c:
* src/gidlmodule.c: Renamed to tools/gidlmodule.c:
* src/gidlmodule.h: Renamed to tools/gidlmodule.h:
* src/gidlnode.c: Renamed to tools/gidlnode.c:
* src/gidlnode.h: Renamed to tools/gidlnode.h:
* src/gidlparser.c: Renamed to tools/gidlparser.c:
* src/gidlparser.h: Renamed to tools/gidlparser.h:
* src/gidlwriter.c: Renamed to tools/gidlwriter.c:
* src/gidlwriter.h: Renamed to tools/gidlwriter.h:
* src/ginfo.c: Renamed to girepository/ginfo.c:
* src/ginvoke.c: Renamed to girepository/ginvoke.c:
* src/girepository.c: Renamed to girepository/girepository.c:
* src/girepository.h: Renamed to girepository/girepository.h:
* src/gmetadata.c: Renamed to girepository/gmetadata.c:
* src/gmetadata.h: Renamed to girepository/gmetadata.h:
* src/scanner.c: Renamed to tools/scanner.c:
* src/scanner.h: Renamed to tools/scanner.h:
* src/scannerlexer.l: Renamed to tools/scannerlexer.l:
* src/scannerparser.y: Renamed to tools/scannerparser.y:
* tests/invoke/Makefile.am:
Split src/ into girepository/ and tools/

* Makefile.am:
* configure.ac:
* girepository/Makefile.am:
* tests/Makefile.am:
* tests/invoke/Makefile.am:
* tests/parser/Makefile.am:
* tests/roundtrips.sh:
* tools/Makefile.am:
Make distcheck work.

svn path=/trunk/; revision=104

16 years agoAdd tests for invokation with a GList argument. Also tests caller-owns
Rob Taylor [Mon, 4 Feb 2008 17:09:02 +0000 (17:09 +0000)]
Add tests for invokation with a GList argument. Also tests caller-owns

2008-02-04  Rob Taylor  <rob.taylor@codethink.co.uk>

* tests/invoke/invoke.c: (main):
* tests/invoke/testfns.c: (test6), (test7):
* tests/invoke/testfns.xml:
Add tests for invokation with a GList argument.
Also tests caller-owns return values.

svn path=/trunk/; revision=103

16 years agoAdd some documentation for GICallableInfo
Rob Taylor [Mon, 4 Feb 2008 17:09:01 +0000 (17:09 +0000)]
Add some documentation for GICallableInfo

2008-02-04  Rob Taylor  <robtaylor@floopily.org>

* src/ginfo.c:
Add some documentation for GICallableInfo

svn path=/trunk/; revision=102

16 years agoCorrect syntax errors in the DTD file.
Mark Doffman [Fri, 1 Feb 2008 16:47:15 +0000 (16:47 +0000)]
Correct syntax errors in the DTD file.

2008-02-01  Mark Doffman  <mark.doffman@codethink.co.uk>

* gidl.dtd:
Correct syntax errors in the DTD file.
* relaxng/api.xml:
* relaxng/c-types.xml:
* relaxng/g-types.xml:
* relaxng/util.xml:
Add a RelaxNG specification for the GObject Introspection XML data.
The Specification has validated all of the test files.

svn path=/trunk/; revision=101

16 years agoAdd roundtrip tests for structs.
Rob Taylor [Fri, 25 Jan 2008 14:34:25 +0000 (14:34 +0000)]
Add roundtrip tests for structs.

2008-01-25  Rob Taylor  <robtaylor@floopily.org>

        * tests/roundtrips.sh:
        * tests/struct.test:
        Add roundtrip tests for structs.

svn path=/trunk/; revision=100

16 years agoRefactor out g_idle_node_add_member. (create_node_from_gtype,
Johan Dahlin [Fri, 11 Jan 2008 23:59:49 +0000 (23:59 +0000)]
Refactor out g_idle_node_add_member. (create_node_from_gtype,

2008-01-11  Johan Dahlin  <johan@gnome.org>

* src/scanner.c (g_igenerator_process_function_symbol):
Refactor out g_idle_node_add_member.
(create_node_from_gtype, create_node_from_ctype):
Use case instead of if...else
(get_type_from_type_id):
Rename to create_node_from_gtype
(get_type_from_ctype):
Rename to create_node_from_ctype

Rename ginode -> node, gitype -> type, gifunc -> func.

* src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
Two new functions, refactor out of scanner.c

svn path=/trunk/; revision=99

16 years agoDo not save the content of the deprecated variable, only if it's set or
Johan Dahlin [Fri, 11 Jan 2008 23:01:41 +0000 (23:01 +0000)]
Do not save the content of the deprecated variable, only if it's set or

2008-01-11  Johan Dahlin  <johan@gnome.org>

* src/scanner.c: (g_igenerator_process_function_symbol):
* src/scannerlexer.l:
Do not save the content of the deprecated variable, only
if it's set or not.

svn path=/trunk/; revision=98

16 years agoAdd a couple of comment parser tests.
Johan Dahlin [Fri, 11 Jan 2008 23:00:48 +0000 (23:00 +0000)]
Add a couple of comment parser tests.

2008-01-11  Johan Dahlin  <johan@gnome.org>

* tests/parser/foo-object.h: Add a couple of comment parser tests.

svn path=/trunk/; revision=97

16 years agoFix libffi configure check - libffi still doesn' have package config, so stealing...
Robert James Taylor [Fri, 11 Jan 2008 21:59:13 +0000 (21:59 +0000)]
Fix libffi configure check - libffi still doesn' have package config, so stealing the checks from pygobject.

svn path=/trunk/; revision=96

16 years agoFix GTK-Doc parsing.
Juerg Billeter [Fri, 11 Jan 2008 21:38:42 +0000 (21:38 +0000)]
Fix GTK-Doc parsing.

2008-01-11  Juerg Billeter  <j@bitron.ch>

* src/scannerlexer.l:
Fix GTK-Doc parsing.

svn path=/trunk/; revision=95

16 years agoReturn unresolved name if we find unknown symbol.
Juerg Billeter [Fri, 11 Jan 2008 21:10:44 +0000 (21:10 +0000)]
Return unresolved name if we find unknown symbol.

2008-01-11  Juerg Billeter  <j@bitron.ch>

* src/scanner.c: (lookup_symbol):
Return unresolved name if we find unknown symbol.

svn path=/trunk/; revision=94

16 years agoInitialize GObject to fix scanning interface properties.
Juerg Billeter [Fri, 11 Jan 2008 17:52:29 +0000 (17:52 +0000)]
Initialize GObject to fix scanning interface properties.

2008-01-11  Juerg Billeter  <j@bitron.ch>

* src/scanner.c: (g_igenerator_generate):
Initialize GObject to fix scanning interface properties.

* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c: (foo_interface_get_type):
Test interfaces with GObject prerequisite.

* tests/parser/Makefile.am:
Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.

svn path=/trunk/; revision=93

17 years agoParse gtk-doc comments.
Johan Dahlin [Fri, 28 Dec 2007 01:03:35 +0000 (01:03 +0000)]
Parse gtk-doc comments.

2007-12-27  Johan Dahlin  <johan@gnome.org>

* src/scannerlexer.l:
Parse gtk-doc comments.

* src/gidlwriter.c: (function_generate):
Reorganize, avoid duplication and add support for
writing deprecated functions.

* src/scannerparser.y:
* src/scanner.h:
Add new structure CDirective and functions to create/free them.

* src/scanner.c: (g_igenerator_process_function_symbol),
(g_igenerator_process_unregistered_struct_typedef),
(g_igenerator_process_struct_typedef),
(g_igenerator_process_union_typedef),
(g_igenerator_process_enum_typedef),
(g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
(g_igenerator_start_preprocessor):
Parse @deprecated directive for functions.
Remove some more C99isms.
Send in -C to cpp to avoid stripping comments.

* tests/parser/foo-object.h:
* tests/parser/Foo-expected.gidl:
Add deprecated directive

svn path=/trunk/; revision=92

17 years agoAdd emacs mode line and escape ' and " so it looks more like C.
Johan Dahlin [Thu, 27 Dec 2007 22:43:41 +0000 (22:43 +0000)]
Add emacs mode line and escape ' and " so it looks more like C.

2007-12-27  Johan Dahlin  <johan@gnome.org>

* src/scannerlexer.l (intsuffix): Add emacs mode line and
escape ' and " so it looks more like C.

svn path=/trunk/; revision=91

17 years agoUnlink temporary file used.
Johan Dahlin [Thu, 27 Dec 2007 21:01:09 +0000 (21:01 +0000)]
Unlink temporary file used.

2007-12-27  Johan Dahlin  <johan@gnome.org>

* src/scanner.c:
Unlink temporary file used.

svn path=/trunk/; revision=90

17 years agoPlug a couple of simple memory leaks.
Johan Dahlin [Thu, 27 Dec 2007 20:39:55 +0000 (20:39 +0000)]
Plug a couple of simple memory leaks.

2007-12-27  Johan Dahlin  <johan@gnome.org>

* src/scanner.c: (g_igenerator_new), (g_igenerator_free),
(g_igenerator_start_preprocessor), (main):
* src/scanner.h:
* src/scannerparser.y:
Plug a couple of simple memory leaks.

svn path=/trunk/; revision=89

17 years agoImprove error reporting, return when the preprocessor fails. Add a verbose
Johan Dahlin [Thu, 27 Dec 2007 20:13:34 +0000 (20:13 +0000)]
Improve error reporting, return when the preprocessor fails. Add a verbose

2007-12-27  Johan Dahlin  <johan@gnome.org>

* src/scanner.c: (g_igenerator_parse_macros),
(g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
(main):
* src/scanner.h:
* src/scannerparser.y:
* tests/parser/Makefile.am:

Improve error reporting, return when the preprocessor fails.
Add a verbose parameter, to aid debugging.
Revert to using a temporary file to communicate between the
preprocessor and the parser, because we need to wait for
the exit code from the pre-processor before starting to parse.

svn path=/trunk/; revision=88

17 years agoremove an unused variable and avoid const to disable compilation warnings
Johan Dahlin [Sun, 16 Dec 2007 19:12:46 +0000 (19:12 +0000)]
remove an unused variable and avoid const to disable compilation warnings

svn path=/trunk/; revision=87

17 years agoRename clexer.l to scannerlexer.l and cparser.y to scannerparser.y
Johan Dahlin [Sun, 16 Dec 2007 17:04:42 +0000 (17:04 +0000)]
Rename clexer.l to scannerlexer.l and cparser.y to scannerparser.y

2007-12-16  Johan Dahlin  <jdahlin@async.com.br>

    * src/Makefile.am: Rename clexer.l to scannerlexer.l and
    cparser.y to scannerparser.y

svn path=/trunk/; revision=86

17 years agoGet rid of the global the_generator variable.
Johan Dahlin [Mon, 10 Dec 2007 23:54:23 +0000 (23:54 +0000)]
Get rid of the global the_generator variable.

2007-12-11  Johan Dahlin  <johan@gnome.org>

* src/clexer.l:
* src/cparser.y:
* src/scanner.c: (g_igenerator_new):
* src/scanner.h:
Get rid of the global the_generator variable.

svn path=/trunk/; revision=85

17 years agoDon't steal my stdout and just send in relative path now when g-idl-scanner does...
Johan Dahlin [Mon, 10 Dec 2007 09:10:12 +0000 (09:10 +0000)]
Don't steal my stdout and just send in relative path now when g-idl-scanner does the right thing

svn path=/trunk/; revision=84

17 years agoAdd an output option, add checks for required parameters
Johan Dahlin [Mon, 10 Dec 2007 09:01:15 +0000 (09:01 +0000)]
Add an output option, add checks for required parameters

2007-12-10  Johan Dahlin  <johan@gnome.org>

* src/scanner.c (main): Add an output option,
add checks for required parameters

svn path=/trunk/; revision=83

17 years agoset BUILD_SOURCES and CLEANFILES properly
Johan Dahlin [Mon, 10 Dec 2007 01:02:59 +0000 (01:02 +0000)]
set BUILD_SOURCES and CLEANFILES properly

2007-12-10  Johan Dahlin  <johan@gnome.org>

* src/Makefile.am:
set BUILD_SOURCES and CLEANFILES properly

svn path=/trunk/; revision=82

17 years agoRefactor scannerwriter to only be tied to a GIdlModule and move it
Johan Dahlin [Mon, 10 Dec 2007 00:54:52 +0000 (00:54 +0000)]
Refactor scannerwriter to only be tied to a GIdlModule and move it

2007-12-10  Johan Dahlin  <johan@gnome.org>

* src/Makefile.am:
* src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
(g_writer_write_indent), (g_writer_write_unindent),
(field_generate), (value_generate), (constant_generate),
(property_generate), (function_generate), (vfunc_generate),
(signal_generate), (interface_generate), (struct_generate),
(union_generate), (boxed_generate), (enum_generate),
(node_generate), (g_writer_write_module), (g_idl_writer_save_file):
* src/gidlwriter.h:
* src/scanner.c: (g_igenerator_generate):
* src/scanner.h:
* src/scannerwriter.c:

Refactor scannerwriter to only be tied to a GIdlModule and move
it (again!) to gidlwriter.c. Change the writer function to take
a filename.

svn path=/trunk/; revision=81

17 years agoMove the scanner gidl writing to a separate source file.
Johan Dahlin [Mon, 10 Dec 2007 00:45:29 +0000 (00:45 +0000)]
Move the scanner gidl writing to a separate source file.

2007-12-10  Johan Dahlin  <johan@gnome.org>

* src/Makefile.am:
* src/scanner.c: (g_igenerator_generate):
* src/scanner.h:
* src/scannerwriter.c: (g_igenerator_write_inline),
(g_igenerator_write), (g_igenerator_write_indent),
(g_igenerator_write_unindent), (field_generate), (value_generate),
(constant_generate), (property_generate), (function_generate),
(vfunc_generate), (signal_generate), (interface_generate),
(struct_generate), (union_generate), (boxed_generate),
(enum_generate), (node_generate), (module_generate),
(g_scanner_write_file):

Move the scanner gidl writing to a separate source file.

svn path=/trunk/; revision=80

17 years agoMove over all CType construction functions.
Johan Dahlin [Mon, 10 Dec 2007 00:35:59 +0000 (00:35 +0000)]
Move over all CType construction functions.

2007-12-10  Johan Dahlin  <johan@gnome.org>

* src/cparser.y:
* src/scanner.c:
* src/scanner.h:
Move over all CType construction functions.

* tests/parser/Makefile.am:
Be verbose when printing parsing tests results.

svn path=/trunk/; revision=79

17 years agoOops, typo
Johan Dahlin [Mon, 10 Dec 2007 00:30:30 +0000 (00:30 +0000)]
Oops, typo

svn path=/trunk/; revision=78

17 years agoRefactor preprocessor handling to here. Start cpp insteado of cc -E,
Johan Dahlin [Mon, 10 Dec 2007 00:26:04 +0000 (00:26 +0000)]
Refactor preprocessor handling to here. Start cpp insteado of cc -E,

2007-12-10  Johan Dahlin  <johan@gnome.org>

* src/scanner.c (g_igenerator_start_preprocessor): Refactor
preprocessor handling to here. Start cpp insteado of cc -E,
always include -U__GNUC__, since it's specific to the preprocessor
we use.

* tests/parser/Makefile.am (check-local): Silent diff and skip
-U__GNUC__ which is always defined now

svn path=/trunk/; revision=77

17 years ago (g_igenerator_new, main): Simplify constructor and they way
Johan Dahlin [Sun, 9 Dec 2007 17:51:39 +0000 (17:51 +0000)]
(g_igenerator_new, main): Simplify constructor and they way
parameters are passed into it.

svn path=/trunk/; revision=76

17 years agoUse GOption for command line options.
Johan Dahlin [Sun, 9 Dec 2007 17:04:08 +0000 (17:04 +0000)]
Use GOption for command line options.

2007-12-09  Johan Dahlin  <johan@gnome.org>

* src/scanner.c:
Use GOption for command line options.

svn path=/trunk/; revision=75

17 years agoRename gen-introspect.[ch] to scanner.[ch]
Johan Dahlin [Sun, 9 Dec 2007 16:07:48 +0000 (16:07 +0000)]
Rename gen-introspect.[ch] to scanner.[ch]

2007-12-09  Johan Dahlin  <johan@gnome.org>

* src/cparser.y:
* src/Makefile.am:
* src/clexer.l:
* src/cparser.y:
* src/gen-introspect.c:
* src/gen-introspect.h:
* src/scanner.c:
Rename gen-introspect.[ch] to scanner.[ch]

svn path=/trunk/; revision=74

17 years agoUpdate
Johan Dahlin [Sun, 9 Dec 2007 16:02:49 +0000 (16:02 +0000)]
Update

2007-12-09  Johan Dahlin  <johan@gnome.org>

* TODO: Update

* src/Makefile.am: Rename gen-introspect to g-idl-scanner,
don't make the repository library and the other utilites link against
gthread-2.0

svn path=/trunk/; revision=73

17 years agoRefactor g_igenerator_process_types into smaller pieces.
Johan Dahlin [Sun, 9 Dec 2007 15:45:55 +0000 (15:45 +0000)]
Refactor g_igenerator_process_types into smaller pieces.

2007-12-09  Johan Dahlin  <johan@gnome.org>

* src/gen-introspect.c: (g_igenerator_create_object),
(g_igenerator_create_interface), (g_igenerator_create_boxed),
(g_igenerator_create_enum), (g_igenerator_create_flags),
(g_igenerator_process_module_symbol),
(g_igenerator_process_module), (g_igenerator_generate), (main):
* src/gen-introspect.h:
Refactor g_igenerator_process_types into smaller pieces.

* tests/parser/Makefile.am:
Depend on the gen-introspect binary

svn path=/trunk/; revision=72

17 years agoBreak into smaller pieces, one for each generated node type.
Johan Dahlin [Sun, 9 Dec 2007 12:00:44 +0000 (12:00 +0000)]
Break into smaller pieces, one for each generated node type.

2007-12-09  Johan Dahlin  <johan@gnome.org>

* src/gen-introspect.c (g_igenerator_process_types):
Break into smaller pieces, one for each generated node type.

svn path=/trunk/; revision=71

17 years agoAdd a subobject test and make sure to register defined classes in the
Johan Dahlin [Sat, 8 Dec 2007 18:30:15 +0000 (18:30 +0000)]
Add a subobject test and make sure to register defined classes in the

2007-12-08  Johan Dahlin  <johan@gnome.org>

* src/gen-introspect.c: (g_igenerator_process_types),
(g_igenerator_add_module):
* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c: (foo_subobject_class_init),
(foo_subobject_init):

Add a subobject test and make sure to register defined classes
in the lookup symbol hash table.

svn path=/trunk/; revision=70

17 years agoChange the gen-introspect to generate namespaced module names, such as
Johan Dahlin [Sat, 8 Dec 2007 18:04:15 +0000 (18:04 +0000)]
Change the gen-introspect to generate namespaced module names, such as

2007-12-08  Johan Dahlin  <johan@gnome.org>

* gidl/GLib.gidl:
* src/Makefile.am:
* src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
(g_igenerator_process_types), (g_igenerator_add_module),
(g_igenerator_add_include_idl), (main):
* src/gen-introspect.h:
* tests/parser/Makefile.am:
* tests/parser/Foo-expected.gidl:

Change the gen-introspect to generate namespaced module names,
such as GLib.Object instead of GObject.
Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
add a --include-idl parameter to gen-introspect,
and update the parser test.

svn path=/trunk/; revision=69

17 years agoMove main to the end of the file and attempt to make it valid ansi c.
Johan Dahlin [Sat, 8 Dec 2007 16:41:46 +0000 (16:41 +0000)]
Move main to the end of the file and attempt to make it valid ansi c.

2007-12-08  Johan Dahlin  <johan@gnome.org>

* src/gen-introspect.c:
Move main to the end of the file and attempt to make it valid
ansi c.

svn path=/trunk/; revision=68

17 years agoAdd a simple gen-introspect parser test 2007-12-08 Johan Dahlin
Johan Dahlin [Sat, 8 Dec 2007 16:39:50 +0000 (16:39 +0000)]
Add a simple gen-introspect parser test 2007-12-08 Johan Dahlin

2007-12-08  Johan Dahlin  <johan@gnome.org>

* tests/parser/:
* configure.ac:

Add a simple gen-introspect parser test
2007-12-08  Johan Dahlin  <johan@gnome.org>

* tests/parser/:
* configure.ac:

Add a simple gen-introspect parser test

svn path=/trunk/; revision=67

17 years agoreviewed by: Johan Dahlin <johan@gnome.org>
Gustavo J. A. M. Carneiro [Thu, 6 Dec 2007 00:16:15 +0000 (00:16 +0000)]
reviewed by: Johan Dahlin <johan@gnome.org>

2007-12-06  Gustavo J. A. M. Carneiro  <gjc@gnome.org>

reviewed by: Johan Dahlin  <johan@gnome.org>

* configure.ac:
* gobject-introspection.pc.in:
* src/Makefile.am:
* src/compiler.c: (format_output), (write_out_metadata), (main):
* src/gen-introspect.c: (main):
* src/gen-introspect.h:
* src/generate.c: (write_callable_info), (write_repository),
(load_metadata), (main):
* src/gidlmodule.c: (g_idl_module_new),
(g_idl_module_build_metadata):
* src/gidlmodule.h:
* src/gidlparser.c: (start_element_handler):
* src/ginfo.c: (g_info_new), (g_info_from_entry),
(g_base_info_get_name), (g_base_info_get_namespace),
(g_base_info_is_deprecated), (g_base_info_get_annotation),
(g_base_info_get_metadata), (g_function_info_get_symbol),
(g_function_info_get_flags), (g_function_info_get_property),
(g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
(g_callable_info_may_return_null),
(g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
(g_callable_info_get_arg), (g_arg_info_get_direction),
(g_arg_info_is_return_value), (g_arg_info_is_dipper),
(g_arg_info_is_optional), (g_arg_info_may_be_null),
(g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
(g_type_info_get_tag), (g_type_info_get_param_type),
(g_type_info_get_interface), (g_type_info_get_array_length),
(g_type_info_is_zero_terminated),
(g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
(g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
(g_value_info_get_value), (g_field_info_get_flags),
(g_field_info_get_size), (g_field_info_get_offset),
(g_registered_type_info_get_type_name),
(g_registered_type_info_get_type_init),
(g_struct_info_get_n_fields), (g_struct_info_get_field),
(g_struct_info_get_n_methods), (g_struct_info_get_method),
(find_method), (g_struct_info_find_method),
(g_enum_info_get_n_values), (g_enum_info_get_value),
(g_object_info_get_parent), (g_object_info_get_type_name),
(g_object_info_get_type_init), (g_object_info_get_n_interfaces),
(g_object_info_get_interface), (g_object_info_get_n_fields),
(g_object_info_get_field), (g_object_info_get_n_properties),
(g_object_info_get_property), (g_object_info_get_n_methods),
(g_object_info_get_method), (g_object_info_find_method),
(g_object_info_get_n_signals), (g_object_info_get_signal),
(g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
(g_object_info_get_n_constants), (g_object_info_get_constant),
(g_interface_info_get_n_prerequisites),
(g_interface_info_get_prerequisite),
(g_interface_info_get_n_properties),
(g_interface_info_get_property), (g_interface_info_get_n_methods),
(g_interface_info_get_method), (g_interface_info_find_method),
(g_interface_info_get_n_signals), (g_interface_info_get_signal),
(g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
(g_interface_info_get_n_constants),
(g_interface_info_get_constant), (g_property_info_get_flags),
(g_signal_info_get_flags), (g_signal_info_get_class_closure),
(g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
(g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
(g_constant_info_get_value), (g_union_info_get_n_fields),
(g_union_info_get_field), (g_union_info_get_n_methods),
(g_union_info_get_method), (g_union_info_is_discriminated),
(g_union_info_get_discriminator_offset),
(g_union_info_get_discriminator):
* src/ginvoke.c: (g_function_info_invoke):
* src/girepository.c: (g_irepository_register),
(g_irepository_unregister), (g_irepository_get_default),
(count_interfaces), (g_irepository_get_n_infos), (find_interface),
(g_irepository_get_info), (g_irepository_find_by_name),
(g_irepository_get_shared_library),
(g_irepository_build_search_path), (g_irepository_register_file),
(g_irepository_error_quark):
* src/girepository.h:
* src/gmetadata.c: (g_metadata_get_dir_entry),
(g_metadata_check_sanity), (validate_header),
(validate_array_type_blob), (validate_iface_type_blob),
(validate_param_type_blob), (validate_error_type_blob),
(validate_type_blob), (validate_arg_blob),
(validate_signature_blob), (validate_function_blob),
(validate_callback_blob), (validate_constant_blob),
(validate_value_blob), (validate_field_blob),
(validate_property_blob), (validate_signal_blob),
(validate_vfunc_blob), (validate_struct_blob),
(validate_enum_blob), (validate_object_blob),
(validate_interface_blob), (validate_errordomain_blob),
(validate_union_blob), (validate_blob), (validate_directory),
(validate_annotations), (g_metadata_validate), (_g_metadata_init),
(g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
(g_metadata_new_from_mapped_file), (g_metadata_free),
(g_metadata_set_module), (g_metadata_get_namespace):
* src/gmetadata.h:
* tests/Makefile.am:
* tests/invoke/Makefile.am:
* tests/invoke/invoke-namespace-find.sh:
* tests/invoke/invoke.c: (main):

Add a namespace/shared library mapping. fixes #313268.

svn path=/trunk/; revision=66

17 years agoDisable char/gchar and guchar for now.
Johan Dahlin [Mon, 3 Dec 2007 22:30:09 +0000 (22:30 +0000)]
Disable char/gchar and guchar for now.

2007-12-03  Johan Dahlin  <johan@gnome.org>

* src/gidlparser.c (parse_type_internal): Disable char/gchar and
guchar for now.

svn path=/trunk/; revision=64

17 years agoImport gen-introspect to generate introspection information by parsing C
Juerg Billeter [Fri, 30 Nov 2007 22:46:43 +0000 (22:46 +0000)]
Import gen-introspect to generate introspection information by parsing C

2007-11-30  Juerg Billeter  <j@bitron.ch>

* configure.ac:
* src/Makefile.am:
* src/clexer.l:
* src/cparser.y:
* src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
(g_igenerator_write_inline), (g_igenerator_write),
(g_igenerator_write_indent), (g_igenerator_write_unindent),
(field_generate), (value_generate), (constant_generate),
(property_generate), (function_generate), (vfunc_generate),
(signal_generate), (interface_generate), (struct_generate),
(union_generate), (boxed_generate), (enum_generate),
(node_generate), (module_generate), (get_type_from_type_id),
(str_replace), (g_igenerator_process_properties),
(g_igenerator_process_signals), (g_igenerator_process_types),
(get_type_from_ctype), (g_igenerator_process_function_symbol),
(g_igenerator_process_unregistered_struct_typedef),
(g_igenerator_process_struct_typedef),
(g_igenerator_process_union_typedef),
(g_igenerator_process_enum_typedef),
(g_igenerator_process_function_typedef),
(g_igenerator_process_constant), (g_igenerator_process_symbols),
(g_igenerator_add_symbol), (g_igenerator_is_typedef),
(g_igenerator_generate), (main), (csymbol_new),
(csymbol_get_const_boolean), (ctype_new), (ctype_copy),
(cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
(cenum_new), (cpointer_new), (carray_new), (cfunction_new),
(eat_hspace), (eat_line), (read_identifier),
(g_igenerator_parse_macros):
* src/gen-introspect.h:

Import gen-introspect to generate introspection information by
parsing C headers.

svn path=/trunk/; revision=63

17 years agosupport creating callback nodes
Juerg Billeter [Fri, 30 Nov 2007 22:12:54 +0000 (22:12 +0000)]
support creating callback nodes

2007-11-30  Juerg Billeter  <j@bitron.ch>

* src/gidlnode.c: (g_idl_node_new): support creating callback nodes

svn path=/trunk/; revision=62

17 years agoDon't leave requires state too early.
Juerg Billeter [Fri, 30 Nov 2007 22:11:49 +0000 (22:11 +0000)]
Don't leave requires state too early.

2007-11-30  Juerg Billeter  <j@bitron.ch>

* src/gidlparser.c: (end_element_handler): Don't leave requires
state too early.

svn path=/trunk/; revision=61