platform/upstream/gobject-introspection.git
16 years agoAdd a LGPL license, to prevent automake to put in a copy of GPL here.
Johan Dahlin [Wed, 23 Apr 2008 00:09:22 +0000 (00:09 +0000)]
Add a LGPL license, to prevent automake to put in a copy of GPL here.

2008-04-22  Johan Dahlin  <johan@gnome.org>

    * COPYING: Add a LGPL license, to prevent automake to
    put in a copy of GPL here. Pointed out by Havoc.

svn path=/trunk/; revision=215

16 years agoRevert revisions 157,149-148,136-129 and 120. Move back to using
Johan Dahlin [Tue, 22 Apr 2008 22:48:16 +0000 (22:48 +0000)]
Revert revisions 157,149-148,136-129 and 120. Move back to using

2008-04-22  Johan Dahlin  <johan@gnome.org>

    * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
    (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_codes), (g_enum_info_get_value),
    (g_object_info_get_interface), (g_object_info_get_field),
    (g_interface_info_get_prerequisite),
    (g_signal_info_get_class_closure), (g_constant_info_get_value):
    * girepository/ginvoke.c (get_ffi_type):
    * girepository/girepository.h:
    * girepository/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_constant_blob),
    (validate_struct_blob), (validate_enum_blob):
    * girepository/gmetadata.h:
    * tests/Makefile.am:
    * tests/invoke/Makefile.am:
    * tests/invoke/invoke.c (main):
    * tests/roundtrips.sh:
    * tools/Makefile.am:
    * tools/compiler.c (format_output), (write_out_metadata), (main):
    * tools/generate.c (write_type_name), (write_type_info),
    (write_constant_value), (write_enum_info), (load_metadata), (main):
    * tools/gidlcompilercontext.c:
    * tools/gidlcompilercontext.h:
    * tools/gidlcompilerentrynode.c:
    * tools/gidlcompilerentrynode.h:
    * tools/gidlcompilertypenode.c:
    * tools/gidlcompilertypenode.h:
    * tools/gidlmodule.c (g_idl_module_build_metadata):
    * tools/gidlmodule.h:
    * tools/gidlnode.c (init_stats), (dump_stats),
    (g_idl_node_get_size), (g_idl_node_get_full_size),
    (g_idl_node_cmp), (g_idl_node_can_have_member),
    (g_idl_node_add_member), (g_idl_node_param_direction_string),
    (parse_int_value), (parse_uint_value), (parse_float_value),
    (parse_boolean_value), (find_entry_node), (find_entry),
    (serialize_type), (g_idl_node_build_metadata), (write_string):
    * tools/gidlnode.h:
    * tools/gidlparser.c (parse_type_internal):
    * tools/quote-file.sh:
    Revert revisions 157,149-148,136-129 and 120.
    Move back to using g-idl-generate to generate the metadata and
    avoids dependency on a c compiler.

svn path=/trunk/; revision=214

16 years agoUpdate
Johan Dahlin [Tue, 22 Apr 2008 15:17:50 +0000 (15:17 +0000)]
Update

svn path=/trunk/; revision=213

16 years agoAdd an initial GIR writer and a --format option to g-ir-scanner
Johan Dahlin [Tue, 22 Apr 2008 14:37:04 +0000 (14:37 +0000)]
Add an initial GIR writer and a --format option to g-ir-scanner

2008-04-22  Johan Dahlin  <jdahlin@async.com.br>

    * giscanner/girwriter.py:
    * tools/g-ir-scanner:
    Add an initial GIR writer and a --format option to g-ir-scanner

svn path=/trunk/; revision=212

16 years agocleanup namespace stripping
Johan Dahlin [Tue, 22 Apr 2008 11:28:48 +0000 (11:28 +0000)]
cleanup namespace stripping

svn path=/trunk/; revision=211

16 years agoonly attempt load a library if one was specified
Johan Dahlin [Tue, 22 Apr 2008 04:31:44 +0000 (04:31 +0000)]
only attempt load a library if one was specified

