Havoc Pennington [Wed, 23 Apr 2008 01:17:24 +0000 (01:17 +0000)]
hack to avoid dlopening a library that is already in the main app, by
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/gmetadata.c (_g_metadata_init): hack to avoid
dlopening a library that is already in the main app, by checking
whether one of the lib's symbols is already loaded.
svn path=/trunk/; revision=220
Johan Dahlin [Wed, 23 Apr 2008 01:13:57 +0000 (01:13 +0000)]
Add a callback test
2008-04-22 Johan Dahlin <jdahlin@async.com.br>
* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
Add a callback test
svn path=/trunk/; revision=219
Havoc Pennington [Wed, 23 Apr 2008 01:07:05 +0000 (01:07 +0000)]
Use interface_blob_size not object_blob_size to compute offset.
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginfo.c (g_interface_info_find_method):
Use interface_blob_size not object_blob_size to compute offset.
svn path=/trunk/; revision=218
Havoc Pennington [Wed, 23 Apr 2008 01:04:43 +0000 (01:04 +0000)]
remove G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/gmetadata.c (_g_metadata_init): remove
G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
(Glade and Clutter for example) rely on being loaded globally.
svn path=/trunk/; revision=217
Havoc Pennington [Wed, 23 Apr 2008 00:57:48 +0000 (00:57 +0000)]
new function to get the GType given a RegisteredTypeInfo
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginfo.c (g_registered_type_info_get_g_type): new
function to get the GType given a RegisteredTypeInfo
svn path=/trunk/; revision=216
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
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
Johan Dahlin [Tue, 22 Apr 2008 15:17:50 +0000 (15:17 +0000)]
Update
svn path=/trunk/; revision=213
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
Johan Dahlin [Tue, 22 Apr 2008 11:28:48 +0000 (11:28 +0000)]
cleanup namespace stripping
svn path=/trunk/; revision=211
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
Johan Dahlin [Tue, 22 Apr 2008 04:31:16 +0000 (04:31 +0000)]
skip private symbols
svn path=/trunk/; revision=209
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
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
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
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
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
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
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
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
Johan Dahlin [Mon, 21 Apr 2008 19:02:06 +0000 (19:02 +0000)]
Avoid a bit of duplication
svn path=/trunk/; revision=200
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
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
Johan Dahlin [Mon, 21 Apr 2008 18:41:55 +0000 (18:41 +0000)]
Add Constant, so far unused
svn path=/trunk/; revision=197
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
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
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
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
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
Johan Dahlin [Mon, 21 Apr 2008 16:36:54 +0000 (16:36 +0000)]
Use relative imports
svn path=/trunk/; revision=191
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
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
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
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
Johan Dahlin [Mon, 21 Apr 2008 04:40:01 +0000 (04:40 +0000)]
Set default to an empty list
svn path=/trunk/; revision=186
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
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
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
Johan Dahlin [Sun, 20 Apr 2008 19:53:12 +0000 (19:53 +0000)]
Oops, forgot to uncomment this
svn path=/trunk/; revision=182
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
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
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
Johan Dahlin [Fri, 18 Apr 2008 21:01:02 +0000 (21:01 +0000)]
add a namespace option
svn path=/trunk/; revision=178
Johan Dahlin [Fri, 18 Apr 2008 20:47:40 +0000 (20:47 +0000)]
Add support for enums
svn path=/trunk/; revision=177
Johan Dahlin [Fri, 18 Apr 2008 20:41:37 +0000 (20:41 +0000)]
Do function names too
svn path=/trunk/; revision=176
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
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
Johan Dahlin [Fri, 18 Apr 2008 20:08:10 +0000 (20:08 +0000)]
Add support for void ctype
svn path=/trunk/; revision=173
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
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
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
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
Johan Dahlin [Wed, 26 Mar 2008 07:25:47 +0000 (07:25 +0000)]
Remove unused files
svn path=/trunk/; revision=168
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Johan Dahlin [Tue, 11 Mar 2008 14:19:48 +0000 (14:19 +0000)]
Remove unused imports
svn path=/trunk/; revision=152
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
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
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
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
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
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
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
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
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
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
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
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
Johan Dahlin [Mon, 10 Mar 2008 17:52:14 +0000 (17:52 +0000)]
and the ChangeLog
svn path=/trunk/; revision=137
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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