1 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
3 * giscanner/cachestore.py (CacheStore.load): Catch AttributeError
4 which seems to be occasionally raised for Record.
6 * giscanner/annotationparser.py:
7 Fix a bug where \n was not present in a comment
9 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
11 Bug 562467 – Property annotation
13 * giscanner/annotationparser.py:
14 * tests/scanner/annotation-1.0-expected.gir:
15 * tests/scanner/annotation-1.0-expected.tgir:
16 * tests/scanner/annotation.c (annotation_object_set_property),
17 (annotation_object_get_property), (annotation_object_class_init):
19 Annotations are parsed for properties.
21 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
23 Bug 546739 – Introspection should know precise signal parameter types
25 * giscanner/annotationparser.py:
26 * tests/scanner/annotation-1.0-expected.gir:
27 * tests/scanner/annotation-1.0-expected.tgir:
28 * tests/scanner/annotation.c (annotation_object_class_init):
30 Annotations are parsed for signals, the (type) annotation is introduced.
32 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
34 Bug 563591 – Flags not recognized when there is no introspection data
37 * giscanner/girwriter.py:
38 * giscanner/giscannermodule.c (type_get_is_bitfield):
39 * giscanner/glibast.py:
40 * giscanner/glibtransformer.py:
41 * giscanner/scannerparser.y:
42 * giscanner/sourcescanner.c (gi_source_type_copy):
43 * giscanner/sourcescanner.h:
44 * giscanner/sourcescanner.py:
45 * giscanner/transformer.py:
46 * tests/scanner/foo-1.0-expected.gir:
47 * tests/scanner/foo-1.0-expected.tgir:
48 * tests/scanner/foo.h:
50 Large parts of this patch was done by Jürg Billeter.
52 2009-01-12 Havoc Pennington <hp@pobox.com>
54 Bug 563386 – scanner ignores "const" on boxed return values
56 * tests/everything/everything.c (test_simple_boxed_a_const_return):
57 * tests/everything/everything.h:
59 This adds just the tests specified in the bug above, the fix itself
60 was included in Bug 563794
62 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
64 Bug 566404 – Annotations for GLib
66 * gir/glib-2.0.c: Added allow-none annotations for g_thread_init()
67 and g_main_loop_new().
69 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
71 Bug 566419 – Element type of arrays not properly handled in all cases
73 * giscanner/annotationparser.py:
74 * tests/scanner/annotation-1.0-expected.gir:
75 * tests/scanner/annotation-1.0-expected.tgir:
76 * tests/scanner/annotation.c (annotation_object_set_data),
77 (annotation_object_set_data2), (annotation_object_set_data3):
78 * tests/scanner/annotation.h:
80 Based on patch by Andreas Rottmann
82 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
84 Bug 566560 – giscanner.transformer.SkipError
86 * giscanner/transformer.py:
88 Catch SkipError for all nodes, not just functions.
89 Makes it possible to skip unsupported parameter types in
92 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
94 Bug 563794 - Redo annotation parsing & applying
96 Thanks to Colin for helping out considerably in landing this.
98 * giscanner/Makefile.am:
100 * giscanner/dumper.py:
101 * giscanner/girparser.py:
102 * giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
103 (calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
104 * giscanner/glibtransformer.py:
105 * giscanner/scannerlexer.l:
106 * giscanner/sourcescanner.c (gi_source_symbol_unref),
107 (gi_source_scanner_new), (gi_source_scanner_free),
108 (gi_source_scanner_get_comments):
109 * giscanner/sourcescanner.h:
110 * giscanner/sourcescanner.py:
111 * giscanner/transformer.py:
112 * giscanner/xmlwriter.py:
113 * tests/scanner/annotation-1.0-expected.gir:
114 * tests/scanner/annotation-1.0-expected.tgir:
115 * tests/scanner/annotation.c:
116 * tests/scanner/annotation.h:
117 * tests/scanner/foo-1.0-expected.gir:
118 * tests/scanner/foo-1.0-expected.tgir:
119 * tests/scanner/foo.h:
120 * tools/g-ir-scanner:
122 This commit merges the annotation parser rewrite branch.
123 It'll change the annotation parsing to be done completely in python
124 code which will make it easier to do further annotation parsing
127 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
129 Bug 563469 – Arrays not treated correctly in struct offset calculation
131 * tests/scanner/foo.h (FooObject): Added field `some_int'.
132 * tests/scanner/foo-1.0-expected.gir,
133 * tests/scanner/foo-1.0-expected.tgir: Adapted.
135 * giscanner/glibtransformer.py (GLibTransformer._create_gobject):
136 carry over object fields from original (struct) node.
137 (GLibTransformer._pair_class_struct): Don't add fields of the
138 class struct to to the node for the class, they should go under a
139 nested <record> element (see also Bug 551738). This is needed as
140 otherwise offset calculation would not work, as the instance
141 fields are mingled with the class fields without a way to
144 2009-01-03 Johan Dahlin <jdahlin@async.com.br>
147 Disable blank line check, it works differently under
148 Python 2.5 from 2.6 and was rather annoying from the start.
150 2008-01-03 Andreas Rottmann <a.rottmann@gmx.at>
152 Bug 556489 – callback annotations
154 * giscanner/transformer.py
156 * tools/generate.c (write_callable_info): Write out the new scope,
157 closure and destroy attributes.
159 * giscanner/transformer.py (Transformer._type_is_callback): New
160 method, checking if a given type is a callback.
161 (Transformer._augment_callback_params): New method; adds
162 information (closure, destroy) to callback parameters.
163 (Transformer._handle_closure, Transformer._handle_destroy): New methods,
164 auxiliary to _augment_callback_params.
165 (Transformer._create_function): Call _augment_callback_params().
166 (Transformer._create_parameter): Handle scope option.
168 (Transformer._create_typedef_callback): New method, creates a
169 callback, and registers it in the typedef namespace
170 (Transformer._create_typedef): Use _create_typedef_callback()
171 instead of the plain _create_callback().
173 * giscanner/ast.py (Parameter): Added callback-related fields.
174 * giscanner/girwriter.py: Write out new Parameter fields.
176 * girepository/girnode.h (GIrNodeParam): Added fields scope,
178 * girepository/gtypelib.h (ArgBlob): Ditto.
179 * girepository/girparser.c (start_parameter): Handle new fields.
181 * girepository/girmodule.c (g_ir_module_build_typelib): Adjust
182 arg_blob_size, bump major version due to this change.
183 * girepository/girnode.c (g_ir_node_get_full_size_internal)
184 (g_ir_node_build_typelib)
185 * girepository/gtypelib.c (g_typelib_check_sanity): ArgBlob size
187 (g_ir_node_build_typelib): Fill in new ArgBlob flags from param.
189 * girepository/girepository.h (GIScope): New enumeration, listing
190 the different possible scopes for callbacks.
192 * girepository/ginfo.c (g_arg_info_get_scope)
193 (g_arg_info_get_closure, g_arg_info_get_destroy): Accessors for
194 callback-related argument indices (callback scope, closure for a
195 callback, destroy notification for a callback).
197 * tests/scanner/: Added testcases for new features.
199 2009-01-03 Jürg Billeter <j@bitron.ch>
202 * giscanner/dumper.py:
203 * giscanner/girparser.py:
204 * giscanner/glibtransformer.py:
205 * giscanner/sourcescanner.py:
206 * giscanner/transformer.py:
207 * giscanner/xmlwriter.py:
209 Fix inconsistencies with PEP8
211 2008-12-21 Johan Dahlin <jdahlin@async.com.br>
214 Annotate transfer, direction and allow none for
215 g_file_load_contents, g_file_load_contents_finish and
216 g_file_load_partial_contents_finish parameters.
218 2008-12-12 Owen Taylor <otaylor@redhat.com>
220 Disable array auto-detection for out-annotated parameters (#563934)
222 If we have a parameter annotated as (out), then having a ctype of
223 'char **' (or similar) doesn't necessarily indicate an array.
225 * giscanner/transformer.py: Skip array-detection logic for
226 (out)-annotated parameters.
227 * tests/scanner/annotation.h tests/scanner/annotation.c
228 tests/scanner/annotation-1.0-expected.gir
229 tests/scanner/annotation-1.0-expected.tgir: Add a test for
230 an (out) string parameter.
232 2008-12-12 Johan Dahlin <jdahlin@async.com.br>
234 * giscanner/dumper.py (DumpCompiler._link): Pass in
235 --tag=CC to libtool to avoid making libtool confused
236 when CC is different from gcc on some systems.
238 2008-12-10 Johan Bilien <jobi@via.ecp.fr>
240 Bug 563998 – Cache the GIBaseInfo for GTypes
242 * girepository/girepository.c (g_irepository_find_by_gtype):
243 add a cache of GType -> GIBaseInfo.
245 2008-12-09 Johan Bilien <jobi@via.ecp.fr>
247 Bug 562545 – Add function taking / returning GValue
249 * tests/everything/everything.[ch]: add a test of function taking and
250 returning "const GValue *"
252 2008-12-09 Johan Dahlin <johan@async.com.br>
254 * giscanner/cachestore.py (CacheStore.store): Use
255 shutil.move instead of os.rename, since it will
256 automatically fall back to copying+remove if the
257 src directory is on a different partition from
260 2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
262 Bug 563742 – introspection should record the introduced version of
263 symbols marked with the "Since:" tag
268 * giscanner/girwriter.py:
269 * giscanner/scannerlexer.l:
270 * giscanner/transformer.py:
271 * tests/scanner/annotation-1.0-expected.gir:
272 * tests/scanner/annotation-1.0-expected.tgir:
273 * tests/scanner/annotation.c (annotation_versioned):
274 * tests/scanner/annotation.h:
276 2008-12-08 Johan Dahlin <johan@async.com.br>
278 * giscanner/cachestore.py (_get_cachedir): Don't require
279 HOME to be set and if it set, don't require the
282 2008-12-08 Johan Dahlin <johan@async.com.br>
284 * giscanner/cachestore.py (CacheStore.store): Dump the cache
285 file to a temporary file and rename it the expected filename
286 only when it's completely written.
287 This should make the cache more roboust when run in parallel,
288 and hopefully avoid triggering bugs in Python.
290 2008-12-03 Christophe Fergeau <teuf@gnome.org>
292 Bug 562971 – g-ir-scanner failure on libgpod headers
294 * giscanner/scannerlexer.l: raise YY_BUF_SIZE to 65536 up from the
295 default 16384. Without it, the lexer was aborting with a cryptic
296 error message on source files containing really long comment
299 2008-12-01 Colin Walters <walters@verbum.org>
301 * girepository/gfield.c: Fix memory leak; unref type info we
302 created, not field info
304 2008-11-30 Johan Dahlin <jdahlin@async.com.br>
306 Bug 562289 – Race when removing invalid cache
308 * giscanner/cachestore.py:
309 ENOENT is mapped to a OSError, not IOError.
311 2008-11-27 Johan Dahlin <jdahlin@async.com.br>
313 * gir/glib-2.0.c: Add return value transfer annotation
314 for g_markup_escape_text.
316 2008-11-25 Colin Walters <walters@verbum.org>
318 * tools/g-ir-scanner: Add --libtool option which we expect Automake-using
320 * giscanner/dumper.py: Implement it.
321 * gir/Makefile.am, tests/**/Makefile.am: Use it.
323 2008-11-25 Colin Walters <walters@verbum.org>
325 * tests/scanner/Makefile.am: Remove hand-rolled generation of .tgir; easier
326 to just use a Makefile rule and dependencies. This corresponds with a change
327 made to gir-repository to fix srcdir != builddir issues.
329 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
332 Post release version bump
335 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
340 2008-11-25 Colin Walters <walters@verbum.org>
342 Bug 559705 – Missing association between static methods and classes
344 * docs/typelib-format.txt:
345 * girepository/ginfo.c (g_function_info_get_flags):
346 * girepository/girmodule.c (g_ir_module_build_typelib):
347 * girepository/girnode.c (g_ir_node_get_size),
348 (g_ir_node_build_typelib):
349 * girepository/girparser.c (start_function):
350 * girepository/gtypelib.c (g_typelib_check_sanity),
351 (validate_header), (validate_function_blob):
352 * girepository/gtypelib.h:
354 * giscanner/girwriter.py:
355 * giscanner/glibtransformer.py:
356 * tests/scanner/foo-1.0-expected.gir:
357 * tests/scanner/foo-1.0-expected.tgir:
358 * tests/scanner/foo.h:
360 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
362 * giscanner/ast.py: Define socklen_t as an alias for int32.
364 2008-11-24 Johan Dahlin <jdahlin@async.com.br>
366 * girepository/gdump.c (dump_type): Remove a warning,
367 be less verbose on error on fundamental types.
369 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
371 * giscanner/dumper.py: Add license headers,
372 refactor into a class, avoid some duplication and do some
373 extra pedantic checks.
375 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
377 Make it compilable with -Werror on my system by adding
378 a couple of prototypes and including headers.
380 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
382 Bug 562022 – gobject-introspection needs python headers
384 * configure.ac: fail without python headers present.
387 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
389 Bug 561617 – Return value array annotations
391 * giscanner/transformer.py:
392 * tests/scanner/annotation.c (annotation_return_array):
393 * tests/scanner/annotation.h:
394 Add support for (array) for return value annotations as well.
396 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
398 * tests/everything/everything.[ch]: add a test function which calls a
401 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
403 * giscanner/cachestore.py:
404 Catch ValueError exceptions.
406 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
408 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
410 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
412 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
413 instead of hard-coding struct sizes.
415 2008-11-18 Owen Taylor <otaylor@redhat.com>
417 Bug 561296 - Add "storage type" to the typelib data for enums
419 In order to set and get enum and flag fields in structures, we need
420 to know the integral type that the enumeration is stored as. We are already
421 computing that at compile time in order to compute struct offsets, so the
422 easiest thing to do is to save that in the typelib.
424 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
425 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
426 and compute and save it at compile time.
428 * girepository/girepository.h girepository/ginfo.c:
429 Add g_enum_info_get_storage_type().
431 * girepository/gfield.c: Implement reading and writing enum and flags fields
432 based on the storage type.
434 2008-11-18 Owen Taylor <otaylor@redhat.com>
436 Add enums to the Everything test module
438 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
439 test module and register them as GTypes.
441 https://bugzilla.gnome.org/show_bug.cgi?id=561296
443 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
445 * giscanner/cachestore.py:
446 Catch BadPickleGet exceptions as well.
448 2008-11-17 Owen Taylor <otaylor@redhat.com>
450 * tests/everything/everything.c: Fix doc comment annotations
451 for test_struct_b_clone() to refer to the right function.
453 2008-11-17 Dan Winship <danw@gnome.org>
455 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
456 spelling of GHashTable. #561135
458 * tests/scanner/annotation.c (annotation_object_get_hash):
459 * tests/scanner/annotation-1.0-expected.gir:
460 * tests/scanner/annotation-1.0-expected.tgir: add a test of
461 GHashTable annotations
463 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
465 * giscanner/ast.py: Change string array match type to be in terms
466 of canonicalized type.
467 * giscanner/transformer.py: Add canonicalize_ctype which gives us
468 a version of a c:type without aliases, so we can deep canonicalize
469 char** to utf8*. Update parse_ctype to use it.
470 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
472 2008-11-16 Colin Walters <walters@verbum.org>
474 * girepository/girepository.c: Ensure we always call init_globals,
475 even if passed a non-default repository.
477 2008-11-16 Colin Walters <walters@verbum.org>
479 Bug 559706 - Interface prerequisites
481 * common.mk: Dep on libgirepository.la for scanner libs so that
482 we rebuild things even if just gdump.c changes.
483 * girepository/gdump.c: Dump prerequisites.
484 * giscanner/ast.py: Add prerequisite list.
485 * giscanner/girparser.py: Parse them from gdump.
486 * giscanner/girwriter.py: Write them.
487 * giscanner/glibtransformer.py: Resolve them.
490 2008-11-16 Owen Taylor <otaylor@redhat.com>
492 Bug 561087 - Respect is_pointer in serialize_type()
494 Add a '*' to the serialization for the cases where we set is_pointer
495 in the type blob we write out depending on node->is_pointer. Don't
496 add the '*' in the cases where is_pointer is set or not set in a
499 http://bugzilla.gnome.org/show_bug.cgi?id=561087
501 2008-11-16 Owen Taylor <otaylor@redhat.com>
503 Bug 560825 – Add size and alignment to typelib
505 Include the size and alignment of structures and unions in the typelib,
506 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
508 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
509 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
510 to StructBlob and UnionBlob.
512 * girepository/ginfo.c girepository/girepository.h:
513 Add g_[struct|union]_get[size|alignment]().
515 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
517 2008-11-16 Owen Taylor <otaylor@redhat.com>
519 Bug 552371 – implement struct field get/set
521 * girepository/gfield.c girepository/girepository.h: Add
522 convenience functions g_field_info_set_field() and
523 g_field_info_get_field() to set and get fields based on the
524 offsets in GIFieldInfo.
526 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
528 Bug 560241 - Out-arguments should not be marked as being pointers
531 * girepository/girparser.c: Improved logic for out arguments.
533 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
535 Bug 559601 - Pointers in structs/unions unduly treated as arrays
537 * giscanner/transformer.py: Differentiate type creation logic
538 between parameters and struct components.
540 2008-11-15 Colin Walters <walters@verbum.org>
542 * giscanner/dumper.py: Check return code from pkg-config
545 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
547 * tests/everything/everything.c (test_array_int_in),
548 (test_array_gtype_in):
549 * tests/everything/everything.h:
550 Rename the int/gtype array tests. Make the return value
551 useful, an aggregation of the array input values.
553 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
555 * tests/everything/Makefile.am:
556 * tests/everything/everything.c:
557 * tests/everything/everything.h:
558 * tests/everything/gitesttypes.c:
559 * tests/everything/gitesttypes.h:
560 Rename gitesttypes.[ch] to everything.[ch]
562 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
564 Bug 560708 – Don't treat arrays that have a length specified as
565 zero-terminated by default
567 * giscanner/transformer.py: Default to non zero terminated for
569 * tests/*: Update, add test for zero vs not.
571 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
573 Bug 557788 - Return types for constructors in generated typelib bogus
575 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
576 obviously broken in the face of duplicate names in different
578 * tests/scanner/*expected.gir: Fix up.
580 2008-11-13 Owen Taylor <otaylor@redhat.com>
582 * girepository/girffi.c: Fix "Unexpected time for time_t"
585 2008-11-13 Colin Walters <walters@verbum.org>
587 Bug 558436 - avoid having scanner load app code
589 * giscanner/cgobject.py: Delete; we no longer load shared
591 * giscanner/dumper.py: Support for linking a library to
592 a stub binary for introspection.
593 * giscanner/glibtransformer.py: Rewrite to use gdump XML
594 from invocation of child binary.
595 * giscanner/transformer.py: Fix up to use fully qualified
596 name in parse tree. Make parse_ctype public so we can use
597 it inside glibtransformer.
598 * tests/scanner/barapp.c: New test, using --program arg
600 * tests/*: Update to use common.mk for invoking scanner.
601 * tools/g-ir-scanner: Add options --program, --program-arg,
603 * docs/g-ir-scanner.1: Update.
605 2008-11-13 Colin Walters <walters@verbum.org>
607 * configure.ac: Depend on Gio, we use it in gdump.c.
608 * girepository/gdump.c: Code to dump GType data to XML.
609 * girepository/girepository.c: Add option group for dumping.
610 * girepository/girepository.h: Define API for the above.
612 2008-11-13 Colin Walters <walters@verbum.org>
614 * common.mk: Add a file to include with Makefile fragments
615 useful for scanner invocation.
617 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
619 * tests/everything/gitesttypes.c (test_filename_return): Return
620 strings in filename encoding.
622 2008-11-13 Owen Taylor <otaylor@redhat.com>
624 Bug 560253 – Add structure and boxed types to Everything test module
626 * tests/everything/gitesttypes.[ch]: Add examples of:
628 Plain old data structs
629 Plain old data structs with nested fields
631 Plain old data boxed with nested fields
632 More complicated boxed types with internal state
634 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
636 * tests/everything/gitesttypes.c (test_gtype_in):
637 * tests/everything/gitesttypes.h:
638 Add a test of GType arrays, a la gtk_list_store_set_columns.
640 2008-11-12 Owen Taylor <otaylor@redhat.com>
642 Bug 560419 – Cache includes when parsing
644 Keep track of all modules parsed within a GIrParser, and when a
645 module is referenced a second time, use the existing parsed copy
646 instead of reparsing.
648 2008-11-12 Owen Taylor <otaylor@redhat.com>
650 Fix management of ParseContext.includes_modules (#560419)
652 * girepository/girparser.c: Fix some trivial bugs in managing the
653 list of include modules. (Add to module's list twice, not
654 initialized to NULL, not freed.)
656 2008-11-12 Owen Taylor <otaylor@redhat.com>
658 Keep aliases and disguised_structures local to each module (#560419)
660 * girepository/girmodule.[ch]: When parsing, keep keep a separate
661 hash tables of aliases and 'disguised' flags for each module, and
662 store that on the module.
664 After parsing an include merge the aliases/disguised flags to the
667 * girepository/girparser.c: Remove 'prefix_aliases' flag and
668 always prefix aliases/disguised structure types when parsing; this
669 simplifies the code considerably.
671 2008-11-12 Owen Taylor <otaylor@redhat.com>
673 Fix mismatches between .gir name and 'name' attribute (#560419)
675 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
676 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
677 where the 'name' element of <namespace/> didn't match the filename of the
678 gir, an assumption that the compiler has always expected and now enforces.
680 2008-11-12 Owen Taylor <otaylor@redhat.com>
682 Only allow one <namespace/> element per <repository/> (#560419)
684 * girepository/girparser.c: The logic in girparser.c didn't work
685 very well if there were multiple <namespace/> nodes within a
686 single <repository/> (context->namespace was always the overall
687 filename and not the the name specified in the <namespace/>
688 element for one thing; this would cause aliases to be mis-prefixed
689 in include modules.) Also check that the "name" in the
690 <namespace/> node matches the filename.
692 2008-11-12 Owen Taylor <otaylor@redhat.com>
694 Add a GirParser object to hold the state of a compilation
696 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
697 GirParser object to hold state that is global across a
698 compilation. Currently just holds the include path, but will
699 eventually also keep a cached list of parsed modules.
701 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
703 * girepository/girepository.c (find_namespace_latest): Fix
706 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
708 * configure.ac: use 'introspection' component for bugs
710 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
712 * tests/everything/gitesttypes.c (test_filename_return):
713 * tests/everything/gitesttypes.h:
714 Add a filename return test.
716 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
718 * tests/offsets/Makefile.am (gitestoffsets.c): fix
719 gen-gitestoffsets invocation with builddir != srcdir
721 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
723 * girepository/girepository.c:
724 Change the element type from utf8 to filename
725 * girepository/girnode.c (g_ir_node_build_typelib):
726 Special case filename equally to utf8 here.
728 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
731 Remove unused variables, add a dependency of girepository.ch, so when
732 they change we rebuild the gir automatically.
734 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
736 * girepository/girepository.c (g_irepository_get_search_path):
737 * girepository/girepository.h:
738 Add a g_irepository_get_search_path, so we can access the search
741 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
743 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
745 * girepository/girparser.c: avoid freeing an uninitialized pointer
747 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
750 * giscanner/glibtransformer.py:
751 * tools/g-ir-scanner:
752 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
753 so we can just pass in --library=foo/bar/baz.la and the scanner
754 does the right thing.
755 Don't warn for _get_type() functions if they don't take any
758 2008-11-11 Owen Taylor <otaylor@redhat.com>
760 Bug 560404 – Prefix types when resolving aliases in included modules
762 * girepository/girparser.c: When resolving aliases in an included
763 module, prefix types before looking them up.
765 2008-11-11 Owen Taylor <otaylor@redhat.com>
767 Compute field offsets and overall size for object structures
769 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
770 field of type object in structure"
772 Do basic computation of field offsets for objects and interfaces;
773 this doesn't attempt to address all of the "mess" for virtual
774 functions described in Bug 560281.
776 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
778 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
780 Based on patch by Johan Bilien.
782 * giscanner/transformer.py (_create_member, _create_parameter):
783 Resolve types here as well.
784 (_resolve_type_name_1): Try resolving using 'ctype' first since
785 it's least ambiguous. Fixes struct member type resolution with
786 similarly named types, e.g. Gdk.PangoRendererClass and
788 * tests/scanner/foo*: Add test.
790 2008-11-11 Owen Taylor <otaylor@redhat.com>
792 * girepository/girparser.c: Search provided include dirs before
793 the default directories.
795 2008-11-11 Owen Taylor <otaylor@redhat.com>
797 * girepository/giroffsets.c: Include fully-qualified names in
800 2008-11-11 Owen Taylor <otaylor@redhat.com>
802 * girepository/giroffsets.c: Fail gracefully with an informative
803 error message when recursion is encountered when computing a
806 2008-11-11 Owen Taylor <otaylor@redhat.com>
808 * girepository/girparser.c: Remove an unused variable.
810 2008-11-10 Owen Taylor <otaylor@redhat.com>
812 Add tests for field offset computations
814 * tests/offsets/offsets.h: Header file with structure definitions to test
816 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
817 field offsets for the structures in offsets.h two ways: using
818 the information from a generated typelib, and as computed by the
821 We diff these two versions to test that everything is OK.
823 2008-11-10 Owen Taylor <otaylor@redhat.com>
825 Remove field offsets from g-ir-generate output and test inputs
827 Field offsets are a) architecture dependent so they shouldn't be part
828 of the architecture-independent gir format which is installed in
829 datadir. b) Are architecture-dependent so they shouldn't be in test
832 * girepository/girparser.c: Don't parse offset for fields
833 * tools/generate.c: Don't parse offset for fields
834 * tests/*.gir test/scanner/*.tgir: Remove offsets
836 (Virtual function and discriminator offsets are not removed, as they
837 aren't fully hooked up to the field-offset computation machinery yet.)
839 2008-11-10 Owen Taylor <otaylor@redhat.com>
841 Bug 560252 - Compute field offsets before writing typelib
843 * girepository/girnode.h: Store the total size and alignment for
844 GIrNodeStruct/Boxed/Union.
846 * girepository/giroffset.c: New file implementing computation of
847 structure field offsets.
849 * girepository/girnode.c: Compute structure field offsets before
850 writing types into the typelib.
852 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
853 means "unknown". Also fix description of the discriminator_offset
856 2008-11-10 Owen Taylor <otaylor@redhat.com>
858 Bug 560250 - Fully parse included modules
860 For some things, like computing structure offsets to put into the typelib
861 we need more than just the aliases from included modules. Do a completel
862 parse of included modules and store in module->included_modules.
864 Also add g_ir_find_node() to find node information from within the
865 active set of modules and their includes.
867 2008-11-10 Owen Taylor <otaylor@redhat.com>
869 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
871 Extract a function to convert GITypeTag to ffi_type from the internals
872 of ginvoke.c. This will be useful in figure out structure alignment.
874 Also fix handling of gsize and time_t to be portable. (Add a check
875 to configure.ac to figure out the width of time_t.)
877 2008-11-10 Owen Taylor <otaylor@redhat.com>
879 Bug 560248 – "disguised structures"
881 Certain types like GIConv and GdkAtom are pointers internally but don't
882 look like pointers when referenced. They have the form.
884 typedef struct _X *X;
886 Parse these as structures/records but mark them in the gir with a 'disguised'
887 attribute so that we know that they need special handling.
889 In the typelib treat them like any other structure.
891 2008-11-09 Jürg Billeter <j@bitron.ch>
894 * giscanner/girwriter.py:
896 Write throws attribute for virtual functions, fixes bug 559703
898 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
900 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
901 up some confusion about the second argument to find_module, it's
902 actually the packages __path__ attribute which we can safely ignore
904 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
906 2008-11-07 Owen Taylor <otaylor@redhat.com>
908 Bug 559737 – Deal with continuations in macros
910 * giscanner/giscannerlexer.l: Treat continuation lines the same
911 as regular newlines. This makes the scanner not complain about
912 #define foo(x) \ <stuff> inside a C file. There's no attempt
913 however to handle parsing macro definitions split across lines.
915 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
917 * giscanner/cachestore.py:
918 Handle broken cache entries, write only filesystems and
919 running out of diskspace.
921 2008-11-07 Owen Taylor <otaylor@redhat.com>
923 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
924 Set current_filename before lexing the file so error messages
925 are reported in the right file.
927 2008-11-06 Colin Walters <walters@verbum.org>
929 * tests/everything/*: Add some tests for strv.
931 2008-11-05 Colin Walters <walters@verbum.org>
933 * girepository/ginvoke.c (g_function_info_invoke): Don't use
934 nested scope local variable for error which may go away after
935 conditional is complete.
937 2008-11-05 Colin Walters <walters@verbum.org>
939 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
940 manipulate hackily; just use GString. This avoids an
941 uninitialized memory read pointed out by Havoc.
943 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
945 * giscanner/__init__.py:
947 * giscanner/cachestore.py:
948 * giscanner/cgobject.py:
949 * giscanner/girparser.py:
950 * giscanner/girwriter.py:
951 * giscanner/giscannermodule.c:
952 * giscanner/glibast.py:
953 * giscanner/glibtransformer.py:
954 * giscanner/libtoolimporter.py:
955 * giscanner/minixpath.py:
956 * giscanner/odict.py:
957 * giscanner/sourcescanner.c:
958 * giscanner/sourcescanner.h:
959 * giscanner/sourcescanner.py:
960 * giscanner/transformer.py:
961 * giscanner/utils.py:
962 * giscanner/xmlwriter.py:
964 Relicense the giscanner library under LGPLv2+.
965 This has been approved by all contributors.
967 2008-11-01 Owen Taylor <otaylor@redhat.com>
969 Bug 558848 giparser.py: shared library should be optional
971 When parsing a .gir, allow the shared-library attribute
972 of <namespace/> to be missing: this corresponds to the handling
973 in libgirepository and elsewhere.
975 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
977 Bug 557898 – Fails to build on OSX 10.4
979 * configure.ac: Check for $shrext_cmds that should be implicitly
980 available if you're using libtool >= 2.0. If undefined, call
981 libtool --config explicitly to get its value.
982 * girepository/gtypelib.c: Remove special case for (non-)Darwin
985 2008-10-31 Colin Walters <walters@verbum.org>
987 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
989 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
991 * configure.ac: Post release version bump
994 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
998 * docs/release-checklist.txt:
1001 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1003 * Makefile.am: add an upload-release target
1004 * docs/release-checklist.txt:
1005 Release process documentation
1007 2008-10-31 Colin Walters <walters@verbum.org>
1009 Bug 558109 – _g_typelib_init fails to find shared libraries
1011 * transformer/glibtransformer.py: Use ctypes' find_library
1012 on passed libraries and write that for the shared-library
1013 entry. We want to avoid depending on -devel packages.
1015 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1017 * docs/g-ir-scanner.1:
1018 Document the renaming options.
1020 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
1022 * giscanner/Makefile.am:
1023 * tests/invoke/Makefile.am:
1024 * tests/repository/Makefile.am: List in-tree libraries first in
1025 LDADD / LIBADD. If installed library is listed first, the
1026 resulting binary will prefer installed version to one in .libs,
1027 possibly making 'make check' behave strangely.
1029 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
1031 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
1032 gir-repository from choking with gdk/quartz
1034 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1036 * giscanner/giscannermodule.c (calc_attrs_length),
1037 (pygi_collect_attributes):
1038 * giscanner/xmlwriter.py:
1039 Write a C version of the xml namespace formatter.
1040 Saves 15% of the time it takes to create a gtk gir.
1042 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1044 * giscanner/xmlwriter.py: Abstract attribute formatting
1045 to a function external to the XMLWriter class.
1047 * giscanner/scannerlexer.l:
1048 Parse and discard __typeof and __attribute.
1050 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1052 * giscanner/girparser.py:
1053 Remove arguments from the constructor, move them to
1054 separate accessors. Add a new parse_tree method
1055 which takes an element tree instance.
1056 * tools/g-ir-scanner:
1057 Update callsite for this
1059 * giscanner/Makefile.am:
1060 * giscanner/cachestore.py:
1061 * giscanner/transformer.py:
1062 Cache the include parsing. Saves ~25% time when
1063 creating vte (which includes everything up to gtk+).
1065 2008-10-30 Colin Walters <walters@verbum.org>
1067 * giscanner/transformer.py: Don't reparse includes
1068 we've already processed.
1070 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1072 * giscanner/girparser.py:
1073 * giscanner/transformer.py:
1074 Avoid parsing parameters, types etc when parsing
1075 includes. Should speed up include parsing a bit.
1077 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1079 * giscanner/girparser.py:
1080 Avoid big if/else and use a dispatch table like
1083 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1085 * giscanner/transformer.py:
1086 Clean up include parsing and registration.
1088 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1090 * giscanner/transformer.py:
1093 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1095 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
1098 construct PYTHONPATH just once
1100 * tests/everything/Makefile.am:
1101 * tests/scanner/Makefile.am:
1102 add $(top_srcdir) to PYTHONPATH to
1103 handle builddir != srcdir
1105 * giscanner/libtoolimporter.py:
1106 * giscanner/sourcescanner.py:
1107 Make the libtoolimporter work when distchecking too.
1109 Mostly based on patch by Tommi Komulainen
1111 2008-10-29 Owen Taylor <otaylor@redhat.com>
1113 * giscanner/glibtransformer.py: If a filename of an existing
1114 file is passed to --library, hunt for it directly, rather than
1115 searching for a corresponding library.
1117 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
1119 * giscanner/libtoolimporter.py:
1120 * giscanner/sourcescanner.py:
1121 Clean up the libtool importer a bit. Add a context so we
1122 can use it through a with statement.
1123 Don't just look in the current directory, look in the whole
1126 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
1128 Bug 558065 – gitesttypes should be installed
1131 * tests/Makefile.am:
1132 * tests/types/Makefile.am -> tests/everything/Makefile.am
1133 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
1134 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
1135 move tests/types to tests/everything
1137 * tests/everything/Makefile.am: build normal shared library
1138 libgirepository-everything.so.1.0.0 and corresponding typelib
1139 Everything-1.0.typelib
1141 * tests/everything/Makefile.am: explicitly link libtool
1142 versioning with typelib versioning with variables
1144 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
1146 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
1148 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1150 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
1153 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1155 Bug 558068 – when invoking a method, offset the in arguments by one,
1158 * tests/invoke/invoke.c, tests/invoke/testfns.c,
1159 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
1160 * girepository/ginvoke.c: do not offset the index of given out
1161 arguments by one for methods, "this" is provided as in argument only.
1163 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1165 * gir/gio-2.0.c: add annotation for g_file_delete
1167 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
1169 Bug 558062 – provide and use paths in the .pc file
1171 * gobject-introspection-1.0.pc.in: provide typelibdir variable
1172 for where .typelibs should be installed (callers shouldn't need
1173 to construct paths from bits and pieces)
1175 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1177 Bug 557791 – g_irepository_require() could return a GTypelib *
1179 * girepository/girepository.c: Return GTypelib; this is useful
1180 for low level manipulation.
1182 2008-10-25 Colin Walters <walters@verbum.org>
1184 Bug 557788 – Return types for constructors in generated typelib bogus
1186 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
1187 rely on end pass resolution.
1189 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1191 Bug 557786 - support fixed size arrays
1193 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
1194 * giscanner/scannerparser.y: Retain fixed array size.
1195 * giscanner/ast.py: Add to note.
1196 * giscanner/girwriter.py: Write to gir.
1197 * girepository/girnode.c: Write it to typelib.
1198 * tools/generate.c: Generate.
1199 * tests/*: Add tests.
1201 2008-10-25 Colin Walters <walters@verbum.org>
1203 Bug 557076 - move typelibs to $libdir
1205 * configure.ac: Steal some configury bits from dbus to expand
1207 * gir/Makefile.am: Move to libdir.
1208 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
1209 instead just look at one hardcoded path in libdir.
1210 * acinclude.m4: Bits from dbus.
1212 2008-10-24 Johan Dahlin <johan@gnome.org>
1214 * girepository/girnode.c (g_ir_node_check_unhandled_members):
1215 Be quiet, do not warn about unhandled members.
1217 2008-10-24 Johan Dahlin <johan@gnome.org>
1219 * girepository/gtypelib.c:
1220 Only use SHLIB_SUFFIX on darwin, otherwise use
1221 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
1223 2008-10-24 Lucas Rocha <lucasr@gnome.org>
1225 Bug 557623 - Constructors shouldn't be flagged as methods.
1227 * girepository/ginfo.c (g_function_info_get_flags): ditto.
1229 2008-10-24 Johan Dahlin <johan@gnome.org>
1231 * giscanner/scannerparser.y:
1232 Check against division by zero for the modula operator.
1233 This fixes header parsing of OSX system headers included
1236 2008-10-24 Johan Dahlin <johan@gnome.org>
1240 Add a CONTRIBUTORS file and dist it.
1242 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1244 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
1246 * girepository/girparser.c (parse_param_transfer):
1247 * giscanner/transformer.py (_create_parameter, _create_return):
1248 * giscanner/girwriter.py (_write_return, _write_parameter):
1249 * tools/generate.c (write_callable_info): always write and
1250 require "transfer-ownership" for return-values and parameters
1253 * tests/invoke/testfns-1.0.gir:
1255 * tests/scanner/DrawableAdditions.xml:
1256 * tests/scanner/GtkFrob-1.0-expected.tgir:
1257 * tests/scanner/annotation-1.0-expected.tgir:
1258 * tests/scanner/drawable-1.0-expected.tgir:
1259 * tests/scanner/drawable-injected-1.0-expected.gir:
1260 * tests/scanner/drawable-injected-1.0-expected.tgir:
1261 * tests/scanner/foo-1.0-expected.tgir: Updated
1263 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1265 * giscanner/cgobject.py: build fundamental types same way as glib
1267 * giscanner/glibtransformer.py (_type_from_gtype): record GType
1268 when constructing the Type from it
1270 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
1271 the parameter is a GObject from its GType, if available.
1273 * giscanner/glibtransformer.py (_adjust_transfer):
1274 * tests/scanner/foo-1.0-expected.gir:
1275 * tests/scanner/foo-1.0-expected.tgir: deduce
1276 transfer-ownership from GTypes
1278 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1280 * giscanner/transformer.py (_create_parameter):
1281 * tests/scanner/foo-1.0-expected.gir: make varargs
1282 transfer-ownership="none"
1284 2008-10-23 Colin Walters <walters@verbum.org>
1286 Bug 556739 - transfer ownership
1288 * giscanner/ast.py: Refactor Parameter/Return to share
1289 common attributes. Add transfer_inferred attribute
1290 which says whether or not we made a guess.
1291 * giscanner/transformer.py: Add much more extensive
1292 heuristics around parameter and return transfer.
1293 * giscanner/glibtransformer.py: Adjust to inspect
1297 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1299 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
1301 * tests/scanner/Makefile.am:
1302 * tests/scanner/annotation-1.0-expected.tgir:
1303 * tests/scanner/drawable-1.0-expected.tgir:
1304 * tests/scanner/drawable-injected-1.0-expected.tgir:
1305 * tests/scanner/foo-1.0-expected.tgir:
1306 * tests/scanner/GtkFrob-1.0-expected.tgir:
1307 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
1308 annotations survive the roundtrip via typelib
1310 The expectations are as currently produced by g-ir-generate,
1311 comparison with the .gir files shows there are differences.
1313 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
1315 Bug 557468 – Support for GI_TYPELIB_PATH
1317 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
1318 provided paths to the global search path.
1320 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1322 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
1324 * tests/scanner/drawable-1.0-expected.tgir:
1325 * tests/scanner/drawable-injected-1.0-expected.tgir:
1326 * tests/scanner/foo-1.0-expected.tgir:
1327 * tools/generate.c (write_object_info): write 'abstract'
1328 attribute for classes
1330 2008-10-22 Lucas Rocha <lucasr@gnome.org>
1332 * girepository/girmodule.c, girepository/gtypelib.c,
1333 girepository/girparser.[ch]: fix some build warnings.
1335 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1337 Bug 557405 – Use 'allow-none' consistently
1339 * docs/typelib-format.txt:
1340 * girepository/ginfo.c (g_arg_info_may_be_null):
1341 * girepository/girnode.c (g_ir_node_build_typelib):
1342 * girepository/girnode.h (struct _GIrNodeParam):
1343 * girepository/girparser.c (start_parameter):
1344 * girepository/girwriter.c (function_generate):
1345 * girepository/gtypelib.h (ArgBlob):
1347 * tests/function.gir:
1348 * tools/generate.c (write_callable_info): Use 'allow-none'
1349 consistently throughout
1351 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1353 Bug 557092 – Callback annotations not used
1355 * giscanner/transformer.py (_create_callback): use annotations
1357 * tests/scanner/annotation.h
1358 * tests/scanner/annotation-1.0-expected.gir: add tests
1360 2008-10-21 Colin Walters <walters@verbum.org>
1362 * giscanner/scannerlexer.l: Don't require trailing whitespace after
1363 uncommented parameters.
1366 2008-10-21 Colin Walters <walters@verbum.org>
1368 * girepository/girepository.c: Ensure that when doing an unversioned
1369 require, we prefer items earlier in the search path to later ones.
1371 2008-10-21 Owen Taylor <otaylor@redhat.com>
1373 * giscanner/transformer.py: For string parameters allow transfer annotation
1374 to override the standard automatic guessing based on 'const'.
1376 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1378 Bug 557241 – "throws" flag for functions
1380 * tests/scanner/drawable-1.0-expected.gir,
1381 tests/scanner/drawable-injected-1.0-expected.gir,
1382 tests/scanner/drawable.[ch]: add simple test for throwing
1383 function (has GError ** as last argument)
1385 * giscanner/ast.py: add a 'throws' flag to Function
1386 * giscanner/glibtransformer.py: if a function's last paramerter is
1387 a GError, set the 'throws' flag and remove that parameter
1388 * giscanner/girwriter.py: write out the 'throws' attribute
1389 * giscanner/girparser.py: support parsing the 'throws' attribute
1391 * tests/repository/gitestthrows.c: add a simple test to check the
1392 throws flag in a typelib and invoke the function
1394 * girepository/ginfo.c, girepository/girnode.[ch],
1395 girepository/girnode.h, girepository/girparser.c,
1396 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1398 * girepository/ginvoke.c: if a function throws, add a GError as last
1399 arguments, and propagate the error to the invoker.
1401 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1403 * giscanner/transformer.py (_create_parameters): Warn if we see
1404 annotations for unknown parameters. If .h and .c files name
1405 parameters differently, the annotations may be lost.
1407 2008-10-21 Johan Dahlin <johan@gnome.org>
1409 Bug 556358 - don't use libtool internals
1411 * giscanner/Makefile.am:
1412 * giscanner/libtoolimporter.py:
1413 * giscanner/sourcescanner.py:
1414 * giscanner/utils.py:
1415 Add a python meta importer and remove a libtool symlink hack.
1417 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1419 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1420 and --add-include-path appropriately when invoking the scanner.
1421 * tests/types/Makefile.am (%typelib): Likewise.
1423 2008-10-20 Colin Walters <walters@verbum.org>
1425 Bug 556777 - validate properties
1427 * giscanner/transformer.py: Add option to throw on unknown types.
1428 * giscanner/glibtransformer.py: Use it on properties.
1429 * tests/*: Add a test.
1431 2008-10-20 Colin Walters <walters@verbum.org>
1433 * giscanner/glibast.py: Also register g variants of
1434 default_array_types. This is not beautiful, but
1435 good alternatives aren't easy to come by.
1436 This fixes gchar ** parsing.
1438 2008-10-20 Colin Walters <walters@verbum.org>
1440 * docs/typelib-format.txt, girepository/gtypelib.h:
1441 Take a bit from ObjectInfo to represent abstract flag.
1442 * giscanner/cgobject.py: Expose g_type_get_flags.
1443 * girepository/girepository.h: Add accessor.
1444 * girepository/ginfo.c: Implement it.
1445 * giscanner/ast.py: Add is_abstract flag to generic
1447 * giscanner/glibast.py: Use it.
1448 * giscanner/girwriter.py: Write it.
1449 * girepository/girparser.c: Parse it.
1452 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1454 * giscanner/girparser.py (_parse_function): don't lose
1455 'transfer-ownership' attributes when injecting, check for the
1458 2008-10-19 Johan Dahlin <johan@gnome.org>
1460 * giscanner/scannerlexer.l: Parse and ignore __asm.
1462 2008-10-19 Colin Walters <walters@verbum.org>
1464 * giscanner/girparser.py: Parse array length= to ensure
1465 it doesn't get lost from --inject.
1467 2008-10-17 Colin Walters <walters@verbum.org>
1469 Bug 556795 - char ** regression
1471 * giscanner/transformer.py: Fix parsing of ctypes, add some
1472 comments about what's going on.
1473 * tests/*: Add a test for char **.
1475 2008-10-17 Colin Walters <walters@verbum.org>
1477 Bug 556783 - change namespace handling to be more consistent
1479 * giscanner/transformer.py: Eliminate usage of
1480 strip_namespace_object. We now treat --namespace as the default
1481 --strip-prefix; however, if --strip-prefix is specified it
1482 overrides --namespace. This applies to everything except function
1483 names, where we do also strip the namespace.
1484 * giscanner/glibtransformer.py: Remove usage of
1485 strip_namespace_object.
1487 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1488 --namespace and --strip-prefix.
1490 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1492 Bug 556732 – generate gir files consistently
1494 * girepository/girparser.c (start_parameter):
1496 * tests/invoke/testfns-1.0.gir:
1497 * tools/generate.c (write_callable_info): write
1498 'transfer-ownership' attribute consistently with both
1499 return-value and parameter elements
1501 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1503 Bug 556732 – generate gir files consistently
1505 * tools/generate.c (write_callable_info): write 'direction'
1506 attribute only if other than 'in' to be consistent with
1509 * tests/object.gir: remove direction="in" which is the default
1511 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1513 Bug 556732 – generate gir files consistently
1515 * giscanner/ast.py (Field): add readable and writable properties
1516 * giscanner/girparser.py (_parse_field): copy 'readable' and
1517 'writable' attributes
1518 * giscanner/transformer.py (_create_member): create fields as
1520 * giscanner/glibtransformer.py (_introspect_object,
1521 _pair_class_struct): make object instance and class fields
1523 * giscanner/girwriter.py (_write_field):
1524 * tools/generate.c (write_field_info): write field 'readable'
1525 and 'writable' attributes only if non-default (read-only)
1526 * girepository/girparser.c (start_field): in the absence of
1527 attributes assume fields are read-only
1529 * tests/struct.gir: remove redundant readable="1" from fields
1530 * tests/scanner/foo-1.0-expected.gir:
1531 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1532 all record and union fields
1534 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1536 Bug 556732 – generate gir files consistently
1538 * giscanner/girwriter.py (_write_property): write properties
1539 'construct' attribute if set
1540 * tools/generate.c (write_property_info): write properties
1541 'readable' and 'writable' attributes only if non-default
1542 * tests/object.gir: add writable="0"
1543 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1545 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1547 * gir/glib-2.0.c: added annotations
1549 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1551 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1554 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1556 Bug 556610 – giscanner/girparser.py drops parameter options
1558 * tests/scanner/drawable-injected-1.0-expected.gir,
1559 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1560 * giscanner/ast.py: allow Parameter to take options in the constructor
1561 * giscanner/girparser.py: parse parameter options (transfer,
1562 direction, allow-none)
1564 2008-10-16 Colin Walters <walters@verbum.org>
1566 Bug 556185 - segfault on g_callable_info_get_return_type
1568 Initial patch from John Ehresman.
1570 * tests/repository/*: Add a test using
1571 g_callable_info_get_return_type. Instead of casting a
1572 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1573 to call g_type_info_get_interface.
1575 2008-10-16 Colin Walters <walters@verbum.org>
1577 Bug 556579 - union and struct name misresolved
1579 * giscanner/transformer.py: The calls to _resolve_type_name
1580 for struct/union names was a legacy holdover from when type
1581 resolution had multiple phases. Now it's actively harmful
1582 since we might pull in an identical name from another
1586 2008-10-16 Colin Walters <walters@verbum.org>
1588 Bug 556432 - transfer annotations and defaults
1590 * giscanner/transformer.py: Canonicalize type
1591 after removing *, not before. This ensures that
1592 guchar* is transformed to 'uint8'.
1593 Add some comments here.
1594 * giscanner/glibtransformer.py: Add _adjust_transfer
1595 phase for tweaking GObject transfers.
1598 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1600 * configure.ac: enable bunch of gcc warning CFLAGS
1602 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1604 Bug 556543 – reduce compiler warnings
1606 * girepository/ginfo.c:
1607 * girepository/girepository.c (register_internal,
1608 count_interfaces, find_interface, find_namespace_version,
1609 parse_version, g_irepository_require):
1610 * girepository/girmodule.c (g_ir_module_build_typelib):
1611 * girepository/girnode.c (init_stats, dump_stats,
1612 _g_irnode_init_stats, _g_irnode_dump_stats,
1613 g_ir_node_can_have_member):
1614 * girepository/girparser.c (firstpass_end_element_handler,
1615 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1616 start_alias, start_type, end_type_top, parse_include, cleanup,
1618 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1619 * giscanner/giscannermodule.c (directive_get_options,
1620 type_get_child_list):
1621 * giscanner/scannerlexer.l (parse_gtkdoc):
1622 * giscanner/scannerparser.y (ctype_free):
1623 * giscanner/sourcescanner.c:
1624 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1625 * tests/types/gitesttypes.c:
1626 * tools/compiler.c (main):
1627 * tools/generate.c (write_repository): Remove unused variables
1628 and code, add missing includes, declarations and case
1631 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1633 Bug 556541 – access union members through UnionBlob rather than
1636 * girepository/ginfo.c (g_union_info_find_method): access union
1637 members through UnionBlob rather than StructBlob
1639 2008-10-15 Colin Walters <walters@verbum.org>
1641 Bug 556331 - clean up includes handling
1643 * tools/g-ir-scanner: Rework command line arguments; now we take
1644 --add-include-path and --include separately.
1645 * giscanner/girwriter.py: Separate name= and version= in include
1647 * giscanner/ast.py: Add Include type.
1648 * giscanner/transformer.py: Cleanups to register_include now that
1649 we don't need to handle mixed filenames and relative arguments.
1650 * girepository/girparser.c: Parse name and version separately;
1651 this fixes a bug as a side effect where we weren't resolving
1652 through aliases for basic types.
1653 * girepository/girepository.c: Fix format string args.
1654 * gir/Makefile.am: Update.
1657 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1659 Bug 556434 – unhandled interface/object/... member types
1661 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1662 g_ir_node_build_typelib): Check all
1663 interface/object/boxed/struct/union members are processed and
1664 abort if they are not. (Mostly callbacks in structs, but also
1665 fields in interfaces.)
1667 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1669 * a/girepository/girnode.c (g_ir_node_build_members,
1670 g_ir_node_build_typelib): refactor common code for processing
1671 members to a function
1673 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1675 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1676 transformation is lossless (it's not)
1678 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1680 * tests/Makefile.am: fix tests to compare xml to xml instead of
1681 typelib to xml, and stop on error
1683 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1685 * tools/generate.c (write_type_name, write_type_info,
1686 write_type_info, write_object_info, write_object_info,
1687 write_interface_info, write_error_domain_info): reduce code
1690 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1692 Bug 556174 – parse types for lists etc.
1694 * girepository/girparser.c (end_type_recurse):
1696 * tools/generate.c (write_type_info, write_field_info,
1697 write_callable_info, write_callable_info, write_constant_info,
1698 write_property_info): use nested <type>s for lists and hashes
1700 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1703 * tests/object.gir: remove trailing whitespace from inside
1704 elements to match g-ir-generate output
1706 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1708 * tools/generate.c (xml_printf): quote printf arguments so that
1709 we don't generate invalid XML by writing unescaped double quotes
1710 and such in attributes
1712 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1714 * tools/generate.c (write_field_info, write_callable_info,
1715 write_function_info, write_callback_info, write_struct_info,
1716 write_constant_value, write_signal_info, write_vfunc_info,
1717 write_object_info, write_interface_info, write_union_info,
1718 write_repository): remove unused indent parameters, xmlwriter
1719 keeps track of necessary indentation
1721 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1723 * tools/generate.c (xml_element_new, xml_element_free,
1724 xml_start_element, xml_end_element, xml_end_element_unchecked,
1725 xml_open, xml_close): Keep track of generated XML tree and
1726 handle indentation and closing tags properly.
1727 (write_field_info, write_callable_info, write_function_info,
1728 write_callback_info, write_struct_info, write_value_info,
1729 write_constant_info, write_enum_info, write_signal_info,
1730 write_vfunc_info, write_property_info, write_object_info,
1731 write_interface_info, write_error_domain_info, write_union_info,
1732 write_repository): Use xml_start_element and xml_end_element to
1735 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1737 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1738 (write_type_name, write_type_info, write_field_info,
1739 write_callable_info, write_function_info, write_callback_info,
1740 write_struct_info, write_value_info, write_constant_value,
1741 write_constant_info, write_enum_info, write_signal_info,
1742 write_vfunc_info, write_property_info, write_object_info,
1743 write_interface_info, write_error_domain_info, write_union_info,
1744 write_repository): wrap all FILE access to go through simple xmlwriter
1746 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1748 Bug 556400 – Fails to build on OS X 10.4
1750 * configure.ac: check for functions backtrace and backtrace_symbols
1751 * girepository/girparser.c (backtrace_stderr): Comment out
1752 implementation if the functions are not available.
1753 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1754 directory for better portability
1756 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1758 Bug 556433 – assume direction = out for int * parameters
1760 * giscanner/ast.py: define a list of types for which, if passed as
1761 reference, we assume a default direction of 'out'
1762 * giscanner/transformer.py: if a type has type pointer to one of the
1763 previously defined types, and no direction is set, assume out.
1764 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1766 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1768 * tests/scanner/annotation.c: fixed a few copy-paste errors
1770 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1772 Bug 556323 – transfer-ownership is wrong for functions returning const
1775 * giscanner/transformer.py: check for a const string as return value,
1776 not just const char*. Suggested by Colin Walters
1777 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1779 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1781 * girepository/ginfo.c, girepository/girepository.h: add
1782 g_union_info_find_method
1784 2008-10-14 Colin Walters <walters@verbum.org>
1786 * tests/repository/Makefile.am: Reenable repo test.
1787 * tests/repository/gitestrepo.c: Prepend search
1788 path for $(top_builddir)/gir dir so that we don't
1789 require installation for "make check" to pass.
1791 2008-10-13 Jürg Billeter <j@bitron.ch>
1793 * giscanner/glibtransformer.py:
1794 * tests/scanner/annotation-1.0-expected.gir:
1795 * tests/scanner/drawable-1.0-expected.gir:
1796 * tests/scanner/foo-1.0-expected.gir:
1797 * tests/scanner/utility-1.0-expected.gir:
1799 Support fields in GObject structs
1801 2008-10-13 Jürg Billeter <j@bitron.ch>
1803 * giscanner/ast.py: add signed integer and off_t to type_names
1805 2008-10-12 Jürg Billeter <j@bitron.ch>
1807 * giscanner/girparser.py: Parse bits attribute of fields
1809 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1811 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1812 * tests/repository/gitestrepo.c (main): instantiate
1813 'GCancellable' to ensure the GType is registered before using
1816 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1818 * giscanner/girparser.py: actually add the parsed constant nodes
1820 2008-10-12 Colin Walters <walters@verbum.org>
1822 * girepository/girepository.c: Don't cast DirEntry to Blob,
1823 actually look it up by offset.
1825 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1827 * giscanner/girparser.py: parse constant nodes in gir files
1829 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1831 * giscanner/transformer.py: prefix for constants have an underscore,
1832 so remove them as if they were functions, not objects.
1834 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1836 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1839 2008-10-12 Colin Walters <walters@verbum.org>
1841 Initial patch from Jani Monoses.
1843 * girepository/gtypelib.c: Fix inverted test for success
1846 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1848 * tools/generate.c (write_callable_info): use "transfer-ownership"
1849 attribute for return values
1851 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1853 * tools/generate.c (write_callable_info): move "transfer" and
1854 "null-ok" attributes from <function> to <return-value> element
1856 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1858 * girepository/girparser.c (start_return_value): handle
1859 "transfer-ownership" attribute
1861 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1863 * girepository/girparser.c (parse_param_transfer):
1864 * tools/generate.c (write_callable_info): use "container" for
1865 container/shallow ownership transfer (not "shallow")
1867 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1869 * girepository/girparser.c (parse_param_transfer,
1870 start_parameter): Refactor handling of transfer=none/shallow/full
1871 to separate function
1873 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1875 Bug 556048 – Crash in g_irepository_find_by_gtype
1877 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1878 * girepository/girepository.c (find_interface): Fix
1879 find_by_gtype case to get the type name from right offset
1881 2008-10-12 Jürg Billeter <j@bitron.ch>
1883 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1886 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1888 * girepository/gtypelib.h (RegisteredTypeBlob): make
1889 'unregistered' one bit wide as everywhere else
1891 2008-10-12 Jürg Billeter <j@bitron.ch>
1893 * giscanner/glibtransformer.py:
1894 * tests/scanner/annotation-1.0-expected.gir:
1895 * tests/scanner/drawable-1.0-expected.gir:
1896 * tests/scanner/drawable.h:
1897 * tests/scanner/foo-1.0-expected.gir:
1898 * tests/scanner/utility-1.0-expected.gir:
1900 Readd class records as workaround to not break Gtk typelib
1902 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1904 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1906 2008-10-12 Jürg Billeter <j@bitron.ch>
1908 * giscanner/glibtransformer.py: Don't generate <record> elements
1910 * tests/scanner/*: Update test cases
1912 2008-10-11 Colin Walters <walters@verbum.org>
1914 Bug 552858: versioning
1916 This is a big patch. You should probably remove your installation
1919 * docs/typelib-format.txt: Add nsversion entry which holds
1920 version of namespace.
1921 * girepository/girepository.h: Add 'version' parameter to
1922 g_irepository_require. This may be NULL. Normally
1923 bindings should pass an explicit version though.
1924 * girepository/girepository.c: Lots of infrastructure to
1925 support versioning. Add some more documentation. Disallow
1926 some usage of NULL namespaces.
1927 * girepository/girmodule.c: Add version parameter.
1928 * girepository/gtypelib.c: Update header size.
1929 * giscanner/ast.py: Add version to Namespace.
1930 * giscanner/girparser.py: Parse version attribute from
1931 XML, pass to Namespace.
1932 * giscanner/girwriter.py: Write out version parameter.
1933 * giscanner/transformer.py: Clean up include registration.
1934 * tests/*: Add version attribute.
1935 * tests/invoke/invoke.c: Don't try looking up test before
1936 it's loaded in repository.
1937 * tools/generate.c: Output version parameter.
1938 * gir/Makefile.am: Add 2.0 version to .gir files.
1940 2008-10-11 Colin Walters <walters@verbum.org>
1942 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1943 if we have mismatched parens.
1945 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1947 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1948 on 'members' variable.
1950 2008-10-11 Colin Walters <walters@verbum.org>
1952 Bug 555947 - update annotations syntax
1954 * giscanner/ast.py: Default to None for transfer. Remove
1955 default transfers for container types; we require this to
1957 * giscanner/girwriter.py: Transfer is now 'none', 'container',
1958 'full' to match repository.
1959 * giscanner/scannerlexer.l: Annotations now are parenthesized.
1960 * giscanner/transformer.py: Update for new annotations syntax.
1963 2008-10-11 Johan Bilien <jobi@litl.com>
1965 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1967 2008-10-11 Johan Bilien <jobi@litl.com>
1969 Bug 552347: Parse #defines constants
1971 * girepository/gtypelib.c: update the list of value_size
1972 with recently defined type tags
1973 * giscanner/scannerparser.y: brought back parsing of #defined, as
1974 present in older version
1975 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1976 * giscanner/girwriter.py: write out constant tags in the gir
1977 * giscanner/sourcescanner.py: add accessor for const_string
1978 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1981 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
1983 Bug 555946: Install a test module exercising all types, transfer
1988 * tests/types/*: Add and install a test module that has functions
1989 accepting and returning most of the basic types to enable bindings
1990 implementors to more easily test their type conversion routines.
1992 2008-10-11 Jürg Billeter <j@bitron.ch>
1994 Bug 552374: Const strings should be identified in the gir.
1996 * giscanner/transformer.py: support string memory management
1997 * tests/scanner/foo.h: use char * and const char *
1998 * tests/scanner/foo-expected.gir: test that
2000 2008-10-11 Johan Dahlin <johan@gnome.org>
2002 * giscanner/girparser.py:
2003 Also parse enums which are not glib types.
2005 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2007 Bug 552370: add one more test for unsigned as a type, not as
2010 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
2011 * test/scanner/foo.h: add function which uses unsigned as a type.
2012 * test/scanner/foo-expected.gir: test that.
2014 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
2016 Bug 555712: Struct and union issues
2018 * giscanner/scannerparser.y (struct_declarator): Use information
2019 provided about the bit width of a field.
2020 * giscanner/transformer.py (Transformer._create_member): Pass the
2021 symbol's const_int member to the created field (it represents the
2023 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
2024 field attribute, if present.
2025 * giscanner/ast.py (Field): Add 'bits' member, specifying the
2026 width in bits of the field (only relevant for bitfields).
2029 * giscanner/transformer.py (Transformer._create_typedef_struct)
2030 (Transformer._create_typedef_union): Add calls to _create_struct()
2031 and _create_union(), respectively. This causes the scanner to
2032 generate output for fields of struct and union typedefs.
2035 2008-10-11 Jürg Billeter <j@bitron.ch>
2037 Bug 552370: unsigned not scanned properly
2039 * giscanner/scannerparser.y: combine basic types such as unsigned
2040 int and long long when scanning
2041 * tests/scanner/foo-expected.gir:
2042 * tests/scanner/foo.c: (foo_test_unsigned):
2043 * tests/scanner/foo.h: test that
2045 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2047 Bug 554854: The --typelib-xml and --inject options should reuse
2048 giscanner parser/writer.
2050 * giscanner/ast.py: add constructor list to Struct and Union.
2051 Add new param in Return's contructor to define transfer.
2052 * giscanner/girparser.py: several additions to the parser in order
2053 to have parsing all nodes of the gir xml files.
2054 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
2055 and writer in --inject and --typelib-xml options.
2056 * giscanner/xmlwriter.py: ignore empty attributes instead of
2057 raising an error as this basically exposes a bug in GIRParser.
2058 This should be reverted as soon as the parser is fixed.
2060 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2062 Bug 552376: scanner generates wrong names for enum members when
2063 there's no defined gtype.
2065 * giscanner/utils.py (strip_common_prefix): Always strip common
2066 prefix exactly up to the last "_", and not beyond.
2067 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
2068 here is that the first character after the last '_' should should be
2069 the same as the character in the same position on the type name.
2070 * tests/scanner/foo-expected.gir: test that
2072 2008-10-10 Lucas Rocha <lucasr@gnome.org>
2074 Bug 555293: append library_paths to LPATH env variable to work
2075 around a bug in find_library when using ldconfig.
2077 * tools/g-ir-scanner (main): ditto.
2079 2008-10-09 Lucas Rocha <lucasr@gnome.org>
2081 * girepository/girepository.c (register_internal): fix regression on
2082 invoke test case by making sure we load the global module in the
2083 typelib when dealing with inline typelibs.
2084 * girepository/gtypelib.c: a couple of coding style fixes.
2086 2008-10-06 Lucas Rocha <lucasr@gnome.org>
2088 Bug 555294: Add support for multiple shared libraries per typelib.
2090 * girepository/ginvoke.c (g_function_info_invoke),
2091 girepository/ginfo.c(g_registered_type_info_get_g_type): use
2092 g_typelib_symbol instead of g_module_symbol.
2093 * girepository/girepository.h: remove g_typelib_set_module and add
2095 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
2096 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
2097 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
2098 modules instead of just one. The symbol lookup is now abstracted
2099 behind g_typelib_symbol which tries to find the passed symbol name in
2101 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
2102 and write shared_library attribute as a comma-separated list of libs.
2104 2008-10-06 Colin Walters <walters@verbum.org>
2106 * giscanner/transformer.py: Parse length= annotation as
2107 a parameter name, not a raw int.
2110 2008-10-03 Colin Walters <walters@verbum.org>
2112 Bug 551744: Non-GObject types aren't aggregating ctors and methods
2114 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
2116 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
2120 2008-10-03 Colin Walters <walters@verbum.org>
2122 Bug 554576: scan problem with ev_selection_render_selection()
2124 * giscanner/transformer.py: Only do type resolution once we've
2125 scanned all types. What could happen before is that we'd strip
2126 the namespace from local type "EvSelection" => Selection, and
2127 then later pull a "Selection" from some other namespace because
2128 we hadn't yet seen the local EvSelection. This could come
2129 down to hash table ordering and other things so not easy
2130 to write a test for.
2132 2008-10-03 Lucas Rocha <lucasr@gnome.org>
2134 * giscanner/girwriter.py (_parser_member): fix the last parameter of
2135 GLibEnumMember constructor as it should be the enum member nick.
2137 2008-10-02 Colin Walters <walters@verbum.org>
2139 Bug 552961: remove this parameter for methods
2141 * giscanner/glibtransformer.py: Delete this parameter; it is
2143 * girepository/ginvoke.c: Insert this parameter for methods.
2144 * girepository/gtypelib.c: Remove no longer needed verification of
2145 method this parameter.
2148 2008-09-30 Dan Winship <danw@gnome.org>
2150 Bug 554490: g-ir-scanner gets confused by '\\'
2152 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
2153 backslashes so it will correctly parse '\\' and "\\"
2155 * tests/scanner/annotation.c: add a use of '\\' to make sure that
2158 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
2160 2008-10-02 Colin Walters <walters@verbum.org>
2162 bug 552393: Note variadic functions
2164 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
2165 to use parameter_list directly.
2166 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
2167 * giscanner/ast.py: Add Varargs type.
2168 * giscanner/transformer.py: Check for ellipsis symbol, transform
2170 * girepository/girnode.h: Add varargs flag to in-memory nodes.
2171 Parse varargs functions, but filter them out before we start
2172 compiling the typelib.
2174 2008-10-02 Colin Walters <walters@verbum.org>
2176 Bug 554632: type tag for GType
2178 * girepository/girepository.h, girepository/girepository.c:
2179 Add type tag for GType - it's a special type we don't want
2180 to resolve to just "long".
2181 * docs/typelib-format.txt: Update.
2182 * girepository/girparser.c: Parse it.
2183 * giscanner/glibtransformer.py: Ensure we don't put GType in
2185 * tools/generate.c: Remove hardcoded type list.
2188 2008-09-30 Dan Winship <danw@gnome.org>
2190 Bug 554521: scanner generates wrong names for enum members with
2191 full type name prefix
2193 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
2194 right amount when the entire "first" string is a prefix of
2197 * tests/scanner/foo.h (FooEnumFullname):
2198 * tests/scanner/foo-expected.gir: test that
2200 2008-09-29 Colin Walters <walters@verbum.org>
2202 Bug 552380: Array parameters should be marked in the gir
2204 * giscanner/ast.py: Default char** to utf8[], and guchar* to
2205 uint8[]. Add Array, List, and Map subclasses of Type;
2206 these types can be generic. Return transfer defaults
2207 to true if return value is string or container type.
2208 Delete Sequence type.
2209 * giscanner/scannerlexer.l: Syntax change for annotations;
2210 use <> since it's more readable.
2211 * giscanner/girwriter.py: Write out these changes.
2212 * giscanner/girparser.py: Parse them.
2213 * giscanner/transformer.py: Have a defined set of
2214 both list and map types. When creating a type,
2215 check if the ctype we've parsed is one of them,
2216 if so create a container type subclass as appropriate.
2217 * girepository/girparser.c: Parse in generic types.
2220 2008-09-27 Colin Walters <walters@verbum.org>
2222 * tools/g-ir-scanner: Add --inject option.
2224 2008-09-25 Colin Walters <walters@verbum.org>
2226 Remove non-repository types from GIR
2228 * giscanner/ast.py: The canonical name is 'utf8', not
2230 * giscanner/glibast.py: A few more glib type mappings.
2231 * girepository/girparser.c: We only parse repository types.
2232 * tests/*.gir: Update.
2234 2008-09-23 Colin Walters <walters@verbum.org>
2236 Bug 552566: Add time_t type
2238 We need a type for time_t since it's special in C, and just
2239 mapping it to long precluded bindings from handling it
2242 2008-09-19 Colin Walters <walters@verbum.org>
2244 Bug 552390: Handle capitialization like "DBus" more robustly
2246 The to_underscores function was designed for use against prefixed
2247 names; we need a separate function which will convert names like
2248 DBusFoo into dbus_foo, not d_bus_foo.
2250 2008-09-19 Colin Walters <walters@verbum.org>
2252 Add check to make sure we're not hitting out unresolved types
2254 Validate the "this" argument for methods
2256 Remove heuristic matching of methods to classes based on prefix
2258 It was a broken hack that dated from when we handled underscoring
2259 and capitalization conventions less well.
2261 2008-09-18 Colin Walters <walters@verbum.org>
2263 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
2265 On Darwin, the suffix for installed shared libraries (.dylib) is
2266 different from loadable modules (.so). We use a bit of magic shell
2267 script from Behdad Esfahbod to figure out the right suffix.
2269 2008-09-15 Johan Dahlin <johan@gnome.org>
2271 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
2272 a wrapper for type_qualifier as well.
2274 2008-09-15 Colin Walters <walters@verbum.org>
2276 http://bugzilla.gnome.org/show_bug.cgi?id=552065
2278 * giscanner/ast.py: Add deprecation attributes.
2279 * giscanner/girwriter.py: Write out deprecation data.
2280 * girepository/girparser.c: Relax parsing; deprecated
2281 attribute now includes freeform string.
2282 * giscanner/scannerlexer.l: Parse Deprecated.
2283 * giscanner/transformer.py: Look for deprecated attribute
2285 * tests/scanner/*: Add a Deprecated test.
2287 2008-09-14 Tor Lillqvist <tml@novell.com>
2289 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
2291 2008-09-14 Colin Walters <walters@verbum.org>
2293 * giscanner/glibtransformer.py: Ignore functions with
2296 2008-09-12 Colin Walters <walters@verbum.org>
2298 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
2300 2008-09-12 Colin Walters <walters@verbum.org>
2302 * giscanner/ast.py: Bind pid_t to INT for vte.
2304 2008-09-12 Colin Walters <walters@verbum.org>
2306 * giscanner/girparser.py: Parse c:type for boxed records/unions.
2307 * giscanner/glibast.py: Avoid overwriting ctype.
2308 * giscsanner/transformer.py: Try resolving types using the GType names.
2310 2008-09-12 Colin Walters <walters@verbum.org>
2312 * giscanner/minixpath.py: Code to run an "XPath"
2313 assertion against an XML tree, taken from
2314 gir-repository/gir/tests.py.
2315 * giscanner/Makefile.am: Ship it.
2316 * tools/g-ir-scanner: Add --xpath-assertions option.
2317 * gir/GLib-assertions.txt: Add a few assertions.
2318 * gir/Makefile.am: Run them.
2320 2008-09-11 Colin Walters <walters@verbum.org>
2322 http://bugzilla.gnome.org/show_bug.cgi?id=551737
2324 * giscanner/transformer.py: Fix strip_namespace_func to only strip
2325 prefix if it ends with _. Tweak callback stripping to determine
2326 based on presence of _ whether we need to use strip_namespace_func
2327 or strip_namespace_object.
2329 2008-09-09 Owen Taylor <otaylor@redhat.com>
2331 * docs/typelib-format.txt: Wether => Whether
2333 2008-09-08 Colin Walters <walters@verbum.org>
2335 * girepository/girparser.c: Default to "readable" for properties.
2336 * giscanner/ast.py: Add readable, writable etc.
2337 * giscanner/girwriter.py: Writ them.
2338 * giscanner/glibtransformer.py: Inspect them.
2341 2008-09-07 Colin Walters <walters@verbum.org>
2343 * giscanner/cgobject.py: Add comment.
2345 2008-09-07 Colin Walters <walters@verbum.org>
2347 * giscanner/cgobject.py: Also call g_thread_init.
2349 2008-09-07 Colin Walters <walters@verbum.org>
2351 * giscanner/transformer.py: Fix regression by not
2352 stripping prefix before stripping namespace for unions
2355 2008-09-06 Colin Walters <walters@verbum.org>
2357 * giscanner/transformer.py: If a namespace contains
2358 multiple caps, try stripping both gnomekeyring_ and
2361 2008-09-07 Johan Dahlin <johan@gnome.org>
2363 Bug 551162 – giscanner does not recognize asm and __asm__
2364 * giscanner/scannerlexer.l:
2365 Patch by Jani Monoses.
2367 2008-09-06 Colin Walters <walters@verbum.org>
2369 * girepository/girnode.c: Allow gtype_name
2370 and gtype_init in struct and union.
2371 * girepository/girparser.c: Parse glib:
2372 boxed bits for both structure and union.
2373 * girepository/gtypelib.c: Don't barf
2374 if structure is boxed.
2375 * giscanner/girparser.py: Parse new XML
2377 * giscanner/girwriter.py: Write out new
2379 * giscanner/glibast.py: Define new classes
2380 which are both Boxed and Struct/Union, as
2381 well as an "Other" for everything else.
2382 * giscanner/glibtransformer.py: Handle
2383 boxed types specially; we try to merge
2384 them with a struct/union if one exists,
2385 otherwise fall back to generic boxed.
2387 * tools/generate.c: Write out new format.
2389 2008-09-06 Johan Dahlin <johan@gnome.org>
2391 * giscanner/grealpath.h: Include stdlib.h
2393 * docs/g-ir-generate.1: Remove leading %
2395 2008-09-01 Colin Walters <walters@verbum.org>
2397 * girepository/girparser.c: Look at c:type to determine
2398 whether or not an item is a pointer.
2400 2008-09-01 Johan Dahlin <johan@gnome.org>
2402 * tests/scanner/Makefile.am:
2403 Set PYTHONPATH so the scanner can run
2404 even if you didn't install anything.
2406 2008-09-01 Johan Dahlin <johan@gnome.org>
2409 Post-release version bump
2412 2008-09-01 Johan Dahlin <johan@gnome.org>
2416 2008-08-31 Colin Walters <walters@verbum.org>
2418 * giscanner/glibtransformer.py: Quiet info
2421 2008-08-31 Johan Dahlin <johan@gnome.org>
2424 Bump version to 0.5.0
2426 2008-08-31 Colin Walters <walters@verbum.org>
2428 * giscanner/glibtransformer.py: Follow aliases to ensure
2429 we don't get a constructor returning a basic type.
2430 * giscanner/transformer.py: Add function to follow aliases.
2433 2008-08-31 Johan Dahlin <johan@gnome.org>
2435 * giscanner/scannerlexer.l:
2436 * giscanner/scannerparser.y:
2437 * giscanner/sourcescanner.h:
2438 * giscanner/sourcescanner.py:
2439 Parse GCC extensions in the parser instead of just undeffing them
2440 in the pre-processor.
2442 2008-08-31 Johan Dahlin <johan@gnome.org>
2444 * giscanner/glibtransformer.py:
2445 Clean up a huge if. Do not add methods or constructors
2447 * giscanner/utils.py:
2448 second might be longer than first, check that.
2450 2008-08-31 Johan Dahlin <johan@gnome.org>
2455 2008-08-31 Colin Walters <walters@verbum.org>
2457 * girepository/girparser.c: Don't lose if we
2460 2008-08-31 Colin Walters <walters@verbum.org>
2462 * giscanner/glibtransformer.py: Look for libtool
2463 library in current directory
2464 * tests/scanner - Update.
2466 2008-08-30 Colin Walters <walters@verbum.org>
2468 * docs/typelib-format.txt: Add a guint32
2470 * gir/Makefile.am: Dep on Makefile
2471 * girepository/ginfo.c:
2472 * girepository/girepository.c: Clean up
2473 default typelib handling; remove global
2474 default_typelib variable. Ensure we handle
2475 NULL repository in more places.
2476 Support dependency resolution.
2477 Support lazy loading.
2478 * girepository/girepository.h: Remove
2479 g_irepository_unregister; we don't support
2480 unloading typelibs since really they're
2481 process-global. Update for lazy loading
2483 * girepository/girmodule.c: Use g_new0.
2484 Add dependencies to GirModule.
2485 * girepository/girparser.c: Parse dependencies.
2486 * girepository/gtypelib.c: Add 4 bytes for
2488 * tests/Makefile.am: Kill off gobject.gir,
2489 it conflicts with the real one.
2490 * tests/object.gir: Dep on GObject.
2491 * tools/generate.c: Take --includedir
2492 argument to say which directories to search
2493 for typelibs. Print out dependencies.
2495 2008-08-30 Colin Walters <walters@verbum.org>
2497 * giscanner/glibtransformer.py: Reduce warning noise.
2499 2008-08-29 Colin Walters <walters@verbum.org>
2501 * girepository/ginfo.c: Add some assertions regarding
2502 refcounts, just to be sure.
2503 * giscanner/glibtransformer.py: Blacklist a few more
2506 2008-08-29 Colin Walters <walters@verbum.org>
2508 * giscanner/glibtransformer.py: Blacklist a few
2509 functions that use GError oddly
2511 2008-08-29 Colin Walters <walters@verbum.org>
2513 * girepository/gtypelib.c: Don't crash if no
2516 2008-08-29 Colin Walters <walters@verbum.org>
2518 * girepository/girparser.c: Handle chains of aliases
2519 across modules by ensuring we fully qualify aliases
2522 2008-08-29 Colin Walters <walters@verbum.org>
2524 * girepository/girparser.c: Don't search aliases
2527 2008-08-29 Colin Walters <walters@verbum.org>
2529 * girepository/girparser.c: Rewrite type parsing
2530 to handle both GLib parsing case as well as correctly
2531 handling GLib.List and friends. Don't try to treat
2532 e.g. ListStore as a List.
2534 2008-08-29 Colin Walters <walters@verbum.org>
2536 * girepository/gtypelib.c: Add more context
2539 2008-08-29 Colin Walters <walters@verbum.org>
2541 * giscanner/glibtransformer.py: Add some informative
2542 logging messages in corner cases. Be sure we use
2543 the most recent node set instead of a cache
2544 when generating result set.
2545 * tests/: Remove duplicated bits in expected girs
2546 * girepository/girparser.c: Accept both List (for
2547 compiling GLib) and GLib.List (what the scanner
2550 * tools/generate.c: Generate canonical form.
2552 2008-08-29 Johan Dahlin <johan@gnome.org>
2554 * giscanner/config.py.in:
2555 Use datarootdir instead of datadir to avoid
2556 an autoconf warning.
2558 2008-08-29 Johan Dahlin <johan@gnome.org>
2562 * examples/gdk-pixbuf.gidl:
2564 Update and remove old cruft.
2566 2008-08-29 Johan Dahlin <johan@gnome.org>
2569 * docs/g-ir-compiler.1:
2570 * docs/g-ir-generate.1:
2571 * docs/g-ir-scanner.1:
2572 Add man pages for the generator and compiler.
2574 2008-08-29 Johan Dahlin <johan@gnome.org>
2576 * docs/g-ir-scanner.1: Document
2578 * giscanner/Makefile.am:
2579 * giscanner/gidlparser.py:
2580 * giscanner/gidlwriter.py:
2581 * tools/g-ir-scanner:
2582 Remove gidl support.
2584 2008-08-28 Colin Walters <walters@verbum.org>
2586 * tests/scanner/Makefile.am: Pass the right
2587 --includedir args. Add a Makefile dep.
2588 * tools/compiler.c: Pass includedirs down.
2589 * girepository/girparser.c: Actually put
2590 includedirs in context, pass down. Fix
2593 2008-08-28 Colin Walters <walters@verbum.org>
2595 * gir/Makefile.am: Use --includedir
2596 * girepository/girparser.c: Recursively parse
2597 includes to pull in aliases and expand them.
2598 We need this to avoid putting unknown names in
2600 * tools/compiler.c: Add --includedir option.
2601 * giscanner/ast.py: Map size/ssize to types
2604 2008-08-28 Tor Lillqvist <tml@novell.com>
2606 Make check now runs successfully on Windows.
2608 * tools/compiler.c (write_out_typelib): Use binary mode for output
2611 * girepository/girnode.c: Don't print NULL strings.
2613 * tests/invoke/Makefile.am
2614 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2615 convince libtool to build shared libraries.
2617 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2618 g_assert() instead of printing out expected errors.
2620 2008-08-28 Tor Lillqvist <tml@novell.com>
2622 * girepository/gtypelib.h: Change type of bitfield fields from
2623 guint to the most suitable smaller type. This makes the struct
2624 sizes match the ones on Linux that the sanity check expects when
2625 using gcc -mms-bitfields on Windows.
2627 2008-08-28 Johan Dahlin <johan@gnome.org>
2632 * giscanner/Makefile.am:
2633 * tests/Makefile.am:
2634 * tests/scanner/Makefile.am:
2635 Make distcheck pass.
2637 2008-08-27 Johan Dahlin <johan@gnome.org>
2639 * giscanner/Makefile.am:
2640 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2642 2008-08-27 Tor Lillqvist <tml@novell.com>
2644 Make g-ir-scanner work on Windows. Still problems with the typelib
2645 code. Changes okayed by jdahlin.
2647 * configure.ac: Check for Windows, set Automake conditional
2648 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2649 avoid shell quoting issues
2651 * girepository/Makefile.am: Use -no-undefined so that libtool
2652 agrees to build a shared library on Windows.
2654 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2655 Windows. Empty implementation on Windows so far.
2657 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2658 informative error message for the assertion failures. Tell also
2659 what the expected size of the struct is. Check all sizes first and
2660 fail afterwards if at least one size was different from expected.
2662 * tools/Makefile.am: Reorder libraries into proper logical
2665 * tools/generate.c: Don't include <dlfcn.h>, not used.
2667 * giscanner/Makefile.am: On Windows, link with the Python library,
2668 and install the module DLL as _giscanner.pyd. Remove the
2669 unnecessary import library and libtool library that libtool has
2672 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2673 and just skip it. Recognize also two "l" suffixes for long long
2674 constants. Recognize also __inline__.
2676 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2677 GetFullPathName(). As such, GetFullPathName() does more than the
2678 UNIX realpath(). It also changes relative paths into absolute
2679 paths. But for our purposes that shouldn't matter.
2681 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2682 Windows the file descriptor passed to us is from Python. Python
2683 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2684 uses msvcrt.dll. On Windows, file descriptors are specific to
2685 which C library is used. So we must find out what underlying OS
2686 handle corresponds to the file descriptor Python passes us, and
2687 then make that into a file descriptor valid for the C library this
2690 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2691 __attribute__ as the lexer now handles it. The definition as empty
2692 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2693 __attribute__. Close the temp file before unlinking it.
2695 * giscanner/cgobject.py: Use correct library name for the gobject
2698 * gir/Makefile.am: Must pass the full basename of the DLLs on
2699 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2700 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2701 reality they won't change, until there is a GLib 3, and then also
2702 the Unix code here needs changing.
2704 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2707 2008-08-26 Colin Walters <walters@verbum.org>
2709 * girepository/girepository.c: Search
2710 $DATADIR/girepository instead of
2711 $DATADIR/gitypelibs; this naming makes
2712 it clearer that e.g. jgir can install
2714 * gir/Makefile.am: Install there.
2716 2008-08-26 Colin Walters <walters@verbum.org>
2718 * girepository/gtypelib.c (_g_typelib_init): Also
2719 use G_MODULE_SUFFIX instead of hardcoding .so.
2721 2008-08-26 Colin Walters <walters@verbum.org>
2723 * girepository/gtypelib.c (_g_typelib_init): Free
2724 string in the right place.
2726 2008-08-26 Colin Walters <walters@verbum.org>
2728 * girepository/gtypelib.c (_g_typelib_init): Handle
2729 both .la and .so names; this works better in the
2730 uninstalled library case.
2732 2008-08-26 Johan Dahlin <johan@gnome.org>
2735 * giscanner/Makefile.am:
2736 * giscanner/cgobject.py:
2737 * giscanner/config.py.in:
2738 * giscanner/sourcescanner.py:
2739 Avoid undeffing __GNUC__, instead define
2740 __attribute__ & friends. Remove glibconfig.h hack.
2741 This makes gobject-introspection work better on
2742 MacOS X, Thanks to Richard Hult for kind help.
2744 2008-08-25 Colin Walters <walters@verbum.org>
2746 * giscanner/glibtransformer.py: Always print
2749 2008-08-25 Colin Walters <walters@verbum.org>
2751 * giscanner/glibtransformer.py: Skip over
2752 interfaces we don't know.
2754 2008-08-25 Colin Walters <walters@verbum.org>
2756 * girepository/girparser.c: Parse new implements
2757 syntax, drop gapi one.
2758 * tests/object.gir: Update.
2759 * tools/generate.c: Generate new syntax.
2761 2008-08-25 Colin Walters <walters@verbum.org>
2763 * giscanner/ast.py: Add interfaces property
2765 * giscanner/girwriter.py: Write out implemented
2767 * giscanner/glibtransformer.py: Introspect
2768 implemented interfaces.
2769 * tests/scanner/*: Make FooObject implement
2772 2008-08-25 Colin Walters <walters@verbum.org>
2774 * giscanner/glibtransformer.py: More correctly pair
2775 methods; if we have a symbol that starts with
2776 e.g. hippo_canvas look for a matching HippoCanvas
2777 class before accepting e.g. HippoCanvasImage.
2779 2008-08-24 Colin Walters <walters@verbum.org>
2781 * tools/g-ir-scanner: Filter out unknown options from
2784 2008-08-24 Colin Walters <walters@verbum.org>
2786 * giscanner/glibtransformer.py: Fail with better
2787 error if we can't find library.
2789 2008-08-24 Colin Walters <walters@verbum.org>
2791 * tools/g-ir-scanner: Use subprocess instead of
2792 commands, works on Windows and avoids the evil
2795 2008-08-24 Colin Walters <walters@verbum.org>
2797 * giscanner/glibtransformer.py: Skip over
2798 g_object_get_type from GLib trunk.
2800 2008-08-24 Colin Walters <walters@verbum.org>
2802 * girepository/girepository.c (g_irepository_require):
2803 Don't open shared library here; we already do it
2806 2008-08-24 Colin Walters <walters@verbum.org>
2808 * girepository/gtypelib.c: Add context stack so
2809 when we get an error we can print out nicely
2812 2008-08-24 Johan Dahlin <johan@gnome.org>
2814 * girepository/girparser.c (start_glib_boxed), (start_function),
2815 (start_field), (start_alias):
2816 Refactor a couple of parsing functions to be simpler to follow.
2819 2008-08-24 Johan Dahlin <johan@gnome.org>
2821 * girepository/girparser.c (start_function):
2822 Remove left-over code, checking type of function.
2824 2008-08-23 Colin Walters <walters@verbum.org>
2826 * giscanner/config.py: Define DATADIR.
2827 * giscanner/transformer.py: Look in DATADIR.
2829 2008-08-23 Colin Walters <walters@verbum.org>
2831 * girepository/gtypelib.c: Check constructor
2833 * girepository/girnode.c: Small tweaks.
2834 * girepository/ginfo.c: Calculate signature offsets
2836 * girepository/girparser.c: Remove duplicate
2838 * giscanner/glibtransformer.py: Avoid marking
2839 functions which return a basic type as
2842 2008-08-23 Colin Walters <walters@verbum.org>
2844 * girepository/girparser.c: Ignore <include>.
2845 * giscanner/girparser.py: Parse them.
2846 * giscanner/girwriter.py: Generate them.
2847 * giscanner/transformer.py: Process <include>
2848 recursively. Don't require full path for
2849 includes, look in {$XDG_DATA_DIRS}/gir.
2850 * tools/g-ir-scanner: Pass through includes.
2851 * Makefile.am: Remove extra --include
2853 * *-expected.gir: Add expected includes.
2855 2008-08-23 Johan Dahlin <johan@gnome.org>
2857 * tests/scanner/Makefile.am:
2858 * tests/scanner/annotation-expected.gir:
2859 * tests/scanner/drawable-expected.gir:
2860 Avoid duplication in the Makefile, regenerate with new
2861 namespaces (same as the filename)
2863 2008-08-22 Colin Walters <walters@verbum.org>
2865 * girepository/girnode.c: Don't hardcode integers,
2868 2008-08-22 Johan Dahlin <johan@gnome.org>
2870 * giscanner/sourcescanner.py:
2871 Check for ../gobject-introspection-1.0.pc.in to determine
2872 if we run installed or uninstalled.
2874 2008-08-22 Johan Dahlin <johan@gnome.org>
2877 * giscanner/sourcescanner.py:
2878 Send in undefs/defines via writing it directly to stdin
2879 of cpp instead of via arguments.
2881 2008-08-22 Colin Walters <walters@verbum.org>
2883 * tools/generate.c, tools/compiler.c: Default
2885 * all Makefile.am: Update.
2887 2008-08-22 Colin Walters <walters@verbum.org>
2889 * girepository/girparser.c: Pass through
2890 recursive types. Avoid overwriting errors.
2891 * giscanner/xmlwriter.py: Always write the
2893 * tests/*.gir: Adjust.
2894 * tests/scanner/Makefile.am: Build typelibs,
2895 and generate XML from those. Once we
2896 have a good diff mechanism...
2897 * tests/scanner/*-expected.gir: Add XML
2899 * tools/g-ir-scanner: Accept --typelib-xml
2901 * tools/generate.c: Better defaults for transfer.
2903 2008-08-22 Johan Dahlin <johan@gnome.org>
2907 * giscanner/Makefile.am:
2908 * giscanner/config.py.in:
2909 * giscanner/sourcescanner.py:
2910 Use the generated glibconfig.h for all scanner invokations.
2911 Rename it to glibconfig-scanner.h and install it.
2912 Add a config.py which so far contains the include dir.
2914 2008-08-22 Johan Dahlin <johan@gnome.org>
2917 Replace glibconfig.h with our own, do some replacement
2918 for CPP/C features we do not support
2920 2008-08-22 Colin Walters <walters@verbum.org>
2922 * tools/generate.c (write_callable_info): Fix unref
2925 2008-08-22 Colin Walters <walters@verbum.org>
2927 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2928 * tests/Makefile.am: Support $(DEBUG)
2929 * tools/generate.c: Do immediate close tags if no
2932 2008-08-21 Colin Walters <walters@verbum.org>
2934 * tests/scanner/drawable-expected.gir,
2935 * tests/scanner/drawable.c,
2936 * tests/scanner/drawable.h:
2939 2008-08-21 Colin Walters <walters@verbum.org>
2941 * giscanner/glibtransformer.py: Compute prefix
2942 by searching through the symbol for bits
2943 rather than going directly from ctype; this fixes
2946 2008-08-21 Colin Walters <walters@verbum.org>
2948 * giscanner/glibtransformer.py: Also try squashing
2949 underscores from namespace, fixes webkit_web_view_new.
2951 2008-08-21 Colin Walters <walters@verbum.org>
2953 * giscanner/glibtransformer.py: More ctor work,
2954 avoid having gtk_window_group_new end up under
2957 2008-08-21 Colin Walters <walters@verbum.org>
2959 * giscanner/glibtransformer.py: Much simpler approach
2960 of mapping uscored names to classes.
2961 * giscanner/utils.py: Remove unnecessary function.
2963 2008-08-21 Johan Dahlin <johan@gnome.org>
2965 * girepository/girepository.c (g_irepository_require):
2966 Plug memory leak and avoid using freed memory.
2967 Resolve the whole module path, here as well.
2969 2008-08-21 Colin Walters <walters@verbum.org>
2971 * giscanner/glibtransformer.py: Look up all permutations
2972 of class names when scanning methods/ctors based on
2973 the prefix instead of using the return value. This
2974 associates gtk_window_new with the right class.
2976 2008-08-21 Colin Walters <walters@verbum.org>
2978 * girepository/girmodule.c (g_ir_module_build_typelib):
2979 Revert change to increment header_size; we do that in
2982 2008-08-21 Colin Walters <walters@verbum.org>
2984 * girepository/girnode.c (write_string): Tweak to
2985 use UINT instead of INT. Not likely to matter.
2986 * girepository/girmodule.c (g_ir_module_build_typelib):
2987 Add to header_offset as well for header strings
2988 to match what write_string does.
2989 * girepository/gtypelib.c: Replace is_name with
2990 validate_name, which more strongly validates and
2991 handles errors in a better way. Update all callers.
2992 * giscanner/glibtransformer.py: Handle constructors
2995 2008-08-21 Johan Dahlin <johan@gnome.org>
2997 * gir/Makefile.am (typelibs_DATA): Build and
2998 install the Gio.typelib too
3000 * girepository/gtypelib.c (_g_typelib_init):
3001 Use g_module_build_path to resolve the shlib name
3003 2008-08-21 Colin Walters <walters@verbum.org>
3005 * gir/Makefile.am: CLEANFILES typelibs too.
3007 2008-08-21 Johan Dahlin <johan@gnome.org>
3009 * giscanner/glibtransformer.py:
3010 Do not send .la files through find_library.
3012 2008-08-21 Colin Walters <walters@verbum.org>
3014 * girepository/girparser.c (g_irepository_require):
3015 Fix one small leak in error case.
3017 2008-08-21 Johan Dahlin <johan@gnome.org>
3020 Parse glibconfig.h as well and install the compiled
3023 2008-08-21 Johan Dahlin <johan@gnome.org>
3026 * giscanner/glibtransformer.py:
3027 * tools/g-ir-scanner:
3028 Do not hard-core library names in the Makefile, reuse
3029 ctypes find_library instead.
3031 2008-08-21 Johan Dahlin <johan@gnome.org>
3033 * girepository/girparser.c (resolve_aliases):
3034 Remove compilation warnings
3036 2008-08-21 Johan Dahlin <johan@gnome.org>
3038 * girepository/girepository.c (g_irepository_require):
3039 Rewrap and fix double free bug by leaking a bit.
3041 2008-08-20 Colin Walters <walters@verbum.org>
3043 * girepository/girepository.c: Add new function
3044 g_irepository_get_typelib_path which tells
3045 us from where we loaded a namespace.
3047 2008-08-20 Colin Walters <walters@verbum.org>
3049 * tests/scanner/*-expected.gir: Adjust for
3050 added shared-library.
3051 * giscanner/giwriter.py: Make pylint happy.
3053 2008-08-20 Colin Walters <walters@verbum.org>
3055 * girepository/girmodule.c (g_ir_module_build_typelib):
3056 Calculate size correctly, avoid use-after-free.
3058 2008-08-20 Colin Walters <walters@verbum.org>
3060 * girepository/girepository.c: Remove
3061 g_irepository_register_file in favor of
3062 g_irepository_require. There are two
3063 possible deployment scenarios for typelibs:
3064 First, separate in $DATADIR/gitypelibs/. Second,
3065 they may be embedded in shlibs. However since
3066 the first is now the normal case, the API is
3067 optimized around it.
3069 Refactor internals to look up typelibs for
3070 namespaces just-in-time, but we expect
3071 consumers to call g_irepository_require.
3073 Also, add some docs. No one has died from that
3075 * gir/Makefile.am: Need --library for glib.
3076 * giscanner/girwriter.py: Write out shared-library.
3077 * tools/g-ir-writer: Take the first --library
3078 argument as the target of shared-library. In
3079 the future we should make this nicer with pkg-config
3082 2008-08-20 Colin Walters <walters@verbum.org>
3084 * girepository/girparser.py: And parse them.
3086 2008-08-20 Johan Dahlin <johan@gnome.org>
3088 * giscanner/glibast.py: Add gshort/gushort types
3090 2008-08-20 Colin Walters <walters@verbum.org>
3092 * gir/Makefile.am: Rename .gir files using GI namespace.
3093 * girepository/girepository.c: Use XDG_DATA_DIRS for
3094 looking up typelibs. Also typelibs are now suffixed
3096 * tests/invoke/Makefile.am: Only use metadata.
3097 * girepository/Makefile.am: Remove unnecessary include.
3098 * tests/scanner/Makefile.am: Update using GI namespaces
3099 for scanner includes.
3101 2008-08-20 Colin Walters <walters@verbum.org>
3103 * girepository/transformer.py: Suppress aliases whose
3105 * girepository/ast.py: Define some more aliases.
3107 2008-08-20 Colin Walters <walters@verbum.org>
3109 * girepository/girparser.c: Avoid alias infloops.
3111 2008-08-20 Colin Walters <walters@verbum.org>
3113 * tests/scanner/foo-expected.gir: Fix expected list type.
3115 2008-08-20 Johan Dahlin <johan@gnome.org>
3117 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
3118 Add a workaround for #548689.
3119 We can now compile gtk!
3121 2008-08-20 Colin Walters <walters@verbum.org>
3123 * giscanner/glibtransformer.py: Try to look up
3124 aliases using the c:type too.
3126 2008-08-20 Colin Walters <walters@verbum.org>
3128 * girepository/girparser.c: Parse union fields.
3130 2008-08-20 Johan Dahlin <johan@gnome.org>
3132 * giscanner/ast.py: Make time_t an alias for long
3134 * gir/gio-2.0-good.gir:
3135 * gir/glib-2.0-good.gir:
3136 * gir/gobject-2.0-good.gir:
3138 * giscanner/glibtransformer.py:
3139 Do not delete Class structures, we need them in gdk/gtk.
3140 * tests/scanner/drawable-expected.gir:
3141 * tests/scanner/foo-expected.gir:
3142 * tests/scanner/utility-expected.gir:
3145 2008-08-20 Johan Dahlin <johan@gnome.org>
3147 * tests/scanner/Makefile.am:
3148 * tests/scanner/annotation-expected.gir:
3149 * tests/scanner/annotation.c (annotation_object_class_init),
3150 (annotation_object_init), (annotation_object_method),
3151 (annotation_object_in), (annotation_object_out),
3152 (annotation_object_inout), (annotation_object_inout2),
3153 (annotation_object_inout3), (annotation_object_calleeowns),
3154 (annotation_object_calleesowns), (annotation_object_get_strings),
3155 (annotation_object_with_voidp), (annotation_object_get_objects),
3156 (annotation_object_create_object), (annotation_object_allow_none):
3157 * tests/scanner/annotation.h:
3158 * tests/scanner/foo-expected.gir:
3159 * tests/scanner/foo.c:
3160 * tests/scanner/foo.h:
3161 Split out annotation tests out of foo
3163 2008-08-20 Johan Dahlin <johan@gnome.org>
3165 * tests/scanner/Foo-expected.gir:
3166 * tests/scanner/Makefile.am:
3167 * tests/scanner/foo-expected.gir:
3168 * tests/scanner/foo-object.h:
3169 * tests/scanner/foo.c:
3170 Foo->foo, foo-object.h -> foo.h
3172 2008-08-20 Johan Dahlin <johan@gnome.org>
3174 * tests/scanner/Foo-expected.gir:
3175 * tests/scanner/Makefile.am:
3176 * tests/scanner/drawable-expected.gir:
3177 * tests/scanner/drawable.c (test_drawable_class_init),
3178 (test_drawable_init):
3179 * tests/scanner/drawable.h:
3180 * tests/scanner/foo-object.h:
3181 * tests/scanner/foo.c (foo_boxed_method):
3182 Move the drawable parts out of Foo to its own test.
3184 2008-08-20 Johan Dahlin <johan@gnome.org>
3186 * tests/scanner/Foo-expected.gir:
3187 * tests/scanner/foo-object.h:
3188 * tests/scanner/foo.c (foo_drawable_class_init),
3189 (foo_drawable_init):
3190 Add a based on GdkDrawable which generates
3193 2008-08-19 Colin Walters <walters@verbum.org>
3195 * giscanner/transformer.py: Don't try
3196 to strip prefix before namespace.
3198 2008-08-19 Johan Dahlin <johan@gnome.org>
3200 * giscanner/transformer.py:
3201 * tests/scanner/Foo-expected.gir:
3202 * tests/scanner/foo-object.h:
3203 Add support for typedef void foo type of
3206 2008-08-19 Johan Dahlin <johan@gnome.org>
3209 * giscanner/girwriter.py:
3210 * giscanner/glibtransformer.py:
3211 * giscanner/transformer.py:
3212 * tests/scanner/Foo-expected.gir:
3213 Add basic support for union, base the code much
3214 on Struct. Add a testcase.
3216 2008-08-19 Johan Dahlin <johan@gnome.org>
3218 * tests/scanner/Foo-expected.gir:
3219 * tests/scanner/foo-object.h:
3220 Add a union testcase which the compiler currently
3223 2008-08-19 Johan Dahlin <johan@gnome.org>
3225 * gobject-introspection-1.0.pc.in:
3226 Add a g_ir_compiler variable
3228 2008-08-19 Colin Walters <walters@verbum.org>
3230 * giscanner/ast.py: Rework types to be more closely
3232 * giscanner/girparser.py: Parse more bits.
3233 * giscanner/girwriter.py: Write sequences in a new
3234 way that specifies container type.
3235 * giscanner/glibast.py: Adjust for ast.py changes,
3236 add 'ctype' property to GLibObject and GLibInterface
3237 so we can look things up by it later.
3238 * gicanner/transformer.py: Names is new class holding
3239 the various namespaces we manage. Do not confuse
3240 with Namespace which is toplevel XML node effectively.
3241 Rework all type resolution to go through
3242 _resolve_type_name_1.
3243 * giscanner/glibtransformer.py: Raise UnknownTypeError
3244 instead of ValueError for cleanliness. Add Unresolved
3245 class to mark types whose parent we haven't seen yet.
3246 Use new Names object from transformer.py.
3247 Correctly look up parent=.
3248 Fix type validation to handle sequences.
3249 * tests/scanner/Foo-expected.gir: Update for sequence
3250 work, int instead of int32.
3251 * tools/g-ir-scanner: Add --noclosure option
3252 * gir/Makefile.am: Use --noclosure by default for
3255 2008-08-18 Johan Dahlin <johan@gnome.org>
3257 * gir/gio-2.0-good.gir:
3258 * gir/glib-2.0-good.gir:
3259 * gir/gobject-2.0-good.gir:
3262 2008-08-18 Johan Dahlin <johan@gnome.org>
3265 * giscanner/girparser.py:
3266 * giscanner/girwriter.py:
3267 * giscanner/glibast.py:
3268 * giscanner/glibtransformer.py:
3269 * giscanner/transformer.py:
3270 * tests/scanner/Foo-expected.gir:
3271 * tests/scanner/foo-object.h:
3272 * tests/scanner/utility-expected.gir:
3273 * tests/scanner/utility.h:
3274 Redo type resolving and validation.
3275 Add a couple of new tests.
3276 Patch mostly written by Colin.
3278 2008-08-18 Johan Dahlin <johan@gnome.org>
3281 * giscanner/girparser.py:
3283 * giscanner/transformer.py:
3284 Improve enum parsing for enums without a GType.
3285 Make flags/enum references to other girs work
3286 * giscanner/utils.py:
3288 * tests/scanner/Makefile.am:
3289 * tests/scanner/foo-object.h:
3290 * tests/scanner/utility-expected.gir:
3291 * tests/scanner/utility.h:
3292 Add a new test for external enum references
3294 2008-08-18 Johan Dahlin <johan@gnome.org>
3296 * docs/global-module-registry.txt: Update
3298 * tests/array.gir: Update with new type proposal
3300 * girepository/girepository.c (g_type_tag_to_string):
3301 * girepository/girepository.h:
3302 * girepository/girnode.c (g_ir_node_get_full_size_internal),
3304 * girepository/girnode.h:
3305 Make enum serializing functions public. Clean up some whitespace.
3307 2008-08-17 Johan Dahlin <johan@gnome.org>
3309 * docs/global-module-registry.txt:
3310 Add a document for an on disk module registry format
3312 2008-08-17 Johan Dahlin <johan@gnome.org>
3315 * gir/gio-2.0-good.gir:
3318 2008-08-17 Johan Dahlin <johan@gnome.org>
3321 * gir/glib-2.0-good.gir:
3322 * gir/gobject-2.0-good.gir:
3323 * giscanner/cgobject.py:
3324 * giscanner/glibtransformer.py:
3325 Regenerate GObject & GType.
3326 Avoid warnings when generating gobject-2.0.gir.
3327 Introspect a little more, and skip *_get_type functions.
3329 2008-08-17 Colin Walters <walters@verbum.org>
3331 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
3332 Rename to -good, always generate during build.
3333 * gir/Makefile.am: Ensure .gir files dep on
3334 all scanner sources.
3335 * Makefile.am: Switch build order to ensure
3336 the scanner is ready before we do gir/.
3337 * tools/g-ir-scanner: Look for .git too.
3339 2008-08-17 Johan Dahlin <johan@gnome.org>
3341 * girepository/gtypelib.c (validate_enum_blob):
3342 * giscanner/glibtransformer.py:
3343 * giscanner/transformer.py:
3344 Remove resolve_possible_typedefs, it was unused.
3345 Allow multiple enum values of the sample value in an enum,
3346 since it's actually pretty common.
3347 Register enums so they can be resolved too.
3349 2008-08-16 Johan Dahlin <johan@gnome.org>
3351 * giscanner/girparser.py:
3352 Parse enumeration/bitfield.
3354 2008-08-16 Johan Dahlin <johan@gnome.org>
3356 * giscanner/girparser.py:
3359 2008-08-16 Johan Dahlin <johan@gnome.org>
3361 * giscanner/glibtransformer.py:
3362 Resolve type names for alias targets
3363 * giscanner/transformer.py:
3364 Skip FILE* parameters fow now
3366 2008-08-16 Johan Dahlin <johan@gnome.org>
3369 * gir/gobject-2.0.gir:
3372 * tests/scanner/Makefile.am:
3375 2008-08-15 Colin Walters <walters@verbum.org>
3377 * giscanner/glibtransformer.py: Explicitly construct
3378 new list, since we're deleting as we iterate.
3379 Don't delete all structures which end in Class; just
3380 ones which have a paired GObject.
3381 Fix printing of type warning.
3382 * giscanner/transformer.py: Make strip_namespace_object
3383 be the identity function if it doesn't match the
3386 2008-08-15 Colin Walters <walters@verbum.org>
3388 * giscanner/cgobject.py: Define yet more argument
3389 prototypes; fix prototype for g_type_fundamental.
3391 2008-08-14 Johan Dahlin <johan@gnome.org>
3393 * tests/Makefile.am:
3394 * tests/constant.gir:
3395 * tests/gobject.gir:
3397 * tools/generate.c (write_struct_info):
3398 Fix generator for constant/gobject/struct
3400 2008-08-14 Johan Dahlin <johan@gnome.org>
3402 * tests/Makefile.am:
3404 * tools/generate.c (write_enum_info):
3405 Fix generation of enum/bitfields
3407 2008-08-14 Johan Dahlin <johan@gnome.org>
3409 * girepository/girparser.c (start_field), (start_constant),
3410 (start_type), (end_element_handler):
3411 Clear up constant parsing
3416 * tools/generate.c (write_callable_info), (write_function_info),
3417 (write_callback_info), (write_constant_info), (write_signal_info),
3418 (write_vfunc_info), (write_property_info), (write_object_info),
3419 (write_interface_info):
3420 Constants/Signals are handled now.
3422 2008-08-14 Johan Dahlin <johan@gnome.org>
3424 * girepository/girparser.c (start_type):
3425 Don't require c:type.
3426 * tests/Makefile.am:
3429 Update, remove parts we don't support yet
3430 * tests/roundtrips.sh:
3432 * tools/generate.c (write_type_info), (write_field_info),
3433 (write_callable_info), (write_struct_info):
3434 Make it emit proper gir.
3436 2008-08-14 Johan Dahlin <johan@gnome.org>
3438 * giscanner/transformer.py:
3439 New internal function for adding a new node.
3441 2008-08-14 Johan Dahlin <johan@gnome.org>
3444 Define an internal _H_ variable so we skip parsing both
3445 i18n headers, only one is needed.
3447 Add the glib-2.0.gir too.
3448 * giscanner/glibast.py:
3449 Add gconstpointer as an alias for ANY
3450 * giscanner/transformer.py:
3451 Do not lower case enumeration names per se.
3452 Skip functions which has parameters called 'va_list'
3454 2008-08-14 Colin Walters <walters@verbum.org>
3456 * giscanner/transformer.py: Comment data structures.
3457 Also squash pointers in resolve_type_name to correspond
3458 with what we do for params.
3459 * giscanner/glibtransformer.py: Print warnings in more
3460 situations. Rework checks for method/constructor to
3461 look up in our GType database instead of just checking
3462 for *. Avoid generating <record> for GObject which
3463 duplicate the <class>.
3464 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3467 2008-08-14 Johan Dahlin <johan@gnome.org>
3469 * giscanner/girwriter.py:
3470 * giscanner/glibast.py:
3471 * giscanner/glibtransformer.py:
3472 * giscanner/transformer.py:
3474 * tests/Makefile.am:
3475 Add pyflakes.py and run it in make check.
3476 Update the source code to fix the errors reported by
3479 2008-08-14 Johan Dahlin <johan@gnome.org>
3482 * giscanner/girparser.py:
3483 * giscanner/glibast.py:
3484 * giscanner/glibtransformer.py:
3485 Refactor the parser a bit.
3486 Add parent type to interfaces and update callsites.
3488 2008-08-14 Johan Dahlin <johan@gnome.org>
3490 * giscanner/glibtransformer.py:
3491 * giscanner/utils.py:
3492 Refactor a bit, avoid isinstance and add a method
3493 for each type we parse.
3495 2008-08-14 Johan Dahlin <johan@gnome.org>
3498 * giscanner/girparser.py:
3499 * giscanner/glibtransformer.py:
3500 * tests/Makefile.am:
3501 Run pep8.py in make check, fix old errors.
3503 2008-08-13 Colin Walters <walters@verbum.org>
3505 * giscanner/girparser.py: Parse records.
3507 2008-08-13 Colin Walters <walters@verbum.org>
3509 * gir/Makefile.am: Install again.
3510 * gir/gobject-2.0.gir: Add some more bits.
3512 2008-08-13 Colin Walters <walters@verbum.org>
3514 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3515 * giscanner/girparser.py: Handle aliases.
3516 * giscanner/transformer.py: Record aliases. Make resolver
3517 functions public; we now call into these explicitly from
3518 glibtransformer. Handle resolving aliases.
3519 * giscanner/glibtransformer.py: Separate our internal namespace
3520 from included ones. Call up into transformer's resolver functions.
3522 2008-08-13 Johan Dahlin <johan@gnome.org>
3524 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3525 * girepository/girparser.c (start_class):
3526 * giscanner/glibtransformer.py:
3527 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3529 2008-08-13 Johan Dahlin <johan@gnome.org>
3531 * giscanner/cgobject.py:
3532 Register GInitiallyUnowned
3533 * giscanner/girwriter.py:
3534 * giscanner/glibtransformer.py:
3535 Special case GObject/GInitially owned as they are a bit special to use.
3537 2008-08-13 Colin Walters <walters@verbum.org>
3539 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3540 Object is in GObject namespace.
3542 2008-08-13 Colin Walters <walters@verbum.org>
3544 * giscanner/girparser.py: Fix processing of functions
3547 2008-08-13 Colin Walters <walters@verbum.org>
3549 * giscanner/girparser.py: Parse more than just <class.
3550 * giscanner/glibtransformer.py: Put aliases in a separate
3551 data structure since their name is not canonicall.
3552 * giscanner/transformer.py: Handle resolving type names
3555 2008-08-13 Johan Dahlin <johan@gnome.org>
3557 * tools/g-ir-scanner:
3558 Allow multiple libraries
3559 * giscanner/glibtransformer.py:
3560 Rename load_library to add_library, traverse over all libraries
3561 when trying to resolve a function
3563 2008-08-12 Colin Walters <walters@verbum.org>
3565 * giscanner/transformer.py: Record typedefs as <alias> elements.
3566 Also attempt to look up types in external namespaces.
3567 * giscanner/girwriter.py: Write them.
3568 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3569 checks. Resolve interface methods and properties.
3570 * tests/scanner/foo-object.h: Add a method with typedef.
3571 * tests/scanner/Foo-expected.gir: Update.
3572 * girepository/girnode.c: Debug tweaks.
3573 * girepository/girparser.c: Make a first pass through the XML where we
3574 record all the aliases. This lets us resolve them as we go through the
3576 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3577 from gir-repository.
3579 2008-08-12 Colin Walters <walters@verbum.org>
3581 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3582 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3584 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3586 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3588 2008-08-12 Colin Walters <walters@verbum.org>
3590 * giscanner/glibtransformer.py: Also transform object properties.
3592 2008-08-12 Colin Walters <walters@verbum.org>
3594 * giscanner/glibtransformer.py: Also transform callbacks
3595 and structure field types.
3596 * tests/scanner/Fooe-expected.gir: Update to expect correct
3597 names for callbacks and structs.
3599 2008-08-12 Colin Walters <walters@verbum.org>
3601 * girepository/girparser.c: Handle 'any'.
3602 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3603 Add test for void *.
3605 2008-08-12 Colin Walters <walters@verbum.org>
3607 * giscanner/glibtransformer.py: We need to do type
3608 resolution in a second pass after we've seen all the
3609 enums, records, etc.
3611 2008-08-12 Colin Walters <walters@verbum.org>
3613 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3614 Add enum return value.
3615 * giscanner/glibtransformer.py: Transform function return types
3618 2008-08-12 Colin Walters <walters@verbum.org>
3620 * tests/scanner/Makefile.am: Dep .gir files on scanner
3621 sources too. Also remove @ so we see scanner invocations.
3623 2008-08-12 Colin Walters <walters@verbum.org>
3625 * girepository/girparser.c, girepository/gtypelib.c,
3626 girepository/gtypelib.h, girepository/girnode.c:
3627 Remove usage of (GAPI-oriented) TypeTag in favor of
3628 GITypeTag from girepository.h.
3630 2008-08-10 Colin Walters <walters@verbum.org>
3632 * tests/roundtrips.sh: Use the correct tests.
3634 2008-08-10 Colin Walters <walters@verbum.org>
3636 * giscanner/cgobject.py: Declare/wrap a few more functions.
3637 Fix parameter types for g_object_new and g_type_fundamental.
3639 2008-08-10 Colin Walters <walters@verbum.org>
3641 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3642 us to declare types for both return value and parameters. The
3643 ctypes default of 'int' is bad because it hides 32/64 bit
3644 problems. Convert all existing functions to use it.
3646 2008-08-09 Johan Dahlin <johan@gnome.org>
3648 * giscanner/__init__.py:
3650 * giscanner/cgobject.py:
3651 * giscanner/gidlparser.py:
3652 * giscanner/gidlwriter.py:
3653 * giscanner/girparser.py:
3654 * giscanner/girwriter.py:
3655 * giscanner/glibast.py:
3656 * giscanner/glibtransformer.py:
3657 * giscanner/odict.py:
3658 * giscanner/sourcescanner.py:
3659 * giscanner/transformer.py:
3660 * giscanner/utils.py:
3661 * giscanner/xmlwriter.py:
3662 * tools/g-ir-scanner:
3666 2008-08-09 Johan Dahlin <johan@gnome.org>
3669 * relaxng/c-types.xml:
3670 * relaxng/g-types.xml:
3671 * relaxng/relaxng.rng:
3673 Remove outdated relaxng schemas.
3675 2008-08-09 Johan Dahlin <johan@gnome.org>
3678 Rename metadata to typelib in variable names,
3681 2008-08-09 Johan Dahlin <johan@gnome.org>
3685 Remove old C scanner, which got rewritten in python.
3687 2008-08-09 Johan Dahlin <johan@gnome.org>
3689 * girepository/Makefile.am:
3690 * tools/Makefile.am:
3691 * tools/girmodule.c:
3692 * tools/girmodule.h:
3695 * tools/girparser.c:
3696 * tools/girparser.h:
3697 * tools/girwriter.c:
3698 * tools/girwriter.h:
3699 Move shared *.[ch] files to girepository from tools
3701 2008-08-09 Johan Dahlin <johan@gnome.org>
3703 * tests/Makefile.am:
3706 * tests/constant.test:
3708 * tests/errors.test:
3709 * tests/function.test:
3710 * tests/gobject.test:
3711 * tests/interface.test:
3712 * tests/object.test:
3713 * tests/struct.test:
3718 Rename *.test to *.gir
3720 2008-08-09 Johan Dahlin <johan@gnome.org>
3723 * tests/Makefile.am:
3724 * tests/parser/Foo-expected.gir:
3725 * tests/parser/Makefile.am:
3726 * tests/parser/foo-object.h:
3727 * tests/parser/foo.c:
3728 * tests/parser/utility-expected.gir:
3729 * tests/parser/utility.c:
3730 * tests/parser/utility.h:
3731 * tests/scanner/Makefile.am:
3732 Rename tests/parser to test/scanner
3734 2008-08-08 Colin Walters <walters@verbum.org>
3736 * tests/roundtrips.sh: Use local .gir files again.
3738 2008-08-08 Colin Walters <walters@verbum.org>
3740 * tests/invoke/Makefile.am: .gir file depends on libtool
3743 2008-08-08 Colin Walters <walters@verbum.org>
3745 * tools/girnode.c: Pass through parent node so we can
3746 print the node whose child is NULL, if that occurs.
3748 2008-08-08 Johan Dahlin <johan@gnome.org>
3750 * tests/Makefile.am:
3751 Disable roundtrip tests which are not yet working
3752 * tests/invoke/testfns.gir:
3755 2008-08-08 Johan Dahlin <johan@gnome.org>
3757 * giscanner/girwriter.py:
3759 * giscanner/glibast.py:
3760 * giscanner/glibtransformer.py:
3761 Swap order of members, to keep it consistent with
3764 2008-08-08 Johan Dahlin <johan@gnome.org>
3766 * girepository/gtypelib.c (validate_header):
3767 * girepository/gtypelib.h:
3769 * giscanner/girwriter.py:
3770 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3771 (gi_source_symbol_unref):
3774 * tests/constant.test:
3776 * tests/errors.test:
3777 * tests/function.test:
3778 * tests/gobject.test:
3779 * tests/interface.test:
3780 * tests/invoke/Makefile.am:
3781 * tests/invoke/testfns.xml:
3782 * tests/object.test:
3783 * tests/parser/Makefile.am:
3784 * tests/roundtrips.sh:
3785 * tests/struct.test:
3790 * tools/Makefile.am:
3791 * tools/compiler.c (main):
3792 * tools/generate.c (write_callable_info), (write_function_info),
3794 * tools/gidlmodule.c:
3795 * tools/gidlmodule.h:
3798 * tools/gidlparser.c:
3799 * tools/gidlparser.h:
3800 * tools/gidlwriter.c:
3801 * tools/gidlwriter.h:
3802 * tools/scanner.c (create_node_from_gtype),
3803 (create_node_from_ctype), (g_igenerator_process_properties),
3804 (g_igenerator_process_signals), (g_igenerator_create_object),
3805 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3806 (g_igenerator_create_enum), (g_igenerator_create_flags),
3807 (g_igenerator_process_function_symbol),
3808 (g_igenerator_process_unregistered_struct_typedef),
3809 (g_igenerator_process_struct_typedef),
3810 (g_igenerator_process_union_typedef),
3811 (g_igenerator_process_enum_typedef),
3812 (g_igenerator_process_function_typedef),
3813 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3814 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3815 Merge in the gir-compiler branch.
3816 Thanks to Philip and Colin for their help.
3818 2008-07-26 Colin Walters <walters@verbum.org>
3820 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3821 and g-idl-generate to go along with how we're changing this
3822 module to be installed.
3823 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3825 2008-07-24 Colin Walters <walters@verbum.org>
3827 * girepository/girepository.c (g_irepository_register): Add
3828 environment variable G_IREPOSITORY_VERBOSE so we can print
3829 out what we're doing.
3830 * girepository/girepository.c (g_irepository_register_file):
3831 Add GError error message to g_debug call.
3833 2008-07-08 Jürg Billeter <j@bitron.ch>
3835 * giscanner/glibast.py:
3839 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3841 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3844 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3847 * giscanner/girwriter.py:
3848 * giscanner/transformer.py:
3849 * tests/parser/Foo-expected.gir:
3850 * tests/parser/foo-object.h:
3851 * tests/parser/foo.c (foo_object_allow_none):
3852 Add support for gtk-doc annotations for allow-none.
3855 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3858 * giscanner/girwriter.py:
3859 * giscanner/glibast.py:
3860 * giscanner/glibtransformer.py:
3861 * giscanner/transformer.py:
3862 * tests/parser/Foo-expected.gir:
3863 Start using abstract type instead of the raw C types.
3864 Register a bunch of glib types we care about.
3866 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3871 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3873 * girepository/girepository.c:
3874 * girepository/gtypelib.c:
3875 * girepository/ginfo.c:
3876 * girepository/ginvoke.c:
3877 * girepository/girepository.h:
3878 * girepository/gtypelib.h:
3879 * girepository/gmetadata.c:
3880 * girepository/Makefile.am:
3881 * girepository/gmetadata.h:
3883 * tools/gidlmodule.c:
3886 * tools/gidlmodule.h:
3887 * tools/gidlparser.c:
3889 Renamed GMetadata to GTypelib
3891 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3893 * giscanner/xmlwriter.py:
3894 Improve line wrapping when > 79 charaters
3896 2008-06-05 Jürg Billeter <j@bitron.ch>
3899 * giscanner/girwriter.py:
3900 * giscanner/transformer.py:
3901 Use <type> element for field types
3902 * tests/parser/Foo-expected.gir:
3905 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3907 * giscanner/glibtransformer.py:
3908 Fix a bug which prevented GdkEvent from being generated
3910 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3912 * giscanner/Makefile.am:
3914 * giscanner/girwriter.py:
3915 * giscanner/glibast.py:
3916 * giscanner/glibtransformer.py:
3917 * giscanner/transformer.py:
3918 * giscanner/utils.py:
3919 * tests/parser/Foo-expected.gir:
3920 Improve enum member parsing and introspection
3922 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3924 * giscanner/scannerparser.y:
3925 * giscanner/sourcescanner.h:
3926 * giscanner/sourcescanner.py:
3927 Add a new source type enum for member.
3928 Use __repr__ for improved debugging
3929 * giscanner/girparser.py:
3931 * giscanner/transformer.py:
3932 Improve parsing of struct members.
3933 * tests/parser/foo-object.h:
3936 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3938 * giscanner/xmlwriter.py:
3939 Improve error reporting when trying to quote None.
3940 * giscanner/girparser.py:
3941 Do not print warnings when including more complete .gir files
3942 * giscanner/girwriter.py:
3943 Do not require a name for parameters, add a todo for singletons
3944 * giscanner/glibtransformer.py:
3945 Refactor the way structs are done, add a couple of hacks to allow
3947 * giscanner/transformer.py:
3948 Add enough hacks so cairo, atk and pango.gir can be parsed properly
3949 * gobject-introspection-1.0.pc.in:
3950 Export girdir, so we can access gobject-2.0.gir from outside
3952 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3954 * tools/g-ir-scanner:
3955 * tests/parser/Makefile.am:
3956 Update sys.path before running the parser so we don't have
3957 to setup PYTHONPATH ourselves.
3961 * girepository/Makefile.am:
3962 * giscanner/transformer.py:
3963 * gobject-introspection-1.0.pc.in:
3964 * gobject-introspection.pc.in:
3965 * tools/Makefile.am:
3967 Rename pkg-config name to gobject-introspection-1.0,
3968 Do not installed anything which is not using the gir format.
3969 Disable compililation the old C scanner, but still keep the source
3970 until all the remaning functionallity has been ported.
3972 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3974 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3975 a crash when symbol->indent is NULL.
3977 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3978 a function to convert a CTYPE symbol to a string
3980 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
3983 * giscanner/girwriter.py:
3984 * giscanner/giscannermodule.c
3985 (pygi_source_scanner_append_filename),
3986 (pygi_source_scanner_parse_file):
3987 * giscanner/glibtransformer.py:
3988 * giscanner/sourcescanner.py:
3989 Revert back to using temporary files to send in headers.
3990 Allow Functions to be passed in as callbacks, add a couple
3991 of try/excepts missing features.
3992 We can now scan pango
3994 2008-05-08 Johan Dahlin <johan@gnome.org>
3996 * giscanner/glibtransformer.py:
3997 * giscanner/transformer.py:
3998 Move namespace stripping glibtransformer->transformer
4000 2008-05-08 Johan Dahlin <johan@gnome.org>
4003 * giscanner/girwriter.py:
4004 * giscanner/glibtransformer.py:
4005 * giscanner/transformer.py:
4006 * tools/g-ir-scanner:
4007 Introduce a namespace ast node
4009 2008-05-05 Johan Dahlin <johan@gnome.org>
4011 * giscanner/__init__.py:
4012 * giscanner/sourcescanner.py:
4013 * giscanner/transformer.py:
4014 Move sourcescanner symbols to the sourcescanner module, instead
4015 of in the global __init__ namespace.
4017 2008-05-03 Johan Dahlin <johan@gnome.org>
4019 * giscanner/glibtransformer.py:
4020 * tools/g-ir-scanner:
4021 Handle missing parameters better, allow - and + in .la dlname
4024 2008-05-03 Johan Dahlin <johan@gnome.org>
4026 * giscanner/__init__.py:
4028 * giscanner/girwriter.py:
4029 * giscanner/glibtransformer.py:
4030 * giscanner/transformer.py:
4031 Parse struct fields properly, improve debugging.
4033 2008-04-29 Johan Dahlin <johan@gnome.org>
4036 * giscanner/girwriter.py:
4037 * giscanner/transformer.py:
4038 * tests/parser/Foo-expected.gir:
4040 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
4042 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4045 * docs/g-ir-scanner.1:
4046 * metadata-annotations-proposal.txt:
4047 * metadata-format.txt:
4048 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
4050 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4052 * giscanner/girwriter.py:
4053 * giscanner/glibtransformer.py:
4054 * giscanner/transformer.py:
4055 * giscanner/xmlwriter.py:
4056 * tests/parser/Foo-expected.gir:
4057 * tests/parser/foo-object.h:
4058 Write record/structs to gir file too. Add a couple of tests,
4059 fix an off by one error in xmlwriter.py.
4061 2008-04-28 Johan Dahlin <johan@gnome.org>
4063 * giscanner/xmlwriter.py: Calculate the line length properly,
4064 include the provided extra indentation in the calculation, really.
4066 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4069 * giscanner/glibast.py:
4070 * giscanner/glibtransformer.py:
4071 * giscanner/transformer.py:
4072 * tools/g-ir-scanner:
4073 Add a --strip-prefix and sort out confusion between names and symbols
4074 for functions and struct + derivaties.
4075 Refactor bootstrap of g-ir-scanner, so we can set options on
4076 Transformer() before parsing everything.
4078 2008-04-28 Johan Dahlin <johan@gnome.org>
4080 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
4081 when scanning girepository.h
4083 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
4084 a __GI_SCANNER__ when we run.
4086 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4089 * giscanner/girwriter.py:
4090 * giscanner/glibast.py:
4091 * giscanner/glibtransformer.py:
4092 * tests/parser/Foo-expected.gir:
4093 * tests/parser/utility-expected.gir:
4094 Rename most c:identifier to c:type. Add new ones to
4095 class/interface/enum/boxed.
4097 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4100 * giscanner/girwriter.py:
4101 * giscanner/glibtransformer.py:
4102 * tests/parser/Foo-expected.gidl:
4103 * tests/parser/Makefile.am:
4104 Move c:identifier from return-value to subchild type,
4105 as per Jürgs suggestion
4107 2008-04-28 Johan Dahlin <johan@gnome.org>
4109 * giscanner/girwriter.py:
4110 * tests/parser/Foo-expected.gir:
4111 Write property.type as a child node.
4113 2008-04-27 Johan Dahlin <johan@gnome.org>
4118 * gidl/gobject-2.0.gidl:
4120 * gir/gobject-2.0.gir:
4121 * tests/parser/Makefile.am:
4122 Replace the GObject gidl with a GObject gir.
4124 2008-04-27 Johan Dahlin <johan@gnome.org>
4126 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
4129 * giscanner/xmlwriter.py:
4130 * tests/parser/Foo-expected.gir:
4131 Include indentation in line length calculation
4133 2008-04-27 Johan Dahlin <johan@gnome.org>
4135 * giscanner/girparser.py:
4136 Prettify NS parsing using elementtree.
4138 2008-04-27 Johan Dahlin <johan@gnome.org>
4141 * giscanner/Makefile.am:
4142 * giscanner/girparser.py:
4143 * giscanner/glibtransformer.py:
4144 * tests/parser/Foo-expected.gidl:
4145 * tests/parser/Foo-expected.gir:
4146 * tests/parser/Makefile.am:
4147 * tests/parser/utility-expected.gidl:
4148 * tests/parser/utility-expected.gir:
4149 * tools/g-ir-scanner:
4150 Switch over to GIR as the default format. Add a simple GIDL
4152 Update tests and fix simplify makefiles by depending
4153 on GNU make extensions.
4155 2008-04-27 Johan Dahlin <johan@gnome.org>
4157 * giscanner/xmlwriter.py:
4158 Wrap attributes for lines which are wider than 79 characters
4160 * giscanner/scannerlexer.l:
4161 Allow parenthesis in annotations
4164 * giscanner/gidlwriter.py:
4165 * giscanner/girwriter.py:
4166 * giscanner/glibtransformer.py:
4167 * giscanner/transformer.py:
4168 Add initial sequence support, including annotation.
4169 Refactor type handling a bit.
4171 2008-04-27 Johan Dahlin <johan@gnome.org>
4173 * tests/parser/Foo-expected.gidl:
4174 * tests/parser/foo-object.h:
4175 * tests/parser/foo.c (foo_object_class_init),
4176 (foo_object_get_strings), (foo_object_get_objects):
4177 Add two new functions to check sequence return values.
4178 Also fixes a compilation warning.
4180 2008-04-27 Johan Dahlin <johan@gnome.org>
4182 * giscanner/giscannermodule.c (]): Cast the getter, avoids
4183 a compilation warning.
4185 * tools/Makefile.am (g_ir_scanner_SOURCES):
4186 g-ir-scanner has no sources.
4188 2008-04-25 Johan Dahlin <johan@gnome.org>
4190 * giscanner/Makefile.am:
4192 * giscanner/gidlparser.py:
4193 * giscanner/gidlwriter.py:
4194 * giscanner/girwriter.py:
4195 * giscanner/glibast.py:
4196 * giscanner/glibtransformer.py:
4197 * giscanner/transformer.py:
4198 Split out nodes to ast.py and glibast.py
4200 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4202 * giscanner/Makefile.am:
4203 * giscanner/gidlparser.py:
4204 * giscanner/gidlwriter.py:
4205 * giscanner/girwriter.py:
4206 * giscanner/glibtransformer.py:
4207 * giscanner/gobjecttreebuilder.py:
4208 * giscanner/transformer.py:
4209 * giscanner/treebuilder.py:
4210 * tools/g-ir-scanner:
4211 Rename treebuilder to transformer and
4212 gobjectreebuilder to glibtransformer.
4214 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4216 * giscanner/Makefile.am:
4217 * giscanner/__init__.py:
4218 * giscanner/cgobject.py:
4219 * giscanner/gidlparser.py:
4220 * giscanner/gidlwriter.py:
4221 * giscanner/girwriter.py:
4222 * giscanner/gobjecttreebuilder.py:
4223 * giscanner/odict.py:
4224 * giscanner/sourcescanner.py:
4225 * giscanner/treebuilder.py:
4226 * giscanner/xmlwriter.py:
4227 * tools/Makefile.am:
4228 * tools/g-ir-scanner:
4229 Add LGPLv2 license header and install all python files
4231 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4234 * giscanner/gidlwriter.py:
4235 * giscanner/giscannermodule.c (pygi_source_directive_new),
4236 (directive_get_options), (pygi_source_symbol_new),
4237 (symbol_get_base_type), (pygi_source_type_new),
4238 (type_get_base_type), (type_get_child_list),
4239 (pygi_source_scanner_get_symbols),
4240 (pygi_source_scanner_get_directives):
4241 * giscanner/gobjecttreebuilder.py:
4242 * giscanner/sourcescanner.py:
4243 * giscanner/treebuilder.py:
4244 * tests/parser/foo-object.h:
4245 Add support for virtual methods.
4246 Pair struct FooClass with struct Foo.
4247 Clean up the SourceScanner bindings a bit.
4248 Add a testcase for virtual methods.
4250 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4252 * giscanner/cgobject.py:
4253 * giscanner/gidlwriter.py:
4254 * giscanner/gobjecttreebuilder.py:
4255 Add support for signals
4257 * tests/parser/foo.c (foo_object_class_init):
4258 * Foo-expected.gidl:
4259 Add a signal and update the expected output.
4261 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
4263 * giscanner/gidlwriter.py:
4264 * giscanner/girwriter.py:
4265 * giscanner/giscannermodule.c (directive_get_name),
4266 (directive_get_value), (directive_get_options),
4267 (symbol_get_directives), (symbol_set_directives),
4268 (pygi_source_scanner_parse_file),
4269 (pygi_source_scanner_lex_filename),
4270 (pygi_source_scanner_get_directives), (init_giscanner):
4271 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
4272 * giscanner/sourcescanner.h:
4273 * giscanner/sourcescanner.py:
4274 * giscanner/treebuilder.py:
4275 * tools/g-ir-scanner:
4276 Add support for source/header annotations.
4278 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4280 * giscanner/gidlwriter.py:
4281 * giscanner/girwriter.py:
4282 * giscanner/gobjecttreebuilder.py:
4283 * giscanner/treebuilder.py:
4284 Add support for Callbacks
4286 2008-04-22 Havoc Pennington <hp@pobox.com>
4288 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
4289 not in metadata->module, look for it in the global module, in case
4290 some other object or the app itself provides the symbol.
4292 2008-04-22 Havoc Pennington <hp@pobox.com>
4294 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
4295 dlopening a library that is already in the main app, by checking
4296 whether one of the lib's symbols is already loaded.
4298 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4300 * tests/parser/Foo-expected.gidl:
4301 * tests/parser/foo-object.h:
4304 2008-04-22 Havoc Pennington <hp@pobox.com>
4306 * girepository/ginfo.c (g_interface_info_find_method):
4307 Use interface_blob_size not object_blob_size to compute offset.
4309 2008-04-22 Havoc Pennington <hp@pobox.com>
4311 * girepository/gmetadata.c (_g_metadata_init): remove
4312 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
4313 (Glade and Clutter for example) rely on being loaded globally.
4315 2008-04-22 Havoc Pennington <hp@pobox.com>
4317 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
4318 function to get the GType given a RegisteredTypeInfo
4320 2008-04-22 Johan Dahlin <johan@gnome.org>
4322 * COPYING: Add a LGPL license, to prevent automake to
4323 put in a copy of GPL here. Pointed out by Havoc.
4325 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
4326 (g_type_info_is_pointer), (g_type_info_get_tag),
4327 (g_type_info_get_param_type), (g_type_info_get_interface),
4328 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
4329 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4330 (g_error_domain_info_get_codes), (g_enum_info_get_value),
4331 (g_object_info_get_interface), (g_object_info_get_field),
4332 (g_interface_info_get_prerequisite),
4333 (g_signal_info_get_class_closure), (g_constant_info_get_value):
4334 * girepository/ginvoke.c (get_ffi_type):
4335 * girepository/girepository.h:
4336 * girepository/gmetadata.c (g_metadata_get_dir_entry),
4337 (g_metadata_check_sanity), (validate_header),
4338 (validate_array_type_blob), (validate_iface_type_blob),
4339 (validate_param_type_blob), (validate_error_type_blob),
4340 (validate_type_blob), (validate_constant_blob),
4341 (validate_struct_blob), (validate_enum_blob):
4342 * girepository/gmetadata.h:
4343 * tests/Makefile.am:
4344 * tests/invoke/Makefile.am:
4345 * tests/invoke/invoke.c (main):
4346 * tests/roundtrips.sh:
4347 * tools/Makefile.am:
4348 * tools/compiler.c (format_output), (write_out_metadata), (main):
4349 * tools/generate.c (write_type_name), (write_type_info),
4350 (write_constant_value), (write_enum_info), (load_metadata), (main):
4351 * tools/gidlcompilercontext.c:
4352 * tools/gidlcompilercontext.h:
4353 * tools/gidlcompilerentrynode.c:
4354 * tools/gidlcompilerentrynode.h:
4355 * tools/gidlcompilertypenode.c:
4356 * tools/gidlcompilertypenode.h:
4357 * tools/gidlmodule.c (g_idl_module_build_metadata):
4358 * tools/gidlmodule.h:
4359 * tools/gidlnode.c (init_stats), (dump_stats),
4360 (g_idl_node_get_size), (g_idl_node_get_full_size),
4361 (g_idl_node_cmp), (g_idl_node_can_have_member),
4362 (g_idl_node_add_member), (g_idl_node_param_direction_string),
4363 (parse_int_value), (parse_uint_value), (parse_float_value),
4364 (parse_boolean_value), (find_entry_node), (find_entry),
4365 (serialize_type), (g_idl_node_build_metadata), (write_string):
4367 * tools/gidlparser.c (parse_type_internal):
4368 * tools/quote-file.sh:
4369 Revert revisions 157,149-148,136-129 and 120.
4370 Move back to using g-idl-generate to generate the metadata and
4371 avoids dependency on a c compiler.
4373 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4375 * giscanner/girwriter.py:
4376 * tools/g-ir-scanner:
4377 Add an initial GIR writer and a --format option to g-ir-scanner
4379 2008-04-21 Johan Dahlin <johan@gnome.org>
4381 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4382 gobject-2.0 and raise ImportError if not found.
4384 * giscanner/gidlparser.py:
4385 * giscanner/gidlwriter.py:
4386 * giscanner/gobjecttreebuilder.py:
4387 * tools/g-ir-scanner:
4388 Add a --include argument to include types from other idls.
4389 Add a minimalistic GIDL parser (just objects for now)
4390 Implement resolving of external type references and use it to
4391 resolve parent types, argument types and return types.
4393 2008-04-21 Johan Dahlin <johan@gnome.org>
4395 * giscanner/gidlwriter.py:
4396 * giscanner/gobjecttreebuilder.py:
4397 * giscanner/treebuilder.py:
4398 Add support for properties.
4399 Refactor Class/Interface support a bit, to share more code and
4400 always initialize their method attribute to an empty list.
4402 2008-04-21 Johan Dahlin <johan@gnome.org>
4404 * giscanner/cgobject.py:
4405 Add a workaround for a glib bug interface introspection bug
4406 (object_interface_list_properties, object_class_list_properties):
4407 Cast the return value to GParamSpec.
4409 * tests/parser/Foo-expected.gidl: Update
4410 * tests/parser/foo.c: Add a string property
4412 * giscanner/gobjecttreebuilder.py:
4413 After stripping namespaces, remove the original
4414 item to avoid duplication (GtkButton struct and Button object)
4416 2008-04-21 Johan Dahlin <johan@gnome.org>
4418 * giscanner/gobjecttreebuilder.py:
4419 * giscanner/treebuilder.py:
4420 Strip namespaces before objects, so we'll export
4421 GtkButton as Button in the gtk namespace
4423 2008-04-21 Johan Dahlin <johan@gnome.org>
4425 * giscanner/gidlwriter.py:
4426 * giscanner/gobjecttreebuilder.py:
4427 * giscanner/treebuilder.py:
4428 Add constructors for object/boxed types.
4430 2008-04-21 Johan Dahlin <johan@gnome.org>
4432 * giscanner/gidlwriter.py:
4433 * giscanner/gobjecttreebuilder.py:
4434 Add support for boxed types
4436 2008-04-21 Johan Dahlin <johan@gnome.org>
4438 * giscanner/giscannermodule.c: Mark structures as const,
4439 wrap SourceType.const_string.
4441 * tests/parser/foo-object.h: Add a couple of constants.
4443 * giscanner/gidlwriter.py:
4444 * giscanner/gobjecttreebuilder.py:
4445 * giscanner/treebuilder.py:
4446 Add basic support for interfaces
4448 * tools/g-ir-scanner:
4449 Add -o/--output for writing to a file
4451 2008-04-21 Havoc Pennington <hp@redhat.com>
4453 * TODO: add some C API wishlist items I could think of quickly
4455 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4457 * giscanner/gidlwriter.py:
4458 * giscanner/xmlwriter.py:
4459 Add a simple api for writing tags which can be used
4460 with the new 'with statement' in python 2.5
4462 2008-04-21 Johan Dahlin <johan@gnome.org>
4464 * giscanner/gobjecttreebuilder.py:
4465 Strip namespace and object prefix from method names.
4467 2008-04-21 Johan Dahlin <johan@gnome.org>
4469 * tools/g-ir-scanner (main): Add --pkg option to pass in
4470 pkg-config modules to get cflags from.
4472 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4473 Avoid duplication, reuse function writer for methods.
4475 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4477 * giscanner/gidlwriter.py:
4478 * giscanner/gobjecttreebuilder.py:
4479 * giscanner/treebuilder.py:
4480 * tools/g-ir-scanner:
4481 Resolve libtool .la files.
4482 Strip name spaces for methods.
4483 Add function symbols
4485 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4487 * giscanner/cgobject.py:
4488 * giscanner/gidlwriter.py:
4489 * giscanner/gobjecttreebuilder.py:
4490 * giscanner/treebuilder.py:
4491 Add support for classes and methods
4493 2008-04-20 Johan Dahlin <johan@gnome.org>
4495 * giscanner/gidlwriter.py:
4496 * giscanner/gobjecttreebuilder.py:
4497 * giscanner/odict.py:
4498 Avoid conflicts, keep the output ordered similar to
4499 the order of the input.
4500 Add a simple ordered dictionary implemenation
4502 2008-04-19 Johan Dahlin <johan@gnome.org>
4504 * giscanner/cgobject.py:
4505 * giscanner/gidlwriter.py:
4506 * giscanner/gobjecttreebuilder.py:
4507 * tools/g-ir-scanner:
4508 Start introspecting get-type functions.
4509 Implement support for GLib/GFlags GTypes.
4510 Add a ctype based GObject binding.
4512 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4514 * giscanner/gidlwriter.py:
4515 * giscanner/xmlwriter.py:
4516 * tools/g-ir-scanner:
4517 Add a simplistic gidl writer, which can't do too much.
4519 2008-04-18 Johan Dahlin <johan@gnome.org>
4521 * giscanner/sourcescanner.py:
4522 * giscanner/treebuilder.py:
4523 * tools/g-ir-scanner:
4524 split tree building and source scanning interface to separate files.
4526 2008-04-18 Johan Dahlin <johan@gnome.org>
4528 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4530 - Add support for struct/parameter/return, start parsing of ctypes
4532 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4535 2008-03-31 Johan Dahlin <johan@gnome.org>
4537 * tools/g-ir-scanner:
4538 Start to build abstract syntax node of scanned sources.
4539 Add support for cpp options.
4541 2008-03-27 Johan Dahlin <johan@gnome.org>
4543 * giscanner/giscannermodule.c:
4544 * giscanner/scannerlexer.l:
4545 * giscanner/sourcescanner.c:
4546 * tools/g-ir-scanner:
4548 Add simple pre-processor using subprocess and a PIPE.
4549 Change the parse_file apis to accept a file descriptor.
4551 2008-03-25 Johan Dahlin <johan@gnome.org>
4553 * giscanner/__init__.py:
4554 * tools/g-ir-scanner:
4555 Fix a typo and add an example python test program.
4557 2008-03-25 Johan Dahlin <johan@gnome.org>
4559 * giscanner/__init__.py:
4560 * giscanner/giscannermodule.c:
4561 * giscanner/sourcescanner.c:
4562 * giscanner/sourcescanner.h:
4563 Add constants and wrap a few more SymbolType fields
4565 2008-03-25 Johan Dahlin <johan@gnome.org>
4569 * giscanner/__init__.py:
4570 * giscanner/giscannermodule.c:
4571 * giscanner/Makefile.am:
4573 Add initial python bindings for the scanner and
4574 depend on python 2.5.
4576 2008-03-25 Johan Dahlin <johan@gnome.org>
4580 * giscanner/Makefile.am:
4581 * giscanner/sourcescanner.c:
4582 * giscanner/sourcescanner.h:
4583 * tools/Makefile.am:
4584 * tools/grealpath.h:
4585 * tools/sourcescanner.c:
4586 * tools/sourcescanner.h:
4588 Move the scanner to a separate library.
4590 2008-03-23 Johan Dahlin <johan@gnome.org>
4592 * tools/Makefile.am:
4595 * tools/scannerlexer.l:
4596 * tools/scannerparser.y:
4597 * tools/sourcescanner.c:
4598 * tools/sourcescanner.h:
4599 Split out the source scanner from the generator.
4600 Rename the symbols used in the scanner to use the gi_ prefix.
4601 This should make it possible to use the raw C parser from
4604 2008-03-23 Johan Dahlin <johan@gnome.org>
4606 * tests/parser/Makefile.am (utility.gidl):
4607 * tests/parser/utility-expected.gidl:
4608 Pass in the gobject.gidl since we're defining a GObject.
4610 2008-03-12 Johan Dahlin <johan@gnome.org>
4612 * relaxng/relaxng.rng:
4613 Add a releaxng in relaxng we can use to validate the relaxngs
4616 2008-03-12 Jürg Billeter <j@bitron.ch>
4618 * tools/scanner.c: (g_igenerator_new):
4619 * tools/scannerparser.y:
4620 Fix compiler warnings.
4622 2008-03-12 Jürg Billeter <j@bitron.ch>
4626 * tools/scannerparser.y:
4627 Start fixing memory management in g-idl-scanner.
4629 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4631 * tools/gidlcompilercontext.c: (write_compiled):
4632 Fix critical warning when no shlib passed to g-idl-compiler.
4634 2008-03-12 Johan Dahlin <johan@gnome.org>
4636 * tests/parser/utility-expected.gidl:
4637 * tests/parser/utility.h:
4638 Add a get_type-function, so the scanner actually
4639 parses it as an object.
4641 2008-03-12 Johan Dahlin <johan@gnome.org>
4643 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4646 * tests/parser/Foo-expected.gidl:
4647 * tests/parser/Makefile.am:
4648 * tests/parser/foo-object.h:
4649 * tests/parser/foo.c:
4650 * tests/parser/utility-expected.gidl:
4651 * tests/parser/utility.c:
4652 * tests/parser/utility.h:
4654 Add a new gidl test. 'utility.gidl', which is used to be able
4655 to test external type references. Add a reference to UtilityObject*
4658 2008-03-11 Johan Dahlin <johan@gnome.org>
4662 Remove most global variables
4664 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4666 * tools/scannerlexer.l:
4668 * tests/parser/Foo-expected.gidl:
4669 * tests/parser/foo.c:
4670 * tests/parser/Makefile.am:
4671 * tests/parser/foo-object.h:
4673 Added a few extra tests. Which resulted in finding a few
4674 bugs. Which resulted in me fixing those bugs
4676 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4678 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4679 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4680 Add some comments for strings into generated output for
4683 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4685 * tools/gidlcompilercontext.c: (write_compiled):
4686 Write out the shlibs variable before writing out the strings
4687 length. Fixes compiler warning when using '-l' flag with
4690 2008-03-11 Johan Dahlin <johan@gnome.org>
4692 * tests/parser/Foo-expected.gidl:
4693 * tests/parser/foo-object.h:
4696 * tools/scannerlexer.l:
4697 Add support for parsing return arguments. Add support for
4698 caller-owns return types.
4699 Patch by Philip Van Hoof.
4701 * tools/scannerparser.y:
4702 Remove parsing of the @deprecated syntax used in headers.
4703 We will support gtk-doc deprecation in the future instead.
4705 2008-03-11 Johan Dahlin <johan@gnome.org>
4707 * tools/compiler.c (main): Coding style fixes
4709 2008-03-10 Johan Dahlin <johan@gnome.org>
4712 Add GCOV_LIBS to GILIBS
4714 2008-03-10 Johan Dahlin <johan@gnome.org>
4716 * tests/parser/Foo-expected.gidl:
4717 * tests/parser/foo.c:
4718 Rename null-ok to direction=out
4720 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4722 reviewed and extensively tested by Johan
4724 * tests/parser/Foo-expected.gidl:
4725 * tests/parser/foo-object.h:
4726 * tests/parser/foo.c:
4729 * tools/gidlwriter.c:
4732 * tools/scannerlexer.l:
4733 * tools/scannerparser.y:
4735 Add support for scanning for gtk-doc comments inside
4736 C source files. Add tests
4738 2008-03-10 Johan Dahlin <johan@gnome.org>
4740 * tests/parser/Makefile.am:
4741 * tests/parser/foo.c:
4744 * tools/scannerparser.y:
4745 Add an api to lex filenames.
4746 Lex all source .c files passed in on the command line.
4747 Scan sources in a test and a couple of private structures
4748 which should not be included in the generated gidl
4750 2008-03-10 Johan Dahlin <johan@gnome.org>
4752 * tests/invoke/Makefile.am: Make the generated metadata
4753 depend on the g-idl-compiler
4755 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4757 * tools/gidlmodule.c
4758 * tools/gidlmodule.h
4761 Remove the old g-idl-compiler code.
4764 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4766 * tools/quote-file.sh
4769 Move to using the 'C' struct compiler code.
4771 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4773 * girepository/ginfo.c
4775 Change the way that external references with no namespace
4776 are dealt with. External references with no namespace
4777 are placed into the XML as-if they are a local reference.
4778 This is temporary, but helps with roundtrip tests.
4780 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4782 * girepository/ginfo.c
4783 Add the ability to get the value of a constant of
4784 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4785 is provided as a string.
4787 This would deal properly with:
4788 typedef char* random;
4789 const random = "A string";
4791 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4793 * girepository/ginfo.c
4794 * girepository/girepository.h
4796 Add a function to check if an enum is registered or not.
4797 Previously anything testing this relied on the g-type
4798 string offset having a value of 0.
4800 * girepository/gmetadata.c
4801 * girepository/gmetadata.h
4803 Remove unneccesary or erroneous checks. There were two
4804 metadata validation checks which made sure that the blob
4805 sizes were the same as some magic numbers compiled into the code.
4806 This is wrong as it breaks any forwards compatibility that may
4809 Checks were also present that made sure that unregistered type
4810 blobs had a value of 0 in the g-type offset field. This is
4811 unneccessary. If a type blob is unregistered then any value
4812 in its g-type field is simply invalid.
4814 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4816 * girepository/ginfo.c
4817 * girepository/gmetadata.c
4818 * girepository/gmetadata.h
4820 Change the metadata format to have a standard header
4821 for all the type blobs. Merge the SimpleTypeBlob
4822 and InterfaceTypeBlob into a union. A union of these
4823 two blobs existed previously but was not explicit
4824 in the metadata format.
4826 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4828 * tools/gidlcompilercontext.c
4829 * tools/gidlcompilercontext.h
4830 * tools/gidlcompilerentrynode.c
4831 * tools/gidlcompilerentrynode.h
4832 * tools/gidlcompilertypenode.c
4833 * tools/gidlcompilertypenode.h
4835 Add code to compile a tree of GIdlNodes to
4836 a 'C' struct representing the metadata.
4837 This is to aid cross-compiling. Previously
4838 the g-idl-compiler created a binary blob with
4839 data written in the byte order and alignment
4840 of the tool rather than the intended target.
4842 Cleaned up and improved by Johan and Robert :-)
4844 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4846 * girepository/ginvoke.c
4847 * girepository/girepository.h
4848 * girepository/gmetadata.c
4849 * girepository/gmetadata.h
4851 * tools/gidlparser.c
4852 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4853 to avoid confusion with the interface blob.
4856 * tools/gidlparser.c
4857 Remove magic numbers and replace with type-tag
4858 enumeration symbols.
4860 * girepository/gmetadata.c
4861 Add validate declaration.
4863 2008-03-10 Jürg Billeter <j@bitron.ch>
4865 * tools/gidlparser.c: (parse_type_internal):
4866 * tools/scannerlexer.l:
4867 * tools/scannerparser.y:
4868 Support C99 _Bool type in scanner.
4870 2008-03-10 Jürg Billeter <j@bitron.ch>
4872 * tests/parser/Foo-expected.gidl:
4873 * tests/parser/foo-object.h:
4874 * tests/parser/foo.c: (foo_enum_method):
4875 * tools/scanner.c: (g_igenerator_process_function_symbol):
4876 Don't skip functions that are defined in the namespace of a type
4877 that doesn't support methods, as for example enums.
4879 2008-03-10 Johan Dahlin <johan@gnome.org>
4881 * gidl.dtd: Remove, we're using relaxng for now
4883 * tests/parser/Foo-expected.gidl:
4884 * tests/parser/foo-object.h:
4885 * tests/parser/foo.c:
4886 Rename the enum/flags get_type functions to include the whole type.
4888 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4890 * tools/gidlwriter.c (enum_generate): added "type-name",
4891 "get-type" and "deprecated" missing arguments.
4892 * tests/parser/Foo-expected.gidl:
4893 * tests/parser/foo-object.h: test enum type, and no type.
4895 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4898 Consistent checks, add missing 'test'
4900 2008-03-05 Havoc Pennington <hp@redhat.com>
4902 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4903 does on Fedora 8. Make libffi a hard requirement, since it was in
4904 practice anyway (was not really conditional in the code or
4905 makefile, only in configure).
4907 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4909 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4910 reviewed by: Johan Dahlin <johan@gnome.org>
4912 * tests/Makefile.am:
4913 * tests/roundtrips.sh:
4914 Modify the roundtrips test so that they do not use the
4915 --raw option of the gidl compiler but instead compile a
4916 shared library to use with g_module.
4918 * tests/invoke/Makefile.am:
4919 * tests/invoke/invoke.c:
4920 Modify the invoke tests to build a shared library rather
4921 than use the --raw option.
4923 * tests/invoke/invoke-namespace-find.sh: Removed:
4924 Noone knows why this was here, so removed.
4926 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4928 * tools/scanner.c: (g_igenerator_process_function_symbol):
4929 Move g_idl_node_can_have_member test later, as it broke spotting
4930 get_type's for nodes that can't have members.
4932 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4935 * tools/gidlnode.c: (g_idl_node_can_have_member):
4936 Add g_idl_node_can_have_member.
4938 * tools/scanner.c: (g_igenerator_process_function_symbol):
4939 Use g_idl_node_can_have_member to test if we should add a function
4940 as a member of the type node.
4942 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4944 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4946 * tests/parser/Makefile.am:
4947 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4949 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4951 * tools/scanner.c: (main):
4952 Ignore -pthread when passed to g-idl-scanner.
4954 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4956 * tools/grealpath.h: Added:
4957 * tools/scanner.c: (main):
4958 * tools/scannerlexer.l:
4959 * tools/Makefile.am:
4960 Always use absolute paths with symbolic links resolved when
4961 comparing filenames.
4963 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4965 * gobject-introspection.pc.in:
4966 Provide variables for g-idl-parser, scanner and compiler in the
4969 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
4972 * girepository/Makefile.am:
4973 * tools/Makefile.am:
4974 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4976 2008-02-10 Johan Dahlin <johan@gnome.org>
4978 * tests/parser/Foo-expected.gidl:
4979 * tests/parser/foo-object.h:
4980 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4981 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4984 2008-02-10 Johan Dahlin <johan@gnome.org>
4986 * tests/parser/Foo-expected.gidl:
4987 * tests/parser/foo-object.h:
4988 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4989 Add enum and flags test.
4991 2008-02-10 Johan Dahlin <johan@gnome.org>
4995 * girepository/Makefile.am:
4996 Make 'make distcheck' work again.
4998 2008-02-10 Johan Dahlin <johan@gnome.org>
5000 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
5003 * tests/parser/Makefile.am: Only create Foo.gidl when running make
5004 check, eg exclude it from BUILT_SOURCES.
5006 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5011 * girepository/Makefile.am:
5012 * m4/Makefile.am: Added:
5013 * m4/as-compiler-flag.m4: Added:
5014 * m4/gcov.m4: Added:
5015 * tools/Makefile.am:
5016 Add ability to generate a coverage report.
5017 Adds configure option --enable-gcov and make rule 'check-coverage'.
5019 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5023 * gidl/Makefile.am: Added:
5024 * girepository/Makefile.am: Added:
5025 * src/Makefile.am: Renamed to tools/Makefile.am:
5026 * src/compiler.c: Renamed to tools/compiler.c:
5027 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
5028 * src/generate.c: Renamed to tools/generate.c:
5029 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
5030 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
5031 * src/gidlnode.c: Renamed to tools/gidlnode.c:
5032 * src/gidlnode.h: Renamed to tools/gidlnode.h:
5033 * src/gidlparser.c: Renamed to tools/gidlparser.c:
5034 * src/gidlparser.h: Renamed to tools/gidlparser.h:
5035 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
5036 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
5037 * src/ginfo.c: Renamed to girepository/ginfo.c:
5038 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
5039 * src/girepository.c: Renamed to girepository/girepository.c:
5040 * src/girepository.h: Renamed to girepository/girepository.h:
5041 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
5042 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
5043 * src/scanner.c: Renamed to tools/scanner.c:
5044 * src/scanner.h: Renamed to tools/scanner.h:
5045 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
5046 * src/scannerparser.y: Renamed to tools/scannerparser.y:
5047 * tests/invoke/Makefile.am:
5048 Split src/ into girepository/ and tools/
5052 * girepository/Makefile.am:
5053 * tests/Makefile.am:
5054 * tests/invoke/Makefile.am:
5055 * tests/parser/Makefile.am:
5056 * tests/roundtrips.sh:
5057 * tools/Makefile.am:
5058 Make distcheck work.
5060 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
5062 * tests/invoke/invoke.c: (main):
5063 * tests/invoke/testfns.c: (test6), (test7):
5064 * tests/invoke/testfns.xml:
5065 Add tests for invokation with a GList argument.
5066 Also tests caller-owns return values.
5068 2008-02-04 Rob Taylor <robtaylor@floopily.org>
5071 Add some documentation for GICallableInfo
5073 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
5076 Correct syntax errors in the DTD file.
5078 * relaxng/c-types.xml:
5079 * relaxng/g-types.xml:
5081 Add a RelaxNG specification for the GObject Introspection XML data.
5082 The Specification has validated all of the test files.
5084 2008-01-25 Rob Taylor <robtaylor@floopily.org>
5086 * tests/roundtrips.sh:
5087 * tests/struct.test:
5088 Add roundtrip tests for structs.
5090 2008-01-11 Johan Dahlin <johan@gnome.org>
5092 * src/scanner.c (g_igenerator_process_function_symbol):
5093 Refactor out g_idle_node_add_member.
5094 (create_node_from_gtype, create_node_from_ctype):
5095 Use case instead of if...else
5096 (get_type_from_type_id):
5097 Rename to create_node_from_gtype
5098 (get_type_from_ctype):
5099 Rename to create_node_from_ctype
5101 Rename ginode -> node, gitype -> type, gifunc -> func.
5103 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
5104 Two new functions, refactor out of scanner.c
5106 * src/scanner.c: (g_igenerator_process_function_symbol):
5107 * src/scannerlexer.l:
5108 Do not save the content of the deprecated variable, only
5111 2008-01-11 Johan Dahlin <johan@gnome.org>
5113 * tests/parser/foo-object.h: Add a couple of comment parser tests.
5115 2008-01-11 Jürg Billeter <j@bitron.ch>
5117 * src/scannerlexer.l:
5118 Fix GTK-Doc parsing.
5120 2008-01-11 Jürg Billeter <j@bitron.ch>
5122 * src/scannerlexer.l:
5123 Fix GTK-Doc parsing.
5125 2008-01-11 Jürg Billeter <j@bitron.ch>
5127 * src/scanner.c: (lookup_symbol):
5128 Return unresolved name if we find unknown symbol.
5130 2008-01-11 Jürg Billeter <j@bitron.ch>
5132 * src/scanner.c: (g_igenerator_generate):
5133 Initialize GObject to fix scanning interface properties.
5135 * tests/parser/Foo-expected.gidl:
5136 * tests/parser/foo-object.h:
5137 * tests/parser/foo.c: (foo_interface_get_type):
5138 Test interfaces with GObject prerequisite.
5140 * tests/parser/Makefile.am:
5141 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
5143 2007-12-27 Johan Dahlin <johan@gnome.org>
5145 * src/scannerlexer.l:
5146 Parse gtk-doc comments.
5148 * src/gidlwriter.c: (function_generate):
5149 Reorganize, avoid duplication and add support for
5150 writing deprecated functions.
5152 * src/scannerparser.y:
5154 Add new structure CDirective and functions to create/free them.
5156 * src/scanner.c: (g_igenerator_process_function_symbol),
5157 (g_igenerator_process_unregistered_struct_typedef),
5158 (g_igenerator_process_struct_typedef),
5159 (g_igenerator_process_union_typedef),
5160 (g_igenerator_process_enum_typedef),
5161 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
5162 (g_igenerator_start_preprocessor):
5163 Parse @deprecated directive for functions.
5164 Remove some more C99isms.
5165 Send in -C to cpp to avoid stripping comments.
5167 * tests/parser/foo-object.h:
5168 * tests/parser/Foo-expected.gidl:
5169 Add deprecated directive
5171 2007-12-27 Johan Dahlin <johan@gnome.org>
5173 * src/scannerlexer.l (intsuffix): Add emacs mode line and
5174 escape ' and " so it looks more like C.
5177 Unlink temporary file used.
5179 2007-12-27 Johan Dahlin <johan@gnome.org>
5181 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
5182 (g_igenerator_start_preprocessor), (main):
5184 * src/scannerparser.y:
5185 Plug a couple of simple memory leaks.
5187 2007-12-27 Johan Dahlin <johan@gnome.org>
5189 * src/scanner.c: (g_igenerator_parse_macros),
5190 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
5193 * src/scannerparser.y:
5194 * tests/parser/Makefile.am:
5196 Improve error reporting, return when the preprocessor fails.
5197 Add a verbose parameter, to aid debugging.
5198 Revert to using a temporary file to communicate between the
5199 preprocessor and the parser, because we need to wait for
5200 the exit code from the pre-processor before starting to parse.
5202 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
5204 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
5205 cparser.y to scannerparser.y
5207 2007-12-11 Johan Dahlin <johan@gnome.org>
5211 * src/scanner.c: (g_igenerator_new):
5213 Get rid of the global the_generator variable.
5215 2007-12-10 Johan Dahlin <johan@gnome.org>
5217 * src/scanner.c (main): Add an output option,
5218 add checks for required parameters
5221 set BUILD_SOURCES and CLEANFILES properly
5223 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
5224 (g_writer_write_indent), (g_writer_write_unindent),
5225 (field_generate), (value_generate), (constant_generate),
5226 (property_generate), (function_generate), (vfunc_generate),
5227 (signal_generate), (interface_generate), (struct_generate),
5228 (union_generate), (boxed_generate), (enum_generate),
5229 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
5231 * src/scanner.c: (g_igenerator_generate):
5233 * src/scannerwriter.c:
5235 Refactor scannerwriter to only be tied to a GIdlModule and move
5236 it (again!) to gidlwriter.c. Change the writer function to take
5239 2007-12-10 Johan Dahlin <johan@gnome.org>
5242 * src/scanner.c: (g_igenerator_generate):
5244 * src/scannerwriter.c: (g_igenerator_write_inline),
5245 (g_igenerator_write), (g_igenerator_write_indent),
5246 (g_igenerator_write_unindent), (field_generate), (value_generate),
5247 (constant_generate), (property_generate), (function_generate),
5248 (vfunc_generate), (signal_generate), (interface_generate),
5249 (struct_generate), (union_generate), (boxed_generate),
5250 (enum_generate), (node_generate), (module_generate),
5251 (g_scanner_write_file):
5253 Move the scanner gidl writing to a separate source file.
5255 2007-12-10 Johan Dahlin <johan@gnome.org>
5260 Move over all CType construction functions.
5262 * tests/parser/Makefile.am:
5263 Be verbose when printing parsing tests results.
5265 2007-12-10 Johan Dahlin <johan@gnome.org>
5267 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
5268 preprocessor handling to here. Start cpp insteado of cc -E,
5269 always include -U__GNUC__, since it's specific to the preprocessor
5272 * tests/parser/Makefile.am (check-local): Silent diff and skip
5273 -U__GNUC__ which is always defined now
5275 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
5277 reviewed by: <delete if not using a buddy>
5279 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
5280 * tests/parser/Makefile.am:
5282 2007-12-09 Johan Dahlin <johan@gnome.org>
5285 Use GOption for command line options.
5286 (g_igenerator_new, main): Simplify constructor and they way
5287 parameters are passed into it.
5293 * src/gen-introspect.c:
5294 * src/gen-introspect.h:
5296 Rename gen-introspect.[ch] to scanner.[ch]
5298 2007-12-09 Johan Dahlin <johan@gnome.org>
5302 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
5303 don't make the repository library and the other utilites link against
5306 * src/gen-introspect.c: (g_igenerator_create_object),
5307 (g_igenerator_create_interface), (g_igenerator_create_boxed),
5308 (g_igenerator_create_enum), (g_igenerator_create_flags),
5309 (g_igenerator_process_module_symbol),
5310 (g_igenerator_process_module), (g_igenerator_generate), (main):
5311 * src/gen-introspect.h:
5312 Refactor g_igenerator_process_types into smaller pieces.
5314 * tests/parser/Makefile.am:
5315 Depend on the gen-introspect binary
5317 2007-12-09 Johan Dahlin <johan@gnome.org>
5319 * src/gen-introspect.c (g_igenerator_process_types):
5320 Break into smaller pieces, one for each generated node type.
5322 2007-12-08 Johan Dahlin <johan@gnome.org>
5324 * src/gen-introspect.c: (g_igenerator_process_types),
5325 (g_igenerator_add_module):
5326 * tests/parser/Foo-expected.gidl:
5327 * tests/parser/foo-object.h:
5328 * tests/parser/foo.c: (foo_subobject_class_init),
5329 (foo_subobject_init):
5331 Add a subobject test and make sure to register defined classes
5332 in the lookup symbol hash table.
5334 2007-12-08 Johan Dahlin <johan@gnome.org>
5338 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
5339 (g_igenerator_process_types), (g_igenerator_add_module),
5340 (g_igenerator_add_include_idl), (main):
5341 * src/gen-introspect.h:
5342 * tests/parser/Makefile.am:
5343 * tests/parser/Foo-expected.gidl:
5345 Change the gen-introspect to generate namespaced module names,
5346 such as GLib.Object instead of GObject.
5347 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
5348 add a --include-idl parameter to gen-introspect,
5349 and update the parser test.
5351 2007-12-08 Johan Dahlin <johan@gnome.org>
5353 * src/gen-introspect.c:
5354 Move main to the end of the file and attempt to make it valid
5357 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
5358 we're not quite ready to generate metadata yet.
5363 Add a simple gen-introspect parser test
5365 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
5367 reviewed by: Johan Dahlin <johan@gnome.org>
5370 * gobject-introspection.pc.in:
5372 * src/compiler.c: (format_output), (write_out_metadata), (main):
5373 * src/gen-introspect.c: (main):
5374 * src/gen-introspect.h:
5375 * src/generate.c: (write_callable_info), (write_repository),
5376 (load_metadata), (main):
5377 * src/gidlmodule.c: (g_idl_module_new),
5378 (g_idl_module_build_metadata):
5380 * src/gidlparser.c: (start_element_handler):
5381 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5382 (g_base_info_get_name), (g_base_info_get_namespace),
5383 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5384 (g_base_info_get_metadata), (g_function_info_get_symbol),
5385 (g_function_info_get_flags), (g_function_info_get_property),
5386 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5387 (g_callable_info_may_return_null),
5388 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5389 (g_callable_info_get_arg), (g_arg_info_get_direction),
5390 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5391 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5392 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5393 (g_type_info_get_tag), (g_type_info_get_param_type),
5394 (g_type_info_get_interface), (g_type_info_get_array_length),
5395 (g_type_info_is_zero_terminated),
5396 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5397 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5398 (g_value_info_get_value), (g_field_info_get_flags),
5399 (g_field_info_get_size), (g_field_info_get_offset),
5400 (g_registered_type_info_get_type_name),
5401 (g_registered_type_info_get_type_init),
5402 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5403 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5404 (find_method), (g_struct_info_find_method),
5405 (g_enum_info_get_n_values), (g_enum_info_get_value),
5406 (g_object_info_get_parent), (g_object_info_get_type_name),
5407 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5408 (g_object_info_get_interface), (g_object_info_get_n_fields),
5409 (g_object_info_get_field), (g_object_info_get_n_properties),
5410 (g_object_info_get_property), (g_object_info_get_n_methods),
5411 (g_object_info_get_method), (g_object_info_find_method),
5412 (g_object_info_get_n_signals), (g_object_info_get_signal),
5413 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5414 (g_object_info_get_n_constants), (g_object_info_get_constant),
5415 (g_interface_info_get_n_prerequisites),
5416 (g_interface_info_get_prerequisite),
5417 (g_interface_info_get_n_properties),
5418 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5419 (g_interface_info_get_method), (g_interface_info_find_method),
5420 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5421 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5422 (g_interface_info_get_n_constants),
5423 (g_interface_info_get_constant), (g_property_info_get_flags),
5424 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5425 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5426 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5427 (g_constant_info_get_value), (g_union_info_get_n_fields),
5428 (g_union_info_get_field), (g_union_info_get_n_methods),
5429 (g_union_info_get_method), (g_union_info_is_discriminated),
5430 (g_union_info_get_discriminator_offset),
5431 (g_union_info_get_discriminator):
5432 * src/ginvoke.c: (g_function_info_invoke):
5433 * src/girepository.c: (g_irepository_register),
5434 (g_irepository_unregister), (g_irepository_get_default),
5435 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5436 (g_irepository_get_info), (g_irepository_find_by_name),
5437 (g_irepository_get_shared_library),
5438 (g_irepository_build_search_path), (g_irepository_register_file),
5439 (g_irepository_error_quark):
5440 * src/girepository.h:
5441 * src/gmetadata.c: (g_metadata_get_dir_entry),
5442 (g_metadata_check_sanity), (validate_header),
5443 (validate_array_type_blob), (validate_iface_type_blob),
5444 (validate_param_type_blob), (validate_error_type_blob),
5445 (validate_type_blob), (validate_arg_blob),
5446 (validate_signature_blob), (validate_function_blob),
5447 (validate_callback_blob), (validate_constant_blob),
5448 (validate_value_blob), (validate_field_blob),
5449 (validate_property_blob), (validate_signal_blob),
5450 (validate_vfunc_blob), (validate_struct_blob),
5451 (validate_enum_blob), (validate_object_blob),
5452 (validate_interface_blob), (validate_errordomain_blob),
5453 (validate_union_blob), (validate_blob), (validate_directory),
5454 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5455 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5456 (g_metadata_new_from_mapped_file), (g_metadata_free),
5457 (g_metadata_set_module), (g_metadata_get_namespace):
5459 * tests/Makefile.am:
5460 * tests/invoke/Makefile.am:
5461 * tests/invoke/invoke-namespace-find.sh:
5462 * tests/invoke/invoke.c: (main):
5464 Add a namespace/shared library mapping. fixes #313268.
5466 2007-12-03 Johan Dahlin <johan@gnome.org>
5468 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5471 2007-11-30 Jürg Billeter <j@bitron.ch>
5477 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5478 (g_igenerator_write_inline), (g_igenerator_write),
5479 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5480 (field_generate), (value_generate), (constant_generate),
5481 (property_generate), (function_generate), (vfunc_generate),
5482 (signal_generate), (interface_generate), (struct_generate),
5483 (union_generate), (boxed_generate), (enum_generate),
5484 (node_generate), (module_generate), (get_type_from_type_id),
5485 (str_replace), (g_igenerator_process_properties),
5486 (g_igenerator_process_signals), (g_igenerator_process_types),
5487 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5488 (g_igenerator_process_unregistered_struct_typedef),
5489 (g_igenerator_process_struct_typedef),
5490 (g_igenerator_process_union_typedef),
5491 (g_igenerator_process_enum_typedef),
5492 (g_igenerator_process_function_typedef),
5493 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5494 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5495 (g_igenerator_generate), (main), (csymbol_new),
5496 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5497 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5498 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5499 (eat_hspace), (eat_line), (read_identifier),
5500 (g_igenerator_parse_macros):
5501 * src/gen-introspect.h:
5503 Import gen-introspect to generate introspection information by
5506 2007-11-30 Jürg Billeter <j@bitron.ch>
5508 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5510 2007-11-30 Jürg Billeter <j@bitron.ch>
5512 * src/gidlparser.c: (end_element_handler): Don't leave requires
5515 2007-11-29 Johan Dahlin <johan@gnome.org>
5517 * src/gidlparser.c (parse_type_internal): Add char,
5518 gchar and guchar to the builtin types.
5520 2007-11-26 Johan Dahlin <johan@gnome.org>
5522 * src/ginfo.c: (g_object_info_get_type_name),
5523 (g_object_info_get_type_init):
5524 * src/girepository.c: (g_irepository_is_registered):
5525 * src/girepository.h:
5527 Add g_object_info_get_type_name, g_object_info_get_type_init and
5528 g_irepository_is_registered.
5530 2006-08-14 Jürg Billeter <j@bitron.ch>
5532 * src/gidlparser.c: (end_element_handler): Don't leave
5533 namespace and implements states too early.
5536 2007-11-26 Johan Dahlin <johan@gnome.org>
5538 * src/gmetadata.c (validate_struct_blob):
5539 pass blob_type to validate_function_blob instead of
5540 hard-coding BLOB_TYPE_STRUCT.
5542 Patch by Torsten Schoenfeld, fixes #314190
5544 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5546 * src/compiler.c, src/generate.c, src/gidlnode.c,
5547 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5548 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5549 warnings about return values, signedness mismatches, unused
5550 variables, and unhandles enum values in switch statements.
5552 * tests/invoke/Makefile.am: Don't install the invoke test program.
5553 Add -I ../../src to the cflags used for the test functions files.
5555 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5557 * src/girepository.h: Export g_invoke_error_quark.
5559 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5561 * src/ginvoke.c: Remove the fallback implementation of
5562 g_function_info_invoke since we now formally depend on libffi.
5564 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5566 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5567 Remove these files from cvs, as they are now generated.
5569 * src/gmetadata.c (validate_iface_type_blob): Don't
5570 complain if blob->pointer is not set, since that
5571 happens for enum and flag types. (#308935, Gustavo
5574 * Commit an autoconf-conversion patch by
5575 Gustavo Carneiro (#308708)
5577 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5579 * src/compiler.c (main): Use it here to validate
5580 the generated metadata.
5582 * src/gmetadata.[hc]: Add code to validate a
5585 * metadata-format.txt: Updates
5587 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5589 * tests/*: Add struct offsets to field and vfunc
5592 * src/generate.c (write_vfunc_info): Write offset
5593 information for vfuncs.
5595 * src/gidlnode.c (g_idl_node_build_metadata): Write
5596 the struct offsets into the metadata.
5598 * src/gidlparser.c: Parse the offset attributes of
5599 field and vfunc elements.
5601 * src/gidlnode.h: Add offset members to field and
5604 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5608 * gidl.dtd: Updates.
5610 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5611 file, creates, compiles and runs a C file, and folds the
5612 resulting struct offsets back into the .gidl file.
5614 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5616 * src/gidlparser.c (start_field): Make fields in objects
5619 * src/gidlmodule.c: Include string.h
5624 * metadata-format.txt: Cleanup basic types.
5625 * src/*: Adapt to the changes.
5626 * tests/*: Adapt to the changes.
5627 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5629 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5630 size for enum blobs.
5631 (g_idl_node_get_full_size): Report the correct size for
5634 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5635 error checking for blob sizes.
5637 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5639 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5640 interface types for which is_pointer is FALSE, e.g. enums.
5642 * src/gidlnode.c (g_idl_node_get_full_size)
5643 * src/gidlparser.c (parse_type_internal):
5644 * src/generate.c (write_type_info): Support unspecialized
5645 lists, hashtables and errors. Also emit a '*' after these.
5649 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5653 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5655 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5657 * src/*.c: Change the directory to be addressed by
5658 1-based indexes, and use an index of zero to mean
5661 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5663 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5665 * tests/union.test: Add a union test.
5667 * src/generate.c: Handle unions.
5669 * src/girepository.h:
5670 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5672 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5674 * src/gidlparser.c (start_union): Parse <union> elements.
5676 * src/gidlnode.h: Add a GIdlNodeUnion.
5678 * gidl.dtd: Add a <union> element.
5680 * src/gmetadata.c (g_metadata_check_sanity): Check
5683 * src/gmetadata.h: Add union_blob_size to Header,
5686 * metadata-format.txt: Add a UnionBlob.
5688 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5690 * tests/*: Update testcases.
5692 * src/generate.c (write_callable_info): Don't forget to
5693 write transfer and null-ok attributes for return types
5696 * src/girepository.h:
5697 * src/ginfo.c (g_callable_info_may_return_null):
5698 New function to find out if a function may return NULL.
5700 * src/compiler.c (format_output): Make the generated
5703 * README: Point to a recent libffi snapshot.
5705 * tests/invoke/*: Some invoke tests.
5707 * src/Makefile: Add ginvoke.c and the necessary
5710 * src/girepository.h (g_function_info_invoke): Add
5713 * src/ginvoke.c (g_function_info_invoke): Initial
5714 implementation of invoke functionality based on libffi.
5716 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5717 strings and types hash tables in the right order when
5719 (find_entry_node): Free the name parts.
5721 2005-05-12 Johan Dahlin <johan@gnome.org>
5723 * src/generate.c: Generate consistent end tags.
5727 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5731 * src/gidlparser.c (start_function): Actually add
5732 methods to objects. (Steven Walter)
5734 * src/girepository.h:
5735 * src/ginfo.c: Rename Transfer and Direction to
5736 GITransfer and GIDirection. (Torsten Schoenfeld)
5738 * tests/*: Make tests work with the changes in name
5741 * src/gidlnode.c (find_entry_node): Parse qualified
5742 names and generate xref nodes for them if needed. Don't
5743 require all modules to be loaded any more.
5745 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5748 * src/ginfo.c (g_object_info_get_parent): Return NULL
5749 if blob->parent is 0. Still need to make sure index
5752 * src/generate.c: Generate qualified names when
5753 referring to non-local types. Emit transfer attribute
5756 * src/compiler.c (format_output): Put the function
5757 attributes where gcc accepts them.
5759 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5761 * src/compiler.c (main): Add a --verbose cmdline option
5762 and only log messages if it is specified.
5765 * src/gidlnode.c (init_stats, dump_stats): Collect some
5766 statistics on string and type sharing.
5768 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5769 g_message() instead of fprintf().
5771 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5772 (g_idl_node_get_size): Implement for structs.
5773 (g_idl_node_get_full_size): Handle parent being NULL.
5774 (serialize_type): Handle lookup failures more gracefully.
5776 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5778 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5779 size calculation for 2-parameter types and for objects.
5781 * src/compiler.c: Add a cmdline option for debug output
5782 and install a log handler to implement it.
5783 * src/gidlnode.c: Add some debug spew.
5787 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5788 forget to count the module name when calculating the
5789 required size for the metadata.
5792 * src/gidlparser.c: Fix compiler warnings.
5794 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5796 * src/compiler.c (main): Free the option context.
5798 * gidl.dtd: Clean up handling of names. All elements
5799 have a "name", only the elements corresponding to
5800 actual callable functions (function, method, constructor),
5801 have an additional "symbol" attribute holding the
5802 dlsym()-able function name.
5804 * src/generate.c: Adapt to generate xml matching the
5808 * src/gidlnode.c: Adapt to parse the new dtd.
5810 * tests/*.test: Adjust to the new dtd.
5812 * metadata-format.txt:
5813 * src/gmetadata.h: Remove the short_name field
5815 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5816 * src/girepository.h:
5817 * src/ginfo.c (g_value_info_get_short_name): Removed
5819 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5821 * gidl.dtd: Allow constructors for boxed types,
5822 patch by Jonathan Blandford.
5825 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5827 * --- Initial import ---