svn path=/trunk/; revision=210

16 years agoskip private symbols
Johan Dahlin [Tue, 22 Apr 2008 04:31:16 +0000 (04:31 +0000)]
skip private symbols

svn path=/trunk/; revision=209

16 years agoavoid sending the same options multiple times to cpp
Johan Dahlin [Tue, 22 Apr 2008 04:30:56 +0000 (04:30 +0000)]
avoid sending the same options multiple times to cpp

svn path=/trunk/; revision=208

16 years agoUse ctypes.util.find_library to locate gobject-2.0 and raise ImportError
Johan Dahlin [Tue, 22 Apr 2008 01:31:59 +0000 (01:31 +0000)]
Use ctypes.util.find_library to locate gobject-2.0 and raise ImportError

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/cgobject.py: Use ctypes.util.find_library to locate
gobject-2.0 and raise ImportError if not found.

svn path=/trunk/; revision=207

16 years agoAdd a --include argument to include types from other idls. Add a
Johan Dahlin [Tue, 22 Apr 2008 00:53:40 +0000 (00:53 +0000)]
Add a --include argument to include types from other idls. Add a

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* tools/g-ir-scanner:
Add a --include argument to include types from other idls.
Add a minimalistic GIDL parser (just objects for now)
Implement resolving of external type references and use it to
resolve parent types, argument types and return types.

svn path=/trunk/; revision=206

16 years agoAdd support for properties. Refactor Class/Interface support a bit, to
Johan Dahlin [Mon, 21 Apr 2008 21:03:05 +0000 (21:03 +0000)]
Add support for properties. Refactor Class/Interface support a bit, to

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add support for properties.
Refactor Class/Interface support a bit, to share more code and
always initialize their method attribute to an empty list.

svn path=/trunk/; revision=205

16 years agoAdd a workaround for a glib bug interface introspection bug
Johan Dahlin [Mon, 21 Apr 2008 21:01:50 +0000 (21:01 +0000)]
Add a workaround for a glib bug interface introspection bug

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/cgobject.py:
Add a workaround for a glib bug interface introspection bug
(object_interface_list_properties, object_class_list_properties):
Cast the return value to GParamSpec.

svn path=/trunk/; revision=204

16 years agoUpdate Add a string property
Johan Dahlin [Mon, 21 Apr 2008 21:00:40 +0000 (21:00 +0000)]
Update Add a string property

2008-04-21  Johan Dahlin  <johan@gnome.org>

* tests/parser/Foo-expected.gidl: Update
* tests/parser/foo.c: Add a string property

svn path=/trunk/; revision=203

16 years agoAfter stripping namespaces, remove the original item to avoid duplication
Johan Dahlin [Mon, 21 Apr 2008 19:53:51 +0000 (19:53 +0000)]
After stripping namespaces, remove the original item to avoid duplication

2008-04-21  Johan Dahlin  <johan@gnome.org>

    * giscanner/gobjecttreebuilder.py:
    After stripping namespaces, remove the original
    item to avoid duplication (GtkButton struct and Button object)

svn path=/trunk/; revision=202

16 years agoStrip namespaces before objects, so we'll export GtkButton as Button in
Johan Dahlin [Mon, 21 Apr 2008 19:40:09 +0000 (19:40 +0000)]
Strip namespaces before objects, so we'll export GtkButton as Button in

2008-04-21  Johan Dahlin  <johan@gnome.org>

        * giscanner/gobjecttreebuilder.py:
        * giscanner/treebuilder.py:
        Strip namespaces before objects, so we'll export
        GtkButton as Button in the gtk namespace

svn path=/trunk/; revision=201

16 years agoAvoid a bit of duplication
Johan Dahlin [Mon, 21 Apr 2008 19:02:06 +0000 (19:02 +0000)]
Avoid a bit of duplication

svn path=/trunk/; revision=200

