Johan Dahlin [Mon, 28 Apr 2008 00:15:16 +0000 (00:15 +0000)]
Wrap attributes for lines which are wider than 79 characters
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/xmlwriter.py:
Wrap attributes for lines which are wider than 79 characters
svn path=/trunk/; revision=235
Johan Dahlin [Mon, 28 Apr 2008 00:07:57 +0000 (00:07 +0000)]
Simplify & Remove a bit of unused code
svn path=/trunk/; revision=234
Johan Dahlin [Sun, 27 Apr 2008 23:27:17 +0000 (23:27 +0000)]
Allow parenthesis in annotations
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/scannerlexer.l:
Allow parenthesis in annotations
* giscanner/ast.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Add initial sequence support, including annotation.
Refactor type handling a bit.
svn path=/trunk/; revision=233
Johan Dahlin [Sun, 27 Apr 2008 23:13:24 +0000 (23:13 +0000)]
Add two new functions to check sequence return values. Also fixes a
2008-04-27 Johan Dahlin <johan@gnome.org>
* tests/parser/Foo-expected.gidl:
* tests/parser/foo-object.h:
* tests/parser/foo.c (foo_object_class_init),
(foo_object_get_strings), (foo_object_get_objects):
Add two new functions to check sequence return values.
Also fixes a compilation warning.
svn path=/trunk/; revision=232
Johan Dahlin [Sun, 27 Apr 2008 23:09:07 +0000 (23:09 +0000)]
Cast the getter, avoids a compilation warning.
2008-04-27 Johan Dahlin <johan@gnome.org>
* giscanner/giscannermodule.c (]): Cast the getter, avoids
a compilation warning.
svn path=/trunk/; revision=231
Johan Dahlin [Sun, 27 Apr 2008 23:08:19 +0000 (23:08 +0000)]
g-ir-scanner has no sources.
2008-04-27 Johan Dahlin <johan@gnome.org>
* tools/Makefile.am (g_ir_scanner_SOURCES):
g-ir-scanner has no sources.
svn path=/trunk/; revision=230
Johan Dahlin [Sat, 26 Apr 2008 02:37:07 +0000 (02:37 +0000)]
Split out nodes to ast.py and glibast.py
2008-04-25 Johan Dahlin <johan@gnome.org>
* giscanner/Makefile.am:
* giscanner/ast.py:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Split out nodes to ast.py and glibast.py
svn path=/trunk/; revision=229
Johan Dahlin [Sat, 26 Apr 2008 02:27:40 +0000 (02:27 +0000)]
Rename treebuilder to transformer and gobjectreebuilder to
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/transformer.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Rename treebuilder to transformer and
gobjectreebuilder to glibtransformer.
svn path=/trunk/; revision=228
Johan Dahlin [Sat, 26 Apr 2008 02:20:07 +0000 (02:20 +0000)]
Add LGPLv2 license header and install all python files
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
* giscanner/__init__.py:
* giscanner/cgobject.py:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/odict.py:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* giscanner/xmlwriter.py:
* tools/Makefile.am:
* tools/g-ir-scanner:
Add LGPLv2 license header and install all python files
svn path=/trunk/; revision=227
Johan Dahlin [Fri, 25 Apr 2008 23:50:02 +0000 (23:50 +0000)]
Add support for virtual methods. Pair struct FooClass with struct Foo.
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* TODO:
* giscanner/gidlwriter.py:
* giscanner/giscannermodule.c (pygi_source_directive_new),
(directive_get_options), (pygi_source_symbol_new),
(symbol_get_base_type), (pygi_source_type_new),
(type_get_base_type), (type_get_child_list),
(pygi_source_scanner_get_symbols),
(pygi_source_scanner_get_directives):
* giscanner/gobjecttreebuilder.py:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tests/parser/foo-object.h:
Add support for virtual methods.
Pair struct FooClass with struct Foo.
Clean up the SourceScanner bindings a bit.
Add a testcase for virtual methods.
svn path=/trunk/; revision=226
Johan Dahlin [Fri, 25 Apr 2008 16:26:51 +0000 (16:26 +0000)]
Add support for signals
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/cgobject.py:
* giscanner/gidlwriter.py:
* giscanner/gobjecttreebuilder.py:
Add support for signals
* tests/parser/foo.c (foo_object_class_init):
* Foo-expected.gidl:
Add a signal and update the expected output.
svn path=/trunk/; revision=225
Johan Dahlin [Fri, 25 Apr 2008 00:17:15 +0000 (00:17 +0000)]
Add support for source/header annotations.
2008-04-24 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c (directive_get_name),
(directive_get_value), (directive_get_options),
(symbol_get_directives), (symbol_set_directives),
(pygi_source_scanner_parse_file),
(pygi_source_scanner_lex_filename),
(pygi_source_scanner_get_directives), (init_giscanner):
* giscanner/sourcescanner.c (gi_source_scanner_get_directives):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Add support for source/header annotations.
svn path=/trunk/; revision=224
Johan Dahlin [Wed, 23 Apr 2008 01:32:49 +0000 (01:32 +0000)]
bitmask->bitfield, c:symbol->c:identifer api->repository
svn path=/trunk/; revision=223
Johan Dahlin [Wed, 23 Apr 2008 01:28:27 +0000 (01:28 +0000)]
Add support for Callbacks
2008-04-22 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/treebuilder.py:
Add support for Callbacks
svn path=/trunk/; revision=222
Havoc Pennington [Wed, 23 Apr 2008 01:24:57 +0000 (01:24 +0000)]
If a symbol is not in metadata->module, look for it in the global module,
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginvoke.c (g_function_info_invoke): If a symbol is
not in metadata->module, look for it in the global module, in case
some other object or the app itself provides the symbol.
svn path=/trunk/; revision=221
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