1 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
3 * gir/freetype2-2.0.gir: add FT_Int32
4 * gir/xft-2.0.gir: add XftFont
5 * girepository/gdump.c (g_irepository_dump):
6 Report errors when an invalid type is encountered
7 * giscanner/glibtransformer.py:
8 Make the error message a bit nicer.
10 Part of preparating for gir generating inside pango.
12 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
17 * gir/fontconfig-2.0.gir:
18 * gir/freetype2-2.0.gir:
19 * gir/libxml2-2.0.gir:
24 Move over the hand-written girs from gir-repository
25 so upstream libraries depending on these can avoid
26 a gir-repository dependency.
28 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
30 Bug 567813 – Everything should be versioned
33 * girepository/Makefile.am:
34 * girepository/girepository.c (init_globals):
35 * girepository/girparser.c (locate_gir):
36 * giscanner/dumper.py:
37 * giscanner/transformer.py:
38 * gobject-introspection-1.0.pc.in:
39 * tests/everything/Makefile.am:
40 * tests/invoke/Makefile.am:
41 * tests/offsets/Makefile.am:
42 * tests/repository/Makefile.am:
43 * tests/scanner/Makefile.am:
46 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
48 Bug 555036 – put gtk-doc in GIR
50 * giscanner/annotationparser.py:
52 * giscanner/girwriter.py:
53 * giscanner/glibast.py:
54 * tests/scanner/annotation-1.0-expected.gir:
55 * tests/scanner/annotation.h:
56 * tests/scanner/foo-1.0-expected.gir:
58 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
60 * giscanner/cachestore.py (CacheStore.load): Catch AttributeError
61 which seems to be occasionally raised for Record.
63 * giscanner/annotationparser.py:
64 Fix a bug where \n was not present in a comment
66 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
68 Bug 562467 – Property annotation
70 * giscanner/annotationparser.py:
71 * tests/scanner/annotation-1.0-expected.gir:
72 * tests/scanner/annotation-1.0-expected.tgir:
73 * tests/scanner/annotation.c (annotation_object_set_property),
74 (annotation_object_get_property), (annotation_object_class_init):
76 Annotations are parsed for properties.
78 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
80 Bug 546739 – Introspection should know precise signal parameter types
82 * giscanner/annotationparser.py:
83 * tests/scanner/annotation-1.0-expected.gir:
84 * tests/scanner/annotation-1.0-expected.tgir:
85 * tests/scanner/annotation.c (annotation_object_class_init):
87 Annotations are parsed for signals, the (type) annotation is introduced.
89 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
91 Bug 563591 – Flags not recognized when there is no introspection data
94 * giscanner/girwriter.py:
95 * giscanner/giscannermodule.c (type_get_is_bitfield):
96 * giscanner/glibast.py:
97 * giscanner/glibtransformer.py:
98 * giscanner/scannerparser.y:
99 * giscanner/sourcescanner.c (gi_source_type_copy):
100 * giscanner/sourcescanner.h:
101 * giscanner/sourcescanner.py:
102 * giscanner/transformer.py:
103 * tests/scanner/foo-1.0-expected.gir:
104 * tests/scanner/foo-1.0-expected.tgir:
105 * tests/scanner/foo.h:
107 Large parts of this patch was done by Jürg Billeter.
109 2009-01-12 Havoc Pennington <hp@pobox.com>
111 Bug 563386 – scanner ignores "const" on boxed return values
113 * tests/everything/everything.c (test_simple_boxed_a_const_return):
114 * tests/everything/everything.h:
116 This adds just the tests specified in the bug above, the fix itself
117 was included in Bug 563794
119 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
121 Bug 566404 – Annotations for GLib
123 * gir/glib-2.0.c: Added allow-none annotations for g_thread_init()
124 and g_main_loop_new().
126 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
128 Bug 566419 – Element type of arrays not properly handled in all cases
130 * giscanner/annotationparser.py:
131 * tests/scanner/annotation-1.0-expected.gir:
132 * tests/scanner/annotation-1.0-expected.tgir:
133 * tests/scanner/annotation.c (annotation_object_set_data),
134 (annotation_object_set_data2), (annotation_object_set_data3):
135 * tests/scanner/annotation.h:
137 Based on patch by Andreas Rottmann
139 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
141 Bug 566560 – giscanner.transformer.SkipError
143 * giscanner/transformer.py:
145 Catch SkipError for all nodes, not just functions.
146 Makes it possible to skip unsupported parameter types in
149 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
151 Bug 563794 - Redo annotation parsing & applying
153 Thanks to Colin for helping out considerably in landing this.
155 * giscanner/Makefile.am:
157 * giscanner/dumper.py:
158 * giscanner/girparser.py:
159 * giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
160 (calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
161 * giscanner/glibtransformer.py:
162 * giscanner/scannerlexer.l:
163 * giscanner/sourcescanner.c (gi_source_symbol_unref),
164 (gi_source_scanner_new), (gi_source_scanner_free),
165 (gi_source_scanner_get_comments):
166 * giscanner/sourcescanner.h:
167 * giscanner/sourcescanner.py:
168 * giscanner/transformer.py:
169 * giscanner/xmlwriter.py:
170 * tests/scanner/annotation-1.0-expected.gir:
171 * tests/scanner/annotation-1.0-expected.tgir:
172 * tests/scanner/annotation.c:
173 * tests/scanner/annotation.h:
174 * tests/scanner/foo-1.0-expected.gir:
175 * tests/scanner/foo-1.0-expected.tgir:
176 * tests/scanner/foo.h:
177 * tools/g-ir-scanner:
179 This commit merges the annotation parser rewrite branch.
180 It'll change the annotation parsing to be done completely in python
181 code which will make it easier to do further annotation parsing
184 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
186 Bug 563469 – Arrays not treated correctly in struct offset calculation
188 * tests/scanner/foo.h (FooObject): Added field `some_int'.
189 * tests/scanner/foo-1.0-expected.gir,
190 * tests/scanner/foo-1.0-expected.tgir: Adapted.
192 * giscanner/glibtransformer.py (GLibTransformer._create_gobject):
193 carry over object fields from original (struct) node.
194 (GLibTransformer._pair_class_struct): Don't add fields of the
195 class struct to to the node for the class, they should go under a
196 nested <record> element (see also Bug 551738). This is needed as
197 otherwise offset calculation would not work, as the instance
198 fields are mingled with the class fields without a way to
201 2009-01-03 Johan Dahlin <jdahlin@async.com.br>
204 Disable blank line check, it works differently under
205 Python 2.5 from 2.6 and was rather annoying from the start.
207 2008-01-03 Andreas Rottmann <a.rottmann@gmx.at>
209 Bug 556489 – callback annotations
211 * giscanner/transformer.py
213 * tools/generate.c (write_callable_info): Write out the new scope,
214 closure and destroy attributes.
216 * giscanner/transformer.py (Transformer._type_is_callback): New
217 method, checking if a given type is a callback.
218 (Transformer._augment_callback_params): New method; adds
219 information (closure, destroy) to callback parameters.
220 (Transformer._handle_closure, Transformer._handle_destroy): New methods,
221 auxiliary to _augment_callback_params.
222 (Transformer._create_function): Call _augment_callback_params().
223 (Transformer._create_parameter): Handle scope option.
225 (Transformer._create_typedef_callback): New method, creates a
226 callback, and registers it in the typedef namespace
227 (Transformer._create_typedef): Use _create_typedef_callback()
228 instead of the plain _create_callback().
230 * giscanner/ast.py (Parameter): Added callback-related fields.
231 * giscanner/girwriter.py: Write out new Parameter fields.
233 * girepository/girnode.h (GIrNodeParam): Added fields scope,
235 * girepository/gtypelib.h (ArgBlob): Ditto.
236 * girepository/girparser.c (start_parameter): Handle new fields.
238 * girepository/girmodule.c (g_ir_module_build_typelib): Adjust
239 arg_blob_size, bump major version due to this change.
240 * girepository/girnode.c (g_ir_node_get_full_size_internal)
241 (g_ir_node_build_typelib)
242 * girepository/gtypelib.c (g_typelib_check_sanity): ArgBlob size
244 (g_ir_node_build_typelib): Fill in new ArgBlob flags from param.
246 * girepository/girepository.h (GIScope): New enumeration, listing
247 the different possible scopes for callbacks.
249 * girepository/ginfo.c (g_arg_info_get_scope)
250 (g_arg_info_get_closure, g_arg_info_get_destroy): Accessors for
251 callback-related argument indices (callback scope, closure for a
252 callback, destroy notification for a callback).
254 * tests/scanner/: Added testcases for new features.
256 2009-01-03 Jürg Billeter <j@bitron.ch>
259 * giscanner/dumper.py:
260 * giscanner/girparser.py:
261 * giscanner/glibtransformer.py:
262 * giscanner/sourcescanner.py:
263 * giscanner/transformer.py:
264 * giscanner/xmlwriter.py:
266 Fix inconsistencies with PEP8
268 2008-12-21 Johan Dahlin <jdahlin@async.com.br>
271 Annotate transfer, direction and allow none for
272 g_file_load_contents, g_file_load_contents_finish and
273 g_file_load_partial_contents_finish parameters.
275 2008-12-12 Owen Taylor <otaylor@redhat.com>
277 Disable array auto-detection for out-annotated parameters (#563934)
279 If we have a parameter annotated as (out), then having a ctype of
280 'char **' (or similar) doesn't necessarily indicate an array.
282 * giscanner/transformer.py: Skip array-detection logic for
283 (out)-annotated parameters.
284 * tests/scanner/annotation.h tests/scanner/annotation.c
285 tests/scanner/annotation-1.0-expected.gir
286 tests/scanner/annotation-1.0-expected.tgir: Add a test for
287 an (out) string parameter.
289 2008-12-12 Johan Dahlin <jdahlin@async.com.br>
291 * giscanner/dumper.py (DumpCompiler._link): Pass in
292 --tag=CC to libtool to avoid making libtool confused
293 when CC is different from gcc on some systems.
295 2008-12-10 Johan Bilien <jobi@via.ecp.fr>
297 Bug 563998 – Cache the GIBaseInfo for GTypes
299 * girepository/girepository.c (g_irepository_find_by_gtype):
300 add a cache of GType -> GIBaseInfo.
302 2008-12-09 Johan Bilien <jobi@via.ecp.fr>
304 Bug 562545 – Add function taking / returning GValue
306 * tests/everything/everything.[ch]: add a test of function taking and
307 returning "const GValue *"
309 2008-12-09 Johan Dahlin <johan@async.com.br>
311 * giscanner/cachestore.py (CacheStore.store): Use
312 shutil.move instead of os.rename, since it will
313 automatically fall back to copying+remove if the
314 src directory is on a different partition from
317 2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
319 Bug 563742 – introspection should record the introduced version of
320 symbols marked with the "Since:" tag
325 * giscanner/girwriter.py:
326 * giscanner/scannerlexer.l:
327 * giscanner/transformer.py:
328 * tests/scanner/annotation-1.0-expected.gir:
329 * tests/scanner/annotation-1.0-expected.tgir:
330 * tests/scanner/annotation.c (annotation_versioned):
331 * tests/scanner/annotation.h:
333 2008-12-08 Johan Dahlin <johan@async.com.br>
335 * giscanner/cachestore.py (_get_cachedir): Don't require
336 HOME to be set and if it set, don't require the
339 2008-12-08 Johan Dahlin <johan@async.com.br>
341 * giscanner/cachestore.py (CacheStore.store): Dump the cache
342 file to a temporary file and rename it the expected filename
343 only when it's completely written.
344 This should make the cache more roboust when run in parallel,
345 and hopefully avoid triggering bugs in Python.
347 2008-12-03 Christophe Fergeau <teuf@gnome.org>
349 Bug 562971 – g-ir-scanner failure on libgpod headers
351 * giscanner/scannerlexer.l: raise YY_BUF_SIZE to 65536 up from the
352 default 16384. Without it, the lexer was aborting with a cryptic
353 error message on source files containing really long comment
356 2008-12-01 Colin Walters <walters@verbum.org>
358 * girepository/gfield.c: Fix memory leak; unref type info we
359 created, not field info
361 2008-11-30 Johan Dahlin <jdahlin@async.com.br>
363 Bug 562289 – Race when removing invalid cache
365 * giscanner/cachestore.py:
366 ENOENT is mapped to a OSError, not IOError.
368 2008-11-27 Johan Dahlin <jdahlin@async.com.br>
370 * gir/glib-2.0.c: Add return value transfer annotation
371 for g_markup_escape_text.
373 2008-11-25 Colin Walters <walters@verbum.org>
375 * tools/g-ir-scanner: Add --libtool option which we expect Automake-using
377 * giscanner/dumper.py: Implement it.
378 * gir/Makefile.am, tests/**/Makefile.am: Use it.
380 2008-11-25 Colin Walters <walters@verbum.org>
382 * tests/scanner/Makefile.am: Remove hand-rolled generation of .tgir; easier
383 to just use a Makefile rule and dependencies. This corresponds with a change
384 made to gir-repository to fix srcdir != builddir issues.
386 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
389 Post release version bump
392 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
397 2008-11-25 Colin Walters <walters@verbum.org>
399 Bug 559705 – Missing association between static methods and classes
401 * docs/typelib-format.txt:
402 * girepository/ginfo.c (g_function_info_get_flags):
403 * girepository/girmodule.c (g_ir_module_build_typelib):
404 * girepository/girnode.c (g_ir_node_get_size),
405 (g_ir_node_build_typelib):
406 * girepository/girparser.c (start_function):
407 * girepository/gtypelib.c (g_typelib_check_sanity),
408 (validate_header), (validate_function_blob):
409 * girepository/gtypelib.h:
411 * giscanner/girwriter.py:
412 * giscanner/glibtransformer.py:
413 * tests/scanner/foo-1.0-expected.gir:
414 * tests/scanner/foo-1.0-expected.tgir:
415 * tests/scanner/foo.h:
417 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
419 * giscanner/ast.py: Define socklen_t as an alias for int32.
421 2008-11-24 Johan Dahlin <jdahlin@async.com.br>
423 * girepository/gdump.c (dump_type): Remove a warning,
424 be less verbose on error on fundamental types.
426 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
428 * giscanner/dumper.py: Add license headers,
429 refactor into a class, avoid some duplication and do some
430 extra pedantic checks.
432 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
434 Make it compilable with -Werror on my system by adding
435 a couple of prototypes and including headers.
437 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
439 Bug 562022 – gobject-introspection needs python headers
441 * configure.ac: fail without python headers present.
444 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
446 Bug 561617 – Return value array annotations
448 * giscanner/transformer.py:
449 * tests/scanner/annotation.c (annotation_return_array):
450 * tests/scanner/annotation.h:
451 Add support for (array) for return value annotations as well.
453 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
455 * tests/everything/everything.[ch]: add a test function which calls a
458 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
460 * giscanner/cachestore.py:
461 Catch ValueError exceptions.
463 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
465 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
467 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
469 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
470 instead of hard-coding struct sizes.
472 2008-11-18 Owen Taylor <otaylor@redhat.com>
474 Bug 561296 - Add "storage type" to the typelib data for enums
476 In order to set and get enum and flag fields in structures, we need
477 to know the integral type that the enumeration is stored as. We are already
478 computing that at compile time in order to compute struct offsets, so the
479 easiest thing to do is to save that in the typelib.
481 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
482 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
483 and compute and save it at compile time.
485 * girepository/girepository.h girepository/ginfo.c:
486 Add g_enum_info_get_storage_type().
488 * girepository/gfield.c: Implement reading and writing enum and flags fields
489 based on the storage type.
491 2008-11-18 Owen Taylor <otaylor@redhat.com>
493 Add enums to the Everything test module
495 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
496 test module and register them as GTypes.
498 https://bugzilla.gnome.org/show_bug.cgi?id=561296
500 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
502 * giscanner/cachestore.py:
503 Catch BadPickleGet exceptions as well.
505 2008-11-17 Owen Taylor <otaylor@redhat.com>
507 * tests/everything/everything.c: Fix doc comment annotations
508 for test_struct_b_clone() to refer to the right function.
510 2008-11-17 Dan Winship <danw@gnome.org>
512 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
513 spelling of GHashTable. #561135
515 * tests/scanner/annotation.c (annotation_object_get_hash):
516 * tests/scanner/annotation-1.0-expected.gir:
517 * tests/scanner/annotation-1.0-expected.tgir: add a test of
518 GHashTable annotations
520 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
522 * giscanner/ast.py: Change string array match type to be in terms
523 of canonicalized type.
524 * giscanner/transformer.py: Add canonicalize_ctype which gives us
525 a version of a c:type without aliases, so we can deep canonicalize
526 char** to utf8*. Update parse_ctype to use it.
527 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
529 2008-11-16 Colin Walters <walters@verbum.org>
531 * girepository/girepository.c: Ensure we always call init_globals,
532 even if passed a non-default repository.
534 2008-11-16 Colin Walters <walters@verbum.org>
536 Bug 559706 - Interface prerequisites
538 * common.mk: Dep on libgirepository.la for scanner libs so that
539 we rebuild things even if just gdump.c changes.
540 * girepository/gdump.c: Dump prerequisites.
541 * giscanner/ast.py: Add prerequisite list.
542 * giscanner/girparser.py: Parse them from gdump.
543 * giscanner/girwriter.py: Write them.
544 * giscanner/glibtransformer.py: Resolve them.
547 2008-11-16 Owen Taylor <otaylor@redhat.com>
549 Bug 561087 - Respect is_pointer in serialize_type()
551 Add a '*' to the serialization for the cases where we set is_pointer
552 in the type blob we write out depending on node->is_pointer. Don't
553 add the '*' in the cases where is_pointer is set or not set in a
556 http://bugzilla.gnome.org/show_bug.cgi?id=561087
558 2008-11-16 Owen Taylor <otaylor@redhat.com>
560 Bug 560825 – Add size and alignment to typelib
562 Include the size and alignment of structures and unions in the typelib,
563 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
565 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
566 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
567 to StructBlob and UnionBlob.
569 * girepository/ginfo.c girepository/girepository.h:
570 Add g_[struct|union]_get[size|alignment]().
572 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
574 2008-11-16 Owen Taylor <otaylor@redhat.com>
576 Bug 552371 – implement struct field get/set
578 * girepository/gfield.c girepository/girepository.h: Add
579 convenience functions g_field_info_set_field() and
580 g_field_info_get_field() to set and get fields based on the
581 offsets in GIFieldInfo.
583 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
585 Bug 560241 - Out-arguments should not be marked as being pointers
588 * girepository/girparser.c: Improved logic for out arguments.
590 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
592 Bug 559601 - Pointers in structs/unions unduly treated as arrays
594 * giscanner/transformer.py: Differentiate type creation logic
595 between parameters and struct components.
597 2008-11-15 Colin Walters <walters@verbum.org>
599 * giscanner/dumper.py: Check return code from pkg-config
602 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
604 * tests/everything/everything.c (test_array_int_in),
605 (test_array_gtype_in):
606 * tests/everything/everything.h:
607 Rename the int/gtype array tests. Make the return value
608 useful, an aggregation of the array input values.
610 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
612 * tests/everything/Makefile.am:
613 * tests/everything/everything.c:
614 * tests/everything/everything.h:
615 * tests/everything/gitesttypes.c:
616 * tests/everything/gitesttypes.h:
617 Rename gitesttypes.[ch] to everything.[ch]
619 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
621 Bug 560708 – Don't treat arrays that have a length specified as
622 zero-terminated by default
624 * giscanner/transformer.py: Default to non zero terminated for
626 * tests/*: Update, add test for zero vs not.
628 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
630 Bug 557788 - Return types for constructors in generated typelib bogus
632 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
633 obviously broken in the face of duplicate names in different
635 * tests/scanner/*expected.gir: Fix up.
637 2008-11-13 Owen Taylor <otaylor@redhat.com>
639 * girepository/girffi.c: Fix "Unexpected time for time_t"
642 2008-11-13 Colin Walters <walters@verbum.org>
644 Bug 558436 - avoid having scanner load app code
646 * giscanner/cgobject.py: Delete; we no longer load shared
648 * giscanner/dumper.py: Support for linking a library to
649 a stub binary for introspection.
650 * giscanner/glibtransformer.py: Rewrite to use gdump XML
651 from invocation of child binary.
652 * giscanner/transformer.py: Fix up to use fully qualified
653 name in parse tree. Make parse_ctype public so we can use
654 it inside glibtransformer.
655 * tests/scanner/barapp.c: New test, using --program arg
657 * tests/*: Update to use common.mk for invoking scanner.
658 * tools/g-ir-scanner: Add options --program, --program-arg,
660 * docs/g-ir-scanner.1: Update.
662 2008-11-13 Colin Walters <walters@verbum.org>
664 * configure.ac: Depend on Gio, we use it in gdump.c.
665 * girepository/gdump.c: Code to dump GType data to XML.
666 * girepository/girepository.c: Add option group for dumping.
667 * girepository/girepository.h: Define API for the above.
669 2008-11-13 Colin Walters <walters@verbum.org>
671 * common.mk: Add a file to include with Makefile fragments
672 useful for scanner invocation.
674 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
676 * tests/everything/gitesttypes.c (test_filename_return): Return
677 strings in filename encoding.
679 2008-11-13 Owen Taylor <otaylor@redhat.com>
681 Bug 560253 – Add structure and boxed types to Everything test module
683 * tests/everything/gitesttypes.[ch]: Add examples of:
685 Plain old data structs
686 Plain old data structs with nested fields
688 Plain old data boxed with nested fields
689 More complicated boxed types with internal state
691 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
693 * tests/everything/gitesttypes.c (test_gtype_in):
694 * tests/everything/gitesttypes.h:
695 Add a test of GType arrays, a la gtk_list_store_set_columns.
697 2008-11-12 Owen Taylor <otaylor@redhat.com>
699 Bug 560419 – Cache includes when parsing
701 Keep track of all modules parsed within a GIrParser, and when a
702 module is referenced a second time, use the existing parsed copy
703 instead of reparsing.
705 2008-11-12 Owen Taylor <otaylor@redhat.com>
707 Fix management of ParseContext.includes_modules (#560419)
709 * girepository/girparser.c: Fix some trivial bugs in managing the
710 list of include modules. (Add to module's list twice, not
711 initialized to NULL, not freed.)
713 2008-11-12 Owen Taylor <otaylor@redhat.com>
715 Keep aliases and disguised_structures local to each module (#560419)
717 * girepository/girmodule.[ch]: When parsing, keep keep a separate
718 hash tables of aliases and 'disguised' flags for each module, and
719 store that on the module.
721 After parsing an include merge the aliases/disguised flags to the
724 * girepository/girparser.c: Remove 'prefix_aliases' flag and
725 always prefix aliases/disguised structure types when parsing; this
726 simplifies the code considerably.
728 2008-11-12 Owen Taylor <otaylor@redhat.com>
730 Fix mismatches between .gir name and 'name' attribute (#560419)
732 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
733 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
734 where the 'name' element of <namespace/> didn't match the filename of the
735 gir, an assumption that the compiler has always expected and now enforces.
737 2008-11-12 Owen Taylor <otaylor@redhat.com>
739 Only allow one <namespace/> element per <repository/> (#560419)
741 * girepository/girparser.c: The logic in girparser.c didn't work
742 very well if there were multiple <namespace/> nodes within a
743 single <repository/> (context->namespace was always the overall
744 filename and not the the name specified in the <namespace/>
745 element for one thing; this would cause aliases to be mis-prefixed
746 in include modules.) Also check that the "name" in the
747 <namespace/> node matches the filename.
749 2008-11-12 Owen Taylor <otaylor@redhat.com>
751 Add a GirParser object to hold the state of a compilation
753 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
754 GirParser object to hold state that is global across a
755 compilation. Currently just holds the include path, but will
756 eventually also keep a cached list of parsed modules.
758 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
760 * girepository/girepository.c (find_namespace_latest): Fix
763 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
765 * configure.ac: use 'introspection' component for bugs
767 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
769 * tests/everything/gitesttypes.c (test_filename_return):
770 * tests/everything/gitesttypes.h:
771 Add a filename return test.
773 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
775 * tests/offsets/Makefile.am (gitestoffsets.c): fix
776 gen-gitestoffsets invocation with builddir != srcdir
778 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
780 * girepository/girepository.c:
781 Change the element type from utf8 to filename
782 * girepository/girnode.c (g_ir_node_build_typelib):
783 Special case filename equally to utf8 here.
785 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
788 Remove unused variables, add a dependency of girepository.ch, so when
789 they change we rebuild the gir automatically.
791 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
793 * girepository/girepository.c (g_irepository_get_search_path):
794 * girepository/girepository.h:
795 Add a g_irepository_get_search_path, so we can access the search
798 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
800 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
802 * girepository/girparser.c: avoid freeing an uninitialized pointer
804 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
807 * giscanner/glibtransformer.py:
808 * tools/g-ir-scanner:
809 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
810 so we can just pass in --library=foo/bar/baz.la and the scanner
811 does the right thing.
812 Don't warn for _get_type() functions if they don't take any
815 2008-11-11 Owen Taylor <otaylor@redhat.com>
817 Bug 560404 – Prefix types when resolving aliases in included modules
819 * girepository/girparser.c: When resolving aliases in an included
820 module, prefix types before looking them up.
822 2008-11-11 Owen Taylor <otaylor@redhat.com>
824 Compute field offsets and overall size for object structures
826 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
827 field of type object in structure"
829 Do basic computation of field offsets for objects and interfaces;
830 this doesn't attempt to address all of the "mess" for virtual
831 functions described in Bug 560281.
833 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
835 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
837 Based on patch by Johan Bilien.
839 * giscanner/transformer.py (_create_member, _create_parameter):
840 Resolve types here as well.
841 (_resolve_type_name_1): Try resolving using 'ctype' first since
842 it's least ambiguous. Fixes struct member type resolution with
843 similarly named types, e.g. Gdk.PangoRendererClass and
845 * tests/scanner/foo*: Add test.
847 2008-11-11 Owen Taylor <otaylor@redhat.com>
849 * girepository/girparser.c: Search provided include dirs before
850 the default directories.
852 2008-11-11 Owen Taylor <otaylor@redhat.com>
854 * girepository/giroffsets.c: Include fully-qualified names in
857 2008-11-11 Owen Taylor <otaylor@redhat.com>
859 * girepository/giroffsets.c: Fail gracefully with an informative
860 error message when recursion is encountered when computing a
863 2008-11-11 Owen Taylor <otaylor@redhat.com>
865 * girepository/girparser.c: Remove an unused variable.
867 2008-11-10 Owen Taylor <otaylor@redhat.com>
869 Add tests for field offset computations
871 * tests/offsets/offsets.h: Header file with structure definitions to test
873 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
874 field offsets for the structures in offsets.h two ways: using
875 the information from a generated typelib, and as computed by the
878 We diff these two versions to test that everything is OK.
880 2008-11-10 Owen Taylor <otaylor@redhat.com>
882 Remove field offsets from g-ir-generate output and test inputs
884 Field offsets are a) architecture dependent so they shouldn't be part
885 of the architecture-independent gir format which is installed in
886 datadir. b) Are architecture-dependent so they shouldn't be in test
889 * girepository/girparser.c: Don't parse offset for fields
890 * tools/generate.c: Don't parse offset for fields
891 * tests/*.gir test/scanner/*.tgir: Remove offsets
893 (Virtual function and discriminator offsets are not removed, as they
894 aren't fully hooked up to the field-offset computation machinery yet.)
896 2008-11-10 Owen Taylor <otaylor@redhat.com>
898 Bug 560252 - Compute field offsets before writing typelib
900 * girepository/girnode.h: Store the total size and alignment for
901 GIrNodeStruct/Boxed/Union.
903 * girepository/giroffset.c: New file implementing computation of
904 structure field offsets.
906 * girepository/girnode.c: Compute structure field offsets before
907 writing types into the typelib.
909 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
910 means "unknown". Also fix description of the discriminator_offset
913 2008-11-10 Owen Taylor <otaylor@redhat.com>
915 Bug 560250 - Fully parse included modules
917 For some things, like computing structure offsets to put into the typelib
918 we need more than just the aliases from included modules. Do a completel
919 parse of included modules and store in module->included_modules.
921 Also add g_ir_find_node() to find node information from within the
922 active set of modules and their includes.
924 2008-11-10 Owen Taylor <otaylor@redhat.com>
926 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
928 Extract a function to convert GITypeTag to ffi_type from the internals
929 of ginvoke.c. This will be useful in figure out structure alignment.
931 Also fix handling of gsize and time_t to be portable. (Add a check
932 to configure.ac to figure out the width of time_t.)
934 2008-11-10 Owen Taylor <otaylor@redhat.com>
936 Bug 560248 – "disguised structures"
938 Certain types like GIConv and GdkAtom are pointers internally but don't
939 look like pointers when referenced. They have the form.
941 typedef struct _X *X;
943 Parse these as structures/records but mark them in the gir with a 'disguised'
944 attribute so that we know that they need special handling.
946 In the typelib treat them like any other structure.
948 2008-11-09 Jürg Billeter <j@bitron.ch>
951 * giscanner/girwriter.py:
953 Write throws attribute for virtual functions, fixes bug 559703
955 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
957 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
958 up some confusion about the second argument to find_module, it's
959 actually the packages __path__ attribute which we can safely ignore
961 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
963 2008-11-07 Owen Taylor <otaylor@redhat.com>
965 Bug 559737 – Deal with continuations in macros
967 * giscanner/giscannerlexer.l: Treat continuation lines the same
968 as regular newlines. This makes the scanner not complain about
969 #define foo(x) \ <stuff> inside a C file. There's no attempt
970 however to handle parsing macro definitions split across lines.
972 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
974 * giscanner/cachestore.py:
975 Handle broken cache entries, write only filesystems and
976 running out of diskspace.
978 2008-11-07 Owen Taylor <otaylor@redhat.com>
980 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
981 Set current_filename before lexing the file so error messages
982 are reported in the right file.
984 2008-11-06 Colin Walters <walters@verbum.org>
986 * tests/everything/*: Add some tests for strv.
988 2008-11-05 Colin Walters <walters@verbum.org>
990 * girepository/ginvoke.c (g_function_info_invoke): Don't use
991 nested scope local variable for error which may go away after
992 conditional is complete.
994 2008-11-05 Colin Walters <walters@verbum.org>
996 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
997 manipulate hackily; just use GString. This avoids an
998 uninitialized memory read pointed out by Havoc.
1000 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
1002 * giscanner/__init__.py:
1004 * giscanner/cachestore.py:
1005 * giscanner/cgobject.py:
1006 * giscanner/girparser.py:
1007 * giscanner/girwriter.py:
1008 * giscanner/giscannermodule.c:
1009 * giscanner/glibast.py:
1010 * giscanner/glibtransformer.py:
1011 * giscanner/libtoolimporter.py:
1012 * giscanner/minixpath.py:
1013 * giscanner/odict.py:
1014 * giscanner/sourcescanner.c:
1015 * giscanner/sourcescanner.h:
1016 * giscanner/sourcescanner.py:
1017 * giscanner/transformer.py:
1018 * giscanner/utils.py:
1019 * giscanner/xmlwriter.py:
1021 Relicense the giscanner library under LGPLv2+.
1022 This has been approved by all contributors.
1024 2008-11-01 Owen Taylor <otaylor@redhat.com>
1026 Bug 558848 giparser.py: shared library should be optional
1028 When parsing a .gir, allow the shared-library attribute
1029 of <namespace/> to be missing: this corresponds to the handling
1030 in libgirepository and elsewhere.
1032 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
1034 Bug 557898 – Fails to build on OSX 10.4
1036 * configure.ac: Check for $shrext_cmds that should be implicitly
1037 available if you're using libtool >= 2.0. If undefined, call
1038 libtool --config explicitly to get its value.
1039 * girepository/gtypelib.c: Remove special case for (non-)Darwin
1040 systems as unneeded.
1042 2008-10-31 Colin Walters <walters@verbum.org>
1044 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
1046 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1048 * configure.ac: Post release version bump
1051 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1055 * docs/release-checklist.txt:
1058 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1060 * Makefile.am: add an upload-release target
1061 * docs/release-checklist.txt:
1062 Release process documentation
1064 2008-10-31 Colin Walters <walters@verbum.org>
1066 Bug 558109 – _g_typelib_init fails to find shared libraries
1068 * transformer/glibtransformer.py: Use ctypes' find_library
1069 on passed libraries and write that for the shared-library
1070 entry. We want to avoid depending on -devel packages.
1072 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1074 * docs/g-ir-scanner.1:
1075 Document the renaming options.
1077 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
1079 * giscanner/Makefile.am:
1080 * tests/invoke/Makefile.am:
1081 * tests/repository/Makefile.am: List in-tree libraries first in
1082 LDADD / LIBADD. If installed library is listed first, the
1083 resulting binary will prefer installed version to one in .libs,
1084 possibly making 'make check' behave strangely.
1086 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
1088 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
1089 gir-repository from choking with gdk/quartz
1091 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1093 * giscanner/giscannermodule.c (calc_attrs_length),
1094 (pygi_collect_attributes):
1095 * giscanner/xmlwriter.py:
1096 Write a C version of the xml namespace formatter.
1097 Saves 15% of the time it takes to create a gtk gir.
1099 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1101 * giscanner/xmlwriter.py: Abstract attribute formatting
1102 to a function external to the XMLWriter class.
1104 * giscanner/scannerlexer.l:
1105 Parse and discard __typeof and __attribute.
1107 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1109 * giscanner/girparser.py:
1110 Remove arguments from the constructor, move them to
1111 separate accessors. Add a new parse_tree method
1112 which takes an element tree instance.
1113 * tools/g-ir-scanner:
1114 Update callsite for this
1116 * giscanner/Makefile.am:
1117 * giscanner/cachestore.py:
1118 * giscanner/transformer.py:
1119 Cache the include parsing. Saves ~25% time when
1120 creating vte (which includes everything up to gtk+).
1122 2008-10-30 Colin Walters <walters@verbum.org>
1124 * giscanner/transformer.py: Don't reparse includes
1125 we've already processed.
1127 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1129 * giscanner/girparser.py:
1130 * giscanner/transformer.py:
1131 Avoid parsing parameters, types etc when parsing
1132 includes. Should speed up include parsing a bit.
1134 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1136 * giscanner/girparser.py:
1137 Avoid big if/else and use a dispatch table like
1140 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1142 * giscanner/transformer.py:
1143 Clean up include parsing and registration.
1145 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1147 * giscanner/transformer.py:
1150 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1152 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
1155 construct PYTHONPATH just once
1157 * tests/everything/Makefile.am:
1158 * tests/scanner/Makefile.am:
1159 add $(top_srcdir) to PYTHONPATH to
1160 handle builddir != srcdir
1162 * giscanner/libtoolimporter.py:
1163 * giscanner/sourcescanner.py:
1164 Make the libtoolimporter work when distchecking too.
1166 Mostly based on patch by Tommi Komulainen
1168 2008-10-29 Owen Taylor <otaylor@redhat.com>
1170 * giscanner/glibtransformer.py: If a filename of an existing
1171 file is passed to --library, hunt for it directly, rather than
1172 searching for a corresponding library.
1174 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
1176 * giscanner/libtoolimporter.py:
1177 * giscanner/sourcescanner.py:
1178 Clean up the libtool importer a bit. Add a context so we
1179 can use it through a with statement.
1180 Don't just look in the current directory, look in the whole
1183 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
1185 Bug 558065 – gitesttypes should be installed
1188 * tests/Makefile.am:
1189 * tests/types/Makefile.am -> tests/everything/Makefile.am
1190 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
1191 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
1192 move tests/types to tests/everything
1194 * tests/everything/Makefile.am: build normal shared library
1195 libgirepository-everything.so.1.0.0 and corresponding typelib
1196 Everything-1.0.typelib
1198 * tests/everything/Makefile.am: explicitly link libtool
1199 versioning with typelib versioning with variables
1201 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
1203 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
1205 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1207 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
1210 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1212 Bug 558068 – when invoking a method, offset the in arguments by one,
1215 * tests/invoke/invoke.c, tests/invoke/testfns.c,
1216 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
1217 * girepository/ginvoke.c: do not offset the index of given out
1218 arguments by one for methods, "this" is provided as in argument only.
1220 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1222 * gir/gio-2.0.c: add annotation for g_file_delete
1224 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
1226 Bug 558062 – provide and use paths in the .pc file
1228 * gobject-introspection-1.0.pc.in: provide typelibdir variable
1229 for where .typelibs should be installed (callers shouldn't need
1230 to construct paths from bits and pieces)
1232 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1234 Bug 557791 – g_irepository_require() could return a GTypelib *
1236 * girepository/girepository.c: Return GTypelib; this is useful
1237 for low level manipulation.
1239 2008-10-25 Colin Walters <walters@verbum.org>
1241 Bug 557788 – Return types for constructors in generated typelib bogus
1243 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
1244 rely on end pass resolution.
1246 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1248 Bug 557786 - support fixed size arrays
1250 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
1251 * giscanner/scannerparser.y: Retain fixed array size.
1252 * giscanner/ast.py: Add to note.
1253 * giscanner/girwriter.py: Write to gir.
1254 * girepository/girnode.c: Write it to typelib.
1255 * tools/generate.c: Generate.
1256 * tests/*: Add tests.
1258 2008-10-25 Colin Walters <walters@verbum.org>
1260 Bug 557076 - move typelibs to $libdir
1262 * configure.ac: Steal some configury bits from dbus to expand
1264 * gir/Makefile.am: Move to libdir.
1265 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
1266 instead just look at one hardcoded path in libdir.
1267 * acinclude.m4: Bits from dbus.
1269 2008-10-24 Johan Dahlin <johan@gnome.org>
1271 * girepository/girnode.c (g_ir_node_check_unhandled_members):
1272 Be quiet, do not warn about unhandled members.
1274 2008-10-24 Johan Dahlin <johan@gnome.org>
1276 * girepository/gtypelib.c:
1277 Only use SHLIB_SUFFIX on darwin, otherwise use
1278 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
1280 2008-10-24 Lucas Rocha <lucasr@gnome.org>
1282 Bug 557623 - Constructors shouldn't be flagged as methods.
1284 * girepository/ginfo.c (g_function_info_get_flags): ditto.
1286 2008-10-24 Johan Dahlin <johan@gnome.org>
1288 * giscanner/scannerparser.y:
1289 Check against division by zero for the modula operator.
1290 This fixes header parsing of OSX system headers included
1293 2008-10-24 Johan Dahlin <johan@gnome.org>
1297 Add a CONTRIBUTORS file and dist it.
1299 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1301 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
1303 * girepository/girparser.c (parse_param_transfer):
1304 * giscanner/transformer.py (_create_parameter, _create_return):
1305 * giscanner/girwriter.py (_write_return, _write_parameter):
1306 * tools/generate.c (write_callable_info): always write and
1307 require "transfer-ownership" for return-values and parameters
1310 * tests/invoke/testfns-1.0.gir:
1312 * tests/scanner/DrawableAdditions.xml:
1313 * tests/scanner/GtkFrob-1.0-expected.tgir:
1314 * tests/scanner/annotation-1.0-expected.tgir:
1315 * tests/scanner/drawable-1.0-expected.tgir:
1316 * tests/scanner/drawable-injected-1.0-expected.gir:
1317 * tests/scanner/drawable-injected-1.0-expected.tgir:
1318 * tests/scanner/foo-1.0-expected.tgir: Updated
1320 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1322 * giscanner/cgobject.py: build fundamental types same way as glib
1324 * giscanner/glibtransformer.py (_type_from_gtype): record GType
1325 when constructing the Type from it
1327 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
1328 the parameter is a GObject from its GType, if available.
1330 * giscanner/glibtransformer.py (_adjust_transfer):
1331 * tests/scanner/foo-1.0-expected.gir:
1332 * tests/scanner/foo-1.0-expected.tgir: deduce
1333 transfer-ownership from GTypes
1335 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1337 * giscanner/transformer.py (_create_parameter):
1338 * tests/scanner/foo-1.0-expected.gir: make varargs
1339 transfer-ownership="none"
1341 2008-10-23 Colin Walters <walters@verbum.org>
1343 Bug 556739 - transfer ownership
1345 * giscanner/ast.py: Refactor Parameter/Return to share
1346 common attributes. Add transfer_inferred attribute
1347 which says whether or not we made a guess.
1348 * giscanner/transformer.py: Add much more extensive
1349 heuristics around parameter and return transfer.
1350 * giscanner/glibtransformer.py: Adjust to inspect
1354 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1356 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
1358 * tests/scanner/Makefile.am:
1359 * tests/scanner/annotation-1.0-expected.tgir:
1360 * tests/scanner/drawable-1.0-expected.tgir:
1361 * tests/scanner/drawable-injected-1.0-expected.tgir:
1362 * tests/scanner/foo-1.0-expected.tgir:
1363 * tests/scanner/GtkFrob-1.0-expected.tgir:
1364 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
1365 annotations survive the roundtrip via typelib
1367 The expectations are as currently produced by g-ir-generate,
1368 comparison with the .gir files shows there are differences.
1370 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
1372 Bug 557468 – Support for GI_TYPELIB_PATH
1374 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
1375 provided paths to the global search path.
1377 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1379 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
1381 * tests/scanner/drawable-1.0-expected.tgir:
1382 * tests/scanner/drawable-injected-1.0-expected.tgir:
1383 * tests/scanner/foo-1.0-expected.tgir:
1384 * tools/generate.c (write_object_info): write 'abstract'
1385 attribute for classes
1387 2008-10-22 Lucas Rocha <lucasr@gnome.org>
1389 * girepository/girmodule.c, girepository/gtypelib.c,
1390 girepository/girparser.[ch]: fix some build warnings.
1392 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1394 Bug 557405 – Use 'allow-none' consistently
1396 * docs/typelib-format.txt:
1397 * girepository/ginfo.c (g_arg_info_may_be_null):
1398 * girepository/girnode.c (g_ir_node_build_typelib):
1399 * girepository/girnode.h (struct _GIrNodeParam):
1400 * girepository/girparser.c (start_parameter):
1401 * girepository/girwriter.c (function_generate):
1402 * girepository/gtypelib.h (ArgBlob):
1404 * tests/function.gir:
1405 * tools/generate.c (write_callable_info): Use 'allow-none'
1406 consistently throughout
1408 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1410 Bug 557092 – Callback annotations not used
1412 * giscanner/transformer.py (_create_callback): use annotations
1414 * tests/scanner/annotation.h
1415 * tests/scanner/annotation-1.0-expected.gir: add tests
1417 2008-10-21 Colin Walters <walters@verbum.org>
1419 * giscanner/scannerlexer.l: Don't require trailing whitespace after
1420 uncommented parameters.
1423 2008-10-21 Colin Walters <walters@verbum.org>
1425 * girepository/girepository.c: Ensure that when doing an unversioned
1426 require, we prefer items earlier in the search path to later ones.
1428 2008-10-21 Owen Taylor <otaylor@redhat.com>
1430 * giscanner/transformer.py: For string parameters allow transfer annotation
1431 to override the standard automatic guessing based on 'const'.
1433 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1435 Bug 557241 – "throws" flag for functions
1437 * tests/scanner/drawable-1.0-expected.gir,
1438 tests/scanner/drawable-injected-1.0-expected.gir,
1439 tests/scanner/drawable.[ch]: add simple test for throwing
1440 function (has GError ** as last argument)
1442 * giscanner/ast.py: add a 'throws' flag to Function
1443 * giscanner/glibtransformer.py: if a function's last paramerter is
1444 a GError, set the 'throws' flag and remove that parameter
1445 * giscanner/girwriter.py: write out the 'throws' attribute
1446 * giscanner/girparser.py: support parsing the 'throws' attribute
1448 * tests/repository/gitestthrows.c: add a simple test to check the
1449 throws flag in a typelib and invoke the function
1451 * girepository/ginfo.c, girepository/girnode.[ch],
1452 girepository/girnode.h, girepository/girparser.c,
1453 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1455 * girepository/ginvoke.c: if a function throws, add a GError as last
1456 arguments, and propagate the error to the invoker.
1458 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1460 * giscanner/transformer.py (_create_parameters): Warn if we see
1461 annotations for unknown parameters. If .h and .c files name
1462 parameters differently, the annotations may be lost.
1464 2008-10-21 Johan Dahlin <johan@gnome.org>
1466 Bug 556358 - don't use libtool internals
1468 * giscanner/Makefile.am:
1469 * giscanner/libtoolimporter.py:
1470 * giscanner/sourcescanner.py:
1471 * giscanner/utils.py:
1472 Add a python meta importer and remove a libtool symlink hack.
1474 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1476 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1477 and --add-include-path appropriately when invoking the scanner.
1478 * tests/types/Makefile.am (%typelib): Likewise.
1480 2008-10-20 Colin Walters <walters@verbum.org>
1482 Bug 556777 - validate properties
1484 * giscanner/transformer.py: Add option to throw on unknown types.
1485 * giscanner/glibtransformer.py: Use it on properties.
1486 * tests/*: Add a test.
1488 2008-10-20 Colin Walters <walters@verbum.org>
1490 * giscanner/glibast.py: Also register g variants of
1491 default_array_types. This is not beautiful, but
1492 good alternatives aren't easy to come by.
1493 This fixes gchar ** parsing.
1495 2008-10-20 Colin Walters <walters@verbum.org>
1497 * docs/typelib-format.txt, girepository/gtypelib.h:
1498 Take a bit from ObjectInfo to represent abstract flag.
1499 * giscanner/cgobject.py: Expose g_type_get_flags.
1500 * girepository/girepository.h: Add accessor.
1501 * girepository/ginfo.c: Implement it.
1502 * giscanner/ast.py: Add is_abstract flag to generic
1504 * giscanner/glibast.py: Use it.
1505 * giscanner/girwriter.py: Write it.
1506 * girepository/girparser.c: Parse it.
1509 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1511 * giscanner/girparser.py (_parse_function): don't lose
1512 'transfer-ownership' attributes when injecting, check for the
1515 2008-10-19 Johan Dahlin <johan@gnome.org>
1517 * giscanner/scannerlexer.l: Parse and ignore __asm.
1519 2008-10-19 Colin Walters <walters@verbum.org>
1521 * giscanner/girparser.py: Parse array length= to ensure
1522 it doesn't get lost from --inject.
1524 2008-10-17 Colin Walters <walters@verbum.org>
1526 Bug 556795 - char ** regression
1528 * giscanner/transformer.py: Fix parsing of ctypes, add some
1529 comments about what's going on.
1530 * tests/*: Add a test for char **.
1532 2008-10-17 Colin Walters <walters@verbum.org>
1534 Bug 556783 - change namespace handling to be more consistent
1536 * giscanner/transformer.py: Eliminate usage of
1537 strip_namespace_object. We now treat --namespace as the default
1538 --strip-prefix; however, if --strip-prefix is specified it
1539 overrides --namespace. This applies to everything except function
1540 names, where we do also strip the namespace.
1541 * giscanner/glibtransformer.py: Remove usage of
1542 strip_namespace_object.
1544 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1545 --namespace and --strip-prefix.
1547 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1549 Bug 556732 – generate gir files consistently
1551 * girepository/girparser.c (start_parameter):
1553 * tests/invoke/testfns-1.0.gir:
1554 * tools/generate.c (write_callable_info): write
1555 'transfer-ownership' attribute consistently with both
1556 return-value and parameter elements
1558 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1560 Bug 556732 – generate gir files consistently
1562 * tools/generate.c (write_callable_info): write 'direction'
1563 attribute only if other than 'in' to be consistent with
1566 * tests/object.gir: remove direction="in" which is the default
1568 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1570 Bug 556732 – generate gir files consistently
1572 * giscanner/ast.py (Field): add readable and writable properties
1573 * giscanner/girparser.py (_parse_field): copy 'readable' and
1574 'writable' attributes
1575 * giscanner/transformer.py (_create_member): create fields as
1577 * giscanner/glibtransformer.py (_introspect_object,
1578 _pair_class_struct): make object instance and class fields
1580 * giscanner/girwriter.py (_write_field):
1581 * tools/generate.c (write_field_info): write field 'readable'
1582 and 'writable' attributes only if non-default (read-only)
1583 * girepository/girparser.c (start_field): in the absence of
1584 attributes assume fields are read-only
1586 * tests/struct.gir: remove redundant readable="1" from fields
1587 * tests/scanner/foo-1.0-expected.gir:
1588 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1589 all record and union fields
1591 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1593 Bug 556732 – generate gir files consistently
1595 * giscanner/girwriter.py (_write_property): write properties
1596 'construct' attribute if set
1597 * tools/generate.c (write_property_info): write properties
1598 'readable' and 'writable' attributes only if non-default
1599 * tests/object.gir: add writable="0"
1600 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1602 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1604 * gir/glib-2.0.c: added annotations
1606 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1608 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1611 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1613 Bug 556610 – giscanner/girparser.py drops parameter options
1615 * tests/scanner/drawable-injected-1.0-expected.gir,
1616 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1617 * giscanner/ast.py: allow Parameter to take options in the constructor
1618 * giscanner/girparser.py: parse parameter options (transfer,
1619 direction, allow-none)
1621 2008-10-16 Colin Walters <walters@verbum.org>
1623 Bug 556185 - segfault on g_callable_info_get_return_type
1625 Initial patch from John Ehresman.
1627 * tests/repository/*: Add a test using
1628 g_callable_info_get_return_type. Instead of casting a
1629 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1630 to call g_type_info_get_interface.
1632 2008-10-16 Colin Walters <walters@verbum.org>
1634 Bug 556579 - union and struct name misresolved
1636 * giscanner/transformer.py: The calls to _resolve_type_name
1637 for struct/union names was a legacy holdover from when type
1638 resolution had multiple phases. Now it's actively harmful
1639 since we might pull in an identical name from another
1643 2008-10-16 Colin Walters <walters@verbum.org>
1645 Bug 556432 - transfer annotations and defaults
1647 * giscanner/transformer.py: Canonicalize type
1648 after removing *, not before. This ensures that
1649 guchar* is transformed to 'uint8'.
1650 Add some comments here.
1651 * giscanner/glibtransformer.py: Add _adjust_transfer
1652 phase for tweaking GObject transfers.
1655 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1657 * configure.ac: enable bunch of gcc warning CFLAGS
1659 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1661 Bug 556543 – reduce compiler warnings
1663 * girepository/ginfo.c:
1664 * girepository/girepository.c (register_internal,
1665 count_interfaces, find_interface, find_namespace_version,
1666 parse_version, g_irepository_require):
1667 * girepository/girmodule.c (g_ir_module_build_typelib):
1668 * girepository/girnode.c (init_stats, dump_stats,
1669 _g_irnode_init_stats, _g_irnode_dump_stats,
1670 g_ir_node_can_have_member):
1671 * girepository/girparser.c (firstpass_end_element_handler,
1672 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1673 start_alias, start_type, end_type_top, parse_include, cleanup,
1675 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1676 * giscanner/giscannermodule.c (directive_get_options,
1677 type_get_child_list):
1678 * giscanner/scannerlexer.l (parse_gtkdoc):
1679 * giscanner/scannerparser.y (ctype_free):
1680 * giscanner/sourcescanner.c:
1681 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1682 * tests/types/gitesttypes.c:
1683 * tools/compiler.c (main):
1684 * tools/generate.c (write_repository): Remove unused variables
1685 and code, add missing includes, declarations and case
1688 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1690 Bug 556541 – access union members through UnionBlob rather than
1693 * girepository/ginfo.c (g_union_info_find_method): access union
1694 members through UnionBlob rather than StructBlob
1696 2008-10-15 Colin Walters <walters@verbum.org>
1698 Bug 556331 - clean up includes handling
1700 * tools/g-ir-scanner: Rework command line arguments; now we take
1701 --add-include-path and --include separately.
1702 * giscanner/girwriter.py: Separate name= and version= in include
1704 * giscanner/ast.py: Add Include type.
1705 * giscanner/transformer.py: Cleanups to register_include now that
1706 we don't need to handle mixed filenames and relative arguments.
1707 * girepository/girparser.c: Parse name and version separately;
1708 this fixes a bug as a side effect where we weren't resolving
1709 through aliases for basic types.
1710 * girepository/girepository.c: Fix format string args.
1711 * gir/Makefile.am: Update.
1714 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1716 Bug 556434 – unhandled interface/object/... member types
1718 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1719 g_ir_node_build_typelib): Check all
1720 interface/object/boxed/struct/union members are processed and
1721 abort if they are not. (Mostly callbacks in structs, but also
1722 fields in interfaces.)
1724 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1726 * a/girepository/girnode.c (g_ir_node_build_members,
1727 g_ir_node_build_typelib): refactor common code for processing
1728 members to a function
1730 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1732 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1733 transformation is lossless (it's not)
1735 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1737 * tests/Makefile.am: fix tests to compare xml to xml instead of
1738 typelib to xml, and stop on error
1740 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1742 * tools/generate.c (write_type_name, write_type_info,
1743 write_type_info, write_object_info, write_object_info,
1744 write_interface_info, write_error_domain_info): reduce code
1747 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1749 Bug 556174 – parse types for lists etc.
1751 * girepository/girparser.c (end_type_recurse):
1753 * tools/generate.c (write_type_info, write_field_info,
1754 write_callable_info, write_callable_info, write_constant_info,
1755 write_property_info): use nested <type>s for lists and hashes
1757 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1760 * tests/object.gir: remove trailing whitespace from inside
1761 elements to match g-ir-generate output
1763 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1765 * tools/generate.c (xml_printf): quote printf arguments so that
1766 we don't generate invalid XML by writing unescaped double quotes
1767 and such in attributes
1769 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1771 * tools/generate.c (write_field_info, write_callable_info,
1772 write_function_info, write_callback_info, write_struct_info,
1773 write_constant_value, write_signal_info, write_vfunc_info,
1774 write_object_info, write_interface_info, write_union_info,
1775 write_repository): remove unused indent parameters, xmlwriter
1776 keeps track of necessary indentation
1778 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1780 * tools/generate.c (xml_element_new, xml_element_free,
1781 xml_start_element, xml_end_element, xml_end_element_unchecked,
1782 xml_open, xml_close): Keep track of generated XML tree and
1783 handle indentation and closing tags properly.
1784 (write_field_info, write_callable_info, write_function_info,
1785 write_callback_info, write_struct_info, write_value_info,
1786 write_constant_info, write_enum_info, write_signal_info,
1787 write_vfunc_info, write_property_info, write_object_info,
1788 write_interface_info, write_error_domain_info, write_union_info,
1789 write_repository): Use xml_start_element and xml_end_element to
1792 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1794 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1795 (write_type_name, write_type_info, write_field_info,
1796 write_callable_info, write_function_info, write_callback_info,
1797 write_struct_info, write_value_info, write_constant_value,
1798 write_constant_info, write_enum_info, write_signal_info,
1799 write_vfunc_info, write_property_info, write_object_info,
1800 write_interface_info, write_error_domain_info, write_union_info,
1801 write_repository): wrap all FILE access to go through simple xmlwriter
1803 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1805 Bug 556400 – Fails to build on OS X 10.4
1807 * configure.ac: check for functions backtrace and backtrace_symbols
1808 * girepository/girparser.c (backtrace_stderr): Comment out
1809 implementation if the functions are not available.
1810 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1811 directory for better portability
1813 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1815 Bug 556433 – assume direction = out for int * parameters
1817 * giscanner/ast.py: define a list of types for which, if passed as
1818 reference, we assume a default direction of 'out'
1819 * giscanner/transformer.py: if a type has type pointer to one of the
1820 previously defined types, and no direction is set, assume out.
1821 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1823 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1825 * tests/scanner/annotation.c: fixed a few copy-paste errors
1827 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1829 Bug 556323 – transfer-ownership is wrong for functions returning const
1832 * giscanner/transformer.py: check for a const string as return value,
1833 not just const char*. Suggested by Colin Walters
1834 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1836 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1838 * girepository/ginfo.c, girepository/girepository.h: add
1839 g_union_info_find_method
1841 2008-10-14 Colin Walters <walters@verbum.org>
1843 * tests/repository/Makefile.am: Reenable repo test.
1844 * tests/repository/gitestrepo.c: Prepend search
1845 path for $(top_builddir)/gir dir so that we don't
1846 require installation for "make check" to pass.
1848 2008-10-13 Jürg Billeter <j@bitron.ch>
1850 * giscanner/glibtransformer.py:
1851 * tests/scanner/annotation-1.0-expected.gir:
1852 * tests/scanner/drawable-1.0-expected.gir:
1853 * tests/scanner/foo-1.0-expected.gir:
1854 * tests/scanner/utility-1.0-expected.gir:
1856 Support fields in GObject structs
1858 2008-10-13 Jürg Billeter <j@bitron.ch>
1860 * giscanner/ast.py: add signed integer and off_t to type_names
1862 2008-10-12 Jürg Billeter <j@bitron.ch>
1864 * giscanner/girparser.py: Parse bits attribute of fields
1866 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1868 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1869 * tests/repository/gitestrepo.c (main): instantiate
1870 'GCancellable' to ensure the GType is registered before using
1873 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1875 * giscanner/girparser.py: actually add the parsed constant nodes
1877 2008-10-12 Colin Walters <walters@verbum.org>
1879 * girepository/girepository.c: Don't cast DirEntry to Blob,
1880 actually look it up by offset.
1882 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1884 * giscanner/girparser.py: parse constant nodes in gir files
1886 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1888 * giscanner/transformer.py: prefix for constants have an underscore,
1889 so remove them as if they were functions, not objects.
1891 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1893 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1896 2008-10-12 Colin Walters <walters@verbum.org>
1898 Initial patch from Jani Monoses.
1900 * girepository/gtypelib.c: Fix inverted test for success
1903 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1905 * tools/generate.c (write_callable_info): use "transfer-ownership"
1906 attribute for return values
1908 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1910 * tools/generate.c (write_callable_info): move "transfer" and
1911 "null-ok" attributes from <function> to <return-value> element
1913 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1915 * girepository/girparser.c (start_return_value): handle
1916 "transfer-ownership" attribute
1918 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1920 * girepository/girparser.c (parse_param_transfer):
1921 * tools/generate.c (write_callable_info): use "container" for
1922 container/shallow ownership transfer (not "shallow")
1924 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1926 * girepository/girparser.c (parse_param_transfer,
1927 start_parameter): Refactor handling of transfer=none/shallow/full
1928 to separate function
1930 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1932 Bug 556048 – Crash in g_irepository_find_by_gtype
1934 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1935 * girepository/girepository.c (find_interface): Fix
1936 find_by_gtype case to get the type name from right offset
1938 2008-10-12 Jürg Billeter <j@bitron.ch>
1940 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1943 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1945 * girepository/gtypelib.h (RegisteredTypeBlob): make
1946 'unregistered' one bit wide as everywhere else
1948 2008-10-12 Jürg Billeter <j@bitron.ch>
1950 * giscanner/glibtransformer.py:
1951 * tests/scanner/annotation-1.0-expected.gir:
1952 * tests/scanner/drawable-1.0-expected.gir:
1953 * tests/scanner/drawable.h:
1954 * tests/scanner/foo-1.0-expected.gir:
1955 * tests/scanner/utility-1.0-expected.gir:
1957 Readd class records as workaround to not break Gtk typelib
1959 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1961 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1963 2008-10-12 Jürg Billeter <j@bitron.ch>
1965 * giscanner/glibtransformer.py: Don't generate <record> elements
1967 * tests/scanner/*: Update test cases
1969 2008-10-11 Colin Walters <walters@verbum.org>
1971 Bug 552858: versioning
1973 This is a big patch. You should probably remove your installation
1976 * docs/typelib-format.txt: Add nsversion entry which holds
1977 version of namespace.
1978 * girepository/girepository.h: Add 'version' parameter to
1979 g_irepository_require. This may be NULL. Normally
1980 bindings should pass an explicit version though.
1981 * girepository/girepository.c: Lots of infrastructure to
1982 support versioning. Add some more documentation. Disallow
1983 some usage of NULL namespaces.
1984 * girepository/girmodule.c: Add version parameter.
1985 * girepository/gtypelib.c: Update header size.
1986 * giscanner/ast.py: Add version to Namespace.
1987 * giscanner/girparser.py: Parse version attribute from
1988 XML, pass to Namespace.
1989 * giscanner/girwriter.py: Write out version parameter.
1990 * giscanner/transformer.py: Clean up include registration.
1991 * tests/*: Add version attribute.
1992 * tests/invoke/invoke.c: Don't try looking up test before
1993 it's loaded in repository.
1994 * tools/generate.c: Output version parameter.
1995 * gir/Makefile.am: Add 2.0 version to .gir files.
1997 2008-10-11 Colin Walters <walters@verbum.org>
1999 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
2000 if we have mismatched parens.
2002 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2004 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
2005 on 'members' variable.
2007 2008-10-11 Colin Walters <walters@verbum.org>
2009 Bug 555947 - update annotations syntax
2011 * giscanner/ast.py: Default to None for transfer. Remove
2012 default transfers for container types; we require this to
2014 * giscanner/girwriter.py: Transfer is now 'none', 'container',
2015 'full' to match repository.
2016 * giscanner/scannerlexer.l: Annotations now are parenthesized.
2017 * giscanner/transformer.py: Update for new annotations syntax.
2020 2008-10-11 Johan Bilien <jobi@litl.com>
2022 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
2024 2008-10-11 Johan Bilien <jobi@litl.com>
2026 Bug 552347: Parse #defines constants
2028 * girepository/gtypelib.c: update the list of value_size
2029 with recently defined type tags
2030 * giscanner/scannerparser.y: brought back parsing of #defined, as
2031 present in older version
2032 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
2033 * giscanner/girwriter.py: write out constant tags in the gir
2034 * giscanner/sourcescanner.py: add accessor for const_string
2035 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
2038 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
2040 Bug 555946: Install a test module exercising all types, transfer
2045 * tests/types/*: Add and install a test module that has functions
2046 accepting and returning most of the basic types to enable bindings
2047 implementors to more easily test their type conversion routines.
2049 2008-10-11 Jürg Billeter <j@bitron.ch>
2051 Bug 552374: Const strings should be identified in the gir.
2053 * giscanner/transformer.py: support string memory management
2054 * tests/scanner/foo.h: use char * and const char *
2055 * tests/scanner/foo-expected.gir: test that
2057 2008-10-11 Johan Dahlin <johan@gnome.org>
2059 * giscanner/girparser.py:
2060 Also parse enums which are not glib types.
2062 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2064 Bug 552370: add one more test for unsigned as a type, not as
2067 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
2068 * test/scanner/foo.h: add function which uses unsigned as a type.
2069 * test/scanner/foo-expected.gir: test that.
2071 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
2073 Bug 555712: Struct and union issues
2075 * giscanner/scannerparser.y (struct_declarator): Use information
2076 provided about the bit width of a field.
2077 * giscanner/transformer.py (Transformer._create_member): Pass the
2078 symbol's const_int member to the created field (it represents the
2080 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
2081 field attribute, if present.
2082 * giscanner/ast.py (Field): Add 'bits' member, specifying the
2083 width in bits of the field (only relevant for bitfields).
2086 * giscanner/transformer.py (Transformer._create_typedef_struct)
2087 (Transformer._create_typedef_union): Add calls to _create_struct()
2088 and _create_union(), respectively. This causes the scanner to
2089 generate output for fields of struct and union typedefs.
2092 2008-10-11 Jürg Billeter <j@bitron.ch>
2094 Bug 552370: unsigned not scanned properly
2096 * giscanner/scannerparser.y: combine basic types such as unsigned
2097 int and long long when scanning
2098 * tests/scanner/foo-expected.gir:
2099 * tests/scanner/foo.c: (foo_test_unsigned):
2100 * tests/scanner/foo.h: test that
2102 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2104 Bug 554854: The --typelib-xml and --inject options should reuse
2105 giscanner parser/writer.
2107 * giscanner/ast.py: add constructor list to Struct and Union.
2108 Add new param in Return's contructor to define transfer.
2109 * giscanner/girparser.py: several additions to the parser in order
2110 to have parsing all nodes of the gir xml files.
2111 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
2112 and writer in --inject and --typelib-xml options.
2113 * giscanner/xmlwriter.py: ignore empty attributes instead of
2114 raising an error as this basically exposes a bug in GIRParser.
2115 This should be reverted as soon as the parser is fixed.
2117 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2119 Bug 552376: scanner generates wrong names for enum members when
2120 there's no defined gtype.
2122 * giscanner/utils.py (strip_common_prefix): Always strip common
2123 prefix exactly up to the last "_", and not beyond.
2124 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
2125 here is that the first character after the last '_' should should be
2126 the same as the character in the same position on the type name.
2127 * tests/scanner/foo-expected.gir: test that
2129 2008-10-10 Lucas Rocha <lucasr@gnome.org>
2131 Bug 555293: append library_paths to LPATH env variable to work
2132 around a bug in find_library when using ldconfig.
2134 * tools/g-ir-scanner (main): ditto.
2136 2008-10-09 Lucas Rocha <lucasr@gnome.org>
2138 * girepository/girepository.c (register_internal): fix regression on
2139 invoke test case by making sure we load the global module in the
2140 typelib when dealing with inline typelibs.
2141 * girepository/gtypelib.c: a couple of coding style fixes.
2143 2008-10-06 Lucas Rocha <lucasr@gnome.org>
2145 Bug 555294: Add support for multiple shared libraries per typelib.
2147 * girepository/ginvoke.c (g_function_info_invoke),
2148 girepository/ginfo.c(g_registered_type_info_get_g_type): use
2149 g_typelib_symbol instead of g_module_symbol.
2150 * girepository/girepository.h: remove g_typelib_set_module and add
2152 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
2153 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
2154 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
2155 modules instead of just one. The symbol lookup is now abstracted
2156 behind g_typelib_symbol which tries to find the passed symbol name in
2158 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
2159 and write shared_library attribute as a comma-separated list of libs.
2161 2008-10-06 Colin Walters <walters@verbum.org>
2163 * giscanner/transformer.py: Parse length= annotation as
2164 a parameter name, not a raw int.
2167 2008-10-03 Colin Walters <walters@verbum.org>
2169 Bug 551744: Non-GObject types aren't aggregating ctors and methods
2171 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
2173 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
2177 2008-10-03 Colin Walters <walters@verbum.org>
2179 Bug 554576: scan problem with ev_selection_render_selection()
2181 * giscanner/transformer.py: Only do type resolution once we've
2182 scanned all types. What could happen before is that we'd strip
2183 the namespace from local type "EvSelection" => Selection, and
2184 then later pull a "Selection" from some other namespace because
2185 we hadn't yet seen the local EvSelection. This could come
2186 down to hash table ordering and other things so not easy
2187 to write a test for.
2189 2008-10-03 Lucas Rocha <lucasr@gnome.org>
2191 * giscanner/girwriter.py (_parser_member): fix the last parameter of
2192 GLibEnumMember constructor as it should be the enum member nick.
2194 2008-10-02 Colin Walters <walters@verbum.org>
2196 Bug 552961: remove this parameter for methods
2198 * giscanner/glibtransformer.py: Delete this parameter; it is
2200 * girepository/ginvoke.c: Insert this parameter for methods.
2201 * girepository/gtypelib.c: Remove no longer needed verification of
2202 method this parameter.
2205 2008-09-30 Dan Winship <danw@gnome.org>
2207 Bug 554490: g-ir-scanner gets confused by '\\'
2209 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
2210 backslashes so it will correctly parse '\\' and "\\"
2212 * tests/scanner/annotation.c: add a use of '\\' to make sure that
2215 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
2217 2008-10-02 Colin Walters <walters@verbum.org>
2219 bug 552393: Note variadic functions
2221 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
2222 to use parameter_list directly.
2223 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
2224 * giscanner/ast.py: Add Varargs type.
2225 * giscanner/transformer.py: Check for ellipsis symbol, transform
2227 * girepository/girnode.h: Add varargs flag to in-memory nodes.
2228 Parse varargs functions, but filter them out before we start
2229 compiling the typelib.
2231 2008-10-02 Colin Walters <walters@verbum.org>
2233 Bug 554632: type tag for GType
2235 * girepository/girepository.h, girepository/girepository.c:
2236 Add type tag for GType - it's a special type we don't want
2237 to resolve to just "long".
2238 * docs/typelib-format.txt: Update.
2239 * girepository/girparser.c: Parse it.
2240 * giscanner/glibtransformer.py: Ensure we don't put GType in
2242 * tools/generate.c: Remove hardcoded type list.
2245 2008-09-30 Dan Winship <danw@gnome.org>
2247 Bug 554521: scanner generates wrong names for enum members with
2248 full type name prefix
2250 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
2251 right amount when the entire "first" string is a prefix of
2254 * tests/scanner/foo.h (FooEnumFullname):
2255 * tests/scanner/foo-expected.gir: test that
2257 2008-09-29 Colin Walters <walters@verbum.org>
2259 Bug 552380: Array parameters should be marked in the gir
2261 * giscanner/ast.py: Default char** to utf8[], and guchar* to
2262 uint8[]. Add Array, List, and Map subclasses of Type;
2263 these types can be generic. Return transfer defaults
2264 to true if return value is string or container type.
2265 Delete Sequence type.
2266 * giscanner/scannerlexer.l: Syntax change for annotations;
2267 use <> since it's more readable.
2268 * giscanner/girwriter.py: Write out these changes.
2269 * giscanner/girparser.py: Parse them.
2270 * giscanner/transformer.py: Have a defined set of
2271 both list and map types. When creating a type,
2272 check if the ctype we've parsed is one of them,
2273 if so create a container type subclass as appropriate.
2274 * girepository/girparser.c: Parse in generic types.
2277 2008-09-27 Colin Walters <walters@verbum.org>
2279 * tools/g-ir-scanner: Add --inject option.
2281 2008-09-25 Colin Walters <walters@verbum.org>
2283 Remove non-repository types from GIR
2285 * giscanner/ast.py: The canonical name is 'utf8', not
2287 * giscanner/glibast.py: A few more glib type mappings.
2288 * girepository/girparser.c: We only parse repository types.
2289 * tests/*.gir: Update.
2291 2008-09-23 Colin Walters <walters@verbum.org>
2293 Bug 552566: Add time_t type
2295 We need a type for time_t since it's special in C, and just
2296 mapping it to long precluded bindings from handling it
2299 2008-09-19 Colin Walters <walters@verbum.org>
2301 Bug 552390: Handle capitialization like "DBus" more robustly
2303 The to_underscores function was designed for use against prefixed
2304 names; we need a separate function which will convert names like
2305 DBusFoo into dbus_foo, not d_bus_foo.
2307 2008-09-19 Colin Walters <walters@verbum.org>
2309 Add check to make sure we're not hitting out unresolved types
2311 Validate the "this" argument for methods
2313 Remove heuristic matching of methods to classes based on prefix
2315 It was a broken hack that dated from when we handled underscoring
2316 and capitalization conventions less well.
2318 2008-09-18 Colin Walters <walters@verbum.org>
2320 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
2322 On Darwin, the suffix for installed shared libraries (.dylib) is
2323 different from loadable modules (.so). We use a bit of magic shell
2324 script from Behdad Esfahbod to figure out the right suffix.
2326 2008-09-15 Johan Dahlin <johan@gnome.org>
2328 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
2329 a wrapper for type_qualifier as well.
2331 2008-09-15 Colin Walters <walters@verbum.org>
2333 http://bugzilla.gnome.org/show_bug.cgi?id=552065
2335 * giscanner/ast.py: Add deprecation attributes.
2336 * giscanner/girwriter.py: Write out deprecation data.
2337 * girepository/girparser.c: Relax parsing; deprecated
2338 attribute now includes freeform string.
2339 * giscanner/scannerlexer.l: Parse Deprecated.
2340 * giscanner/transformer.py: Look for deprecated attribute
2342 * tests/scanner/*: Add a Deprecated test.
2344 2008-09-14 Tor Lillqvist <tml@novell.com>
2346 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
2348 2008-09-14 Colin Walters <walters@verbum.org>
2350 * giscanner/glibtransformer.py: Ignore functions with
2353 2008-09-12 Colin Walters <walters@verbum.org>
2355 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
2357 2008-09-12 Colin Walters <walters@verbum.org>
2359 * giscanner/ast.py: Bind pid_t to INT for vte.
2361 2008-09-12 Colin Walters <walters@verbum.org>
2363 * giscanner/girparser.py: Parse c:type for boxed records/unions.
2364 * giscanner/glibast.py: Avoid overwriting ctype.
2365 * giscsanner/transformer.py: Try resolving types using the GType names.
2367 2008-09-12 Colin Walters <walters@verbum.org>
2369 * giscanner/minixpath.py: Code to run an "XPath"
2370 assertion against an XML tree, taken from
2371 gir-repository/gir/tests.py.
2372 * giscanner/Makefile.am: Ship it.
2373 * tools/g-ir-scanner: Add --xpath-assertions option.
2374 * gir/GLib-assertions.txt: Add a few assertions.
2375 * gir/Makefile.am: Run them.
2377 2008-09-11 Colin Walters <walters@verbum.org>
2379 http://bugzilla.gnome.org/show_bug.cgi?id=551737
2381 * giscanner/transformer.py: Fix strip_namespace_func to only strip
2382 prefix if it ends with _. Tweak callback stripping to determine
2383 based on presence of _ whether we need to use strip_namespace_func
2384 or strip_namespace_object.
2386 2008-09-09 Owen Taylor <otaylor@redhat.com>
2388 * docs/typelib-format.txt: Wether => Whether
2390 2008-09-08 Colin Walters <walters@verbum.org>
2392 * girepository/girparser.c: Default to "readable" for properties.
2393 * giscanner/ast.py: Add readable, writable etc.
2394 * giscanner/girwriter.py: Writ them.
2395 * giscanner/glibtransformer.py: Inspect them.
2398 2008-09-07 Colin Walters <walters@verbum.org>
2400 * giscanner/cgobject.py: Add comment.
2402 2008-09-07 Colin Walters <walters@verbum.org>
2404 * giscanner/cgobject.py: Also call g_thread_init.
2406 2008-09-07 Colin Walters <walters@verbum.org>
2408 * giscanner/transformer.py: Fix regression by not
2409 stripping prefix before stripping namespace for unions
2412 2008-09-06 Colin Walters <walters@verbum.org>
2414 * giscanner/transformer.py: If a namespace contains
2415 multiple caps, try stripping both gnomekeyring_ and
2418 2008-09-07 Johan Dahlin <johan@gnome.org>
2420 Bug 551162 – giscanner does not recognize asm and __asm__
2421 * giscanner/scannerlexer.l:
2422 Patch by Jani Monoses.
2424 2008-09-06 Colin Walters <walters@verbum.org>
2426 * girepository/girnode.c: Allow gtype_name
2427 and gtype_init in struct and union.
2428 * girepository/girparser.c: Parse glib:
2429 boxed bits for both structure and union.
2430 * girepository/gtypelib.c: Don't barf
2431 if structure is boxed.
2432 * giscanner/girparser.py: Parse new XML
2434 * giscanner/girwriter.py: Write out new
2436 * giscanner/glibast.py: Define new classes
2437 which are both Boxed and Struct/Union, as
2438 well as an "Other" for everything else.
2439 * giscanner/glibtransformer.py: Handle
2440 boxed types specially; we try to merge
2441 them with a struct/union if one exists,
2442 otherwise fall back to generic boxed.
2444 * tools/generate.c: Write out new format.
2446 2008-09-06 Johan Dahlin <johan@gnome.org>
2448 * giscanner/grealpath.h: Include stdlib.h
2450 * docs/g-ir-generate.1: Remove leading %
2452 2008-09-01 Colin Walters <walters@verbum.org>
2454 * girepository/girparser.c: Look at c:type to determine
2455 whether or not an item is a pointer.
2457 2008-09-01 Johan Dahlin <johan@gnome.org>
2459 * tests/scanner/Makefile.am:
2460 Set PYTHONPATH so the scanner can run
2461 even if you didn't install anything.
2463 2008-09-01 Johan Dahlin <johan@gnome.org>
2466 Post-release version bump
2469 2008-09-01 Johan Dahlin <johan@gnome.org>
2473 2008-08-31 Colin Walters <walters@verbum.org>
2475 * giscanner/glibtransformer.py: Quiet info
2478 2008-08-31 Johan Dahlin <johan@gnome.org>
2481 Bump version to 0.5.0
2483 2008-08-31 Colin Walters <walters@verbum.org>
2485 * giscanner/glibtransformer.py: Follow aliases to ensure
2486 we don't get a constructor returning a basic type.
2487 * giscanner/transformer.py: Add function to follow aliases.
2490 2008-08-31 Johan Dahlin <johan@gnome.org>
2492 * giscanner/scannerlexer.l:
2493 * giscanner/scannerparser.y:
2494 * giscanner/sourcescanner.h:
2495 * giscanner/sourcescanner.py:
2496 Parse GCC extensions in the parser instead of just undeffing them
2497 in the pre-processor.
2499 2008-08-31 Johan Dahlin <johan@gnome.org>
2501 * giscanner/glibtransformer.py:
2502 Clean up a huge if. Do not add methods or constructors
2504 * giscanner/utils.py:
2505 second might be longer than first, check that.
2507 2008-08-31 Johan Dahlin <johan@gnome.org>
2512 2008-08-31 Colin Walters <walters@verbum.org>
2514 * girepository/girparser.c: Don't lose if we
2517 2008-08-31 Colin Walters <walters@verbum.org>
2519 * giscanner/glibtransformer.py: Look for libtool
2520 library in current directory
2521 * tests/scanner - Update.
2523 2008-08-30 Colin Walters <walters@verbum.org>
2525 * docs/typelib-format.txt: Add a guint32
2527 * gir/Makefile.am: Dep on Makefile
2528 * girepository/ginfo.c:
2529 * girepository/girepository.c: Clean up
2530 default typelib handling; remove global
2531 default_typelib variable. Ensure we handle
2532 NULL repository in more places.
2533 Support dependency resolution.
2534 Support lazy loading.
2535 * girepository/girepository.h: Remove
2536 g_irepository_unregister; we don't support
2537 unloading typelibs since really they're
2538 process-global. Update for lazy loading
2540 * girepository/girmodule.c: Use g_new0.
2541 Add dependencies to GirModule.
2542 * girepository/girparser.c: Parse dependencies.
2543 * girepository/gtypelib.c: Add 4 bytes for
2545 * tests/Makefile.am: Kill off gobject.gir,
2546 it conflicts with the real one.
2547 * tests/object.gir: Dep on GObject.
2548 * tools/generate.c: Take --includedir
2549 argument to say which directories to search
2550 for typelibs. Print out dependencies.
2552 2008-08-30 Colin Walters <walters@verbum.org>
2554 * giscanner/glibtransformer.py: Reduce warning noise.
2556 2008-08-29 Colin Walters <walters@verbum.org>
2558 * girepository/ginfo.c: Add some assertions regarding
2559 refcounts, just to be sure.
2560 * giscanner/glibtransformer.py: Blacklist a few more
2563 2008-08-29 Colin Walters <walters@verbum.org>
2565 * giscanner/glibtransformer.py: Blacklist a few
2566 functions that use GError oddly
2568 2008-08-29 Colin Walters <walters@verbum.org>
2570 * girepository/gtypelib.c: Don't crash if no
2573 2008-08-29 Colin Walters <walters@verbum.org>
2575 * girepository/girparser.c: Handle chains of aliases
2576 across modules by ensuring we fully qualify aliases
2579 2008-08-29 Colin Walters <walters@verbum.org>
2581 * girepository/girparser.c: Don't search aliases
2584 2008-08-29 Colin Walters <walters@verbum.org>
2586 * girepository/girparser.c: Rewrite type parsing
2587 to handle both GLib parsing case as well as correctly
2588 handling GLib.List and friends. Don't try to treat
2589 e.g. ListStore as a List.
2591 2008-08-29 Colin Walters <walters@verbum.org>
2593 * girepository/gtypelib.c: Add more context
2596 2008-08-29 Colin Walters <walters@verbum.org>
2598 * giscanner/glibtransformer.py: Add some informative
2599 logging messages in corner cases. Be sure we use
2600 the most recent node set instead of a cache
2601 when generating result set.
2602 * tests/: Remove duplicated bits in expected girs
2603 * girepository/girparser.c: Accept both List (for
2604 compiling GLib) and GLib.List (what the scanner
2607 * tools/generate.c: Generate canonical form.
2609 2008-08-29 Johan Dahlin <johan@gnome.org>
2611 * giscanner/config.py.in:
2612 Use datarootdir instead of datadir to avoid
2613 an autoconf warning.
2615 2008-08-29 Johan Dahlin <johan@gnome.org>
2619 * examples/gdk-pixbuf.gidl:
2621 Update and remove old cruft.
2623 2008-08-29 Johan Dahlin <johan@gnome.org>
2626 * docs/g-ir-compiler.1:
2627 * docs/g-ir-generate.1:
2628 * docs/g-ir-scanner.1:
2629 Add man pages for the generator and compiler.
2631 2008-08-29 Johan Dahlin <johan@gnome.org>
2633 * docs/g-ir-scanner.1: Document
2635 * giscanner/Makefile.am:
2636 * giscanner/gidlparser.py:
2637 * giscanner/gidlwriter.py:
2638 * tools/g-ir-scanner:
2639 Remove gidl support.
2641 2008-08-28 Colin Walters <walters@verbum.org>
2643 * tests/scanner/Makefile.am: Pass the right
2644 --includedir args. Add a Makefile dep.
2645 * tools/compiler.c: Pass includedirs down.
2646 * girepository/girparser.c: Actually put
2647 includedirs in context, pass down. Fix
2650 2008-08-28 Colin Walters <walters@verbum.org>
2652 * gir/Makefile.am: Use --includedir
2653 * girepository/girparser.c: Recursively parse
2654 includes to pull in aliases and expand them.
2655 We need this to avoid putting unknown names in
2657 * tools/compiler.c: Add --includedir option.
2658 * giscanner/ast.py: Map size/ssize to types
2661 2008-08-28 Tor Lillqvist <tml@novell.com>
2663 Make check now runs successfully on Windows.
2665 * tools/compiler.c (write_out_typelib): Use binary mode for output
2668 * girepository/girnode.c: Don't print NULL strings.
2670 * tests/invoke/Makefile.am
2671 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2672 convince libtool to build shared libraries.
2674 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2675 g_assert() instead of printing out expected errors.
2677 2008-08-28 Tor Lillqvist <tml@novell.com>
2679 * girepository/gtypelib.h: Change type of bitfield fields from
2680 guint to the most suitable smaller type. This makes the struct
2681 sizes match the ones on Linux that the sanity check expects when
2682 using gcc -mms-bitfields on Windows.
2684 2008-08-28 Johan Dahlin <johan@gnome.org>
2689 * giscanner/Makefile.am:
2690 * tests/Makefile.am:
2691 * tests/scanner/Makefile.am:
2692 Make distcheck pass.
2694 2008-08-27 Johan Dahlin <johan@gnome.org>
2696 * giscanner/Makefile.am:
2697 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2699 2008-08-27 Tor Lillqvist <tml@novell.com>
2701 Make g-ir-scanner work on Windows. Still problems with the typelib
2702 code. Changes okayed by jdahlin.
2704 * configure.ac: Check for Windows, set Automake conditional
2705 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2706 avoid shell quoting issues
2708 * girepository/Makefile.am: Use -no-undefined so that libtool
2709 agrees to build a shared library on Windows.
2711 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2712 Windows. Empty implementation on Windows so far.
2714 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2715 informative error message for the assertion failures. Tell also
2716 what the expected size of the struct is. Check all sizes first and
2717 fail afterwards if at least one size was different from expected.
2719 * tools/Makefile.am: Reorder libraries into proper logical
2722 * tools/generate.c: Don't include <dlfcn.h>, not used.
2724 * giscanner/Makefile.am: On Windows, link with the Python library,
2725 and install the module DLL as _giscanner.pyd. Remove the
2726 unnecessary import library and libtool library that libtool has
2729 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2730 and just skip it. Recognize also two "l" suffixes for long long
2731 constants. Recognize also __inline__.
2733 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2734 GetFullPathName(). As such, GetFullPathName() does more than the
2735 UNIX realpath(). It also changes relative paths into absolute
2736 paths. But for our purposes that shouldn't matter.
2738 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2739 Windows the file descriptor passed to us is from Python. Python
2740 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2741 uses msvcrt.dll. On Windows, file descriptors are specific to
2742 which C library is used. So we must find out what underlying OS
2743 handle corresponds to the file descriptor Python passes us, and
2744 then make that into a file descriptor valid for the C library this
2747 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2748 __attribute__ as the lexer now handles it. The definition as empty
2749 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2750 __attribute__. Close the temp file before unlinking it.
2752 * giscanner/cgobject.py: Use correct library name for the gobject
2755 * gir/Makefile.am: Must pass the full basename of the DLLs on
2756 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2757 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2758 reality they won't change, until there is a GLib 3, and then also
2759 the Unix code here needs changing.
2761 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2764 2008-08-26 Colin Walters <walters@verbum.org>
2766 * girepository/girepository.c: Search
2767 $DATADIR/girepository instead of
2768 $DATADIR/gitypelibs; this naming makes
2769 it clearer that e.g. jgir can install
2771 * gir/Makefile.am: Install there.
2773 2008-08-26 Colin Walters <walters@verbum.org>
2775 * girepository/gtypelib.c (_g_typelib_init): Also
2776 use G_MODULE_SUFFIX instead of hardcoding .so.
2778 2008-08-26 Colin Walters <walters@verbum.org>
2780 * girepository/gtypelib.c (_g_typelib_init): Free
2781 string in the right place.
2783 2008-08-26 Colin Walters <walters@verbum.org>
2785 * girepository/gtypelib.c (_g_typelib_init): Handle
2786 both .la and .so names; this works better in the
2787 uninstalled library case.
2789 2008-08-26 Johan Dahlin <johan@gnome.org>
2792 * giscanner/Makefile.am:
2793 * giscanner/cgobject.py:
2794 * giscanner/config.py.in:
2795 * giscanner/sourcescanner.py:
2796 Avoid undeffing __GNUC__, instead define
2797 __attribute__ & friends. Remove glibconfig.h hack.
2798 This makes gobject-introspection work better on
2799 MacOS X, Thanks to Richard Hult for kind help.
2801 2008-08-25 Colin Walters <walters@verbum.org>
2803 * giscanner/glibtransformer.py: Always print
2806 2008-08-25 Colin Walters <walters@verbum.org>
2808 * giscanner/glibtransformer.py: Skip over
2809 interfaces we don't know.
2811 2008-08-25 Colin Walters <walters@verbum.org>
2813 * girepository/girparser.c: Parse new implements
2814 syntax, drop gapi one.
2815 * tests/object.gir: Update.
2816 * tools/generate.c: Generate new syntax.
2818 2008-08-25 Colin Walters <walters@verbum.org>
2820 * giscanner/ast.py: Add interfaces property
2822 * giscanner/girwriter.py: Write out implemented
2824 * giscanner/glibtransformer.py: Introspect
2825 implemented interfaces.
2826 * tests/scanner/*: Make FooObject implement
2829 2008-08-25 Colin Walters <walters@verbum.org>
2831 * giscanner/glibtransformer.py: More correctly pair
2832 methods; if we have a symbol that starts with
2833 e.g. hippo_canvas look for a matching HippoCanvas
2834 class before accepting e.g. HippoCanvasImage.
2836 2008-08-24 Colin Walters <walters@verbum.org>
2838 * tools/g-ir-scanner: Filter out unknown options from
2841 2008-08-24 Colin Walters <walters@verbum.org>
2843 * giscanner/glibtransformer.py: Fail with better
2844 error if we can't find library.
2846 2008-08-24 Colin Walters <walters@verbum.org>
2848 * tools/g-ir-scanner: Use subprocess instead of
2849 commands, works on Windows and avoids the evil
2852 2008-08-24 Colin Walters <walters@verbum.org>
2854 * giscanner/glibtransformer.py: Skip over
2855 g_object_get_type from GLib trunk.
2857 2008-08-24 Colin Walters <walters@verbum.org>
2859 * girepository/girepository.c (g_irepository_require):
2860 Don't open shared library here; we already do it
2863 2008-08-24 Colin Walters <walters@verbum.org>
2865 * girepository/gtypelib.c: Add context stack so
2866 when we get an error we can print out nicely
2869 2008-08-24 Johan Dahlin <johan@gnome.org>
2871 * girepository/girparser.c (start_glib_boxed), (start_function),
2872 (start_field), (start_alias):
2873 Refactor a couple of parsing functions to be simpler to follow.
2876 2008-08-24 Johan Dahlin <johan@gnome.org>
2878 * girepository/girparser.c (start_function):
2879 Remove left-over code, checking type of function.
2881 2008-08-23 Colin Walters <walters@verbum.org>
2883 * giscanner/config.py: Define DATADIR.
2884 * giscanner/transformer.py: Look in DATADIR.
2886 2008-08-23 Colin Walters <walters@verbum.org>
2888 * girepository/gtypelib.c: Check constructor
2890 * girepository/girnode.c: Small tweaks.
2891 * girepository/ginfo.c: Calculate signature offsets
2893 * girepository/girparser.c: Remove duplicate
2895 * giscanner/glibtransformer.py: Avoid marking
2896 functions which return a basic type as
2899 2008-08-23 Colin Walters <walters@verbum.org>
2901 * girepository/girparser.c: Ignore <include>.
2902 * giscanner/girparser.py: Parse them.
2903 * giscanner/girwriter.py: Generate them.
2904 * giscanner/transformer.py: Process <include>
2905 recursively. Don't require full path for
2906 includes, look in {$XDG_DATA_DIRS}/gir.
2907 * tools/g-ir-scanner: Pass through includes.
2908 * Makefile.am: Remove extra --include
2910 * *-expected.gir: Add expected includes.
2912 2008-08-23 Johan Dahlin <johan@gnome.org>
2914 * tests/scanner/Makefile.am:
2915 * tests/scanner/annotation-expected.gir:
2916 * tests/scanner/drawable-expected.gir:
2917 Avoid duplication in the Makefile, regenerate with new
2918 namespaces (same as the filename)
2920 2008-08-22 Colin Walters <walters@verbum.org>
2922 * girepository/girnode.c: Don't hardcode integers,
2925 2008-08-22 Johan Dahlin <johan@gnome.org>
2927 * giscanner/sourcescanner.py:
2928 Check for ../gobject-introspection-1.0.pc.in to determine
2929 if we run installed or uninstalled.
2931 2008-08-22 Johan Dahlin <johan@gnome.org>
2934 * giscanner/sourcescanner.py:
2935 Send in undefs/defines via writing it directly to stdin
2936 of cpp instead of via arguments.
2938 2008-08-22 Colin Walters <walters@verbum.org>
2940 * tools/generate.c, tools/compiler.c: Default
2942 * all Makefile.am: Update.
2944 2008-08-22 Colin Walters <walters@verbum.org>
2946 * girepository/girparser.c: Pass through
2947 recursive types. Avoid overwriting errors.
2948 * giscanner/xmlwriter.py: Always write the
2950 * tests/*.gir: Adjust.
2951 * tests/scanner/Makefile.am: Build typelibs,
2952 and generate XML from those. Once we
2953 have a good diff mechanism...
2954 * tests/scanner/*-expected.gir: Add XML
2956 * tools/g-ir-scanner: Accept --typelib-xml
2958 * tools/generate.c: Better defaults for transfer.
2960 2008-08-22 Johan Dahlin <johan@gnome.org>
2964 * giscanner/Makefile.am:
2965 * giscanner/config.py.in:
2966 * giscanner/sourcescanner.py:
2967 Use the generated glibconfig.h for all scanner invokations.
2968 Rename it to glibconfig-scanner.h and install it.
2969 Add a config.py which so far contains the include dir.
2971 2008-08-22 Johan Dahlin <johan@gnome.org>
2974 Replace glibconfig.h with our own, do some replacement
2975 for CPP/C features we do not support
2977 2008-08-22 Colin Walters <walters@verbum.org>
2979 * tools/generate.c (write_callable_info): Fix unref
2982 2008-08-22 Colin Walters <walters@verbum.org>
2984 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2985 * tests/Makefile.am: Support $(DEBUG)
2986 * tools/generate.c: Do immediate close tags if no
2989 2008-08-21 Colin Walters <walters@verbum.org>
2991 * tests/scanner/drawable-expected.gir,
2992 * tests/scanner/drawable.c,
2993 * tests/scanner/drawable.h:
2996 2008-08-21 Colin Walters <walters@verbum.org>
2998 * giscanner/glibtransformer.py: Compute prefix
2999 by searching through the symbol for bits
3000 rather than going directly from ctype; this fixes
3003 2008-08-21 Colin Walters <walters@verbum.org>
3005 * giscanner/glibtransformer.py: Also try squashing
3006 underscores from namespace, fixes webkit_web_view_new.
3008 2008-08-21 Colin Walters <walters@verbum.org>
3010 * giscanner/glibtransformer.py: More ctor work,
3011 avoid having gtk_window_group_new end up under
3014 2008-08-21 Colin Walters <walters@verbum.org>
3016 * giscanner/glibtransformer.py: Much simpler approach
3017 of mapping uscored names to classes.
3018 * giscanner/utils.py: Remove unnecessary function.
3020 2008-08-21 Johan Dahlin <johan@gnome.org>
3022 * girepository/girepository.c (g_irepository_require):
3023 Plug memory leak and avoid using freed memory.
3024 Resolve the whole module path, here as well.
3026 2008-08-21 Colin Walters <walters@verbum.org>
3028 * giscanner/glibtransformer.py: Look up all permutations
3029 of class names when scanning methods/ctors based on
3030 the prefix instead of using the return value. This
3031 associates gtk_window_new with the right class.
3033 2008-08-21 Colin Walters <walters@verbum.org>
3035 * girepository/girmodule.c (g_ir_module_build_typelib):
3036 Revert change to increment header_size; we do that in
3039 2008-08-21 Colin Walters <walters@verbum.org>
3041 * girepository/girnode.c (write_string): Tweak to
3042 use UINT instead of INT. Not likely to matter.
3043 * girepository/girmodule.c (g_ir_module_build_typelib):
3044 Add to header_offset as well for header strings
3045 to match what write_string does.
3046 * girepository/gtypelib.c: Replace is_name with
3047 validate_name, which more strongly validates and
3048 handles errors in a better way. Update all callers.
3049 * giscanner/glibtransformer.py: Handle constructors
3052 2008-08-21 Johan Dahlin <johan@gnome.org>
3054 * gir/Makefile.am (typelibs_DATA): Build and
3055 install the Gio.typelib too
3057 * girepository/gtypelib.c (_g_typelib_init):
3058 Use g_module_build_path to resolve the shlib name
3060 2008-08-21 Colin Walters <walters@verbum.org>
3062 * gir/Makefile.am: CLEANFILES typelibs too.
3064 2008-08-21 Johan Dahlin <johan@gnome.org>
3066 * giscanner/glibtransformer.py:
3067 Do not send .la files through find_library.
3069 2008-08-21 Colin Walters <walters@verbum.org>
3071 * girepository/girparser.c (g_irepository_require):
3072 Fix one small leak in error case.
3074 2008-08-21 Johan Dahlin <johan@gnome.org>
3077 Parse glibconfig.h as well and install the compiled
3080 2008-08-21 Johan Dahlin <johan@gnome.org>
3083 * giscanner/glibtransformer.py:
3084 * tools/g-ir-scanner:
3085 Do not hard-core library names in the Makefile, reuse
3086 ctypes find_library instead.
3088 2008-08-21 Johan Dahlin <johan@gnome.org>
3090 * girepository/girparser.c (resolve_aliases):
3091 Remove compilation warnings
3093 2008-08-21 Johan Dahlin <johan@gnome.org>
3095 * girepository/girepository.c (g_irepository_require):
3096 Rewrap and fix double free bug by leaking a bit.
3098 2008-08-20 Colin Walters <walters@verbum.org>
3100 * girepository/girepository.c: Add new function
3101 g_irepository_get_typelib_path which tells
3102 us from where we loaded a namespace.
3104 2008-08-20 Colin Walters <walters@verbum.org>
3106 * tests/scanner/*-expected.gir: Adjust for
3107 added shared-library.
3108 * giscanner/giwriter.py: Make pylint happy.
3110 2008-08-20 Colin Walters <walters@verbum.org>
3112 * girepository/girmodule.c (g_ir_module_build_typelib):
3113 Calculate size correctly, avoid use-after-free.
3115 2008-08-20 Colin Walters <walters@verbum.org>
3117 * girepository/girepository.c: Remove
3118 g_irepository_register_file in favor of
3119 g_irepository_require. There are two
3120 possible deployment scenarios for typelibs:
3121 First, separate in $DATADIR/gitypelibs/. Second,
3122 they may be embedded in shlibs. However since
3123 the first is now the normal case, the API is
3124 optimized around it.
3126 Refactor internals to look up typelibs for
3127 namespaces just-in-time, but we expect
3128 consumers to call g_irepository_require.
3130 Also, add some docs. No one has died from that
3132 * gir/Makefile.am: Need --library for glib.
3133 * giscanner/girwriter.py: Write out shared-library.
3134 * tools/g-ir-writer: Take the first --library
3135 argument as the target of shared-library. In
3136 the future we should make this nicer with pkg-config
3139 2008-08-20 Colin Walters <walters@verbum.org>
3141 * girepository/girparser.py: And parse them.
3143 2008-08-20 Johan Dahlin <johan@gnome.org>
3145 * giscanner/glibast.py: Add gshort/gushort types
3147 2008-08-20 Colin Walters <walters@verbum.org>
3149 * gir/Makefile.am: Rename .gir files using GI namespace.
3150 * girepository/girepository.c: Use XDG_DATA_DIRS for
3151 looking up typelibs. Also typelibs are now suffixed
3153 * tests/invoke/Makefile.am: Only use metadata.
3154 * girepository/Makefile.am: Remove unnecessary include.
3155 * tests/scanner/Makefile.am: Update using GI namespaces
3156 for scanner includes.
3158 2008-08-20 Colin Walters <walters@verbum.org>
3160 * girepository/transformer.py: Suppress aliases whose
3162 * girepository/ast.py: Define some more aliases.
3164 2008-08-20 Colin Walters <walters@verbum.org>
3166 * girepository/girparser.c: Avoid alias infloops.
3168 2008-08-20 Colin Walters <walters@verbum.org>
3170 * tests/scanner/foo-expected.gir: Fix expected list type.
3172 2008-08-20 Johan Dahlin <johan@gnome.org>
3174 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
3175 Add a workaround for #548689.
3176 We can now compile gtk!
3178 2008-08-20 Colin Walters <walters@verbum.org>
3180 * giscanner/glibtransformer.py: Try to look up
3181 aliases using the c:type too.
3183 2008-08-20 Colin Walters <walters@verbum.org>
3185 * girepository/girparser.c: Parse union fields.
3187 2008-08-20 Johan Dahlin <johan@gnome.org>
3189 * giscanner/ast.py: Make time_t an alias for long
3191 * gir/gio-2.0-good.gir:
3192 * gir/glib-2.0-good.gir:
3193 * gir/gobject-2.0-good.gir:
3195 * giscanner/glibtransformer.py:
3196 Do not delete Class structures, we need them in gdk/gtk.
3197 * tests/scanner/drawable-expected.gir:
3198 * tests/scanner/foo-expected.gir:
3199 * tests/scanner/utility-expected.gir:
3202 2008-08-20 Johan Dahlin <johan@gnome.org>
3204 * tests/scanner/Makefile.am:
3205 * tests/scanner/annotation-expected.gir:
3206 * tests/scanner/annotation.c (annotation_object_class_init),
3207 (annotation_object_init), (annotation_object_method),
3208 (annotation_object_in), (annotation_object_out),
3209 (annotation_object_inout), (annotation_object_inout2),
3210 (annotation_object_inout3), (annotation_object_calleeowns),
3211 (annotation_object_calleesowns), (annotation_object_get_strings),
3212 (annotation_object_with_voidp), (annotation_object_get_objects),
3213 (annotation_object_create_object), (annotation_object_allow_none):
3214 * tests/scanner/annotation.h:
3215 * tests/scanner/foo-expected.gir:
3216 * tests/scanner/foo.c:
3217 * tests/scanner/foo.h:
3218 Split out annotation tests out of foo
3220 2008-08-20 Johan Dahlin <johan@gnome.org>
3222 * tests/scanner/Foo-expected.gir:
3223 * tests/scanner/Makefile.am:
3224 * tests/scanner/foo-expected.gir:
3225 * tests/scanner/foo-object.h:
3226 * tests/scanner/foo.c:
3227 Foo->foo, foo-object.h -> foo.h
3229 2008-08-20 Johan Dahlin <johan@gnome.org>
3231 * tests/scanner/Foo-expected.gir:
3232 * tests/scanner/Makefile.am:
3233 * tests/scanner/drawable-expected.gir:
3234 * tests/scanner/drawable.c (test_drawable_class_init),
3235 (test_drawable_init):
3236 * tests/scanner/drawable.h:
3237 * tests/scanner/foo-object.h:
3238 * tests/scanner/foo.c (foo_boxed_method):
3239 Move the drawable parts out of Foo to its own test.
3241 2008-08-20 Johan Dahlin <johan@gnome.org>
3243 * tests/scanner/Foo-expected.gir:
3244 * tests/scanner/foo-object.h:
3245 * tests/scanner/foo.c (foo_drawable_class_init),
3246 (foo_drawable_init):
3247 Add a based on GdkDrawable which generates
3250 2008-08-19 Colin Walters <walters@verbum.org>
3252 * giscanner/transformer.py: Don't try
3253 to strip prefix before namespace.
3255 2008-08-19 Johan Dahlin <johan@gnome.org>
3257 * giscanner/transformer.py:
3258 * tests/scanner/Foo-expected.gir:
3259 * tests/scanner/foo-object.h:
3260 Add support for typedef void foo type of
3263 2008-08-19 Johan Dahlin <johan@gnome.org>
3266 * giscanner/girwriter.py:
3267 * giscanner/glibtransformer.py:
3268 * giscanner/transformer.py:
3269 * tests/scanner/Foo-expected.gir:
3270 Add basic support for union, base the code much
3271 on Struct. Add a testcase.
3273 2008-08-19 Johan Dahlin <johan@gnome.org>
3275 * tests/scanner/Foo-expected.gir:
3276 * tests/scanner/foo-object.h:
3277 Add a union testcase which the compiler currently
3280 2008-08-19 Johan Dahlin <johan@gnome.org>
3282 * gobject-introspection-1.0.pc.in:
3283 Add a g_ir_compiler variable
3285 2008-08-19 Colin Walters <walters@verbum.org>
3287 * giscanner/ast.py: Rework types to be more closely
3289 * giscanner/girparser.py: Parse more bits.
3290 * giscanner/girwriter.py: Write sequences in a new
3291 way that specifies container type.
3292 * giscanner/glibast.py: Adjust for ast.py changes,
3293 add 'ctype' property to GLibObject and GLibInterface
3294 so we can look things up by it later.
3295 * gicanner/transformer.py: Names is new class holding
3296 the various namespaces we manage. Do not confuse
3297 with Namespace which is toplevel XML node effectively.
3298 Rework all type resolution to go through
3299 _resolve_type_name_1.
3300 * giscanner/glibtransformer.py: Raise UnknownTypeError
3301 instead of ValueError for cleanliness. Add Unresolved
3302 class to mark types whose parent we haven't seen yet.
3303 Use new Names object from transformer.py.
3304 Correctly look up parent=.
3305 Fix type validation to handle sequences.
3306 * tests/scanner/Foo-expected.gir: Update for sequence
3307 work, int instead of int32.
3308 * tools/g-ir-scanner: Add --noclosure option
3309 * gir/Makefile.am: Use --noclosure by default for
3312 2008-08-18 Johan Dahlin <johan@gnome.org>
3314 * gir/gio-2.0-good.gir:
3315 * gir/glib-2.0-good.gir:
3316 * gir/gobject-2.0-good.gir:
3319 2008-08-18 Johan Dahlin <johan@gnome.org>
3322 * giscanner/girparser.py:
3323 * giscanner/girwriter.py:
3324 * giscanner/glibast.py:
3325 * giscanner/glibtransformer.py:
3326 * giscanner/transformer.py:
3327 * tests/scanner/Foo-expected.gir:
3328 * tests/scanner/foo-object.h:
3329 * tests/scanner/utility-expected.gir:
3330 * tests/scanner/utility.h:
3331 Redo type resolving and validation.
3332 Add a couple of new tests.
3333 Patch mostly written by Colin.
3335 2008-08-18 Johan Dahlin <johan@gnome.org>
3338 * giscanner/girparser.py:
3340 * giscanner/transformer.py:
3341 Improve enum parsing for enums without a GType.
3342 Make flags/enum references to other girs work
3343 * giscanner/utils.py:
3345 * tests/scanner/Makefile.am:
3346 * tests/scanner/foo-object.h:
3347 * tests/scanner/utility-expected.gir:
3348 * tests/scanner/utility.h:
3349 Add a new test for external enum references
3351 2008-08-18 Johan Dahlin <johan@gnome.org>
3353 * docs/global-module-registry.txt: Update
3355 * tests/array.gir: Update with new type proposal
3357 * girepository/girepository.c (g_type_tag_to_string):
3358 * girepository/girepository.h:
3359 * girepository/girnode.c (g_ir_node_get_full_size_internal),
3361 * girepository/girnode.h:
3362 Make enum serializing functions public. Clean up some whitespace.
3364 2008-08-17 Johan Dahlin <johan@gnome.org>
3366 * docs/global-module-registry.txt:
3367 Add a document for an on disk module registry format
3369 2008-08-17 Johan Dahlin <johan@gnome.org>
3372 * gir/gio-2.0-good.gir:
3375 2008-08-17 Johan Dahlin <johan@gnome.org>
3378 * gir/glib-2.0-good.gir:
3379 * gir/gobject-2.0-good.gir:
3380 * giscanner/cgobject.py:
3381 * giscanner/glibtransformer.py:
3382 Regenerate GObject & GType.
3383 Avoid warnings when generating gobject-2.0.gir.
3384 Introspect a little more, and skip *_get_type functions.
3386 2008-08-17 Colin Walters <walters@verbum.org>
3388 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
3389 Rename to -good, always generate during build.
3390 * gir/Makefile.am: Ensure .gir files dep on
3391 all scanner sources.
3392 * Makefile.am: Switch build order to ensure
3393 the scanner is ready before we do gir/.
3394 * tools/g-ir-scanner: Look for .git too.
3396 2008-08-17 Johan Dahlin <johan@gnome.org>
3398 * girepository/gtypelib.c (validate_enum_blob):
3399 * giscanner/glibtransformer.py:
3400 * giscanner/transformer.py:
3401 Remove resolve_possible_typedefs, it was unused.
3402 Allow multiple enum values of the sample value in an enum,
3403 since it's actually pretty common.
3404 Register enums so they can be resolved too.
3406 2008-08-16 Johan Dahlin <johan@gnome.org>
3408 * giscanner/girparser.py:
3409 Parse enumeration/bitfield.
3411 2008-08-16 Johan Dahlin <johan@gnome.org>
3413 * giscanner/girparser.py:
3416 2008-08-16 Johan Dahlin <johan@gnome.org>
3418 * giscanner/glibtransformer.py:
3419 Resolve type names for alias targets
3420 * giscanner/transformer.py:
3421 Skip FILE* parameters fow now
3423 2008-08-16 Johan Dahlin <johan@gnome.org>
3426 * gir/gobject-2.0.gir:
3429 * tests/scanner/Makefile.am:
3432 2008-08-15 Colin Walters <walters@verbum.org>
3434 * giscanner/glibtransformer.py: Explicitly construct
3435 new list, since we're deleting as we iterate.
3436 Don't delete all structures which end in Class; just
3437 ones which have a paired GObject.
3438 Fix printing of type warning.
3439 * giscanner/transformer.py: Make strip_namespace_object
3440 be the identity function if it doesn't match the
3443 2008-08-15 Colin Walters <walters@verbum.org>
3445 * giscanner/cgobject.py: Define yet more argument
3446 prototypes; fix prototype for g_type_fundamental.
3448 2008-08-14 Johan Dahlin <johan@gnome.org>
3450 * tests/Makefile.am:
3451 * tests/constant.gir:
3452 * tests/gobject.gir:
3454 * tools/generate.c (write_struct_info):
3455 Fix generator for constant/gobject/struct
3457 2008-08-14 Johan Dahlin <johan@gnome.org>
3459 * tests/Makefile.am:
3461 * tools/generate.c (write_enum_info):
3462 Fix generation of enum/bitfields
3464 2008-08-14 Johan Dahlin <johan@gnome.org>
3466 * girepository/girparser.c (start_field), (start_constant),
3467 (start_type), (end_element_handler):
3468 Clear up constant parsing
3473 * tools/generate.c (write_callable_info), (write_function_info),
3474 (write_callback_info), (write_constant_info), (write_signal_info),
3475 (write_vfunc_info), (write_property_info), (write_object_info),
3476 (write_interface_info):
3477 Constants/Signals are handled now.
3479 2008-08-14 Johan Dahlin <johan@gnome.org>
3481 * girepository/girparser.c (start_type):
3482 Don't require c:type.
3483 * tests/Makefile.am:
3486 Update, remove parts we don't support yet
3487 * tests/roundtrips.sh:
3489 * tools/generate.c (write_type_info), (write_field_info),
3490 (write_callable_info), (write_struct_info):
3491 Make it emit proper gir.
3493 2008-08-14 Johan Dahlin <johan@gnome.org>
3495 * giscanner/transformer.py:
3496 New internal function for adding a new node.
3498 2008-08-14 Johan Dahlin <johan@gnome.org>
3501 Define an internal _H_ variable so we skip parsing both
3502 i18n headers, only one is needed.
3504 Add the glib-2.0.gir too.
3505 * giscanner/glibast.py:
3506 Add gconstpointer as an alias for ANY
3507 * giscanner/transformer.py:
3508 Do not lower case enumeration names per se.
3509 Skip functions which has parameters called 'va_list'
3511 2008-08-14 Colin Walters <walters@verbum.org>
3513 * giscanner/transformer.py: Comment data structures.
3514 Also squash pointers in resolve_type_name to correspond
3515 with what we do for params.
3516 * giscanner/glibtransformer.py: Print warnings in more
3517 situations. Rework checks for method/constructor to
3518 look up in our GType database instead of just checking
3519 for *. Avoid generating <record> for GObject which
3520 duplicate the <class>.
3521 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3524 2008-08-14 Johan Dahlin <johan@gnome.org>
3526 * giscanner/girwriter.py:
3527 * giscanner/glibast.py:
3528 * giscanner/glibtransformer.py:
3529 * giscanner/transformer.py:
3531 * tests/Makefile.am:
3532 Add pyflakes.py and run it in make check.
3533 Update the source code to fix the errors reported by
3536 2008-08-14 Johan Dahlin <johan@gnome.org>
3539 * giscanner/girparser.py:
3540 * giscanner/glibast.py:
3541 * giscanner/glibtransformer.py:
3542 Refactor the parser a bit.
3543 Add parent type to interfaces and update callsites.
3545 2008-08-14 Johan Dahlin <johan@gnome.org>
3547 * giscanner/glibtransformer.py:
3548 * giscanner/utils.py:
3549 Refactor a bit, avoid isinstance and add a method
3550 for each type we parse.
3552 2008-08-14 Johan Dahlin <johan@gnome.org>
3555 * giscanner/girparser.py:
3556 * giscanner/glibtransformer.py:
3557 * tests/Makefile.am:
3558 Run pep8.py in make check, fix old errors.
3560 2008-08-13 Colin Walters <walters@verbum.org>
3562 * giscanner/girparser.py: Parse records.
3564 2008-08-13 Colin Walters <walters@verbum.org>
3566 * gir/Makefile.am: Install again.
3567 * gir/gobject-2.0.gir: Add some more bits.
3569 2008-08-13 Colin Walters <walters@verbum.org>
3571 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3572 * giscanner/girparser.py: Handle aliases.
3573 * giscanner/transformer.py: Record aliases. Make resolver
3574 functions public; we now call into these explicitly from
3575 glibtransformer. Handle resolving aliases.
3576 * giscanner/glibtransformer.py: Separate our internal namespace
3577 from included ones. Call up into transformer's resolver functions.
3579 2008-08-13 Johan Dahlin <johan@gnome.org>
3581 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3582 * girepository/girparser.c (start_class):
3583 * giscanner/glibtransformer.py:
3584 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3586 2008-08-13 Johan Dahlin <johan@gnome.org>
3588 * giscanner/cgobject.py:
3589 Register GInitiallyUnowned
3590 * giscanner/girwriter.py:
3591 * giscanner/glibtransformer.py:
3592 Special case GObject/GInitially owned as they are a bit special to use.
3594 2008-08-13 Colin Walters <walters@verbum.org>
3596 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3597 Object is in GObject namespace.
3599 2008-08-13 Colin Walters <walters@verbum.org>
3601 * giscanner/girparser.py: Fix processing of functions
3604 2008-08-13 Colin Walters <walters@verbum.org>
3606 * giscanner/girparser.py: Parse more than just <class.
3607 * giscanner/glibtransformer.py: Put aliases in a separate
3608 data structure since their name is not canonicall.
3609 * giscanner/transformer.py: Handle resolving type names
3612 2008-08-13 Johan Dahlin <johan@gnome.org>
3614 * tools/g-ir-scanner:
3615 Allow multiple libraries
3616 * giscanner/glibtransformer.py:
3617 Rename load_library to add_library, traverse over all libraries
3618 when trying to resolve a function
3620 2008-08-12 Colin Walters <walters@verbum.org>
3622 * giscanner/transformer.py: Record typedefs as <alias> elements.
3623 Also attempt to look up types in external namespaces.
3624 * giscanner/girwriter.py: Write them.
3625 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3626 checks. Resolve interface methods and properties.
3627 * tests/scanner/foo-object.h: Add a method with typedef.
3628 * tests/scanner/Foo-expected.gir: Update.
3629 * girepository/girnode.c: Debug tweaks.
3630 * girepository/girparser.c: Make a first pass through the XML where we
3631 record all the aliases. This lets us resolve them as we go through the
3633 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3634 from gir-repository.
3636 2008-08-12 Colin Walters <walters@verbum.org>
3638 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3639 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3641 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3643 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3645 2008-08-12 Colin Walters <walters@verbum.org>
3647 * giscanner/glibtransformer.py: Also transform object properties.
3649 2008-08-12 Colin Walters <walters@verbum.org>
3651 * giscanner/glibtransformer.py: Also transform callbacks
3652 and structure field types.
3653 * tests/scanner/Fooe-expected.gir: Update to expect correct
3654 names for callbacks and structs.
3656 2008-08-12 Colin Walters <walters@verbum.org>
3658 * girepository/girparser.c: Handle 'any'.
3659 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3660 Add test for void *.
3662 2008-08-12 Colin Walters <walters@verbum.org>
3664 * giscanner/glibtransformer.py: We need to do type
3665 resolution in a second pass after we've seen all the
3666 enums, records, etc.
3668 2008-08-12 Colin Walters <walters@verbum.org>
3670 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3671 Add enum return value.
3672 * giscanner/glibtransformer.py: Transform function return types
3675 2008-08-12 Colin Walters <walters@verbum.org>
3677 * tests/scanner/Makefile.am: Dep .gir files on scanner
3678 sources too. Also remove @ so we see scanner invocations.
3680 2008-08-12 Colin Walters <walters@verbum.org>
3682 * girepository/girparser.c, girepository/gtypelib.c,
3683 girepository/gtypelib.h, girepository/girnode.c:
3684 Remove usage of (GAPI-oriented) TypeTag in favor of
3685 GITypeTag from girepository.h.
3687 2008-08-10 Colin Walters <walters@verbum.org>
3689 * tests/roundtrips.sh: Use the correct tests.
3691 2008-08-10 Colin Walters <walters@verbum.org>
3693 * giscanner/cgobject.py: Declare/wrap a few more functions.
3694 Fix parameter types for g_object_new and g_type_fundamental.
3696 2008-08-10 Colin Walters <walters@verbum.org>
3698 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3699 us to declare types for both return value and parameters. The
3700 ctypes default of 'int' is bad because it hides 32/64 bit
3701 problems. Convert all existing functions to use it.
3703 2008-08-09 Johan Dahlin <johan@gnome.org>
3705 * giscanner/__init__.py:
3707 * giscanner/cgobject.py:
3708 * giscanner/gidlparser.py:
3709 * giscanner/gidlwriter.py:
3710 * giscanner/girparser.py:
3711 * giscanner/girwriter.py:
3712 * giscanner/glibast.py:
3713 * giscanner/glibtransformer.py:
3714 * giscanner/odict.py:
3715 * giscanner/sourcescanner.py:
3716 * giscanner/transformer.py:
3717 * giscanner/utils.py:
3718 * giscanner/xmlwriter.py:
3719 * tools/g-ir-scanner:
3723 2008-08-09 Johan Dahlin <johan@gnome.org>
3726 * relaxng/c-types.xml:
3727 * relaxng/g-types.xml:
3728 * relaxng/relaxng.rng:
3730 Remove outdated relaxng schemas.
3732 2008-08-09 Johan Dahlin <johan@gnome.org>
3735 Rename metadata to typelib in variable names,
3738 2008-08-09 Johan Dahlin <johan@gnome.org>
3742 Remove old C scanner, which got rewritten in python.
3744 2008-08-09 Johan Dahlin <johan@gnome.org>
3746 * girepository/Makefile.am:
3747 * tools/Makefile.am:
3748 * tools/girmodule.c:
3749 * tools/girmodule.h:
3752 * tools/girparser.c:
3753 * tools/girparser.h:
3754 * tools/girwriter.c:
3755 * tools/girwriter.h:
3756 Move shared *.[ch] files to girepository from tools
3758 2008-08-09 Johan Dahlin <johan@gnome.org>
3760 * tests/Makefile.am:
3763 * tests/constant.test:
3765 * tests/errors.test:
3766 * tests/function.test:
3767 * tests/gobject.test:
3768 * tests/interface.test:
3769 * tests/object.test:
3770 * tests/struct.test:
3775 Rename *.test to *.gir
3777 2008-08-09 Johan Dahlin <johan@gnome.org>
3780 * tests/Makefile.am:
3781 * tests/parser/Foo-expected.gir:
3782 * tests/parser/Makefile.am:
3783 * tests/parser/foo-object.h:
3784 * tests/parser/foo.c:
3785 * tests/parser/utility-expected.gir:
3786 * tests/parser/utility.c:
3787 * tests/parser/utility.h:
3788 * tests/scanner/Makefile.am:
3789 Rename tests/parser to test/scanner
3791 2008-08-08 Colin Walters <walters@verbum.org>
3793 * tests/roundtrips.sh: Use local .gir files again.
3795 2008-08-08 Colin Walters <walters@verbum.org>
3797 * tests/invoke/Makefile.am: .gir file depends on libtool
3800 2008-08-08 Colin Walters <walters@verbum.org>
3802 * tools/girnode.c: Pass through parent node so we can
3803 print the node whose child is NULL, if that occurs.
3805 2008-08-08 Johan Dahlin <johan@gnome.org>
3807 * tests/Makefile.am:
3808 Disable roundtrip tests which are not yet working
3809 * tests/invoke/testfns.gir:
3812 2008-08-08 Johan Dahlin <johan@gnome.org>
3814 * giscanner/girwriter.py:
3816 * giscanner/glibast.py:
3817 * giscanner/glibtransformer.py:
3818 Swap order of members, to keep it consistent with
3821 2008-08-08 Johan Dahlin <johan@gnome.org>
3823 * girepository/gtypelib.c (validate_header):
3824 * girepository/gtypelib.h:
3826 * giscanner/girwriter.py:
3827 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3828 (gi_source_symbol_unref):
3831 * tests/constant.test:
3833 * tests/errors.test:
3834 * tests/function.test:
3835 * tests/gobject.test:
3836 * tests/interface.test:
3837 * tests/invoke/Makefile.am:
3838 * tests/invoke/testfns.xml:
3839 * tests/object.test:
3840 * tests/parser/Makefile.am:
3841 * tests/roundtrips.sh:
3842 * tests/struct.test:
3847 * tools/Makefile.am:
3848 * tools/compiler.c (main):
3849 * tools/generate.c (write_callable_info), (write_function_info),
3851 * tools/gidlmodule.c:
3852 * tools/gidlmodule.h:
3855 * tools/gidlparser.c:
3856 * tools/gidlparser.h:
3857 * tools/gidlwriter.c:
3858 * tools/gidlwriter.h:
3859 * tools/scanner.c (create_node_from_gtype),
3860 (create_node_from_ctype), (g_igenerator_process_properties),
3861 (g_igenerator_process_signals), (g_igenerator_create_object),
3862 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3863 (g_igenerator_create_enum), (g_igenerator_create_flags),
3864 (g_igenerator_process_function_symbol),
3865 (g_igenerator_process_unregistered_struct_typedef),
3866 (g_igenerator_process_struct_typedef),
3867 (g_igenerator_process_union_typedef),
3868 (g_igenerator_process_enum_typedef),
3869 (g_igenerator_process_function_typedef),
3870 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3871 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3872 Merge in the gir-compiler branch.
3873 Thanks to Philip and Colin for their help.
3875 2008-07-26 Colin Walters <walters@verbum.org>
3877 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3878 and g-idl-generate to go along with how we're changing this
3879 module to be installed.
3880 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3882 2008-07-24 Colin Walters <walters@verbum.org>
3884 * girepository/girepository.c (g_irepository_register): Add
3885 environment variable G_IREPOSITORY_VERBOSE so we can print
3886 out what we're doing.
3887 * girepository/girepository.c (g_irepository_register_file):
3888 Add GError error message to g_debug call.
3890 2008-07-08 Jürg Billeter <j@bitron.ch>
3892 * giscanner/glibast.py:
3896 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3898 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3901 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3904 * giscanner/girwriter.py:
3905 * giscanner/transformer.py:
3906 * tests/parser/Foo-expected.gir:
3907 * tests/parser/foo-object.h:
3908 * tests/parser/foo.c (foo_object_allow_none):
3909 Add support for gtk-doc annotations for allow-none.
3912 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3915 * giscanner/girwriter.py:
3916 * giscanner/glibast.py:
3917 * giscanner/glibtransformer.py:
3918 * giscanner/transformer.py:
3919 * tests/parser/Foo-expected.gir:
3920 Start using abstract type instead of the raw C types.
3921 Register a bunch of glib types we care about.
3923 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3928 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3930 * girepository/girepository.c:
3931 * girepository/gtypelib.c:
3932 * girepository/ginfo.c:
3933 * girepository/ginvoke.c:
3934 * girepository/girepository.h:
3935 * girepository/gtypelib.h:
3936 * girepository/gmetadata.c:
3937 * girepository/Makefile.am:
3938 * girepository/gmetadata.h:
3940 * tools/gidlmodule.c:
3943 * tools/gidlmodule.h:
3944 * tools/gidlparser.c:
3946 Renamed GMetadata to GTypelib
3948 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3950 * giscanner/xmlwriter.py:
3951 Improve line wrapping when > 79 charaters
3953 2008-06-05 Jürg Billeter <j@bitron.ch>
3956 * giscanner/girwriter.py:
3957 * giscanner/transformer.py:
3958 Use <type> element for field types
3959 * tests/parser/Foo-expected.gir:
3962 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3964 * giscanner/glibtransformer.py:
3965 Fix a bug which prevented GdkEvent from being generated
3967 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3969 * giscanner/Makefile.am:
3971 * giscanner/girwriter.py:
3972 * giscanner/glibast.py:
3973 * giscanner/glibtransformer.py:
3974 * giscanner/transformer.py:
3975 * giscanner/utils.py:
3976 * tests/parser/Foo-expected.gir:
3977 Improve enum member parsing and introspection
3979 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3981 * giscanner/scannerparser.y:
3982 * giscanner/sourcescanner.h:
3983 * giscanner/sourcescanner.py:
3984 Add a new source type enum for member.
3985 Use __repr__ for improved debugging
3986 * giscanner/girparser.py:
3988 * giscanner/transformer.py:
3989 Improve parsing of struct members.
3990 * tests/parser/foo-object.h:
3993 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3995 * giscanner/xmlwriter.py:
3996 Improve error reporting when trying to quote None.
3997 * giscanner/girparser.py:
3998 Do not print warnings when including more complete .gir files
3999 * giscanner/girwriter.py:
4000 Do not require a name for parameters, add a todo for singletons
4001 * giscanner/glibtransformer.py:
4002 Refactor the way structs are done, add a couple of hacks to allow
4004 * giscanner/transformer.py:
4005 Add enough hacks so cairo, atk and pango.gir can be parsed properly
4006 * gobject-introspection-1.0.pc.in:
4007 Export girdir, so we can access gobject-2.0.gir from outside
4009 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4011 * tools/g-ir-scanner:
4012 * tests/parser/Makefile.am:
4013 Update sys.path before running the parser so we don't have
4014 to setup PYTHONPATH ourselves.
4018 * girepository/Makefile.am:
4019 * giscanner/transformer.py:
4020 * gobject-introspection-1.0.pc.in:
4021 * gobject-introspection.pc.in:
4022 * tools/Makefile.am:
4024 Rename pkg-config name to gobject-introspection-1.0,
4025 Do not installed anything which is not using the gir format.
4026 Disable compililation the old C scanner, but still keep the source
4027 until all the remaning functionallity has been ported.
4029 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4031 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
4032 a crash when symbol->indent is NULL.
4034 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
4035 a function to convert a CTYPE symbol to a string
4037 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
4040 * giscanner/girwriter.py:
4041 * giscanner/giscannermodule.c
4042 (pygi_source_scanner_append_filename),
4043 (pygi_source_scanner_parse_file):
4044 * giscanner/glibtransformer.py:
4045 * giscanner/sourcescanner.py:
4046 Revert back to using temporary files to send in headers.
4047 Allow Functions to be passed in as callbacks, add a couple
4048 of try/excepts missing features.
4049 We can now scan pango
4051 2008-05-08 Johan Dahlin <johan@gnome.org>
4053 * giscanner/glibtransformer.py:
4054 * giscanner/transformer.py:
4055 Move namespace stripping glibtransformer->transformer
4057 2008-05-08 Johan Dahlin <johan@gnome.org>
4060 * giscanner/girwriter.py:
4061 * giscanner/glibtransformer.py:
4062 * giscanner/transformer.py:
4063 * tools/g-ir-scanner:
4064 Introduce a namespace ast node
4066 2008-05-05 Johan Dahlin <johan@gnome.org>
4068 * giscanner/__init__.py:
4069 * giscanner/sourcescanner.py:
4070 * giscanner/transformer.py:
4071 Move sourcescanner symbols to the sourcescanner module, instead
4072 of in the global __init__ namespace.
4074 2008-05-03 Johan Dahlin <johan@gnome.org>
4076 * giscanner/glibtransformer.py:
4077 * tools/g-ir-scanner:
4078 Handle missing parameters better, allow - and + in .la dlname
4081 2008-05-03 Johan Dahlin <johan@gnome.org>
4083 * giscanner/__init__.py:
4085 * giscanner/girwriter.py:
4086 * giscanner/glibtransformer.py:
4087 * giscanner/transformer.py:
4088 Parse struct fields properly, improve debugging.
4090 2008-04-29 Johan Dahlin <johan@gnome.org>
4093 * giscanner/girwriter.py:
4094 * giscanner/transformer.py:
4095 * tests/parser/Foo-expected.gir:
4097 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
4099 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4102 * docs/g-ir-scanner.1:
4103 * metadata-annotations-proposal.txt:
4104 * metadata-format.txt:
4105 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
4107 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4109 * giscanner/girwriter.py:
4110 * giscanner/glibtransformer.py:
4111 * giscanner/transformer.py:
4112 * giscanner/xmlwriter.py:
4113 * tests/parser/Foo-expected.gir:
4114 * tests/parser/foo-object.h:
4115 Write record/structs to gir file too. Add a couple of tests,
4116 fix an off by one error in xmlwriter.py.
4118 2008-04-28 Johan Dahlin <johan@gnome.org>
4120 * giscanner/xmlwriter.py: Calculate the line length properly,
4121 include the provided extra indentation in the calculation, really.
4123 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4126 * giscanner/glibast.py:
4127 * giscanner/glibtransformer.py:
4128 * giscanner/transformer.py:
4129 * tools/g-ir-scanner:
4130 Add a --strip-prefix and sort out confusion between names and symbols
4131 for functions and struct + derivaties.
4132 Refactor bootstrap of g-ir-scanner, so we can set options on
4133 Transformer() before parsing everything.
4135 2008-04-28 Johan Dahlin <johan@gnome.org>
4137 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
4138 when scanning girepository.h
4140 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
4141 a __GI_SCANNER__ when we run.
4143 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4146 * giscanner/girwriter.py:
4147 * giscanner/glibast.py:
4148 * giscanner/glibtransformer.py:
4149 * tests/parser/Foo-expected.gir:
4150 * tests/parser/utility-expected.gir:
4151 Rename most c:identifier to c:type. Add new ones to
4152 class/interface/enum/boxed.
4154 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4157 * giscanner/girwriter.py:
4158 * giscanner/glibtransformer.py:
4159 * tests/parser/Foo-expected.gidl:
4160 * tests/parser/Makefile.am:
4161 Move c:identifier from return-value to subchild type,
4162 as per Jürgs suggestion
4164 2008-04-28 Johan Dahlin <johan@gnome.org>
4166 * giscanner/girwriter.py:
4167 * tests/parser/Foo-expected.gir:
4168 Write property.type as a child node.
4170 2008-04-27 Johan Dahlin <johan@gnome.org>
4175 * gidl/gobject-2.0.gidl:
4177 * gir/gobject-2.0.gir:
4178 * tests/parser/Makefile.am:
4179 Replace the GObject gidl with a GObject gir.
4181 2008-04-27 Johan Dahlin <johan@gnome.org>
4183 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
4186 * giscanner/xmlwriter.py:
4187 * tests/parser/Foo-expected.gir:
4188 Include indentation in line length calculation
4190 2008-04-27 Johan Dahlin <johan@gnome.org>
4192 * giscanner/girparser.py:
4193 Prettify NS parsing using elementtree.
4195 2008-04-27 Johan Dahlin <johan@gnome.org>
4198 * giscanner/Makefile.am:
4199 * giscanner/girparser.py:
4200 * giscanner/glibtransformer.py:
4201 * tests/parser/Foo-expected.gidl:
4202 * tests/parser/Foo-expected.gir:
4203 * tests/parser/Makefile.am:
4204 * tests/parser/utility-expected.gidl:
4205 * tests/parser/utility-expected.gir:
4206 * tools/g-ir-scanner:
4207 Switch over to GIR as the default format. Add a simple GIDL
4209 Update tests and fix simplify makefiles by depending
4210 on GNU make extensions.
4212 2008-04-27 Johan Dahlin <johan@gnome.org>
4214 * giscanner/xmlwriter.py:
4215 Wrap attributes for lines which are wider than 79 characters
4217 * giscanner/scannerlexer.l:
4218 Allow parenthesis in annotations
4221 * giscanner/gidlwriter.py:
4222 * giscanner/girwriter.py:
4223 * giscanner/glibtransformer.py:
4224 * giscanner/transformer.py:
4225 Add initial sequence support, including annotation.
4226 Refactor type handling a bit.
4228 2008-04-27 Johan Dahlin <johan@gnome.org>
4230 * tests/parser/Foo-expected.gidl:
4231 * tests/parser/foo-object.h:
4232 * tests/parser/foo.c (foo_object_class_init),
4233 (foo_object_get_strings), (foo_object_get_objects):
4234 Add two new functions to check sequence return values.
4235 Also fixes a compilation warning.
4237 2008-04-27 Johan Dahlin <johan@gnome.org>
4239 * giscanner/giscannermodule.c (]): Cast the getter, avoids
4240 a compilation warning.
4242 * tools/Makefile.am (g_ir_scanner_SOURCES):
4243 g-ir-scanner has no sources.
4245 2008-04-25 Johan Dahlin <johan@gnome.org>
4247 * giscanner/Makefile.am:
4249 * giscanner/gidlparser.py:
4250 * giscanner/gidlwriter.py:
4251 * giscanner/girwriter.py:
4252 * giscanner/glibast.py:
4253 * giscanner/glibtransformer.py:
4254 * giscanner/transformer.py:
4255 Split out nodes to ast.py and glibast.py
4257 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4259 * giscanner/Makefile.am:
4260 * giscanner/gidlparser.py:
4261 * giscanner/gidlwriter.py:
4262 * giscanner/girwriter.py:
4263 * giscanner/glibtransformer.py:
4264 * giscanner/gobjecttreebuilder.py:
4265 * giscanner/transformer.py:
4266 * giscanner/treebuilder.py:
4267 * tools/g-ir-scanner:
4268 Rename treebuilder to transformer and
4269 gobjectreebuilder to glibtransformer.
4271 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4273 * giscanner/Makefile.am:
4274 * giscanner/__init__.py:
4275 * giscanner/cgobject.py:
4276 * giscanner/gidlparser.py:
4277 * giscanner/gidlwriter.py:
4278 * giscanner/girwriter.py:
4279 * giscanner/gobjecttreebuilder.py:
4280 * giscanner/odict.py:
4281 * giscanner/sourcescanner.py:
4282 * giscanner/treebuilder.py:
4283 * giscanner/xmlwriter.py:
4284 * tools/Makefile.am:
4285 * tools/g-ir-scanner:
4286 Add LGPLv2 license header and install all python files
4288 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4291 * giscanner/gidlwriter.py:
4292 * giscanner/giscannermodule.c (pygi_source_directive_new),
4293 (directive_get_options), (pygi_source_symbol_new),
4294 (symbol_get_base_type), (pygi_source_type_new),
4295 (type_get_base_type), (type_get_child_list),
4296 (pygi_source_scanner_get_symbols),
4297 (pygi_source_scanner_get_directives):
4298 * giscanner/gobjecttreebuilder.py:
4299 * giscanner/sourcescanner.py:
4300 * giscanner/treebuilder.py:
4301 * tests/parser/foo-object.h:
4302 Add support for virtual methods.
4303 Pair struct FooClass with struct Foo.
4304 Clean up the SourceScanner bindings a bit.
4305 Add a testcase for virtual methods.
4307 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4309 * giscanner/cgobject.py:
4310 * giscanner/gidlwriter.py:
4311 * giscanner/gobjecttreebuilder.py:
4312 Add support for signals
4314 * tests/parser/foo.c (foo_object_class_init):
4315 * Foo-expected.gidl:
4316 Add a signal and update the expected output.
4318 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
4320 * giscanner/gidlwriter.py:
4321 * giscanner/girwriter.py:
4322 * giscanner/giscannermodule.c (directive_get_name),
4323 (directive_get_value), (directive_get_options),
4324 (symbol_get_directives), (symbol_set_directives),
4325 (pygi_source_scanner_parse_file),
4326 (pygi_source_scanner_lex_filename),
4327 (pygi_source_scanner_get_directives), (init_giscanner):
4328 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
4329 * giscanner/sourcescanner.h:
4330 * giscanner/sourcescanner.py:
4331 * giscanner/treebuilder.py:
4332 * tools/g-ir-scanner:
4333 Add support for source/header annotations.
4335 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4337 * giscanner/gidlwriter.py:
4338 * giscanner/girwriter.py:
4339 * giscanner/gobjecttreebuilder.py:
4340 * giscanner/treebuilder.py:
4341 Add support for Callbacks
4343 2008-04-22 Havoc Pennington <hp@pobox.com>
4345 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
4346 not in metadata->module, look for it in the global module, in case
4347 some other object or the app itself provides the symbol.
4349 2008-04-22 Havoc Pennington <hp@pobox.com>
4351 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
4352 dlopening a library that is already in the main app, by checking
4353 whether one of the lib's symbols is already loaded.
4355 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4357 * tests/parser/Foo-expected.gidl:
4358 * tests/parser/foo-object.h:
4361 2008-04-22 Havoc Pennington <hp@pobox.com>
4363 * girepository/ginfo.c (g_interface_info_find_method):
4364 Use interface_blob_size not object_blob_size to compute offset.
4366 2008-04-22 Havoc Pennington <hp@pobox.com>
4368 * girepository/gmetadata.c (_g_metadata_init): remove
4369 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
4370 (Glade and Clutter for example) rely on being loaded globally.
4372 2008-04-22 Havoc Pennington <hp@pobox.com>
4374 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
4375 function to get the GType given a RegisteredTypeInfo
4377 2008-04-22 Johan Dahlin <johan@gnome.org>
4379 * COPYING: Add a LGPL license, to prevent automake to
4380 put in a copy of GPL here. Pointed out by Havoc.
4382 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
4383 (g_type_info_is_pointer), (g_type_info_get_tag),
4384 (g_type_info_get_param_type), (g_type_info_get_interface),
4385 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
4386 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4387 (g_error_domain_info_get_codes), (g_enum_info_get_value),
4388 (g_object_info_get_interface), (g_object_info_get_field),
4389 (g_interface_info_get_prerequisite),
4390 (g_signal_info_get_class_closure), (g_constant_info_get_value):
4391 * girepository/ginvoke.c (get_ffi_type):
4392 * girepository/girepository.h:
4393 * girepository/gmetadata.c (g_metadata_get_dir_entry),
4394 (g_metadata_check_sanity), (validate_header),
4395 (validate_array_type_blob), (validate_iface_type_blob),
4396 (validate_param_type_blob), (validate_error_type_blob),
4397 (validate_type_blob), (validate_constant_blob),
4398 (validate_struct_blob), (validate_enum_blob):
4399 * girepository/gmetadata.h:
4400 * tests/Makefile.am:
4401 * tests/invoke/Makefile.am:
4402 * tests/invoke/invoke.c (main):
4403 * tests/roundtrips.sh:
4404 * tools/Makefile.am:
4405 * tools/compiler.c (format_output), (write_out_metadata), (main):
4406 * tools/generate.c (write_type_name), (write_type_info),
4407 (write_constant_value), (write_enum_info), (load_metadata), (main):
4408 * tools/gidlcompilercontext.c:
4409 * tools/gidlcompilercontext.h:
4410 * tools/gidlcompilerentrynode.c:
4411 * tools/gidlcompilerentrynode.h:
4412 * tools/gidlcompilertypenode.c:
4413 * tools/gidlcompilertypenode.h:
4414 * tools/gidlmodule.c (g_idl_module_build_metadata):
4415 * tools/gidlmodule.h:
4416 * tools/gidlnode.c (init_stats), (dump_stats),
4417 (g_idl_node_get_size), (g_idl_node_get_full_size),
4418 (g_idl_node_cmp), (g_idl_node_can_have_member),
4419 (g_idl_node_add_member), (g_idl_node_param_direction_string),
4420 (parse_int_value), (parse_uint_value), (parse_float_value),
4421 (parse_boolean_value), (find_entry_node), (find_entry),
4422 (serialize_type), (g_idl_node_build_metadata), (write_string):
4424 * tools/gidlparser.c (parse_type_internal):
4425 * tools/quote-file.sh:
4426 Revert revisions 157,149-148,136-129 and 120.
4427 Move back to using g-idl-generate to generate the metadata and
4428 avoids dependency on a c compiler.
4430 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4432 * giscanner/girwriter.py:
4433 * tools/g-ir-scanner:
4434 Add an initial GIR writer and a --format option to g-ir-scanner
4436 2008-04-21 Johan Dahlin <johan@gnome.org>
4438 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4439 gobject-2.0 and raise ImportError if not found.
4441 * giscanner/gidlparser.py:
4442 * giscanner/gidlwriter.py:
4443 * giscanner/gobjecttreebuilder.py:
4444 * tools/g-ir-scanner:
4445 Add a --include argument to include types from other idls.
4446 Add a minimalistic GIDL parser (just objects for now)
4447 Implement resolving of external type references and use it to
4448 resolve parent types, argument types and return types.
4450 2008-04-21 Johan Dahlin <johan@gnome.org>
4452 * giscanner/gidlwriter.py:
4453 * giscanner/gobjecttreebuilder.py:
4454 * giscanner/treebuilder.py:
4455 Add support for properties.
4456 Refactor Class/Interface support a bit, to share more code and
4457 always initialize their method attribute to an empty list.
4459 2008-04-21 Johan Dahlin <johan@gnome.org>
4461 * giscanner/cgobject.py:
4462 Add a workaround for a glib bug interface introspection bug
4463 (object_interface_list_properties, object_class_list_properties):
4464 Cast the return value to GParamSpec.
4466 * tests/parser/Foo-expected.gidl: Update
4467 * tests/parser/foo.c: Add a string property
4469 * giscanner/gobjecttreebuilder.py:
4470 After stripping namespaces, remove the original
4471 item to avoid duplication (GtkButton struct and Button object)
4473 2008-04-21 Johan Dahlin <johan@gnome.org>
4475 * giscanner/gobjecttreebuilder.py:
4476 * giscanner/treebuilder.py:
4477 Strip namespaces before objects, so we'll export
4478 GtkButton as Button in the gtk namespace
4480 2008-04-21 Johan Dahlin <johan@gnome.org>
4482 * giscanner/gidlwriter.py:
4483 * giscanner/gobjecttreebuilder.py:
4484 * giscanner/treebuilder.py:
4485 Add constructors for object/boxed types.
4487 2008-04-21 Johan Dahlin <johan@gnome.org>
4489 * giscanner/gidlwriter.py:
4490 * giscanner/gobjecttreebuilder.py:
4491 Add support for boxed types
4493 2008-04-21 Johan Dahlin <johan@gnome.org>
4495 * giscanner/giscannermodule.c: Mark structures as const,
4496 wrap SourceType.const_string.
4498 * tests/parser/foo-object.h: Add a couple of constants.
4500 * giscanner/gidlwriter.py:
4501 * giscanner/gobjecttreebuilder.py:
4502 * giscanner/treebuilder.py:
4503 Add basic support for interfaces
4505 * tools/g-ir-scanner:
4506 Add -o/--output for writing to a file
4508 2008-04-21 Havoc Pennington <hp@redhat.com>
4510 * TODO: add some C API wishlist items I could think of quickly
4512 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4514 * giscanner/gidlwriter.py:
4515 * giscanner/xmlwriter.py:
4516 Add a simple api for writing tags which can be used
4517 with the new 'with statement' in python 2.5
4519 2008-04-21 Johan Dahlin <johan@gnome.org>
4521 * giscanner/gobjecttreebuilder.py:
4522 Strip namespace and object prefix from method names.
4524 2008-04-21 Johan Dahlin <johan@gnome.org>
4526 * tools/g-ir-scanner (main): Add --pkg option to pass in
4527 pkg-config modules to get cflags from.
4529 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4530 Avoid duplication, reuse function writer for methods.
4532 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4534 * giscanner/gidlwriter.py:
4535 * giscanner/gobjecttreebuilder.py:
4536 * giscanner/treebuilder.py:
4537 * tools/g-ir-scanner:
4538 Resolve libtool .la files.
4539 Strip name spaces for methods.
4540 Add function symbols
4542 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4544 * giscanner/cgobject.py:
4545 * giscanner/gidlwriter.py:
4546 * giscanner/gobjecttreebuilder.py:
4547 * giscanner/treebuilder.py:
4548 Add support for classes and methods
4550 2008-04-20 Johan Dahlin <johan@gnome.org>
4552 * giscanner/gidlwriter.py:
4553 * giscanner/gobjecttreebuilder.py:
4554 * giscanner/odict.py:
4555 Avoid conflicts, keep the output ordered similar to
4556 the order of the input.
4557 Add a simple ordered dictionary implemenation
4559 2008-04-19 Johan Dahlin <johan@gnome.org>
4561 * giscanner/cgobject.py:
4562 * giscanner/gidlwriter.py:
4563 * giscanner/gobjecttreebuilder.py:
4564 * tools/g-ir-scanner:
4565 Start introspecting get-type functions.
4566 Implement support for GLib/GFlags GTypes.
4567 Add a ctype based GObject binding.
4569 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4571 * giscanner/gidlwriter.py:
4572 * giscanner/xmlwriter.py:
4573 * tools/g-ir-scanner:
4574 Add a simplistic gidl writer, which can't do too much.
4576 2008-04-18 Johan Dahlin <johan@gnome.org>
4578 * giscanner/sourcescanner.py:
4579 * giscanner/treebuilder.py:
4580 * tools/g-ir-scanner:
4581 split tree building and source scanning interface to separate files.
4583 2008-04-18 Johan Dahlin <johan@gnome.org>
4585 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4587 - Add support for struct/parameter/return, start parsing of ctypes
4589 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4592 2008-03-31 Johan Dahlin <johan@gnome.org>
4594 * tools/g-ir-scanner:
4595 Start to build abstract syntax node of scanned sources.
4596 Add support for cpp options.
4598 2008-03-27 Johan Dahlin <johan@gnome.org>
4600 * giscanner/giscannermodule.c:
4601 * giscanner/scannerlexer.l:
4602 * giscanner/sourcescanner.c:
4603 * tools/g-ir-scanner:
4605 Add simple pre-processor using subprocess and a PIPE.
4606 Change the parse_file apis to accept a file descriptor.
4608 2008-03-25 Johan Dahlin <johan@gnome.org>
4610 * giscanner/__init__.py:
4611 * tools/g-ir-scanner:
4612 Fix a typo and add an example python test program.
4614 2008-03-25 Johan Dahlin <johan@gnome.org>
4616 * giscanner/__init__.py:
4617 * giscanner/giscannermodule.c:
4618 * giscanner/sourcescanner.c:
4619 * giscanner/sourcescanner.h:
4620 Add constants and wrap a few more SymbolType fields
4622 2008-03-25 Johan Dahlin <johan@gnome.org>
4626 * giscanner/__init__.py:
4627 * giscanner/giscannermodule.c:
4628 * giscanner/Makefile.am:
4630 Add initial python bindings for the scanner and
4631 depend on python 2.5.
4633 2008-03-25 Johan Dahlin <johan@gnome.org>
4637 * giscanner/Makefile.am:
4638 * giscanner/sourcescanner.c:
4639 * giscanner/sourcescanner.h:
4640 * tools/Makefile.am:
4641 * tools/grealpath.h:
4642 * tools/sourcescanner.c:
4643 * tools/sourcescanner.h:
4645 Move the scanner to a separate library.
4647 2008-03-23 Johan Dahlin <johan@gnome.org>
4649 * tools/Makefile.am:
4652 * tools/scannerlexer.l:
4653 * tools/scannerparser.y:
4654 * tools/sourcescanner.c:
4655 * tools/sourcescanner.h:
4656 Split out the source scanner from the generator.
4657 Rename the symbols used in the scanner to use the gi_ prefix.
4658 This should make it possible to use the raw C parser from
4661 2008-03-23 Johan Dahlin <johan@gnome.org>
4663 * tests/parser/Makefile.am (utility.gidl):
4664 * tests/parser/utility-expected.gidl:
4665 Pass in the gobject.gidl since we're defining a GObject.
4667 2008-03-12 Johan Dahlin <johan@gnome.org>
4669 * relaxng/relaxng.rng:
4670 Add a releaxng in relaxng we can use to validate the relaxngs
4673 2008-03-12 Jürg Billeter <j@bitron.ch>
4675 * tools/scanner.c: (g_igenerator_new):
4676 * tools/scannerparser.y:
4677 Fix compiler warnings.
4679 2008-03-12 Jürg Billeter <j@bitron.ch>
4683 * tools/scannerparser.y:
4684 Start fixing memory management in g-idl-scanner.
4686 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4688 * tools/gidlcompilercontext.c: (write_compiled):
4689 Fix critical warning when no shlib passed to g-idl-compiler.
4691 2008-03-12 Johan Dahlin <johan@gnome.org>
4693 * tests/parser/utility-expected.gidl:
4694 * tests/parser/utility.h:
4695 Add a get_type-function, so the scanner actually
4696 parses it as an object.
4698 2008-03-12 Johan Dahlin <johan@gnome.org>
4700 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4703 * tests/parser/Foo-expected.gidl:
4704 * tests/parser/Makefile.am:
4705 * tests/parser/foo-object.h:
4706 * tests/parser/foo.c:
4707 * tests/parser/utility-expected.gidl:
4708 * tests/parser/utility.c:
4709 * tests/parser/utility.h:
4711 Add a new gidl test. 'utility.gidl', which is used to be able
4712 to test external type references. Add a reference to UtilityObject*
4715 2008-03-11 Johan Dahlin <johan@gnome.org>
4719 Remove most global variables
4721 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4723 * tools/scannerlexer.l:
4725 * tests/parser/Foo-expected.gidl:
4726 * tests/parser/foo.c:
4727 * tests/parser/Makefile.am:
4728 * tests/parser/foo-object.h:
4730 Added a few extra tests. Which resulted in finding a few
4731 bugs. Which resulted in me fixing those bugs
4733 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4735 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4736 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4737 Add some comments for strings into generated output for
4740 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4742 * tools/gidlcompilercontext.c: (write_compiled):
4743 Write out the shlibs variable before writing out the strings
4744 length. Fixes compiler warning when using '-l' flag with
4747 2008-03-11 Johan Dahlin <johan@gnome.org>
4749 * tests/parser/Foo-expected.gidl:
4750 * tests/parser/foo-object.h:
4753 * tools/scannerlexer.l:
4754 Add support for parsing return arguments. Add support for
4755 caller-owns return types.
4756 Patch by Philip Van Hoof.
4758 * tools/scannerparser.y:
4759 Remove parsing of the @deprecated syntax used in headers.
4760 We will support gtk-doc deprecation in the future instead.
4762 2008-03-11 Johan Dahlin <johan@gnome.org>
4764 * tools/compiler.c (main): Coding style fixes
4766 2008-03-10 Johan Dahlin <johan@gnome.org>
4769 Add GCOV_LIBS to GILIBS
4771 2008-03-10 Johan Dahlin <johan@gnome.org>
4773 * tests/parser/Foo-expected.gidl:
4774 * tests/parser/foo.c:
4775 Rename null-ok to direction=out
4777 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4779 reviewed and extensively tested by Johan
4781 * tests/parser/Foo-expected.gidl:
4782 * tests/parser/foo-object.h:
4783 * tests/parser/foo.c:
4786 * tools/gidlwriter.c:
4789 * tools/scannerlexer.l:
4790 * tools/scannerparser.y:
4792 Add support for scanning for gtk-doc comments inside
4793 C source files. Add tests
4795 2008-03-10 Johan Dahlin <johan@gnome.org>
4797 * tests/parser/Makefile.am:
4798 * tests/parser/foo.c:
4801 * tools/scannerparser.y:
4802 Add an api to lex filenames.
4803 Lex all source .c files passed in on the command line.
4804 Scan sources in a test and a couple of private structures
4805 which should not be included in the generated gidl
4807 2008-03-10 Johan Dahlin <johan@gnome.org>
4809 * tests/invoke/Makefile.am: Make the generated metadata
4810 depend on the g-idl-compiler
4812 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4814 * tools/gidlmodule.c
4815 * tools/gidlmodule.h
4818 Remove the old g-idl-compiler code.
4821 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4823 * tools/quote-file.sh
4826 Move to using the 'C' struct compiler code.
4828 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4830 * girepository/ginfo.c
4832 Change the way that external references with no namespace
4833 are dealt with. External references with no namespace
4834 are placed into the XML as-if they are a local reference.
4835 This is temporary, but helps with roundtrip tests.
4837 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4839 * girepository/ginfo.c
4840 Add the ability to get the value of a constant of
4841 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4842 is provided as a string.
4844 This would deal properly with:
4845 typedef char* random;
4846 const random = "A string";
4848 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4850 * girepository/ginfo.c
4851 * girepository/girepository.h
4853 Add a function to check if an enum is registered or not.
4854 Previously anything testing this relied on the g-type
4855 string offset having a value of 0.
4857 * girepository/gmetadata.c
4858 * girepository/gmetadata.h
4860 Remove unneccesary or erroneous checks. There were two
4861 metadata validation checks which made sure that the blob
4862 sizes were the same as some magic numbers compiled into the code.
4863 This is wrong as it breaks any forwards compatibility that may
4866 Checks were also present that made sure that unregistered type
4867 blobs had a value of 0 in the g-type offset field. This is
4868 unneccessary. If a type blob is unregistered then any value
4869 in its g-type field is simply invalid.
4871 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4873 * girepository/ginfo.c
4874 * girepository/gmetadata.c
4875 * girepository/gmetadata.h
4877 Change the metadata format to have a standard header
4878 for all the type blobs. Merge the SimpleTypeBlob
4879 and InterfaceTypeBlob into a union. A union of these
4880 two blobs existed previously but was not explicit
4881 in the metadata format.
4883 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4885 * tools/gidlcompilercontext.c
4886 * tools/gidlcompilercontext.h
4887 * tools/gidlcompilerentrynode.c
4888 * tools/gidlcompilerentrynode.h
4889 * tools/gidlcompilertypenode.c
4890 * tools/gidlcompilertypenode.h
4892 Add code to compile a tree of GIdlNodes to
4893 a 'C' struct representing the metadata.
4894 This is to aid cross-compiling. Previously
4895 the g-idl-compiler created a binary blob with
4896 data written in the byte order and alignment
4897 of the tool rather than the intended target.
4899 Cleaned up and improved by Johan and Robert :-)
4901 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4903 * girepository/ginvoke.c
4904 * girepository/girepository.h
4905 * girepository/gmetadata.c
4906 * girepository/gmetadata.h
4908 * tools/gidlparser.c
4909 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4910 to avoid confusion with the interface blob.
4913 * tools/gidlparser.c
4914 Remove magic numbers and replace with type-tag
4915 enumeration symbols.
4917 * girepository/gmetadata.c
4918 Add validate declaration.
4920 2008-03-10 Jürg Billeter <j@bitron.ch>
4922 * tools/gidlparser.c: (parse_type_internal):
4923 * tools/scannerlexer.l:
4924 * tools/scannerparser.y:
4925 Support C99 _Bool type in scanner.
4927 2008-03-10 Jürg Billeter <j@bitron.ch>
4929 * tests/parser/Foo-expected.gidl:
4930 * tests/parser/foo-object.h:
4931 * tests/parser/foo.c: (foo_enum_method):
4932 * tools/scanner.c: (g_igenerator_process_function_symbol):
4933 Don't skip functions that are defined in the namespace of a type
4934 that doesn't support methods, as for example enums.
4936 2008-03-10 Johan Dahlin <johan@gnome.org>
4938 * gidl.dtd: Remove, we're using relaxng for now
4940 * tests/parser/Foo-expected.gidl:
4941 * tests/parser/foo-object.h:
4942 * tests/parser/foo.c:
4943 Rename the enum/flags get_type functions to include the whole type.
4945 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4947 * tools/gidlwriter.c (enum_generate): added "type-name",
4948 "get-type" and "deprecated" missing arguments.
4949 * tests/parser/Foo-expected.gidl:
4950 * tests/parser/foo-object.h: test enum type, and no type.
4952 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4955 Consistent checks, add missing 'test'
4957 2008-03-05 Havoc Pennington <hp@redhat.com>
4959 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4960 does on Fedora 8. Make libffi a hard requirement, since it was in
4961 practice anyway (was not really conditional in the code or
4962 makefile, only in configure).
4964 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4966 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4967 reviewed by: Johan Dahlin <johan@gnome.org>
4969 * tests/Makefile.am:
4970 * tests/roundtrips.sh:
4971 Modify the roundtrips test so that they do not use the
4972 --raw option of the gidl compiler but instead compile a
4973 shared library to use with g_module.
4975 * tests/invoke/Makefile.am:
4976 * tests/invoke/invoke.c:
4977 Modify the invoke tests to build a shared library rather
4978 than use the --raw option.
4980 * tests/invoke/invoke-namespace-find.sh: Removed:
4981 Noone knows why this was here, so removed.
4983 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4985 * tools/scanner.c: (g_igenerator_process_function_symbol):
4986 Move g_idl_node_can_have_member test later, as it broke spotting
4987 get_type's for nodes that can't have members.
4989 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4992 * tools/gidlnode.c: (g_idl_node_can_have_member):
4993 Add g_idl_node_can_have_member.
4995 * tools/scanner.c: (g_igenerator_process_function_symbol):
4996 Use g_idl_node_can_have_member to test if we should add a function
4997 as a member of the type node.
4999 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5001 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
5003 * tests/parser/Makefile.am:
5004 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
5006 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5008 * tools/scanner.c: (main):
5009 Ignore -pthread when passed to g-idl-scanner.
5011 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5013 * tools/grealpath.h: Added:
5014 * tools/scanner.c: (main):
5015 * tools/scannerlexer.l:
5016 * tools/Makefile.am:
5017 Always use absolute paths with symbolic links resolved when
5018 comparing filenames.
5020 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5022 * gobject-introspection.pc.in:
5023 Provide variables for g-idl-parser, scanner and compiler in the
5026 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
5029 * girepository/Makefile.am:
5030 * tools/Makefile.am:
5031 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
5033 2008-02-10 Johan Dahlin <johan@gnome.org>
5035 * tests/parser/Foo-expected.gidl:
5036 * tests/parser/foo-object.h:
5037 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
5038 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
5041 2008-02-10 Johan Dahlin <johan@gnome.org>
5043 * tests/parser/Foo-expected.gidl:
5044 * tests/parser/foo-object.h:
5045 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
5046 Add enum and flags test.
5048 2008-02-10 Johan Dahlin <johan@gnome.org>
5052 * girepository/Makefile.am:
5053 Make 'make distcheck' work again.
5055 2008-02-10 Johan Dahlin <johan@gnome.org>
5057 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
5060 * tests/parser/Makefile.am: Only create Foo.gidl when running make
5061 check, eg exclude it from BUILT_SOURCES.
5063 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5068 * girepository/Makefile.am:
5069 * m4/Makefile.am: Added:
5070 * m4/as-compiler-flag.m4: Added:
5071 * m4/gcov.m4: Added:
5072 * tools/Makefile.am:
5073 Add ability to generate a coverage report.
5074 Adds configure option --enable-gcov and make rule 'check-coverage'.
5076 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5080 * gidl/Makefile.am: Added:
5081 * girepository/Makefile.am: Added:
5082 * src/Makefile.am: Renamed to tools/Makefile.am:
5083 * src/compiler.c: Renamed to tools/compiler.c:
5084 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
5085 * src/generate.c: Renamed to tools/generate.c:
5086 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
5087 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
5088 * src/gidlnode.c: Renamed to tools/gidlnode.c:
5089 * src/gidlnode.h: Renamed to tools/gidlnode.h:
5090 * src/gidlparser.c: Renamed to tools/gidlparser.c:
5091 * src/gidlparser.h: Renamed to tools/gidlparser.h:
5092 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
5093 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
5094 * src/ginfo.c: Renamed to girepository/ginfo.c:
5095 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
5096 * src/girepository.c: Renamed to girepository/girepository.c:
5097 * src/girepository.h: Renamed to girepository/girepository.h:
5098 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
5099 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
5100 * src/scanner.c: Renamed to tools/scanner.c:
5101 * src/scanner.h: Renamed to tools/scanner.h:
5102 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
5103 * src/scannerparser.y: Renamed to tools/scannerparser.y:
5104 * tests/invoke/Makefile.am:
5105 Split src/ into girepository/ and tools/
5109 * girepository/Makefile.am:
5110 * tests/Makefile.am:
5111 * tests/invoke/Makefile.am:
5112 * tests/parser/Makefile.am:
5113 * tests/roundtrips.sh:
5114 * tools/Makefile.am:
5115 Make distcheck work.
5117 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
5119 * tests/invoke/invoke.c: (main):
5120 * tests/invoke/testfns.c: (test6), (test7):
5121 * tests/invoke/testfns.xml:
5122 Add tests for invokation with a GList argument.
5123 Also tests caller-owns return values.
5125 2008-02-04 Rob Taylor <robtaylor@floopily.org>
5128 Add some documentation for GICallableInfo
5130 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
5133 Correct syntax errors in the DTD file.
5135 * relaxng/c-types.xml:
5136 * relaxng/g-types.xml:
5138 Add a RelaxNG specification for the GObject Introspection XML data.
5139 The Specification has validated all of the test files.
5141 2008-01-25 Rob Taylor <robtaylor@floopily.org>
5143 * tests/roundtrips.sh:
5144 * tests/struct.test:
5145 Add roundtrip tests for structs.
5147 2008-01-11 Johan Dahlin <johan@gnome.org>
5149 * src/scanner.c (g_igenerator_process_function_symbol):
5150 Refactor out g_idle_node_add_member.
5151 (create_node_from_gtype, create_node_from_ctype):
5152 Use case instead of if...else
5153 (get_type_from_type_id):
5154 Rename to create_node_from_gtype
5155 (get_type_from_ctype):
5156 Rename to create_node_from_ctype
5158 Rename ginode -> node, gitype -> type, gifunc -> func.
5160 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
5161 Two new functions, refactor out of scanner.c
5163 * src/scanner.c: (g_igenerator_process_function_symbol):
5164 * src/scannerlexer.l:
5165 Do not save the content of the deprecated variable, only
5168 2008-01-11 Johan Dahlin <johan@gnome.org>
5170 * tests/parser/foo-object.h: Add a couple of comment parser tests.
5172 2008-01-11 Jürg Billeter <j@bitron.ch>
5174 * src/scannerlexer.l:
5175 Fix GTK-Doc parsing.
5177 2008-01-11 Jürg Billeter <j@bitron.ch>
5179 * src/scannerlexer.l:
5180 Fix GTK-Doc parsing.
5182 2008-01-11 Jürg Billeter <j@bitron.ch>
5184 * src/scanner.c: (lookup_symbol):
5185 Return unresolved name if we find unknown symbol.
5187 2008-01-11 Jürg Billeter <j@bitron.ch>
5189 * src/scanner.c: (g_igenerator_generate):
5190 Initialize GObject to fix scanning interface properties.
5192 * tests/parser/Foo-expected.gidl:
5193 * tests/parser/foo-object.h:
5194 * tests/parser/foo.c: (foo_interface_get_type):
5195 Test interfaces with GObject prerequisite.
5197 * tests/parser/Makefile.am:
5198 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
5200 2007-12-27 Johan Dahlin <johan@gnome.org>
5202 * src/scannerlexer.l:
5203 Parse gtk-doc comments.
5205 * src/gidlwriter.c: (function_generate):
5206 Reorganize, avoid duplication and add support for
5207 writing deprecated functions.
5209 * src/scannerparser.y:
5211 Add new structure CDirective and functions to create/free them.
5213 * src/scanner.c: (g_igenerator_process_function_symbol),
5214 (g_igenerator_process_unregistered_struct_typedef),
5215 (g_igenerator_process_struct_typedef),
5216 (g_igenerator_process_union_typedef),
5217 (g_igenerator_process_enum_typedef),
5218 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
5219 (g_igenerator_start_preprocessor):
5220 Parse @deprecated directive for functions.
5221 Remove some more C99isms.
5222 Send in -C to cpp to avoid stripping comments.
5224 * tests/parser/foo-object.h:
5225 * tests/parser/Foo-expected.gidl:
5226 Add deprecated directive
5228 2007-12-27 Johan Dahlin <johan@gnome.org>
5230 * src/scannerlexer.l (intsuffix): Add emacs mode line and
5231 escape ' and " so it looks more like C.
5234 Unlink temporary file used.
5236 2007-12-27 Johan Dahlin <johan@gnome.org>
5238 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
5239 (g_igenerator_start_preprocessor), (main):
5241 * src/scannerparser.y:
5242 Plug a couple of simple memory leaks.
5244 2007-12-27 Johan Dahlin <johan@gnome.org>
5246 * src/scanner.c: (g_igenerator_parse_macros),
5247 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
5250 * src/scannerparser.y:
5251 * tests/parser/Makefile.am:
5253 Improve error reporting, return when the preprocessor fails.
5254 Add a verbose parameter, to aid debugging.
5255 Revert to using a temporary file to communicate between the
5256 preprocessor and the parser, because we need to wait for
5257 the exit code from the pre-processor before starting to parse.
5259 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
5261 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
5262 cparser.y to scannerparser.y
5264 2007-12-11 Johan Dahlin <johan@gnome.org>
5268 * src/scanner.c: (g_igenerator_new):
5270 Get rid of the global the_generator variable.
5272 2007-12-10 Johan Dahlin <johan@gnome.org>
5274 * src/scanner.c (main): Add an output option,
5275 add checks for required parameters
5278 set BUILD_SOURCES and CLEANFILES properly
5280 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
5281 (g_writer_write_indent), (g_writer_write_unindent),
5282 (field_generate), (value_generate), (constant_generate),
5283 (property_generate), (function_generate), (vfunc_generate),
5284 (signal_generate), (interface_generate), (struct_generate),
5285 (union_generate), (boxed_generate), (enum_generate),
5286 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
5288 * src/scanner.c: (g_igenerator_generate):
5290 * src/scannerwriter.c:
5292 Refactor scannerwriter to only be tied to a GIdlModule and move
5293 it (again!) to gidlwriter.c. Change the writer function to take
5296 2007-12-10 Johan Dahlin <johan@gnome.org>
5299 * src/scanner.c: (g_igenerator_generate):
5301 * src/scannerwriter.c: (g_igenerator_write_inline),
5302 (g_igenerator_write), (g_igenerator_write_indent),
5303 (g_igenerator_write_unindent), (field_generate), (value_generate),
5304 (constant_generate), (property_generate), (function_generate),
5305 (vfunc_generate), (signal_generate), (interface_generate),
5306 (struct_generate), (union_generate), (boxed_generate),
5307 (enum_generate), (node_generate), (module_generate),
5308 (g_scanner_write_file):
5310 Move the scanner gidl writing to a separate source file.
5312 2007-12-10 Johan Dahlin <johan@gnome.org>
5317 Move over all CType construction functions.
5319 * tests/parser/Makefile.am:
5320 Be verbose when printing parsing tests results.
5322 2007-12-10 Johan Dahlin <johan@gnome.org>
5324 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
5325 preprocessor handling to here. Start cpp insteado of cc -E,
5326 always include -U__GNUC__, since it's specific to the preprocessor
5329 * tests/parser/Makefile.am (check-local): Silent diff and skip
5330 -U__GNUC__ which is always defined now
5332 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
5334 reviewed by: <delete if not using a buddy>
5336 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
5337 * tests/parser/Makefile.am:
5339 2007-12-09 Johan Dahlin <johan@gnome.org>
5342 Use GOption for command line options.
5343 (g_igenerator_new, main): Simplify constructor and they way
5344 parameters are passed into it.
5350 * src/gen-introspect.c:
5351 * src/gen-introspect.h:
5353 Rename gen-introspect.[ch] to scanner.[ch]
5355 2007-12-09 Johan Dahlin <johan@gnome.org>
5359 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
5360 don't make the repository library and the other utilites link against
5363 * src/gen-introspect.c: (g_igenerator_create_object),
5364 (g_igenerator_create_interface), (g_igenerator_create_boxed),
5365 (g_igenerator_create_enum), (g_igenerator_create_flags),
5366 (g_igenerator_process_module_symbol),
5367 (g_igenerator_process_module), (g_igenerator_generate), (main):
5368 * src/gen-introspect.h:
5369 Refactor g_igenerator_process_types into smaller pieces.
5371 * tests/parser/Makefile.am:
5372 Depend on the gen-introspect binary
5374 2007-12-09 Johan Dahlin <johan@gnome.org>
5376 * src/gen-introspect.c (g_igenerator_process_types):
5377 Break into smaller pieces, one for each generated node type.
5379 2007-12-08 Johan Dahlin <johan@gnome.org>
5381 * src/gen-introspect.c: (g_igenerator_process_types),
5382 (g_igenerator_add_module):
5383 * tests/parser/Foo-expected.gidl:
5384 * tests/parser/foo-object.h:
5385 * tests/parser/foo.c: (foo_subobject_class_init),
5386 (foo_subobject_init):
5388 Add a subobject test and make sure to register defined classes
5389 in the lookup symbol hash table.
5391 2007-12-08 Johan Dahlin <johan@gnome.org>
5395 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
5396 (g_igenerator_process_types), (g_igenerator_add_module),
5397 (g_igenerator_add_include_idl), (main):
5398 * src/gen-introspect.h:
5399 * tests/parser/Makefile.am:
5400 * tests/parser/Foo-expected.gidl:
5402 Change the gen-introspect to generate namespaced module names,
5403 such as GLib.Object instead of GObject.
5404 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
5405 add a --include-idl parameter to gen-introspect,
5406 and update the parser test.
5408 2007-12-08 Johan Dahlin <johan@gnome.org>
5410 * src/gen-introspect.c:
5411 Move main to the end of the file and attempt to make it valid
5414 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
5415 we're not quite ready to generate metadata yet.
5420 Add a simple gen-introspect parser test
5422 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
5424 reviewed by: Johan Dahlin <johan@gnome.org>
5427 * gobject-introspection.pc.in:
5429 * src/compiler.c: (format_output), (write_out_metadata), (main):
5430 * src/gen-introspect.c: (main):
5431 * src/gen-introspect.h:
5432 * src/generate.c: (write_callable_info), (write_repository),
5433 (load_metadata), (main):
5434 * src/gidlmodule.c: (g_idl_module_new),
5435 (g_idl_module_build_metadata):
5437 * src/gidlparser.c: (start_element_handler):
5438 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5439 (g_base_info_get_name), (g_base_info_get_namespace),
5440 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5441 (g_base_info_get_metadata), (g_function_info_get_symbol),
5442 (g_function_info_get_flags), (g_function_info_get_property),
5443 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5444 (g_callable_info_may_return_null),
5445 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5446 (g_callable_info_get_arg), (g_arg_info_get_direction),
5447 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5448 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5449 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5450 (g_type_info_get_tag), (g_type_info_get_param_type),
5451 (g_type_info_get_interface), (g_type_info_get_array_length),
5452 (g_type_info_is_zero_terminated),
5453 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5454 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5455 (g_value_info_get_value), (g_field_info_get_flags),
5456 (g_field_info_get_size), (g_field_info_get_offset),
5457 (g_registered_type_info_get_type_name),
5458 (g_registered_type_info_get_type_init),
5459 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5460 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5461 (find_method), (g_struct_info_find_method),
5462 (g_enum_info_get_n_values), (g_enum_info_get_value),
5463 (g_object_info_get_parent), (g_object_info_get_type_name),
5464 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5465 (g_object_info_get_interface), (g_object_info_get_n_fields),
5466 (g_object_info_get_field), (g_object_info_get_n_properties),
5467 (g_object_info_get_property), (g_object_info_get_n_methods),
5468 (g_object_info_get_method), (g_object_info_find_method),
5469 (g_object_info_get_n_signals), (g_object_info_get_signal),
5470 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5471 (g_object_info_get_n_constants), (g_object_info_get_constant),
5472 (g_interface_info_get_n_prerequisites),
5473 (g_interface_info_get_prerequisite),
5474 (g_interface_info_get_n_properties),
5475 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5476 (g_interface_info_get_method), (g_interface_info_find_method),
5477 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5478 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5479 (g_interface_info_get_n_constants),
5480 (g_interface_info_get_constant), (g_property_info_get_flags),
5481 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5482 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5483 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5484 (g_constant_info_get_value), (g_union_info_get_n_fields),
5485 (g_union_info_get_field), (g_union_info_get_n_methods),
5486 (g_union_info_get_method), (g_union_info_is_discriminated),
5487 (g_union_info_get_discriminator_offset),
5488 (g_union_info_get_discriminator):
5489 * src/ginvoke.c: (g_function_info_invoke):
5490 * src/girepository.c: (g_irepository_register),
5491 (g_irepository_unregister), (g_irepository_get_default),
5492 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5493 (g_irepository_get_info), (g_irepository_find_by_name),
5494 (g_irepository_get_shared_library),
5495 (g_irepository_build_search_path), (g_irepository_register_file),
5496 (g_irepository_error_quark):
5497 * src/girepository.h:
5498 * src/gmetadata.c: (g_metadata_get_dir_entry),
5499 (g_metadata_check_sanity), (validate_header),
5500 (validate_array_type_blob), (validate_iface_type_blob),
5501 (validate_param_type_blob), (validate_error_type_blob),
5502 (validate_type_blob), (validate_arg_blob),
5503 (validate_signature_blob), (validate_function_blob),
5504 (validate_callback_blob), (validate_constant_blob),
5505 (validate_value_blob), (validate_field_blob),
5506 (validate_property_blob), (validate_signal_blob),
5507 (validate_vfunc_blob), (validate_struct_blob),
5508 (validate_enum_blob), (validate_object_blob),
5509 (validate_interface_blob), (validate_errordomain_blob),
5510 (validate_union_blob), (validate_blob), (validate_directory),
5511 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5512 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5513 (g_metadata_new_from_mapped_file), (g_metadata_free),
5514 (g_metadata_set_module), (g_metadata_get_namespace):
5516 * tests/Makefile.am:
5517 * tests/invoke/Makefile.am:
5518 * tests/invoke/invoke-namespace-find.sh:
5519 * tests/invoke/invoke.c: (main):
5521 Add a namespace/shared library mapping. fixes #313268.
5523 2007-12-03 Johan Dahlin <johan@gnome.org>
5525 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5528 2007-11-30 Jürg Billeter <j@bitron.ch>
5534 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5535 (g_igenerator_write_inline), (g_igenerator_write),
5536 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5537 (field_generate), (value_generate), (constant_generate),
5538 (property_generate), (function_generate), (vfunc_generate),
5539 (signal_generate), (interface_generate), (struct_generate),
5540 (union_generate), (boxed_generate), (enum_generate),
5541 (node_generate), (module_generate), (get_type_from_type_id),
5542 (str_replace), (g_igenerator_process_properties),
5543 (g_igenerator_process_signals), (g_igenerator_process_types),
5544 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5545 (g_igenerator_process_unregistered_struct_typedef),
5546 (g_igenerator_process_struct_typedef),
5547 (g_igenerator_process_union_typedef),
5548 (g_igenerator_process_enum_typedef),
5549 (g_igenerator_process_function_typedef),
5550 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5551 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5552 (g_igenerator_generate), (main), (csymbol_new),
5553 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5554 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5555 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5556 (eat_hspace), (eat_line), (read_identifier),
5557 (g_igenerator_parse_macros):
5558 * src/gen-introspect.h:
5560 Import gen-introspect to generate introspection information by
5563 2007-11-30 Jürg Billeter <j@bitron.ch>
5565 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5567 2007-11-30 Jürg Billeter <j@bitron.ch>
5569 * src/gidlparser.c: (end_element_handler): Don't leave requires
5572 2007-11-29 Johan Dahlin <johan@gnome.org>
5574 * src/gidlparser.c (parse_type_internal): Add char,
5575 gchar and guchar to the builtin types.
5577 2007-11-26 Johan Dahlin <johan@gnome.org>
5579 * src/ginfo.c: (g_object_info_get_type_name),
5580 (g_object_info_get_type_init):
5581 * src/girepository.c: (g_irepository_is_registered):
5582 * src/girepository.h:
5584 Add g_object_info_get_type_name, g_object_info_get_type_init and
5585 g_irepository_is_registered.
5587 2006-08-14 Jürg Billeter <j@bitron.ch>
5589 * src/gidlparser.c: (end_element_handler): Don't leave
5590 namespace and implements states too early.
5593 2007-11-26 Johan Dahlin <johan@gnome.org>
5595 * src/gmetadata.c (validate_struct_blob):
5596 pass blob_type to validate_function_blob instead of
5597 hard-coding BLOB_TYPE_STRUCT.
5599 Patch by Torsten Schoenfeld, fixes #314190
5601 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5603 * src/compiler.c, src/generate.c, src/gidlnode.c,
5604 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5605 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5606 warnings about return values, signedness mismatches, unused
5607 variables, and unhandles enum values in switch statements.
5609 * tests/invoke/Makefile.am: Don't install the invoke test program.
5610 Add -I ../../src to the cflags used for the test functions files.
5612 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5614 * src/girepository.h: Export g_invoke_error_quark.
5616 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5618 * src/ginvoke.c: Remove the fallback implementation of
5619 g_function_info_invoke since we now formally depend on libffi.
5621 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5623 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5624 Remove these files from cvs, as they are now generated.
5626 * src/gmetadata.c (validate_iface_type_blob): Don't
5627 complain if blob->pointer is not set, since that
5628 happens for enum and flag types. (#308935, Gustavo
5631 * Commit an autoconf-conversion patch by
5632 Gustavo Carneiro (#308708)
5634 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5636 * src/compiler.c (main): Use it here to validate
5637 the generated metadata.
5639 * src/gmetadata.[hc]: Add code to validate a
5642 * metadata-format.txt: Updates
5644 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5646 * tests/*: Add struct offsets to field and vfunc
5649 * src/generate.c (write_vfunc_info): Write offset
5650 information for vfuncs.
5652 * src/gidlnode.c (g_idl_node_build_metadata): Write
5653 the struct offsets into the metadata.
5655 * src/gidlparser.c: Parse the offset attributes of
5656 field and vfunc elements.
5658 * src/gidlnode.h: Add offset members to field and
5661 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5665 * gidl.dtd: Updates.
5667 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5668 file, creates, compiles and runs a C file, and folds the
5669 resulting struct offsets back into the .gidl file.
5671 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5673 * src/gidlparser.c (start_field): Make fields in objects
5676 * src/gidlmodule.c: Include string.h
5681 * metadata-format.txt: Cleanup basic types.
5682 * src/*: Adapt to the changes.
5683 * tests/*: Adapt to the changes.
5684 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5686 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5687 size for enum blobs.
5688 (g_idl_node_get_full_size): Report the correct size for
5691 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5692 error checking for blob sizes.
5694 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5696 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5697 interface types for which is_pointer is FALSE, e.g. enums.
5699 * src/gidlnode.c (g_idl_node_get_full_size)
5700 * src/gidlparser.c (parse_type_internal):
5701 * src/generate.c (write_type_info): Support unspecialized
5702 lists, hashtables and errors. Also emit a '*' after these.
5706 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5710 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5712 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5714 * src/*.c: Change the directory to be addressed by
5715 1-based indexes, and use an index of zero to mean
5718 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5720 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5722 * tests/union.test: Add a union test.
5724 * src/generate.c: Handle unions.
5726 * src/girepository.h:
5727 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5729 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5731 * src/gidlparser.c (start_union): Parse <union> elements.
5733 * src/gidlnode.h: Add a GIdlNodeUnion.
5735 * gidl.dtd: Add a <union> element.
5737 * src/gmetadata.c (g_metadata_check_sanity): Check
5740 * src/gmetadata.h: Add union_blob_size to Header,
5743 * metadata-format.txt: Add a UnionBlob.
5745 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5747 * tests/*: Update testcases.
5749 * src/generate.c (write_callable_info): Don't forget to
5750 write transfer and null-ok attributes for return types
5753 * src/girepository.h:
5754 * src/ginfo.c (g_callable_info_may_return_null):
5755 New function to find out if a function may return NULL.
5757 * src/compiler.c (format_output): Make the generated
5760 * README: Point to a recent libffi snapshot.
5762 * tests/invoke/*: Some invoke tests.
5764 * src/Makefile: Add ginvoke.c and the necessary
5767 * src/girepository.h (g_function_info_invoke): Add
5770 * src/ginvoke.c (g_function_info_invoke): Initial
5771 implementation of invoke functionality based on libffi.
5773 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5774 strings and types hash tables in the right order when
5776 (find_entry_node): Free the name parts.
5778 2005-05-12 Johan Dahlin <johan@gnome.org>
5780 * src/generate.c: Generate consistent end tags.
5784 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5788 * src/gidlparser.c (start_function): Actually add
5789 methods to objects. (Steven Walter)
5791 * src/girepository.h:
5792 * src/ginfo.c: Rename Transfer and Direction to
5793 GITransfer and GIDirection. (Torsten Schoenfeld)
5795 * tests/*: Make tests work with the changes in name
5798 * src/gidlnode.c (find_entry_node): Parse qualified
5799 names and generate xref nodes for them if needed. Don't
5800 require all modules to be loaded any more.
5802 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5805 * src/ginfo.c (g_object_info_get_parent): Return NULL
5806 if blob->parent is 0. Still need to make sure index
5809 * src/generate.c: Generate qualified names when
5810 referring to non-local types. Emit transfer attribute
5813 * src/compiler.c (format_output): Put the function
5814 attributes where gcc accepts them.
5816 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5818 * src/compiler.c (main): Add a --verbose cmdline option
5819 and only log messages if it is specified.
5822 * src/gidlnode.c (init_stats, dump_stats): Collect some
5823 statistics on string and type sharing.
5825 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5826 g_message() instead of fprintf().
5828 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5829 (g_idl_node_get_size): Implement for structs.
5830 (g_idl_node_get_full_size): Handle parent being NULL.
5831 (serialize_type): Handle lookup failures more gracefully.
5833 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5835 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5836 size calculation for 2-parameter types and for objects.
5838 * src/compiler.c: Add a cmdline option for debug output
5839 and install a log handler to implement it.
5840 * src/gidlnode.c: Add some debug spew.
5844 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5845 forget to count the module name when calculating the
5846 required size for the metadata.
5849 * src/gidlparser.c: Fix compiler warnings.
5851 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5853 * src/compiler.c (main): Free the option context.
5855 * gidl.dtd: Clean up handling of names. All elements
5856 have a "name", only the elements corresponding to
5857 actual callable functions (function, method, constructor),
5858 have an additional "symbol" attribute holding the
5859 dlsym()-able function name.
5861 * src/generate.c: Adapt to generate xml matching the
5865 * src/gidlnode.c: Adapt to parse the new dtd.
5867 * tests/*.test: Adjust to the new dtd.
5869 * metadata-format.txt:
5870 * src/gmetadata.h: Remove the short_name field
5872 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5873 * src/girepository.h:
5874 * src/ginfo.c (g_value_info_get_short_name): Removed
5876 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5878 * gidl.dtd: Allow constructors for boxed types,
5879 patch by Jonathan Blandford.
5882 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5884 * --- Initial import ---