16 years agoAdd constructors for object/boxed types.
Johan Dahlin [Mon, 21 Apr 2008 18:56:23 +0000 (18:56 +0000)]
Add constructors for object/boxed types.

2008-04-21  Johan Dahlin  <johan@gnome.org>

    * giscanner/gidlwriter.py:
    * giscanner/gobjecttreebuilder.py:
    * giscanner/treebuilder.py:
    Add constructors for object/boxed types.

svn path=/trunk/; revision=199

16 years agoAdd support for boxed types
Johan Dahlin [Mon, 21 Apr 2008 18:46:21 +0000 (18:46 +0000)]
Add support for boxed types

2008-04-21  Johan Dahlin  <johan@gnome.org>

        * giscanner/gidlwriter.py:
        * giscanner/gobjecttreebuilder.py:
        Add support for boxed types

svn path=/trunk/; revision=198

16 years agoAdd Constant, so far unused
Johan Dahlin [Mon, 21 Apr 2008 18:41:55 +0000 (18:41 +0000)]
Add Constant, so far unused

svn path=/trunk/; revision=197

16 years agomark them as const and comment out
Johan Dahlin [Mon, 21 Apr 2008 18:39:04 +0000 (18:39 +0000)]
mark them as const and comment out

svn path=/trunk/; revision=196

16 years agoMark structures as const, wrap SourceType.const_string.
Johan Dahlin [Mon, 21 Apr 2008 18:24:02 +0000 (18:24 +0000)]
Mark structures as const, wrap SourceType.const_string.

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/giscannermodule.c: Mark structures as const,
wrap SourceType.const_string.

svn path=/trunk/; revision=195

16 years agoAdd a couple of constants.
Johan Dahlin [Mon, 21 Apr 2008 18:09:31 +0000 (18:09 +0000)]
Add a couple of constants.

2008-04-21  Johan Dahlin  <johan@gnome.org>

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

svn path=/trunk/; revision=194

16 years agoAdd basic support for interfaces
Johan Dahlin [Mon, 21 Apr 2008 18:05:18 +0000 (18:05 +0000)]
Add basic support for interfaces

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add basic support for interfaces

* tools/g-ir-scanner:
Add -o/--output for writing to a file

svn path=/trunk/; revision=193

16 years agoadd some C API wishlist items I could think of quickly
Havoc Pennington [Mon, 21 Apr 2008 16:55:13 +0000 (16:55 +0000)]
add some C API wishlist items I could think of quickly

2008-04-21  Havoc Pennington  <hp@redhat.com>

* TODO: add some C API wishlist items I could think of quickly

svn path=/trunk/; revision=192

16 years agoUse relative imports
Johan Dahlin [Mon, 21 Apr 2008 16:36:54 +0000 (16:36 +0000)]
Use relative imports

svn path=/trunk/; revision=191

16 years agoAdd a simple api for writing tags which can be used with the new 'with
Johan Dahlin [Mon, 21 Apr 2008 14:12:47 +0000 (14:12 +0000)]
Add a simple api for writing tags which can be used with the new 'with

2008-04-21  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/gidlwriter.py:
        * giscanner/xmlwriter.py:
        Add a simple api for writing tags which can be used
        with the new 'with statement' in python 2.5

svn path=/trunk/; revision=190

16 years agoRename and refactor internal introspection api and get-type calling
Johan Dahlin [Mon, 21 Apr 2008 14:05:32 +0000 (14:05 +0000)]
Rename and refactor internal introspection api and get-type calling

svn path=/trunk/; revision=189

16 years agoStrip namespace and object prefix from method names.
Johan Dahlin [Mon, 21 Apr 2008 13:59:20 +0000 (13:59 +0000)]
Strip namespace and object prefix from method names.

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/gobjecttreebuilder.py:
Strip namespace and object prefix from method names.

svn path=/trunk/; revision=188

16 years agoSimplify and remove improper use of getattr
Johan Dahlin [Mon, 21 Apr 2008 13:42:50 +0000 (13:42 +0000)]
Simplify and remove improper use of getattr

