1 2008-08-20 Johan Dahlin <johan@gnome.org>
3 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
4 Add a workaround for #548689.
5 We can now compile gtk!
7 2008-08-20 Colin Walters <walters@verbum.org>
9 * giscanner/glibtransformer.py: Try to look up
10 aliases using the c:type too.
12 2008-08-20 Colin Walters <walters@verbum.org>
14 * girepository/girparser.c: Parse union fields.
16 2008-08-20 Johan Dahlin <johan@gnome.org>
18 * giscanner/ast.py: Make time_t an alias for long
20 * gir/gio-2.0-good.gir:
21 * gir/glib-2.0-good.gir:
22 * gir/gobject-2.0-good.gir:
24 * giscanner/glibtransformer.py:
25 Do not delete Class structures, we need them in gdk/gtk.
26 * tests/scanner/drawable-expected.gir:
27 * tests/scanner/foo-expected.gir:
28 * tests/scanner/utility-expected.gir:
31 2008-08-20 Johan Dahlin <johan@gnome.org>
33 * tests/scanner/Makefile.am:
34 * tests/scanner/annotation-expected.gir:
35 * tests/scanner/annotation.c (annotation_object_class_init),
36 (annotation_object_init), (annotation_object_method),
37 (annotation_object_in), (annotation_object_out),
38 (annotation_object_inout), (annotation_object_inout2),
39 (annotation_object_inout3), (annotation_object_calleeowns),
40 (annotation_object_calleesowns), (annotation_object_get_strings),
41 (annotation_object_with_voidp), (annotation_object_get_objects),
42 (annotation_object_create_object), (annotation_object_allow_none):
43 * tests/scanner/annotation.h:
44 * tests/scanner/foo-expected.gir:
45 * tests/scanner/foo.c:
46 * tests/scanner/foo.h:
47 Split out annotation tests out of foo
49 2008-08-20 Johan Dahlin <johan@gnome.org>
51 * tests/scanner/Foo-expected.gir:
52 * tests/scanner/Makefile.am:
53 * tests/scanner/foo-expected.gir:
54 * tests/scanner/foo-object.h:
55 * tests/scanner/foo.c:
56 Foo->foo, foo-object.h -> foo.h
58 2008-08-20 Johan Dahlin <johan@gnome.org>
60 * tests/scanner/Foo-expected.gir:
61 * tests/scanner/Makefile.am:
62 * tests/scanner/drawable-expected.gir:
63 * tests/scanner/drawable.c (test_drawable_class_init),
65 * tests/scanner/drawable.h:
66 * tests/scanner/foo-object.h:
67 * tests/scanner/foo.c (foo_boxed_method):
68 Move the drawable parts out of Foo to its own test.
70 2008-08-20 Johan Dahlin <johan@gnome.org>
72 * tests/scanner/Foo-expected.gir:
73 * tests/scanner/foo-object.h:
74 * tests/scanner/foo.c (foo_drawable_class_init),
76 Add a based on GdkDrawable which generates
79 2008-08-19 Colin Walters <walters@verbum.org>
81 * giscanner/transformer.py: Don't try
82 to strip prefix before namespace.
84 2008-08-19 Johan Dahlin <johan@gnome.org>
86 * giscanner/transformer.py:
87 * tests/scanner/Foo-expected.gir:
88 * tests/scanner/foo-object.h:
89 Add support for typedef void foo type of
92 2008-08-19 Johan Dahlin <johan@gnome.org>
95 * giscanner/girwriter.py:
96 * giscanner/glibtransformer.py:
97 * giscanner/transformer.py:
98 * tests/scanner/Foo-expected.gir:
99 Add basic support for union, base the code much
100 on Struct. Add a testcase.
102 2008-08-19 Johan Dahlin <johan@gnome.org>
104 * tests/scanner/Foo-expected.gir:
105 * tests/scanner/foo-object.h:
106 Add a union testcase which the compiler currently
109 2008-08-19 Johan Dahlin <johan@gnome.org>
111 * gobject-introspection-1.0.pc.in:
112 Add a g_ir_compiler variable
114 2008-08-19 Colin Walters <walters@verbum.org>
116 * giscanner/ast.py: Rework types to be more closely
118 * giscanner/girparser.py: Parse more bits.
119 * giscanner/girwriter.py: Write sequences in a new
120 way that specifies container type.
121 * giscanner/glibast.py: Adjust for ast.py changes,
122 add 'ctype' property to GLibObject and GLibInterface
123 so we can look things up by it later.
124 * gicanner/transformer.py: Names is new class holding
125 the various namespaces we manage. Do not confuse
126 with Namespace which is toplevel XML node effectively.
127 Rework all type resolution to go through
128 _resolve_type_name_1.
129 * giscanner/glibtransformer.py: Raise UnknownTypeError
130 instead of ValueError for cleanliness. Add Unresolved
131 class to mark types whose parent we haven't seen yet.
132 Use new Names object from transformer.py.
133 Correctly look up parent=.
134 Fix type validation to handle sequences.
135 * tests/scanner/Foo-expected.gir: Update for sequence
136 work, int instead of int32.
137 * tools/g-ir-scanner: Add --noclosure option
138 * gir/Makefile.am: Use --noclosure by default for
141 2008-08-18 Johan Dahlin <johan@gnome.org>
143 * gir/gio-2.0-good.gir:
144 * gir/glib-2.0-good.gir:
145 * gir/gobject-2.0-good.gir:
148 2008-08-18 Johan Dahlin <johan@gnome.org>
151 * giscanner/girparser.py:
152 * giscanner/girwriter.py:
153 * giscanner/glibast.py:
154 * giscanner/glibtransformer.py:
155 * giscanner/transformer.py:
156 * tests/scanner/Foo-expected.gir:
157 * tests/scanner/foo-object.h:
158 * tests/scanner/utility-expected.gir:
159 * tests/scanner/utility.h:
160 Redo type resolving and validation.
161 Add a couple of new tests.
162 Patch mostly written by Colin.
164 2008-08-18 Johan Dahlin <johan@gnome.org>
167 * giscanner/girparser.py:
169 * giscanner/transformer.py:
170 Improve enum parsing for enums without a GType.
171 Make flags/enum references to other girs work
172 * giscanner/utils.py:
174 * tests/scanner/Makefile.am:
175 * tests/scanner/foo-object.h:
176 * tests/scanner/utility-expected.gir:
177 * tests/scanner/utility.h:
178 Add a new test for external enum references
180 2008-08-18 Johan Dahlin <johan@gnome.org>
182 * docs/global-module-registry.txt: Update
184 * tests/array.gir: Update with new type proposal
186 * girepository/girepository.c (g_type_tag_to_string):
187 * girepository/girepository.h:
188 * girepository/girnode.c (g_ir_node_get_full_size_internal),
190 * girepository/girnode.h:
191 Make enum serializing functions public. Clean up some whitespace.
193 2008-08-17 Johan Dahlin <johan@gnome.org>
195 * docs/global-module-registry.txt:
196 Add a document for an on disk module registry format
198 2008-08-17 Johan Dahlin <johan@gnome.org>
201 * gir/gio-2.0-good.gir:
204 2008-08-17 Johan Dahlin <johan@gnome.org>
207 * gir/glib-2.0-good.gir:
208 * gir/gobject-2.0-good.gir:
209 * giscanner/cgobject.py:
210 * giscanner/glibtransformer.py:
211 Regenerate GObject & GType.
212 Avoid warnings when generating gobject-2.0.gir.
213 Introspect a little more, and skip *_get_type functions.
215 2008-08-17 Colin Walters <walters@verbum.org>
217 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
218 Rename to -good, always generate during build.
219 * gir/Makefile.am: Ensure .gir files dep on
221 * Makefile.am: Switch build order to ensure
222 the scanner is ready before we do gir/.
223 * tools/g-ir-scanner: Look for .git too.
225 2008-08-17 Johan Dahlin <johan@gnome.org>
227 * girepository/gtypelib.c (validate_enum_blob):
228 * giscanner/glibtransformer.py:
229 * giscanner/transformer.py:
230 Remove resolve_possible_typedefs, it was unused.
231 Allow multiple enum values of the sample value in an enum,
232 since it's actually pretty common.
233 Register enums so they can be resolved too.
235 2008-08-16 Johan Dahlin <johan@gnome.org>
237 * giscanner/girparser.py:
238 Parse enumeration/bitfield.
240 2008-08-16 Johan Dahlin <johan@gnome.org>
242 * giscanner/girparser.py:
245 2008-08-16 Johan Dahlin <johan@gnome.org>
247 * giscanner/glibtransformer.py:
248 Resolve type names for alias targets
249 * giscanner/transformer.py:
250 Skip FILE* parameters fow now
252 2008-08-16 Johan Dahlin <johan@gnome.org>
255 * gir/gobject-2.0.gir:
258 * tests/scanner/Makefile.am:
261 2008-08-15 Colin Walters <walters@verbum.org>
263 * giscanner/glibtransformer.py: Explicitly construct
264 new list, since we're deleting as we iterate.
265 Don't delete all structures which end in Class; just
266 ones which have a paired GObject.
267 Fix printing of type warning.
268 * giscanner/transformer.py: Make strip_namespace_object
269 be the identity function if it doesn't match the
272 2008-08-15 Colin Walters <walters@verbum.org>
274 * giscanner/cgobject.py: Define yet more argument
275 prototypes; fix prototype for g_type_fundamental.
277 2008-08-14 Johan Dahlin <johan@gnome.org>
280 * tests/constant.gir:
283 * tools/generate.c (write_struct_info):
284 Fix generator for constant/gobject/struct
286 2008-08-14 Johan Dahlin <johan@gnome.org>
290 * tools/generate.c (write_enum_info):
291 Fix generation of enum/bitfields
293 2008-08-14 Johan Dahlin <johan@gnome.org>
295 * girepository/girparser.c (start_field), (start_constant),
296 (start_type), (end_element_handler):
297 Clear up constant parsing
302 * tools/generate.c (write_callable_info), (write_function_info),
303 (write_callback_info), (write_constant_info), (write_signal_info),
304 (write_vfunc_info), (write_property_info), (write_object_info),
305 (write_interface_info):
306 Constants/Signals are handled now.
308 2008-08-14 Johan Dahlin <johan@gnome.org>
310 * girepository/girparser.c (start_type):
311 Don't require c:type.
315 Update, remove parts we don't support yet
316 * tests/roundtrips.sh:
318 * tools/generate.c (write_type_info), (write_field_info),
319 (write_callable_info), (write_struct_info):
320 Make it emit proper gir.
322 2008-08-14 Johan Dahlin <johan@gnome.org>
324 * giscanner/transformer.py:
325 New internal function for adding a new node.
327 2008-08-14 Johan Dahlin <johan@gnome.org>
330 Define an internal _H_ variable so we skip parsing both
331 i18n headers, only one is needed.
333 Add the glib-2.0.gir too.
334 * giscanner/glibast.py:
335 Add gconstpointer as an alias for ANY
336 * giscanner/transformer.py:
337 Do not lower case enumeration names per se.
338 Skip functions which has parameters called 'va_list'
340 2008-08-14 Colin Walters <walters@verbum.org>
342 * giscanner/transformer.py: Comment data structures.
343 Also squash pointers in resolve_type_name to correspond
344 with what we do for params.
345 * giscanner/glibtransformer.py: Print warnings in more
346 situations. Rework checks for method/constructor to
347 look up in our GType database instead of just checking
348 for *. Avoid generating <record> for GObject which
349 duplicate the <class>.
350 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
353 2008-08-14 Johan Dahlin <johan@gnome.org>
355 * giscanner/girwriter.py:
356 * giscanner/glibast.py:
357 * giscanner/glibtransformer.py:
358 * giscanner/transformer.py:
361 Add pyflakes.py and run it in make check.
362 Update the source code to fix the errors reported by
365 2008-08-14 Johan Dahlin <johan@gnome.org>
368 * giscanner/girparser.py:
369 * giscanner/glibast.py:
370 * giscanner/glibtransformer.py:
371 Refactor the parser a bit.
372 Add parent type to interfaces and update callsites.
374 2008-08-14 Johan Dahlin <johan@gnome.org>
376 * giscanner/glibtransformer.py:
377 * giscanner/utils.py:
378 Refactor a bit, avoid isinstance and add a method
379 for each type we parse.
381 2008-08-14 Johan Dahlin <johan@gnome.org>
384 * giscanner/girparser.py:
385 * giscanner/glibtransformer.py:
387 Run pep8.py in make check, fix old errors.
389 2008-08-13 Colin Walters <walters@verbum.org>
391 * giscanner/girparser.py: Parse records.
393 2008-08-13 Colin Walters <walters@verbum.org>
395 * gir/Makefile.am: Install again.
396 * gir/gobject-2.0.gir: Add some more bits.
398 2008-08-13 Colin Walters <walters@verbum.org>
400 * gir/gobject-2.0.gir: Use correct namespace, add GType.
401 * giscanner/girparser.py: Handle aliases.
402 * giscanner/transformer.py: Record aliases. Make resolver
403 functions public; we now call into these explicitly from
404 glibtransformer. Handle resolving aliases.
405 * giscanner/glibtransformer.py: Separate our internal namespace
406 from included ones. Call up into transformer's resolver functions.
408 2008-08-13 Johan Dahlin <johan@gnome.org>
410 * girepository/girnode.c (g_ir_node_get_full_size_internal):
411 * girepository/girparser.c (start_class):
412 * giscanner/glibtransformer.py:
413 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
415 2008-08-13 Johan Dahlin <johan@gnome.org>
417 * giscanner/cgobject.py:
418 Register GInitiallyUnowned
419 * giscanner/girwriter.py:
420 * giscanner/glibtransformer.py:
421 Special case GObject/GInitially owned as they are a bit special to use.
423 2008-08-13 Colin Walters <walters@verbum.org>
425 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
426 Object is in GObject namespace.
428 2008-08-13 Colin Walters <walters@verbum.org>
430 * giscanner/girparser.py: Fix processing of functions
433 2008-08-13 Colin Walters <walters@verbum.org>
435 * giscanner/girparser.py: Parse more than just <class.
436 * giscanner/glibtransformer.py: Put aliases in a separate
437 data structure since their name is not canonicall.
438 * giscanner/transformer.py: Handle resolving type names
441 2008-08-13 Johan Dahlin <johan@gnome.org>
443 * tools/g-ir-scanner:
444 Allow multiple libraries
445 * giscanner/glibtransformer.py:
446 Rename load_library to add_library, traverse over all libraries
447 when trying to resolve a function
449 2008-08-12 Colin Walters <walters@verbum.org>
451 * giscanner/transformer.py: Record typedefs as <alias> elements.
452 Also attempt to look up types in external namespaces.
453 * giscanner/girwriter.py: Write them.
454 * giscanner/glibtransformer.py: Rework resolver using real instanceof
455 checks. Resolve interface methods and properties.
456 * tests/scanner/foo-object.h: Add a method with typedef.
457 * tests/scanner/Foo-expected.gir: Update.
458 * girepository/girnode.c: Debug tweaks.
459 * girepository/girparser.c: Make a first pass through the XML where we
460 record all the aliases. This lets us resolve them as we go through the
462 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
465 2008-08-12 Colin Walters <walters@verbum.org>
467 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
468 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
470 * giscanner/transformer.py: Record typedefs and expose public API for resolving
472 * tests/scanner/Foo-expected.gir: Fix expected callback types.
474 2008-08-12 Colin Walters <walters@verbum.org>
476 * giscanner/glibtransformer.py: Also transform object properties.
478 2008-08-12 Colin Walters <walters@verbum.org>
480 * giscanner/glibtransformer.py: Also transform callbacks
481 and structure field types.
482 * tests/scanner/Fooe-expected.gir: Update to expect correct
483 names for callbacks and structs.
485 2008-08-12 Colin Walters <walters@verbum.org>
487 * girepository/girparser.c: Handle 'any'.
488 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
491 2008-08-12 Colin Walters <walters@verbum.org>
493 * giscanner/glibtransformer.py: We need to do type
494 resolution in a second pass after we've seen all the
497 2008-08-12 Colin Walters <walters@verbum.org>
499 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
500 Add enum return value.
501 * giscanner/glibtransformer.py: Transform function return types
504 2008-08-12 Colin Walters <walters@verbum.org>
506 * tests/scanner/Makefile.am: Dep .gir files on scanner
507 sources too. Also remove @ so we see scanner invocations.
509 2008-08-12 Colin Walters <walters@verbum.org>
511 * girepository/girparser.c, girepository/gtypelib.c,
512 girepository/gtypelib.h, girepository/girnode.c:
513 Remove usage of (GAPI-oriented) TypeTag in favor of
514 GITypeTag from girepository.h.
516 2008-08-10 Colin Walters <walters@verbum.org>
518 * tests/roundtrips.sh: Use the correct tests.
520 2008-08-10 Colin Walters <walters@verbum.org>
522 * giscanner/cgobject.py: Declare/wrap a few more functions.
523 Fix parameter types for g_object_new and g_type_fundamental.
525 2008-08-10 Colin Walters <walters@verbum.org>
527 * giscanner/cgobject.py: Add new decorator @gwrap which forces
528 us to declare types for both return value and parameters. The
529 ctypes default of 'int' is bad because it hides 32/64 bit
530 problems. Convert all existing functions to use it.
532 2008-08-09 Johan Dahlin <johan@gnome.org>
534 * giscanner/__init__.py:
536 * giscanner/cgobject.py:
537 * giscanner/gidlparser.py:
538 * giscanner/gidlwriter.py:
539 * giscanner/girparser.py:
540 * giscanner/girwriter.py:
541 * giscanner/glibast.py:
542 * giscanner/glibtransformer.py:
543 * giscanner/odict.py:
544 * giscanner/sourcescanner.py:
545 * giscanner/transformer.py:
546 * giscanner/utils.py:
547 * giscanner/xmlwriter.py:
548 * tools/g-ir-scanner:
552 2008-08-09 Johan Dahlin <johan@gnome.org>
555 * relaxng/c-types.xml:
556 * relaxng/g-types.xml:
557 * relaxng/relaxng.rng:
559 Remove outdated relaxng schemas.
561 2008-08-09 Johan Dahlin <johan@gnome.org>
564 Rename metadata to typelib in variable names,
567 2008-08-09 Johan Dahlin <johan@gnome.org>
571 Remove old C scanner, which got rewritten in python.
573 2008-08-09 Johan Dahlin <johan@gnome.org>
575 * girepository/Makefile.am:
585 Move shared *.[ch] files to girepository from tools
587 2008-08-09 Johan Dahlin <johan@gnome.org>
592 * tests/constant.test:
595 * tests/function.test:
596 * tests/gobject.test:
597 * tests/interface.test:
604 Rename *.test to *.gir
606 2008-08-09 Johan Dahlin <johan@gnome.org>
610 * tests/parser/Foo-expected.gir:
611 * tests/parser/Makefile.am:
612 * tests/parser/foo-object.h:
613 * tests/parser/foo.c:
614 * tests/parser/utility-expected.gir:
615 * tests/parser/utility.c:
616 * tests/parser/utility.h:
617 * tests/scanner/Makefile.am:
618 Rename tests/parser to test/scanner
620 2008-08-08 Colin Walters <walters@verbum.org>
622 * tests/roundtrips.sh: Use local .gir files again.
624 2008-08-08 Colin Walters <walters@verbum.org>
626 * tests/invoke/Makefile.am: .gir file depends on libtool
629 2008-08-08 Colin Walters <walters@verbum.org>
631 * tools/girnode.c: Pass through parent node so we can
632 print the node whose child is NULL, if that occurs.
634 2008-08-08 Johan Dahlin <johan@gnome.org>
637 Disable roundtrip tests which are not yet working
638 * tests/invoke/testfns.gir:
641 2008-08-08 Johan Dahlin <johan@gnome.org>
643 * giscanner/girwriter.py:
645 * giscanner/glibast.py:
646 * giscanner/glibtransformer.py:
647 Swap order of members, to keep it consistent with
650 2008-08-08 Johan Dahlin <johan@gnome.org>
652 * girepository/gtypelib.c (validate_header):
653 * girepository/gtypelib.h:
655 * giscanner/girwriter.py:
656 * giscanner/sourcescanner.c (gi_source_symbol_ref),
657 (gi_source_symbol_unref):
660 * tests/constant.test:
663 * tests/function.test:
664 * tests/gobject.test:
665 * tests/interface.test:
666 * tests/invoke/Makefile.am:
667 * tests/invoke/testfns.xml:
669 * tests/parser/Makefile.am:
670 * tests/roundtrips.sh:
677 * tools/compiler.c (main):
678 * tools/generate.c (write_callable_info), (write_function_info),
680 * tools/gidlmodule.c:
681 * tools/gidlmodule.h:
684 * tools/gidlparser.c:
685 * tools/gidlparser.h:
686 * tools/gidlwriter.c:
687 * tools/gidlwriter.h:
688 * tools/scanner.c (create_node_from_gtype),
689 (create_node_from_ctype), (g_igenerator_process_properties),
690 (g_igenerator_process_signals), (g_igenerator_create_object),
691 (g_igenerator_create_interface), (g_igenerator_create_boxed),
692 (g_igenerator_create_enum), (g_igenerator_create_flags),
693 (g_igenerator_process_function_symbol),
694 (g_igenerator_process_unregistered_struct_typedef),
695 (g_igenerator_process_struct_typedef),
696 (g_igenerator_process_union_typedef),
697 (g_igenerator_process_enum_typedef),
698 (g_igenerator_process_function_typedef),
699 (g_igenerator_process_constant), (g_igenerator_process_symbols),
700 (g_igenerator_add_module), (g_igenerator_add_include_idl):
701 Merge in the gir-compiler branch.
702 Thanks to Philip and Colin for their help.
704 2008-07-26 Colin Walters <walters@verbum.org>
706 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
707 and g-idl-generate to go along with how we're changing this
708 module to be installed.
709 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
711 2008-07-24 Colin Walters <walters@verbum.org>
713 * girepository/girepository.c (g_irepository_register): Add
714 environment variable G_IREPOSITORY_VERBOSE so we can print
715 out what we're doing.
716 * girepository/girepository.c (g_irepository_register_file):
717 Add GError error message to g_debug call.
719 2008-07-08 Jürg Billeter <j@bitron.ch>
721 * giscanner/glibast.py:
725 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
727 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
730 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
733 * giscanner/girwriter.py:
734 * giscanner/transformer.py:
735 * tests/parser/Foo-expected.gir:
736 * tests/parser/foo-object.h:
737 * tests/parser/foo.c (foo_object_allow_none):
738 Add support for gtk-doc annotations for allow-none.
741 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
744 * giscanner/girwriter.py:
745 * giscanner/glibast.py:
746 * giscanner/glibtransformer.py:
747 * giscanner/transformer.py:
748 * tests/parser/Foo-expected.gir:
749 Start using abstract type instead of the raw C types.
750 Register a bunch of glib types we care about.
752 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
757 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
759 * girepository/girepository.c:
760 * girepository/gtypelib.c:
761 * girepository/ginfo.c:
762 * girepository/ginvoke.c:
763 * girepository/girepository.h:
764 * girepository/gtypelib.h:
765 * girepository/gmetadata.c:
766 * girepository/Makefile.am:
767 * girepository/gmetadata.h:
769 * tools/gidlmodule.c:
772 * tools/gidlmodule.h:
773 * tools/gidlparser.c:
775 Renamed GMetadata to GTypelib
777 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
779 * giscanner/xmlwriter.py:
780 Improve line wrapping when > 79 charaters
782 2008-06-05 Jürg Billeter <j@bitron.ch>
785 * giscanner/girwriter.py:
786 * giscanner/transformer.py:
787 Use <type> element for field types
788 * tests/parser/Foo-expected.gir:
791 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
793 * giscanner/glibtransformer.py:
794 Fix a bug which prevented GdkEvent from being generated
796 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
798 * giscanner/Makefile.am:
800 * giscanner/girwriter.py:
801 * giscanner/glibast.py:
802 * giscanner/glibtransformer.py:
803 * giscanner/transformer.py:
804 * giscanner/utils.py:
805 * tests/parser/Foo-expected.gir:
806 Improve enum member parsing and introspection
808 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
810 * giscanner/scannerparser.y:
811 * giscanner/sourcescanner.h:
812 * giscanner/sourcescanner.py:
813 Add a new source type enum for member.
814 Use __repr__ for improved debugging
815 * giscanner/girparser.py:
817 * giscanner/transformer.py:
818 Improve parsing of struct members.
819 * tests/parser/foo-object.h:
822 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
824 * giscanner/xmlwriter.py:
825 Improve error reporting when trying to quote None.
826 * giscanner/girparser.py:
827 Do not print warnings when including more complete .gir files
828 * giscanner/girwriter.py:
829 Do not require a name for parameters, add a todo for singletons
830 * giscanner/glibtransformer.py:
831 Refactor the way structs are done, add a couple of hacks to allow
833 * giscanner/transformer.py:
834 Add enough hacks so cairo, atk and pango.gir can be parsed properly
835 * gobject-introspection-1.0.pc.in:
836 Export girdir, so we can access gobject-2.0.gir from outside
838 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
840 * tools/g-ir-scanner:
841 * tests/parser/Makefile.am:
842 Update sys.path before running the parser so we don't have
843 to setup PYTHONPATH ourselves.
847 * girepository/Makefile.am:
848 * giscanner/transformer.py:
849 * gobject-introspection-1.0.pc.in:
850 * gobject-introspection.pc.in:
853 Rename pkg-config name to gobject-introspection-1.0,
854 Do not installed anything which is not using the gir format.
855 Disable compililation the old C scanner, but still keep the source
856 until all the remaning functionallity has been ported.
858 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
860 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
861 a crash when symbol->indent is NULL.
863 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
864 a function to convert a CTYPE symbol to a string
866 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
869 * giscanner/girwriter.py:
870 * giscanner/giscannermodule.c
871 (pygi_source_scanner_append_filename),
872 (pygi_source_scanner_parse_file):
873 * giscanner/glibtransformer.py:
874 * giscanner/sourcescanner.py:
875 Revert back to using temporary files to send in headers.
876 Allow Functions to be passed in as callbacks, add a couple
877 of try/excepts missing features.
878 We can now scan pango
880 2008-05-08 Johan Dahlin <johan@gnome.org>
882 * giscanner/glibtransformer.py:
883 * giscanner/transformer.py:
884 Move namespace stripping glibtransformer->transformer
886 2008-05-08 Johan Dahlin <johan@gnome.org>
889 * giscanner/girwriter.py:
890 * giscanner/glibtransformer.py:
891 * giscanner/transformer.py:
892 * tools/g-ir-scanner:
893 Introduce a namespace ast node
895 2008-05-05 Johan Dahlin <johan@gnome.org>
897 * giscanner/__init__.py:
898 * giscanner/sourcescanner.py:
899 * giscanner/transformer.py:
900 Move sourcescanner symbols to the sourcescanner module, instead
901 of in the global __init__ namespace.
903 2008-05-03 Johan Dahlin <johan@gnome.org>
905 * giscanner/glibtransformer.py:
906 * tools/g-ir-scanner:
907 Handle missing parameters better, allow - and + in .la dlname
910 2008-05-03 Johan Dahlin <johan@gnome.org>
912 * giscanner/__init__.py:
914 * giscanner/girwriter.py:
915 * giscanner/glibtransformer.py:
916 * giscanner/transformer.py:
917 Parse struct fields properly, improve debugging.
919 2008-04-29 Johan Dahlin <johan@gnome.org>
922 * giscanner/girwriter.py:
923 * giscanner/transformer.py:
924 * tests/parser/Foo-expected.gir:
926 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
928 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
931 * docs/g-ir-scanner.1:
932 * metadata-annotations-proposal.txt:
933 * metadata-format.txt:
934 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
936 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
938 * giscanner/girwriter.py:
939 * giscanner/glibtransformer.py:
940 * giscanner/transformer.py:
941 * giscanner/xmlwriter.py:
942 * tests/parser/Foo-expected.gir:
943 * tests/parser/foo-object.h:
944 Write record/structs to gir file too. Add a couple of tests,
945 fix an off by one error in xmlwriter.py.
947 2008-04-28 Johan Dahlin <johan@gnome.org>
949 * giscanner/xmlwriter.py: Calculate the line length properly,
950 include the provided extra indentation in the calculation, really.
952 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
955 * giscanner/glibast.py:
956 * giscanner/glibtransformer.py:
957 * giscanner/transformer.py:
958 * tools/g-ir-scanner:
959 Add a --strip-prefix and sort out confusion between names and symbols
960 for functions and struct + derivaties.
961 Refactor bootstrap of g-ir-scanner, so we can set options on
962 Transformer() before parsing everything.
964 2008-04-28 Johan Dahlin <johan@gnome.org>
966 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
967 when scanning girepository.h
969 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
970 a __GI_SCANNER__ when we run.
972 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
975 * giscanner/girwriter.py:
976 * giscanner/glibast.py:
977 * giscanner/glibtransformer.py:
978 * tests/parser/Foo-expected.gir:
979 * tests/parser/utility-expected.gir:
980 Rename most c:identifier to c:type. Add new ones to
981 class/interface/enum/boxed.
983 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
986 * giscanner/girwriter.py:
987 * giscanner/glibtransformer.py:
988 * tests/parser/Foo-expected.gidl:
989 * tests/parser/Makefile.am:
990 Move c:identifier from return-value to subchild type,
991 as per Jürgs suggestion
993 2008-04-28 Johan Dahlin <johan@gnome.org>
995 * giscanner/girwriter.py:
996 * tests/parser/Foo-expected.gir:
997 Write property.type as a child node.
999 2008-04-27 Johan Dahlin <johan@gnome.org>
1004 * gidl/gobject-2.0.gidl:
1006 * gir/gobject-2.0.gir:
1007 * tests/parser/Makefile.am:
1008 Replace the GObject gidl with a GObject gir.
1010 2008-04-27 Johan Dahlin <johan@gnome.org>
1012 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
1015 * giscanner/xmlwriter.py:
1016 * tests/parser/Foo-expected.gir:
1017 Include indentation in line length calculation
1019 2008-04-27 Johan Dahlin <johan@gnome.org>
1021 * giscanner/girparser.py:
1022 Prettify NS parsing using elementtree.
1024 2008-04-27 Johan Dahlin <johan@gnome.org>
1027 * giscanner/Makefile.am:
1028 * giscanner/girparser.py:
1029 * giscanner/glibtransformer.py:
1030 * tests/parser/Foo-expected.gidl:
1031 * tests/parser/Foo-expected.gir:
1032 * tests/parser/Makefile.am:
1033 * tests/parser/utility-expected.gidl:
1034 * tests/parser/utility-expected.gir:
1035 * tools/g-ir-scanner:
1036 Switch over to GIR as the default format. Add a simple GIDL
1038 Update tests and fix simplify makefiles by depending
1039 on GNU make extensions.
1041 2008-04-27 Johan Dahlin <johan@gnome.org>
1043 * giscanner/xmlwriter.py:
1044 Wrap attributes for lines which are wider than 79 characters
1046 * giscanner/scannerlexer.l:
1047 Allow parenthesis in annotations
1050 * giscanner/gidlwriter.py:
1051 * giscanner/girwriter.py:
1052 * giscanner/glibtransformer.py:
1053 * giscanner/transformer.py:
1054 Add initial sequence support, including annotation.
1055 Refactor type handling a bit.
1057 2008-04-27 Johan Dahlin <johan@gnome.org>
1059 * tests/parser/Foo-expected.gidl:
1060 * tests/parser/foo-object.h:
1061 * tests/parser/foo.c (foo_object_class_init),
1062 (foo_object_get_strings), (foo_object_get_objects):
1063 Add two new functions to check sequence return values.
1064 Also fixes a compilation warning.
1066 2008-04-27 Johan Dahlin <johan@gnome.org>
1068 * giscanner/giscannermodule.c (]): Cast the getter, avoids
1069 a compilation warning.
1071 * tools/Makefile.am (g_ir_scanner_SOURCES):
1072 g-ir-scanner has no sources.
1074 2008-04-25 Johan Dahlin <johan@gnome.org>
1076 * giscanner/Makefile.am:
1078 * giscanner/gidlparser.py:
1079 * giscanner/gidlwriter.py:
1080 * giscanner/girwriter.py:
1081 * giscanner/glibast.py:
1082 * giscanner/glibtransformer.py:
1083 * giscanner/transformer.py:
1084 Split out nodes to ast.py and glibast.py
1086 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
1088 * giscanner/Makefile.am:
1089 * giscanner/gidlparser.py:
1090 * giscanner/gidlwriter.py:
1091 * giscanner/girwriter.py:
1092 * giscanner/glibtransformer.py:
1093 * giscanner/gobjecttreebuilder.py:
1094 * giscanner/transformer.py:
1095 * giscanner/treebuilder.py:
1096 * tools/g-ir-scanner:
1097 Rename treebuilder to transformer and
1098 gobjectreebuilder to glibtransformer.
1100 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
1102 * giscanner/Makefile.am:
1103 * giscanner/__init__.py:
1104 * giscanner/cgobject.py:
1105 * giscanner/gidlparser.py:
1106 * giscanner/gidlwriter.py:
1107 * giscanner/girwriter.py:
1108 * giscanner/gobjecttreebuilder.py:
1109 * giscanner/odict.py:
1110 * giscanner/sourcescanner.py:
1111 * giscanner/treebuilder.py:
1112 * giscanner/xmlwriter.py:
1113 * tools/Makefile.am:
1114 * tools/g-ir-scanner:
1115 Add LGPLv2 license header and install all python files
1117 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
1120 * giscanner/gidlwriter.py:
1121 * giscanner/giscannermodule.c (pygi_source_directive_new),
1122 (directive_get_options), (pygi_source_symbol_new),
1123 (symbol_get_base_type), (pygi_source_type_new),
1124 (type_get_base_type), (type_get_child_list),
1125 (pygi_source_scanner_get_symbols),
1126 (pygi_source_scanner_get_directives):
1127 * giscanner/gobjecttreebuilder.py:
1128 * giscanner/sourcescanner.py:
1129 * giscanner/treebuilder.py:
1130 * tests/parser/foo-object.h:
1131 Add support for virtual methods.
1132 Pair struct FooClass with struct Foo.
1133 Clean up the SourceScanner bindings a bit.
1134 Add a testcase for virtual methods.
1136 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
1138 * giscanner/cgobject.py:
1139 * giscanner/gidlwriter.py:
1140 * giscanner/gobjecttreebuilder.py:
1141 Add support for signals
1143 * tests/parser/foo.c (foo_object_class_init):
1144 * Foo-expected.gidl:
1145 Add a signal and update the expected output.
1147 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
1149 * giscanner/gidlwriter.py:
1150 * giscanner/girwriter.py:
1151 * giscanner/giscannermodule.c (directive_get_name),
1152 (directive_get_value), (directive_get_options),
1153 (symbol_get_directives), (symbol_set_directives),
1154 (pygi_source_scanner_parse_file),
1155 (pygi_source_scanner_lex_filename),
1156 (pygi_source_scanner_get_directives), (init_giscanner):
1157 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
1158 * giscanner/sourcescanner.h:
1159 * giscanner/sourcescanner.py:
1160 * giscanner/treebuilder.py:
1161 * tools/g-ir-scanner:
1162 Add support for source/header annotations.
1164 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
1166 * giscanner/gidlwriter.py:
1167 * giscanner/girwriter.py:
1168 * giscanner/gobjecttreebuilder.py:
1169 * giscanner/treebuilder.py:
1170 Add support for Callbacks
1172 2008-04-22 Havoc Pennington <hp@pobox.com>
1174 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
1175 not in metadata->module, look for it in the global module, in case
1176 some other object or the app itself provides the symbol.
1178 2008-04-22 Havoc Pennington <hp@pobox.com>
1180 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
1181 dlopening a library that is already in the main app, by checking
1182 whether one of the lib's symbols is already loaded.
1184 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
1186 * tests/parser/Foo-expected.gidl:
1187 * tests/parser/foo-object.h:
1190 2008-04-22 Havoc Pennington <hp@pobox.com>
1192 * girepository/ginfo.c (g_interface_info_find_method):
1193 Use interface_blob_size not object_blob_size to compute offset.
1195 2008-04-22 Havoc Pennington <hp@pobox.com>
1197 * girepository/gmetadata.c (_g_metadata_init): remove
1198 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
1199 (Glade and Clutter for example) rely on being loaded globally.
1201 2008-04-22 Havoc Pennington <hp@pobox.com>
1203 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
1204 function to get the GType given a RegisteredTypeInfo
1206 2008-04-22 Johan Dahlin <johan@gnome.org>
1208 * COPYING: Add a LGPL license, to prevent automake to
1209 put in a copy of GPL here. Pointed out by Havoc.
1211 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
1212 (g_type_info_is_pointer), (g_type_info_get_tag),
1213 (g_type_info_get_param_type), (g_type_info_get_interface),
1214 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
1215 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
1216 (g_error_domain_info_get_codes), (g_enum_info_get_value),
1217 (g_object_info_get_interface), (g_object_info_get_field),
1218 (g_interface_info_get_prerequisite),
1219 (g_signal_info_get_class_closure), (g_constant_info_get_value):
1220 * girepository/ginvoke.c (get_ffi_type):
1221 * girepository/girepository.h:
1222 * girepository/gmetadata.c (g_metadata_get_dir_entry),
1223 (g_metadata_check_sanity), (validate_header),
1224 (validate_array_type_blob), (validate_iface_type_blob),
1225 (validate_param_type_blob), (validate_error_type_blob),
1226 (validate_type_blob), (validate_constant_blob),
1227 (validate_struct_blob), (validate_enum_blob):
1228 * girepository/gmetadata.h:
1229 * tests/Makefile.am:
1230 * tests/invoke/Makefile.am:
1231 * tests/invoke/invoke.c (main):
1232 * tests/roundtrips.sh:
1233 * tools/Makefile.am:
1234 * tools/compiler.c (format_output), (write_out_metadata), (main):
1235 * tools/generate.c (write_type_name), (write_type_info),
1236 (write_constant_value), (write_enum_info), (load_metadata), (main):
1237 * tools/gidlcompilercontext.c:
1238 * tools/gidlcompilercontext.h:
1239 * tools/gidlcompilerentrynode.c:
1240 * tools/gidlcompilerentrynode.h:
1241 * tools/gidlcompilertypenode.c:
1242 * tools/gidlcompilertypenode.h:
1243 * tools/gidlmodule.c (g_idl_module_build_metadata):
1244 * tools/gidlmodule.h:
1245 * tools/gidlnode.c (init_stats), (dump_stats),
1246 (g_idl_node_get_size), (g_idl_node_get_full_size),
1247 (g_idl_node_cmp), (g_idl_node_can_have_member),
1248 (g_idl_node_add_member), (g_idl_node_param_direction_string),
1249 (parse_int_value), (parse_uint_value), (parse_float_value),
1250 (parse_boolean_value), (find_entry_node), (find_entry),
1251 (serialize_type), (g_idl_node_build_metadata), (write_string):
1253 * tools/gidlparser.c (parse_type_internal):
1254 * tools/quote-file.sh:
1255 Revert revisions 157,149-148,136-129 and 120.
1256 Move back to using g-idl-generate to generate the metadata and
1257 avoids dependency on a c compiler.
1259 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
1261 * giscanner/girwriter.py:
1262 * tools/g-ir-scanner:
1263 Add an initial GIR writer and a --format option to g-ir-scanner
1265 2008-04-21 Johan Dahlin <johan@gnome.org>
1267 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
1268 gobject-2.0 and raise ImportError if not found.
1270 * giscanner/gidlparser.py:
1271 * giscanner/gidlwriter.py:
1272 * giscanner/gobjecttreebuilder.py:
1273 * tools/g-ir-scanner:
1274 Add a --include argument to include types from other idls.
1275 Add a minimalistic GIDL parser (just objects for now)
1276 Implement resolving of external type references and use it to
1277 resolve parent types, argument types and return types.
1279 2008-04-21 Johan Dahlin <johan@gnome.org>
1281 * giscanner/gidlwriter.py:
1282 * giscanner/gobjecttreebuilder.py:
1283 * giscanner/treebuilder.py:
1284 Add support for properties.
1285 Refactor Class/Interface support a bit, to share more code and
1286 always initialize their method attribute to an empty list.
1288 2008-04-21 Johan Dahlin <johan@gnome.org>
1290 * giscanner/cgobject.py:
1291 Add a workaround for a glib bug interface introspection bug
1292 (object_interface_list_properties, object_class_list_properties):
1293 Cast the return value to GParamSpec.
1295 * tests/parser/Foo-expected.gidl: Update
1296 * tests/parser/foo.c: Add a string property
1298 * giscanner/gobjecttreebuilder.py:
1299 After stripping namespaces, remove the original
1300 item to avoid duplication (GtkButton struct and Button object)
1302 2008-04-21 Johan Dahlin <johan@gnome.org>
1304 * giscanner/gobjecttreebuilder.py:
1305 * giscanner/treebuilder.py:
1306 Strip namespaces before objects, so we'll export
1307 GtkButton as Button in the gtk namespace
1309 2008-04-21 Johan Dahlin <johan@gnome.org>
1311 * giscanner/gidlwriter.py:
1312 * giscanner/gobjecttreebuilder.py:
1313 * giscanner/treebuilder.py:
1314 Add constructors for object/boxed types.
1316 2008-04-21 Johan Dahlin <johan@gnome.org>
1318 * giscanner/gidlwriter.py:
1319 * giscanner/gobjecttreebuilder.py:
1320 Add support for boxed types
1322 2008-04-21 Johan Dahlin <johan@gnome.org>
1324 * giscanner/giscannermodule.c: Mark structures as const,
1325 wrap SourceType.const_string.
1327 * tests/parser/foo-object.h: Add a couple of constants.
1329 * giscanner/gidlwriter.py:
1330 * giscanner/gobjecttreebuilder.py:
1331 * giscanner/treebuilder.py:
1332 Add basic support for interfaces
1334 * tools/g-ir-scanner:
1335 Add -o/--output for writing to a file
1337 2008-04-21 Havoc Pennington <hp@redhat.com>
1339 * TODO: add some C API wishlist items I could think of quickly
1341 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
1343 * giscanner/gidlwriter.py:
1344 * giscanner/xmlwriter.py:
1345 Add a simple api for writing tags which can be used
1346 with the new 'with statement' in python 2.5
1348 2008-04-21 Johan Dahlin <johan@gnome.org>
1350 * giscanner/gobjecttreebuilder.py:
1351 Strip namespace and object prefix from method names.
1353 2008-04-21 Johan Dahlin <johan@gnome.org>
1355 * tools/g-ir-scanner (main): Add --pkg option to pass in
1356 pkg-config modules to get cflags from.
1358 * giscanner/gidlwriter.py (GIDLWriter._write_method):
1359 Avoid duplication, reuse function writer for methods.
1361 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
1363 * giscanner/gidlwriter.py:
1364 * giscanner/gobjecttreebuilder.py:
1365 * giscanner/treebuilder.py:
1366 * tools/g-ir-scanner:
1367 Resolve libtool .la files.
1368 Strip name spaces for methods.
1369 Add function symbols
1371 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
1373 * giscanner/cgobject.py:
1374 * giscanner/gidlwriter.py:
1375 * giscanner/gobjecttreebuilder.py:
1376 * giscanner/treebuilder.py:
1377 Add support for classes and methods
1379 2008-04-20 Johan Dahlin <johan@gnome.org>
1381 * giscanner/gidlwriter.py:
1382 * giscanner/gobjecttreebuilder.py:
1383 * giscanner/odict.py:
1384 Avoid conflicts, keep the output ordered similar to
1385 the order of the input.
1386 Add a simple ordered dictionary implemenation
1388 2008-04-19 Johan Dahlin <johan@gnome.org>
1390 * giscanner/cgobject.py:
1391 * giscanner/gidlwriter.py:
1392 * giscanner/gobjecttreebuilder.py:
1393 * tools/g-ir-scanner:
1394 Start introspecting get-type functions.
1395 Implement support for GLib/GFlags GTypes.
1396 Add a ctype based GObject binding.
1398 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
1400 * giscanner/gidlwriter.py:
1401 * giscanner/xmlwriter.py:
1402 * tools/g-ir-scanner:
1403 Add a simplistic gidl writer, which can't do too much.
1405 2008-04-18 Johan Dahlin <johan@gnome.org>
1407 * giscanner/sourcescanner.py:
1408 * giscanner/treebuilder.py:
1409 * tools/g-ir-scanner:
1410 split tree building and source scanning interface to separate files.
1412 2008-04-18 Johan Dahlin <johan@gnome.org>
1414 * tools/g-ir-scanner (Parameter.__init__): Start constructing
1416 - Add support for struct/parameter/return, start parsing of ctypes
1418 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
1421 2008-03-31 Johan Dahlin <johan@gnome.org>
1423 * tools/g-ir-scanner:
1424 Start to build abstract syntax node of scanned sources.
1425 Add support for cpp options.
1427 2008-03-27 Johan Dahlin <johan@gnome.org>
1429 * giscanner/giscannermodule.c:
1430 * giscanner/scannerlexer.l:
1431 * giscanner/sourcescanner.c:
1432 * tools/g-ir-scanner:
1434 Add simple pre-processor using subprocess and a PIPE.
1435 Change the parse_file apis to accept a file descriptor.
1437 2008-03-25 Johan Dahlin <johan@gnome.org>
1439 * giscanner/__init__.py:
1440 * tools/g-ir-scanner:
1441 Fix a typo and add an example python test program.
1443 2008-03-25 Johan Dahlin <johan@gnome.org>
1445 * giscanner/__init__.py:
1446 * giscanner/giscannermodule.c:
1447 * giscanner/sourcescanner.c:
1448 * giscanner/sourcescanner.h:
1449 Add constants and wrap a few more SymbolType fields
1451 2008-03-25 Johan Dahlin <johan@gnome.org>
1455 * giscanner/__init__.py:
1456 * giscanner/giscannermodule.c:
1457 * giscanner/Makefile.am:
1459 Add initial python bindings for the scanner and
1460 depend on python 2.5.
1462 2008-03-25 Johan Dahlin <johan@gnome.org>
1466 * giscanner/Makefile.am:
1467 * giscanner/sourcescanner.c:
1468 * giscanner/sourcescanner.h:
1469 * tools/Makefile.am:
1470 * tools/grealpath.h:
1471 * tools/sourcescanner.c:
1472 * tools/sourcescanner.h:
1474 Move the scanner to a separate library.
1476 2008-03-23 Johan Dahlin <johan@gnome.org>
1478 * tools/Makefile.am:
1481 * tools/scannerlexer.l:
1482 * tools/scannerparser.y:
1483 * tools/sourcescanner.c:
1484 * tools/sourcescanner.h:
1485 Split out the source scanner from the generator.
1486 Rename the symbols used in the scanner to use the gi_ prefix.
1487 This should make it possible to use the raw C parser from
1490 2008-03-23 Johan Dahlin <johan@gnome.org>
1492 * tests/parser/Makefile.am (utility.gidl):
1493 * tests/parser/utility-expected.gidl:
1494 Pass in the gobject.gidl since we're defining a GObject.
1496 2008-03-12 Johan Dahlin <johan@gnome.org>
1498 * relaxng/relaxng.rng:
1499 Add a releaxng in relaxng we can use to validate the relaxngs
1502 2008-03-12 Jürg Billeter <j@bitron.ch>
1504 * tools/scanner.c: (g_igenerator_new):
1505 * tools/scannerparser.y:
1506 Fix compiler warnings.
1508 2008-03-12 Jürg Billeter <j@bitron.ch>
1512 * tools/scannerparser.y:
1513 Start fixing memory management in g-idl-scanner.
1515 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
1517 * tools/gidlcompilercontext.c: (write_compiled):
1518 Fix critical warning when no shlib passed to g-idl-compiler.
1520 2008-03-12 Johan Dahlin <johan@gnome.org>
1522 * tests/parser/utility-expected.gidl:
1523 * tests/parser/utility.h:
1524 Add a get_type-function, so the scanner actually
1525 parses it as an object.
1527 2008-03-12 Johan Dahlin <johan@gnome.org>
1529 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
1532 * tests/parser/Foo-expected.gidl:
1533 * tests/parser/Makefile.am:
1534 * tests/parser/foo-object.h:
1535 * tests/parser/foo.c:
1536 * tests/parser/utility-expected.gidl:
1537 * tests/parser/utility.c:
1538 * tests/parser/utility.h:
1540 Add a new gidl test. 'utility.gidl', which is used to be able
1541 to test external type references. Add a reference to UtilityObject*
1544 2008-03-11 Johan Dahlin <johan@gnome.org>
1548 Remove most global variables
1550 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
1552 * tools/scannerlexer.l:
1554 * tests/parser/Foo-expected.gidl:
1555 * tests/parser/foo.c:
1556 * tests/parser/Makefile.am:
1557 * tests/parser/foo-object.h:
1559 Added a few extra tests. Which resulted in finding a few
1560 bugs. Which resulted in me fixing those bugs
1562 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
1564 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
1565 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
1566 Add some comments for strings into generated output for
1569 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
1571 * tools/gidlcompilercontext.c: (write_compiled):
1572 Write out the shlibs variable before writing out the strings
1573 length. Fixes compiler warning when using '-l' flag with
1576 2008-03-11 Johan Dahlin <johan@gnome.org>
1578 * tests/parser/Foo-expected.gidl:
1579 * tests/parser/foo-object.h:
1582 * tools/scannerlexer.l:
1583 Add support for parsing return arguments. Add support for
1584 caller-owns return types.
1585 Patch by Philip Van Hoof.
1587 * tools/scannerparser.y:
1588 Remove parsing of the @deprecated syntax used in headers.
1589 We will support gtk-doc deprecation in the future instead.
1591 2008-03-11 Johan Dahlin <johan@gnome.org>
1593 * tools/compiler.c (main): Coding style fixes
1595 2008-03-10 Johan Dahlin <johan@gnome.org>
1598 Add GCOV_LIBS to GILIBS
1600 2008-03-10 Johan Dahlin <johan@gnome.org>
1602 * tests/parser/Foo-expected.gidl:
1603 * tests/parser/foo.c:
1604 Rename null-ok to direction=out
1606 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
1608 reviewed and extensively tested by Johan
1610 * tests/parser/Foo-expected.gidl:
1611 * tests/parser/foo-object.h:
1612 * tests/parser/foo.c:
1615 * tools/gidlwriter.c:
1618 * tools/scannerlexer.l:
1619 * tools/scannerparser.y:
1621 Add support for scanning for gtk-doc comments inside
1622 C source files. Add tests
1624 2008-03-10 Johan Dahlin <johan@gnome.org>
1626 * tests/parser/Makefile.am:
1627 * tests/parser/foo.c:
1630 * tools/scannerparser.y:
1631 Add an api to lex filenames.
1632 Lex all source .c files passed in on the command line.
1633 Scan sources in a test and a couple of private structures
1634 which should not be included in the generated gidl
1636 2008-03-10 Johan Dahlin <johan@gnome.org>
1638 * tests/invoke/Makefile.am: Make the generated metadata
1639 depend on the g-idl-compiler
1641 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1643 * tools/gidlmodule.c
1644 * tools/gidlmodule.h
1647 Remove the old g-idl-compiler code.
1650 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
1652 * tools/quote-file.sh
1655 Move to using the 'C' struct compiler code.
1657 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1659 * girepository/ginfo.c
1661 Change the way that external references with no namespace
1662 are dealt with. External references with no namespace
1663 are placed into the XML as-if they are a local reference.
1664 This is temporary, but helps with roundtrip tests.
1666 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1668 * girepository/ginfo.c
1669 Add the ability to get the value of a constant of
1670 type TYPE_TAG_SYMBOL. In the case of a symbol the value
1671 is provided as a string.
1673 This would deal properly with:
1674 typedef char* random;
1675 const random = "A string";
1677 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1679 * girepository/ginfo.c
1680 * girepository/girepository.h
1682 Add a function to check if an enum is registered or not.
1683 Previously anything testing this relied on the g-type
1684 string offset having a value of 0.
1686 * girepository/gmetadata.c
1687 * girepository/gmetadata.h
1689 Remove unneccesary or erroneous checks. There were two
1690 metadata validation checks which made sure that the blob
1691 sizes were the same as some magic numbers compiled into the code.
1692 This is wrong as it breaks any forwards compatibility that may
1695 Checks were also present that made sure that unregistered type
1696 blobs had a value of 0 in the g-type offset field. This is
1697 unneccessary. If a type blob is unregistered then any value
1698 in its g-type field is simply invalid.
1700 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1702 * girepository/ginfo.c
1703 * girepository/gmetadata.c
1704 * girepository/gmetadata.h
1706 Change the metadata format to have a standard header
1707 for all the type blobs. Merge the SimpleTypeBlob
1708 and InterfaceTypeBlob into a union. A union of these
1709 two blobs existed previously but was not explicit
1710 in the metadata format.
1712 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1714 * tools/gidlcompilercontext.c
1715 * tools/gidlcompilercontext.h
1716 * tools/gidlcompilerentrynode.c
1717 * tools/gidlcompilerentrynode.h
1718 * tools/gidlcompilertypenode.c
1719 * tools/gidlcompilertypenode.h
1721 Add code to compile a tree of GIdlNodes to
1722 a 'C' struct representing the metadata.
1723 This is to aid cross-compiling. Previously
1724 the g-idl-compiler created a binary blob with
1725 data written in the byte order and alignment
1726 of the tool rather than the intended target.
1728 Cleaned up and improved by Johan and Robert :-)
1730 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1732 * girepository/ginvoke.c
1733 * girepository/girepository.h
1734 * girepository/gmetadata.c
1735 * girepository/gmetadata.h
1737 * tools/gidlparser.c
1738 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
1739 to avoid confusion with the interface blob.
1742 * tools/gidlparser.c
1743 Remove magic numbers and replace with type-tag
1744 enumeration symbols.
1746 * girepository/gmetadata.c
1747 Add validate declaration.
1749 2008-03-10 Jürg Billeter <j@bitron.ch>
1751 * tools/gidlparser.c: (parse_type_internal):
1752 * tools/scannerlexer.l:
1753 * tools/scannerparser.y:
1754 Support C99 _Bool type in scanner.
1756 2008-03-10 Jürg Billeter <j@bitron.ch>
1758 * tests/parser/Foo-expected.gidl:
1759 * tests/parser/foo-object.h:
1760 * tests/parser/foo.c: (foo_enum_method):
1761 * tools/scanner.c: (g_igenerator_process_function_symbol):
1762 Don't skip functions that are defined in the namespace of a type
1763 that doesn't support methods, as for example enums.
1765 2008-03-10 Johan Dahlin <johan@gnome.org>
1767 * gidl.dtd: Remove, we're using relaxng for now
1769 * tests/parser/Foo-expected.gidl:
1770 * tests/parser/foo-object.h:
1771 * tests/parser/foo.c:
1772 Rename the enum/flags get_type functions to include the whole type.
1774 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
1776 * tools/gidlwriter.c (enum_generate): added "type-name",
1777 "get-type" and "deprecated" missing arguments.
1778 * tests/parser/Foo-expected.gidl:
1779 * tests/parser/foo-object.h: test enum type, and no type.
1781 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
1784 Consistent checks, add missing 'test'
1786 2008-03-05 Havoc Pennington <hp@redhat.com>
1788 * configure.ac: Take advantage of a libffi.pc if one exists, as it
1789 does on Fedora 8. Make libffi a hard requirement, since it was in
1790 practice anyway (was not really conditional in the code or
1791 makefile, only in configure).
1793 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
1795 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
1796 reviewed by: Johan Dahlin <johan@gnome.org>
1798 * tests/Makefile.am:
1799 * tests/roundtrips.sh:
1800 Modify the roundtrips test so that they do not use the
1801 --raw option of the gidl compiler but instead compile a
1802 shared library to use with g_module.
1804 * tests/invoke/Makefile.am:
1805 * tests/invoke/invoke.c:
1806 Modify the invoke tests to build a shared library rather
1807 than use the --raw option.
1809 * tests/invoke/invoke-namespace-find.sh: Removed:
1810 Noone knows why this was here, so removed.
1812 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
1814 * tools/scanner.c: (g_igenerator_process_function_symbol):
1815 Move g_idl_node_can_have_member test later, as it broke spotting
1816 get_type's for nodes that can't have members.
1818 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
1821 * tools/gidlnode.c: (g_idl_node_can_have_member):
1822 Add g_idl_node_can_have_member.
1824 * tools/scanner.c: (g_igenerator_process_function_symbol):
1825 Use g_idl_node_can_have_member to test if we should add a function
1826 as a member of the type node.
1828 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
1830 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
1832 * tests/parser/Makefile.am:
1833 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
1835 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
1837 * tools/scanner.c: (main):
1838 Ignore -pthread when passed to g-idl-scanner.
1840 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
1842 * tools/grealpath.h: Added:
1843 * tools/scanner.c: (main):
1844 * tools/scannerlexer.l:
1845 * tools/Makefile.am:
1846 Always use absolute paths with symbolic links resolved when
1847 comparing filenames.
1849 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
1851 * gobject-introspection.pc.in:
1852 Provide variables for g-idl-parser, scanner and compiler in the
1855 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
1858 * girepository/Makefile.am:
1859 * tools/Makefile.am:
1860 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
1862 2008-02-10 Johan Dahlin <johan@gnome.org>
1864 * tests/parser/Foo-expected.gidl:
1865 * tests/parser/foo-object.h:
1866 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
1867 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
1870 2008-02-10 Johan Dahlin <johan@gnome.org>
1872 * tests/parser/Foo-expected.gidl:
1873 * tests/parser/foo-object.h:
1874 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
1875 Add enum and flags test.
1877 2008-02-10 Johan Dahlin <johan@gnome.org>
1881 * girepository/Makefile.am:
1882 Make 'make distcheck' work again.
1884 2008-02-10 Johan Dahlin <johan@gnome.org>
1886 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
1889 * tests/parser/Makefile.am: Only create Foo.gidl when running make
1890 check, eg exclude it from BUILT_SOURCES.
1892 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
1897 * girepository/Makefile.am:
1898 * m4/Makefile.am: Added:
1899 * m4/as-compiler-flag.m4: Added:
1900 * m4/gcov.m4: Added:
1901 * tools/Makefile.am:
1902 Add ability to generate a coverage report.
1903 Adds configure option --enable-gcov and make rule 'check-coverage'.
1905 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
1909 * gidl/Makefile.am: Added:
1910 * girepository/Makefile.am: Added:
1911 * src/Makefile.am: Renamed to tools/Makefile.am:
1912 * src/compiler.c: Renamed to tools/compiler.c:
1913 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
1914 * src/generate.c: Renamed to tools/generate.c:
1915 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
1916 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
1917 * src/gidlnode.c: Renamed to tools/gidlnode.c:
1918 * src/gidlnode.h: Renamed to tools/gidlnode.h:
1919 * src/gidlparser.c: Renamed to tools/gidlparser.c:
1920 * src/gidlparser.h: Renamed to tools/gidlparser.h:
1921 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
1922 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
1923 * src/ginfo.c: Renamed to girepository/ginfo.c:
1924 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
1925 * src/girepository.c: Renamed to girepository/girepository.c:
1926 * src/girepository.h: Renamed to girepository/girepository.h:
1927 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
1928 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
1929 * src/scanner.c: Renamed to tools/scanner.c:
1930 * src/scanner.h: Renamed to tools/scanner.h:
1931 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
1932 * src/scannerparser.y: Renamed to tools/scannerparser.y:
1933 * tests/invoke/Makefile.am:
1934 Split src/ into girepository/ and tools/
1938 * girepository/Makefile.am:
1939 * tests/Makefile.am:
1940 * tests/invoke/Makefile.am:
1941 * tests/parser/Makefile.am:
1942 * tests/roundtrips.sh:
1943 * tools/Makefile.am:
1944 Make distcheck work.
1946 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
1948 * tests/invoke/invoke.c: (main):
1949 * tests/invoke/testfns.c: (test6), (test7):
1950 * tests/invoke/testfns.xml:
1951 Add tests for invokation with a GList argument.
1952 Also tests caller-owns return values.
1954 2008-02-04 Rob Taylor <robtaylor@floopily.org>
1957 Add some documentation for GICallableInfo
1959 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
1962 Correct syntax errors in the DTD file.
1964 * relaxng/c-types.xml:
1965 * relaxng/g-types.xml:
1967 Add a RelaxNG specification for the GObject Introspection XML data.
1968 The Specification has validated all of the test files.
1970 2008-01-25 Rob Taylor <robtaylor@floopily.org>
1972 * tests/roundtrips.sh:
1973 * tests/struct.test:
1974 Add roundtrip tests for structs.
1976 2008-01-11 Johan Dahlin <johan@gnome.org>
1978 * src/scanner.c (g_igenerator_process_function_symbol):
1979 Refactor out g_idle_node_add_member.
1980 (create_node_from_gtype, create_node_from_ctype):
1981 Use case instead of if...else
1982 (get_type_from_type_id):
1983 Rename to create_node_from_gtype
1984 (get_type_from_ctype):
1985 Rename to create_node_from_ctype
1987 Rename ginode -> node, gitype -> type, gifunc -> func.
1989 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
1990 Two new functions, refactor out of scanner.c
1992 * src/scanner.c: (g_igenerator_process_function_symbol):
1993 * src/scannerlexer.l:
1994 Do not save the content of the deprecated variable, only
1997 2008-01-11 Johan Dahlin <johan@gnome.org>
1999 * tests/parser/foo-object.h: Add a couple of comment parser tests.
2001 2008-01-11 Jürg Billeter <j@bitron.ch>
2003 * src/scannerlexer.l:
2004 Fix GTK-Doc parsing.
2006 2008-01-11 Jürg Billeter <j@bitron.ch>
2008 * src/scannerlexer.l:
2009 Fix GTK-Doc parsing.
2011 2008-01-11 Jürg Billeter <j@bitron.ch>
2013 * src/scanner.c: (lookup_symbol):
2014 Return unresolved name if we find unknown symbol.
2016 2008-01-11 Jürg Billeter <j@bitron.ch>
2018 * src/scanner.c: (g_igenerator_generate):
2019 Initialize GObject to fix scanning interface properties.
2021 * tests/parser/Foo-expected.gidl:
2022 * tests/parser/foo-object.h:
2023 * tests/parser/foo.c: (foo_interface_get_type):
2024 Test interfaces with GObject prerequisite.
2026 * tests/parser/Makefile.am:
2027 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
2029 2007-12-27 Johan Dahlin <johan@gnome.org>
2031 * src/scannerlexer.l:
2032 Parse gtk-doc comments.
2034 * src/gidlwriter.c: (function_generate):
2035 Reorganize, avoid duplication and add support for
2036 writing deprecated functions.
2038 * src/scannerparser.y:
2040 Add new structure CDirective and functions to create/free them.
2042 * src/scanner.c: (g_igenerator_process_function_symbol),
2043 (g_igenerator_process_unregistered_struct_typedef),
2044 (g_igenerator_process_struct_typedef),
2045 (g_igenerator_process_union_typedef),
2046 (g_igenerator_process_enum_typedef),
2047 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
2048 (g_igenerator_start_preprocessor):
2049 Parse @deprecated directive for functions.
2050 Remove some more C99isms.
2051 Send in -C to cpp to avoid stripping comments.
2053 * tests/parser/foo-object.h:
2054 * tests/parser/Foo-expected.gidl:
2055 Add deprecated directive
2057 2007-12-27 Johan Dahlin <johan@gnome.org>
2059 * src/scannerlexer.l (intsuffix): Add emacs mode line and
2060 escape ' and " so it looks more like C.
2063 Unlink temporary file used.
2065 2007-12-27 Johan Dahlin <johan@gnome.org>
2067 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
2068 (g_igenerator_start_preprocessor), (main):
2070 * src/scannerparser.y:
2071 Plug a couple of simple memory leaks.
2073 2007-12-27 Johan Dahlin <johan@gnome.org>
2075 * src/scanner.c: (g_igenerator_parse_macros),
2076 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
2079 * src/scannerparser.y:
2080 * tests/parser/Makefile.am:
2082 Improve error reporting, return when the preprocessor fails.
2083 Add a verbose parameter, to aid debugging.
2084 Revert to using a temporary file to communicate between the
2085 preprocessor and the parser, because we need to wait for
2086 the exit code from the pre-processor before starting to parse.
2088 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
2090 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
2091 cparser.y to scannerparser.y
2093 2007-12-11 Johan Dahlin <johan@gnome.org>
2097 * src/scanner.c: (g_igenerator_new):
2099 Get rid of the global the_generator variable.
2101 2007-12-10 Johan Dahlin <johan@gnome.org>
2103 * src/scanner.c (main): Add an output option,
2104 add checks for required parameters
2107 set BUILD_SOURCES and CLEANFILES properly
2109 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
2110 (g_writer_write_indent), (g_writer_write_unindent),
2111 (field_generate), (value_generate), (constant_generate),
2112 (property_generate), (function_generate), (vfunc_generate),
2113 (signal_generate), (interface_generate), (struct_generate),
2114 (union_generate), (boxed_generate), (enum_generate),
2115 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
2117 * src/scanner.c: (g_igenerator_generate):
2119 * src/scannerwriter.c:
2121 Refactor scannerwriter to only be tied to a GIdlModule and move
2122 it (again!) to gidlwriter.c. Change the writer function to take
2125 2007-12-10 Johan Dahlin <johan@gnome.org>
2128 * src/scanner.c: (g_igenerator_generate):
2130 * src/scannerwriter.c: (g_igenerator_write_inline),
2131 (g_igenerator_write), (g_igenerator_write_indent),
2132 (g_igenerator_write_unindent), (field_generate), (value_generate),
2133 (constant_generate), (property_generate), (function_generate),
2134 (vfunc_generate), (signal_generate), (interface_generate),
2135 (struct_generate), (union_generate), (boxed_generate),
2136 (enum_generate), (node_generate), (module_generate),
2137 (g_scanner_write_file):
2139 Move the scanner gidl writing to a separate source file.
2141 2007-12-10 Johan Dahlin <johan@gnome.org>
2146 Move over all CType construction functions.
2148 * tests/parser/Makefile.am:
2149 Be verbose when printing parsing tests results.
2151 2007-12-10 Johan Dahlin <johan@gnome.org>
2153 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
2154 preprocessor handling to here. Start cpp insteado of cc -E,
2155 always include -U__GNUC__, since it's specific to the preprocessor
2158 * tests/parser/Makefile.am (check-local): Silent diff and skip
2159 -U__GNUC__ which is always defined now
2161 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
2163 reviewed by: <delete if not using a buddy>
2165 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
2166 * tests/parser/Makefile.am:
2168 2007-12-09 Johan Dahlin <johan@gnome.org>
2171 Use GOption for command line options.
2172 (g_igenerator_new, main): Simplify constructor and they way
2173 parameters are passed into it.
2179 * src/gen-introspect.c:
2180 * src/gen-introspect.h:
2182 Rename gen-introspect.[ch] to scanner.[ch]
2184 2007-12-09 Johan Dahlin <johan@gnome.org>
2188 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
2189 don't make the repository library and the other utilites link against
2192 * src/gen-introspect.c: (g_igenerator_create_object),
2193 (g_igenerator_create_interface), (g_igenerator_create_boxed),
2194 (g_igenerator_create_enum), (g_igenerator_create_flags),
2195 (g_igenerator_process_module_symbol),
2196 (g_igenerator_process_module), (g_igenerator_generate), (main):
2197 * src/gen-introspect.h:
2198 Refactor g_igenerator_process_types into smaller pieces.
2200 * tests/parser/Makefile.am:
2201 Depend on the gen-introspect binary
2203 2007-12-09 Johan Dahlin <johan@gnome.org>
2205 * src/gen-introspect.c (g_igenerator_process_types):
2206 Break into smaller pieces, one for each generated node type.
2208 2007-12-08 Johan Dahlin <johan@gnome.org>
2210 * src/gen-introspect.c: (g_igenerator_process_types),
2211 (g_igenerator_add_module):
2212 * tests/parser/Foo-expected.gidl:
2213 * tests/parser/foo-object.h:
2214 * tests/parser/foo.c: (foo_subobject_class_init),
2215 (foo_subobject_init):
2217 Add a subobject test and make sure to register defined classes
2218 in the lookup symbol hash table.
2220 2007-12-08 Johan Dahlin <johan@gnome.org>
2224 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
2225 (g_igenerator_process_types), (g_igenerator_add_module),
2226 (g_igenerator_add_include_idl), (main):
2227 * src/gen-introspect.h:
2228 * tests/parser/Makefile.am:
2229 * tests/parser/Foo-expected.gidl:
2231 Change the gen-introspect to generate namespaced module names,
2232 such as GLib.Object instead of GObject.
2233 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
2234 add a --include-idl parameter to gen-introspect,
2235 and update the parser test.
2237 2007-12-08 Johan Dahlin <johan@gnome.org>
2239 * src/gen-introspect.c:
2240 Move main to the end of the file and attempt to make it valid
2243 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
2244 we're not quite ready to generate metadata yet.
2249 Add a simple gen-introspect parser test
2251 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
2253 reviewed by: Johan Dahlin <johan@gnome.org>
2256 * gobject-introspection.pc.in:
2258 * src/compiler.c: (format_output), (write_out_metadata), (main):
2259 * src/gen-introspect.c: (main):
2260 * src/gen-introspect.h:
2261 * src/generate.c: (write_callable_info), (write_repository),
2262 (load_metadata), (main):
2263 * src/gidlmodule.c: (g_idl_module_new),
2264 (g_idl_module_build_metadata):
2266 * src/gidlparser.c: (start_element_handler):
2267 * src/ginfo.c: (g_info_new), (g_info_from_entry),
2268 (g_base_info_get_name), (g_base_info_get_namespace),
2269 (g_base_info_is_deprecated), (g_base_info_get_annotation),
2270 (g_base_info_get_metadata), (g_function_info_get_symbol),
2271 (g_function_info_get_flags), (g_function_info_get_property),
2272 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
2273 (g_callable_info_may_return_null),
2274 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
2275 (g_callable_info_get_arg), (g_arg_info_get_direction),
2276 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
2277 (g_arg_info_is_optional), (g_arg_info_may_be_null),
2278 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
2279 (g_type_info_get_tag), (g_type_info_get_param_type),
2280 (g_type_info_get_interface), (g_type_info_get_array_length),
2281 (g_type_info_is_zero_terminated),
2282 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
2283 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
2284 (g_value_info_get_value), (g_field_info_get_flags),
2285 (g_field_info_get_size), (g_field_info_get_offset),
2286 (g_registered_type_info_get_type_name),
2287 (g_registered_type_info_get_type_init),
2288 (g_struct_info_get_n_fields), (g_struct_info_get_field),
2289 (g_struct_info_get_n_methods), (g_struct_info_get_method),
2290 (find_method), (g_struct_info_find_method),
2291 (g_enum_info_get_n_values), (g_enum_info_get_value),
2292 (g_object_info_get_parent), (g_object_info_get_type_name),
2293 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
2294 (g_object_info_get_interface), (g_object_info_get_n_fields),
2295 (g_object_info_get_field), (g_object_info_get_n_properties),
2296 (g_object_info_get_property), (g_object_info_get_n_methods),
2297 (g_object_info_get_method), (g_object_info_find_method),
2298 (g_object_info_get_n_signals), (g_object_info_get_signal),
2299 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
2300 (g_object_info_get_n_constants), (g_object_info_get_constant),
2301 (g_interface_info_get_n_prerequisites),
2302 (g_interface_info_get_prerequisite),
2303 (g_interface_info_get_n_properties),
2304 (g_interface_info_get_property), (g_interface_info_get_n_methods),
2305 (g_interface_info_get_method), (g_interface_info_find_method),
2306 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
2307 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
2308 (g_interface_info_get_n_constants),
2309 (g_interface_info_get_constant), (g_property_info_get_flags),
2310 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
2311 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
2312 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
2313 (g_constant_info_get_value), (g_union_info_get_n_fields),
2314 (g_union_info_get_field), (g_union_info_get_n_methods),
2315 (g_union_info_get_method), (g_union_info_is_discriminated),
2316 (g_union_info_get_discriminator_offset),
2317 (g_union_info_get_discriminator):
2318 * src/ginvoke.c: (g_function_info_invoke):
2319 * src/girepository.c: (g_irepository_register),
2320 (g_irepository_unregister), (g_irepository_get_default),
2321 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
2322 (g_irepository_get_info), (g_irepository_find_by_name),
2323 (g_irepository_get_shared_library),
2324 (g_irepository_build_search_path), (g_irepository_register_file),
2325 (g_irepository_error_quark):
2326 * src/girepository.h:
2327 * src/gmetadata.c: (g_metadata_get_dir_entry),
2328 (g_metadata_check_sanity), (validate_header),
2329 (validate_array_type_blob), (validate_iface_type_blob),
2330 (validate_param_type_blob), (validate_error_type_blob),
2331 (validate_type_blob), (validate_arg_blob),
2332 (validate_signature_blob), (validate_function_blob),
2333 (validate_callback_blob), (validate_constant_blob),
2334 (validate_value_blob), (validate_field_blob),
2335 (validate_property_blob), (validate_signal_blob),
2336 (validate_vfunc_blob), (validate_struct_blob),
2337 (validate_enum_blob), (validate_object_blob),
2338 (validate_interface_blob), (validate_errordomain_blob),
2339 (validate_union_blob), (validate_blob), (validate_directory),
2340 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
2341 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
2342 (g_metadata_new_from_mapped_file), (g_metadata_free),
2343 (g_metadata_set_module), (g_metadata_get_namespace):
2345 * tests/Makefile.am:
2346 * tests/invoke/Makefile.am:
2347 * tests/invoke/invoke-namespace-find.sh:
2348 * tests/invoke/invoke.c: (main):
2350 Add a namespace/shared library mapping. fixes #313268.
2352 2007-12-03 Johan Dahlin <johan@gnome.org>
2354 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
2357 2007-11-30 Jürg Billeter <j@bitron.ch>
2363 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
2364 (g_igenerator_write_inline), (g_igenerator_write),
2365 (g_igenerator_write_indent), (g_igenerator_write_unindent),
2366 (field_generate), (value_generate), (constant_generate),
2367 (property_generate), (function_generate), (vfunc_generate),
2368 (signal_generate), (interface_generate), (struct_generate),
2369 (union_generate), (boxed_generate), (enum_generate),
2370 (node_generate), (module_generate), (get_type_from_type_id),
2371 (str_replace), (g_igenerator_process_properties),
2372 (g_igenerator_process_signals), (g_igenerator_process_types),
2373 (get_type_from_ctype), (g_igenerator_process_function_symbol),
2374 (g_igenerator_process_unregistered_struct_typedef),
2375 (g_igenerator_process_struct_typedef),
2376 (g_igenerator_process_union_typedef),
2377 (g_igenerator_process_enum_typedef),
2378 (g_igenerator_process_function_typedef),
2379 (g_igenerator_process_constant), (g_igenerator_process_symbols),
2380 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
2381 (g_igenerator_generate), (main), (csymbol_new),
2382 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
2383 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
2384 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
2385 (eat_hspace), (eat_line), (read_identifier),
2386 (g_igenerator_parse_macros):
2387 * src/gen-introspect.h:
2389 Import gen-introspect to generate introspection information by
2392 2007-11-30 Jürg Billeter <j@bitron.ch>
2394 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
2396 2007-11-30 Jürg Billeter <j@bitron.ch>
2398 * src/gidlparser.c: (end_element_handler): Don't leave requires
2401 2007-11-29 Johan Dahlin <johan@gnome.org>
2403 * src/gidlparser.c (parse_type_internal): Add char,
2404 gchar and guchar to the builtin types.
2406 2007-11-26 Johan Dahlin <johan@gnome.org>
2408 * src/ginfo.c: (g_object_info_get_type_name),
2409 (g_object_info_get_type_init):
2410 * src/girepository.c: (g_irepository_is_registered):
2411 * src/girepository.h:
2413 Add g_object_info_get_type_name, g_object_info_get_type_init and
2414 g_irepository_is_registered.
2416 2006-08-14 Jürg Billeter <j@bitron.ch>
2418 * src/gidlparser.c: (end_element_handler): Don't leave
2419 namespace and implements states too early.
2422 2007-11-26 Johan Dahlin <johan@gnome.org>
2424 * src/gmetadata.c (validate_struct_blob):
2425 pass blob_type to validate_function_blob instead of
2426 hard-coding BLOB_TYPE_STRUCT.
2428 Patch by Torsten Schoenfeld, fixes #314190
2430 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
2432 * src/compiler.c, src/generate.c, src/gidlnode.c,
2433 src/gidlparser.c, src/ginfo.c, src/girepository.c,
2434 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
2435 warnings about return values, signedness mismatches, unused
2436 variables, and unhandles enum values in switch statements.
2438 * tests/invoke/Makefile.am: Don't install the invoke test program.
2439 Add -I ../../src to the cflags used for the test functions files.
2441 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
2443 * src/girepository.h: Export g_invoke_error_quark.
2445 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
2447 * src/ginvoke.c: Remove the fallback implementation of
2448 g_function_info_invoke since we now formally depend on libffi.
2450 2005-07-25 Matthias Clasen <mclasen@redhat.com>
2452 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
2453 Remove these files from cvs, as they are now generated.
2455 * src/gmetadata.c (validate_iface_type_blob): Don't
2456 complain if blob->pointer is not set, since that
2457 happens for enum and flag types. (#308935, Gustavo
2460 * Commit an autoconf-conversion patch by
2461 Gustavo Carneiro (#308708)
2463 2005-05-24 Matthias Clasen <mclasen@redhat.com>
2465 * src/compiler.c (main): Use it here to validate
2466 the generated metadata.
2468 * src/gmetadata.[hc]: Add code to validate a
2471 * metadata-format.txt: Updates
2473 2005-05-22 Matthias Clasen <mclasen@redhat.com>
2475 * tests/*: Add struct offsets to field and vfunc
2478 * src/generate.c (write_vfunc_info): Write offset
2479 information for vfuncs.
2481 * src/gidlnode.c (g_idl_node_build_metadata): Write
2482 the struct offsets into the metadata.
2484 * src/gidlparser.c: Parse the offset attributes of
2485 field and vfunc elements.
2487 * src/gidlnode.h: Add offset members to field and
2490 2005-05-21 Matthias Clasen <mclasen@redhat.com>
2494 * gidl.dtd: Updates.
2496 * src/g-idl-offsets.pl: A perl script which reads a .gidl
2497 file, creates, compiles and runs a C file, and folds the
2498 resulting struct offsets back into the .gidl file.
2500 2005-05-20 Matthias Clasen <mclasen@redhat.com>
2502 * src/gidlparser.c (start_field): Make fields in objects
2505 * src/gidlmodule.c: Include string.h
2510 * metadata-format.txt: Cleanup basic types.
2511 * src/*: Adapt to the changes.
2512 * tests/*: Adapt to the changes.
2513 * examples/gdk-pixbuf.gidl: Adapt to the changes.
2515 * src/gidlnode.c (g_idl_node_get_size): Report the correct
2516 size for enum blobs.
2517 (g_idl_node_get_full_size): Report the correct size for
2520 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
2521 error checking for blob sizes.
2523 2005-05-19 Matthias Clasen <mclasen@redhat.com>
2525 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
2526 interface types for which is_pointer is FALSE, e.g. enums.
2528 * src/gidlnode.c (g_idl_node_get_full_size)
2529 * src/gidlparser.c (parse_type_internal):
2530 * src/generate.c (write_type_info): Support unspecialized
2531 lists, hashtables and errors. Also emit a '*' after these.
2535 2005-05-17 Matthias Clasen <mclasen@redhat.com>
2539 * metadata-format.txt: Cleanups by Maciej Katafiasz.
2541 2005-05-15 Matthias Clasen <mclasen@redhat.com>
2543 * src/*.c: Change the directory to be addressed by
2544 1-based indexes, and use an index of zero to mean
2547 2005-05-15 Matthias Clasen <mclasen@redhat.com>
2549 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
2551 * tests/union.test: Add a union test.
2553 * src/generate.c: Handle unions.
2555 * src/girepository.h:
2556 * src/ginfo.c: Add GIUnionInfo and functions to access it.
2558 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
2560 * src/gidlparser.c (start_union): Parse <union> elements.
2562 * src/gidlnode.h: Add a GIdlNodeUnion.
2564 * gidl.dtd: Add a <union> element.
2566 * src/gmetadata.c (g_metadata_check_sanity): Check
2569 * src/gmetadata.h: Add union_blob_size to Header,
2572 * metadata-format.txt: Add a UnionBlob.
2574 2005-05-13 Matthias Clasen <mclasen@redhat.com>
2576 * tests/*: Update testcases.
2578 * src/generate.c (write_callable_info): Don't forget to
2579 write transfer and null-ok attributes for return types
2582 * src/girepository.h:
2583 * src/ginfo.c (g_callable_info_may_return_null):
2584 New function to find out if a function may return NULL.
2586 * src/compiler.c (format_output): Make the generated
2589 * README: Point to a recent libffi snapshot.
2591 * tests/invoke/*: Some invoke tests.
2593 * src/Makefile: Add ginvoke.c and the necessary
2596 * src/girepository.h (g_function_info_invoke): Add
2599 * src/ginvoke.c (g_function_info_invoke): Initial
2600 implementation of invoke functionality based on libffi.
2602 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
2603 strings and types hash tables in the right order when
2605 (find_entry_node): Free the name parts.
2607 2005-05-12 Johan Dahlin <johan@gnome.org>
2609 * src/generate.c: Generate consistent end tags.
2613 2005-05-12 Matthias Clasen <mclasen@redhat.com>
2617 * src/gidlparser.c (start_function): Actually add
2618 methods to objects. (Steven Walter)
2620 * src/girepository.h:
2621 * src/ginfo.c: Rename Transfer and Direction to
2622 GITransfer and GIDirection. (Torsten Schoenfeld)
2624 * tests/*: Make tests work with the changes in name
2627 * src/gidlnode.c (find_entry_node): Parse qualified
2628 names and generate xref nodes for them if needed. Don't
2629 require all modules to be loaded any more.
2631 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
2634 * src/ginfo.c (g_object_info_get_parent): Return NULL
2635 if blob->parent is 0. Still need to make sure index
2638 * src/generate.c: Generate qualified names when
2639 referring to non-local types. Emit transfer attribute
2642 * src/compiler.c (format_output): Put the function
2643 attributes where gcc accepts them.
2645 2005-05-11 Matthias Clasen <mclasen@redhat.com>
2647 * src/compiler.c (main): Add a --verbose cmdline option
2648 and only log messages if it is specified.
2651 * src/gidlnode.c (init_stats, dump_stats): Collect some
2652 statistics on string and type sharing.
2654 * src/gidlmodule.c (g_idl_module_build_metadata): Use
2655 g_message() instead of fprintf().
2657 * src/gidlnode.c (g_idl_node_free): Make this more robust.
2658 (g_idl_node_get_size): Implement for structs.
2659 (g_idl_node_get_full_size): Handle parent being NULL.
2660 (serialize_type): Handle lookup failures more gracefully.
2662 2005-05-10 Matthias Clasen <mclasen@redhat.com>
2664 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
2665 size calculation for 2-parameter types and for objects.
2667 * src/compiler.c: Add a cmdline option for debug output
2668 and install a log handler to implement it.
2669 * src/gidlnode.c: Add some debug spew.
2673 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
2674 forget to count the module name when calculating the
2675 required size for the metadata.
2678 * src/gidlparser.c: Fix compiler warnings.
2680 2005-05-09 Matthias Clasen <mclasen@redhat.com>
2682 * src/compiler.c (main): Free the option context.
2684 * gidl.dtd: Clean up handling of names. All elements
2685 have a "name", only the elements corresponding to
2686 actual callable functions (function, method, constructor),
2687 have an additional "symbol" attribute holding the
2688 dlsym()-able function name.
2690 * src/generate.c: Adapt to generate xml matching the
2694 * src/gidlnode.c: Adapt to parse the new dtd.
2696 * tests/*.test: Adjust to the new dtd.
2698 * metadata-format.txt:
2699 * src/gmetadata.h: Remove the short_name field
2701 * src/gmetadata.c: Shrink size of ValueBlob to 12.
2702 * src/girepository.h:
2703 * src/ginfo.c (g_value_info_get_short_name): Removed
2705 2005-05-09 Matthias Clasen <mclasen@redhat.com>
2707 * gidl.dtd: Allow constructors for boxed types,
2708 patch by Jonathan Blandford.
2711 2005-05-09 Matthias Clasen <mclasen@redhat.com>
2713 * --- Initial import ---