svn path=/trunk/; revision=187

16 years agoSet default to an empty list
Johan Dahlin [Mon, 21 Apr 2008 04:40:01 +0000 (04:40 +0000)]
Set default to an empty list

svn path=/trunk/; revision=186

16 years agoAdd --pkg option to pass in pkg-config modules to get cflags from.
Johan Dahlin [Mon, 21 Apr 2008 04:36:52 +0000 (04:36 +0000)]
Add --pkg option to pass in pkg-config modules to get cflags from.

2008-04-21  Johan Dahlin  <johan@gnome.org>

* tools/g-ir-scanner (main): Add --pkg option to pass in
pkg-config modules to get cflags from.

svn path=/trunk/; revision=185

16 years agoAvoid duplication, reuse function writer for methods.
Johan Dahlin [Mon, 21 Apr 2008 04:20:53 +0000 (04:20 +0000)]
Avoid duplication, reuse function writer for methods.

2008-04-21  Johan Dahlin  <johan@gnome.org>

* giscanner/gidlwriter.py (GIDLWriter._write_method):
Avoid duplication, reuse function writer for methods.

svn path=/trunk/; revision=184

16 years agoResolve libtool .la files. Strip name spaces for methods. Add function
Johan Dahlin [Mon, 21 Apr 2008 04:18:56 +0000 (04:18 +0000)]
Resolve libtool .la files. Strip name spaces for methods. Add function

2008-04-21  Johan Dahlin  <jdahlin@async.com.br>

* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Resolve libtool .la files.
Strip name spaces for methods.
Add function symbols

svn path=/trunk/; revision=183

16 years agoOops, forgot to uncomment this
Johan Dahlin [Sun, 20 Apr 2008 19:53:12 +0000 (19:53 +0000)]
Oops, forgot to uncomment this

svn path=/trunk/; revision=182

16 years agoAdd support for classes and methods
Johan Dahlin [Sun, 20 Apr 2008 19:52:33 +0000 (19:52 +0000)]
Add support for classes and methods

2008-04-20  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/cgobject.py:
        * giscanner/gidlwriter.py:
        * giscanner/gobjecttreebuilder.py:
        * giscanner/treebuilder.py:
        Add support for classes and methods

svn path=/trunk/; revision=181

16 years agoAvoid conflicts, keep the output ordered similar to the order of the
Johan Dahlin [Sun, 20 Apr 2008 19:06:19 +0000 (19:06 +0000)]
Avoid conflicts, keep the output ordered similar to the order of the

2008-04-20  Johan Dahlin  <johan@gnome.org>

* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/odict.py:
Avoid conflicts, keep the output ordered similar to
the order of the input.
Add a simple ordered dictionary implemenation

svn path=/trunk/; revision=180

16 years agoStart introspecting get-type functions. Implement support for GLib/GFlags
Johan Dahlin [Sat, 19 Apr 2008 13:31:03 +0000 (13:31 +0000)]
Start introspecting get-type functions. Implement support for GLib/GFlags

2008-04-19  Johan Dahlin  <johan@gnome.org>

        * giscanner/cgobject.py:
        * giscanner/gidlwriter.py:
        * giscanner/gobjecttreebuilder.py:
        * tools/g-ir-scanner:
        Start introspecting get-type functions.
        Implement support for GLib/GFlags GTypes.
        Add a ctype based GObject binding.

svn path=/trunk/; revision=179

16 years agoadd a namespace option
Johan Dahlin [Fri, 18 Apr 2008 21:01:02 +0000 (21:01 +0000)]
add a namespace option

svn path=/trunk/; revision=178

16 years agoAdd support for enums
Johan Dahlin [Fri, 18 Apr 2008 20:47:40 +0000 (20:47 +0000)]
Add support for enums

svn path=/trunk/; revision=177

16 years agoDo function names too
Johan Dahlin [Fri, 18 Apr 2008 20:41:37 +0000 (20:41 +0000)]
Do function names too

svn path=/trunk/; revision=176

16 years agoAdd a simplistic gidl writer, which can't do too much.
Johan Dahlin [Fri, 18 Apr 2008 20:37:51 +0000 (20:37 +0000)]
Add a simplistic gidl writer, which can't do too much.

2008-04-18  Johan Dahlin  <jdahlin@async.com.br>

    * giscanner/gidlwriter.py:
    * giscanner/xmlwriter.py:
    * tools/g-ir-scanner:
    Add a simplistic gidl writer, which can't do too much.

svn path=/trunk/; revision=175

16 years agosplit tree building and source scanning interface to separate files.
Johan Dahlin [Fri, 18 Apr 2008 20:20:06 +0000 (20:20 +0000)]
split tree building and source scanning interface to separate files.

2008-04-18  Johan Dahlin  <johan@gnome.org>

    * giscanner/sourcescanner.py:
    * giscanner/treebuilder.py:
    * tools/g-ir-scanner:
    split tree building and source scanning interface to separate files.

svn path=/trunk/; revision=174

16 years agoAdd support for void ctype
Johan Dahlin [Fri, 18 Apr 2008 20:08:10 +0000 (20:08 +0000)]
Add support for void ctype

svn path=/trunk/; revision=173

16 years ago- Add support for struct/parameter/return, start parsing of ctypes
Johan Dahlin [Fri, 18 Apr 2008 20:05:31 +0000 (20:05 +0000)]
- Add support for struct/parameter/return, start parsing of ctypes

svn path=/trunk/; revision=172

16 years agoStart constructing a real node tree.
Johan Dahlin [Fri, 18 Apr 2008 19:49:43 +0000 (19:49 +0000)]
Start constructing a real node tree.

2008-04-18  Johan Dahlin  <johan@gnome.org>

    * tools/g-ir-scanner (Parameter.__init__): Start constructing
    a real node tree.

    * giscanner/giscannermodule.c: wrap GISourceType.child_list and
    fix the style

svn path=/trunk/; revision=171

16 years agoStart to build abstract syntax node of scanned sources. Add support for
Johan Dahlin [Mon, 31 Mar 2008 19:38:22 +0000 (19:38 +0000)]
Start to build abstract syntax node of scanned sources. Add support for

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

        * tools/g-ir-scanner:
        Start to build abstract syntax node of scanned sources.
        Add support for cpp options.

svn path=/trunk/; revision=170

16 years agoAdd simple pre-processor using subprocess and a PIPE. Change the
Johan Dahlin [Thu, 27 Mar 2008 19:20:45 +0000 (19:20 +0000)]
Add simple pre-processor using subprocess and a PIPE. Change the

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

* giscanner/giscannermodule.c:
* giscanner/scannerlexer.l:
* giscanner/sourcescanner.c:
* tools/g-ir-scanner:

Add simple pre-processor using subprocess and a PIPE.
Change the parse_file apis to accept a file descriptor.

svn path=/trunk/; revision=169

16 years agoRemove unused files
Johan Dahlin [Wed, 26 Mar 2008 07:25:47 +0000 (07:25 +0000)]
Remove unused files

svn path=/trunk/; revision=168

16 years agoFix a typo and add an example python test program.
Johan Dahlin [Tue, 25 Mar 2008 22:07:17 +0000 (22:07 +0000)]
Fix a typo and add an example python test program.

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

        * giscanner/__init__.py:
        * tools/g-ir-scanner:
        Fix a typo and add an example python test program.

svn path=/trunk/; revision=167

16 years agoAdd constants and wrap a few more SymbolType fields
Johan Dahlin [Tue, 25 Mar 2008 21:58:43 +0000 (21:58 +0000)]
Add constants and wrap a few more SymbolType fields

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

        * giscanner/__init__.py:
        * giscanner/giscannermodule.c:
        * giscanner/sourcescanner.c:
        * giscanner/sourcescanner.h:
        Add constants and wrap a few more SymbolType fields

svn path=/trunk/; revision=166

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