1 2009-01-26 Johan Dahlin <jdahlin@async.com.br>
3 * tests/everything/everything.c (test_callback):
4 * tests/everything/everything.h:
5 Add a couple of callback tests.
7 2009-01-26 Johan Dahlin <jdahlin@async.com.br>
9 * girepository/ginfo.c (g_base_info_unref):
10 Only unref the repository if it's actually set.
12 2009-01-23 Johan Dahlin <jdahlin@async.com.br>
14 * tests/everything/everything.c (test_enum_param):
15 * tests/everything/everything.h:
17 Add an enum param test function
19 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
22 Post-release version bump
25 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
29 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
31 Bug 562622 – Errordomains missing
33 * giscanner/girwriter.py:
34 * giscanner/glibast.py:
35 * giscanner/glibtransformer.py:
36 * tests/scanner/Makefile.am:
37 * tests/scanner/foo-1.0-expected.gir:
38 * tests/scanner/foo-1.0-expected.tgir:
39 * tests/scanner/foo.c (foo_error_get_type), (foo_error_quark):
40 * tests/scanner/foo.h:
42 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
44 * giscanner/scannerlexer.l:
45 Increase the buffer size to 1M, so
46 gtkalias.h can be parsed.
48 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
50 * giscanner/glibtransformer.py:
51 When trying to map functions to structs, do
52 not require a public structure to exist, should
53 fix Gst gir generation in.
55 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
57 Bug 562615 – Struct methods missing
59 * giscanner/annotationparser.py:
61 * giscanner/girwriter.py:
62 * giscanner/glibast.py:
63 * giscanner/glibtransformer.py:
64 * tests/scanner/foo-1.0-expected.gir:
65 * tests/scanner/foo-1.0-expected.tgir:
67 2009-01-16 Dan Winship <danw@gnome.org>
69 * gir/GL-1.0.gir: add back GLvoid, which got lost during the
70 gir-repository -> gobject-introspection migration
72 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
74 * gir/freetype2-2.0.gir: add FT_Int32
75 * gir/xft-2.0.gir: add XftFont
76 * girepository/gdump.c (g_irepository_dump):
77 Report errors when an invalid type is encountered
78 * giscanner/glibtransformer.py:
79 Make the error message a bit nicer.
81 Part of preparating for gir generating inside pango.
83 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
88 * gir/fontconfig-2.0.gir:
89 * gir/freetype2-2.0.gir:
90 * gir/libxml2-2.0.gir:
95 Move over the hand-written girs from gir-repository
96 so upstream libraries depending on these can avoid
97 a gir-repository dependency.
99 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
101 Bug 567813 – Everything should be versioned
104 * girepository/Makefile.am:
105 * girepository/girepository.c (init_globals):
106 * girepository/girparser.c (locate_gir):
107 * giscanner/dumper.py:
108 * giscanner/transformer.py:
109 * gobject-introspection-1.0.pc.in:
110 * tests/everything/Makefile.am:
111 * tests/invoke/Makefile.am:
112 * tests/offsets/Makefile.am:
113 * tests/repository/Makefile.am:
114 * tests/scanner/Makefile.am:
117 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
119 Bug 555036 – put gtk-doc in GIR
121 * giscanner/annotationparser.py:
123 * giscanner/girwriter.py:
124 * giscanner/glibast.py:
125 * tests/scanner/annotation-1.0-expected.gir:
126 * tests/scanner/annotation.h:
127 * tests/scanner/foo-1.0-expected.gir:
129 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
131 * giscanner/cachestore.py (CacheStore.load): Catch AttributeError
132 which seems to be occasionally raised for Record.
134 * giscanner/annotationparser.py:
135 Fix a bug where \n was not present in a comment
137 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
139 Bug 562467 – Property annotation
141 * giscanner/annotationparser.py:
142 * tests/scanner/annotation-1.0-expected.gir:
143 * tests/scanner/annotation-1.0-expected.tgir:
144 * tests/scanner/annotation.c (annotation_object_set_property),
145 (annotation_object_get_property), (annotation_object_class_init):
147 Annotations are parsed for properties.
149 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
151 Bug 546739 – Introspection should know precise signal parameter types
153 * giscanner/annotationparser.py:
154 * tests/scanner/annotation-1.0-expected.gir:
155 * tests/scanner/annotation-1.0-expected.tgir:
156 * tests/scanner/annotation.c (annotation_object_class_init):
158 Annotations are parsed for signals, the (type) annotation is introduced.
160 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
162 Bug 563591 – Flags not recognized when there is no introspection data
165 * giscanner/girwriter.py:
166 * giscanner/giscannermodule.c (type_get_is_bitfield):
167 * giscanner/glibast.py:
168 * giscanner/glibtransformer.py:
169 * giscanner/scannerparser.y:
170 * giscanner/sourcescanner.c (gi_source_type_copy):
171 * giscanner/sourcescanner.h:
172 * giscanner/sourcescanner.py:
173 * giscanner/transformer.py:
174 * tests/scanner/foo-1.0-expected.gir:
175 * tests/scanner/foo-1.0-expected.tgir:
176 * tests/scanner/foo.h:
178 Large parts of this patch was done by Jürg Billeter.
180 2009-01-12 Havoc Pennington <hp@pobox.com>
182 Bug 563386 – scanner ignores "const" on boxed return values
184 * tests/everything/everything.c (test_simple_boxed_a_const_return):
185 * tests/everything/everything.h:
187 This adds just the tests specified in the bug above, the fix itself
188 was included in Bug 563794
190 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
192 Bug 566404 – Annotations for GLib
194 * gir/glib-2.0.c: Added allow-none annotations for g_thread_init()
195 and g_main_loop_new().
197 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
199 Bug 566419 – Element type of arrays not properly handled in all cases
201 * giscanner/annotationparser.py:
202 * tests/scanner/annotation-1.0-expected.gir:
203 * tests/scanner/annotation-1.0-expected.tgir:
204 * tests/scanner/annotation.c (annotation_object_set_data),
205 (annotation_object_set_data2), (annotation_object_set_data3):
206 * tests/scanner/annotation.h:
208 Based on patch by Andreas Rottmann
210 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
212 Bug 566560 – giscanner.transformer.SkipError
214 * giscanner/transformer.py:
216 Catch SkipError for all nodes, not just functions.
217 Makes it possible to skip unsupported parameter types in
220 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
222 Bug 563794 - Redo annotation parsing & applying
224 Thanks to Colin for helping out considerably in landing this.
226 * giscanner/Makefile.am:
228 * giscanner/dumper.py:
229 * giscanner/girparser.py:
230 * giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
231 (calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
232 * giscanner/glibtransformer.py:
233 * giscanner/scannerlexer.l:
234 * giscanner/sourcescanner.c (gi_source_symbol_unref),
235 (gi_source_scanner_new), (gi_source_scanner_free),
236 (gi_source_scanner_get_comments):
237 * giscanner/sourcescanner.h:
238 * giscanner/sourcescanner.py:
239 * giscanner/transformer.py:
240 * giscanner/xmlwriter.py:
241 * tests/scanner/annotation-1.0-expected.gir:
242 * tests/scanner/annotation-1.0-expected.tgir:
243 * tests/scanner/annotation.c:
244 * tests/scanner/annotation.h:
245 * tests/scanner/foo-1.0-expected.gir:
246 * tests/scanner/foo-1.0-expected.tgir:
247 * tests/scanner/foo.h:
248 * tools/g-ir-scanner:
250 This commit merges the annotation parser rewrite branch.
251 It'll change the annotation parsing to be done completely in python
252 code which will make it easier to do further annotation parsing
255 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
257 Bug 563469 – Arrays not treated correctly in struct offset calculation
259 * tests/scanner/foo.h (FooObject): Added field `some_int'.
260 * tests/scanner/foo-1.0-expected.gir,
261 * tests/scanner/foo-1.0-expected.tgir: Adapted.
263 * giscanner/glibtransformer.py (GLibTransformer._create_gobject):
264 carry over object fields from original (struct) node.
265 (GLibTransformer._pair_class_struct): Don't add fields of the
266 class struct to to the node for the class, they should go under a
267 nested <record> element (see also Bug 551738). This is needed as
268 otherwise offset calculation would not work, as the instance
269 fields are mingled with the class fields without a way to
272 2009-01-03 Johan Dahlin <jdahlin@async.com.br>
275 Disable blank line check, it works differently under
276 Python 2.5 from 2.6 and was rather annoying from the start.
278 2008-01-03 Andreas Rottmann <a.rottmann@gmx.at>
280 Bug 556489 – callback annotations
282 * giscanner/transformer.py
284 * tools/generate.c (write_callable_info): Write out the new scope,
285 closure and destroy attributes.
287 * giscanner/transformer.py (Transformer._type_is_callback): New
288 method, checking if a given type is a callback.
289 (Transformer._augment_callback_params): New method; adds
290 information (closure, destroy) to callback parameters.
291 (Transformer._handle_closure, Transformer._handle_destroy): New methods,
292 auxiliary to _augment_callback_params.
293 (Transformer._create_function): Call _augment_callback_params().
294 (Transformer._create_parameter): Handle scope option.
296 (Transformer._create_typedef_callback): New method, creates a
297 callback, and registers it in the typedef namespace
298 (Transformer._create_typedef): Use _create_typedef_callback()
299 instead of the plain _create_callback().
301 * giscanner/ast.py (Parameter): Added callback-related fields.
302 * giscanner/girwriter.py: Write out new Parameter fields.
304 * girepository/girnode.h (GIrNodeParam): Added fields scope,
306 * girepository/gtypelib.h (ArgBlob): Ditto.
307 * girepository/girparser.c (start_parameter): Handle new fields.
309 * girepository/girmodule.c (g_ir_module_build_typelib): Adjust
310 arg_blob_size, bump major version due to this change.
311 * girepository/girnode.c (g_ir_node_get_full_size_internal)
312 (g_ir_node_build_typelib)
313 * girepository/gtypelib.c (g_typelib_check_sanity): ArgBlob size
315 (g_ir_node_build_typelib): Fill in new ArgBlob flags from param.
317 * girepository/girepository.h (GIScope): New enumeration, listing
318 the different possible scopes for callbacks.
320 * girepository/ginfo.c (g_arg_info_get_scope)
321 (g_arg_info_get_closure, g_arg_info_get_destroy): Accessors for
322 callback-related argument indices (callback scope, closure for a
323 callback, destroy notification for a callback).
325 * tests/scanner/: Added testcases for new features.
327 2009-01-03 Jürg Billeter <j@bitron.ch>
330 * giscanner/dumper.py:
331 * giscanner/girparser.py:
332 * giscanner/glibtransformer.py:
333 * giscanner/sourcescanner.py:
334 * giscanner/transformer.py:
335 * giscanner/xmlwriter.py:
337 Fix inconsistencies with PEP8
339 2008-12-21 Johan Dahlin <jdahlin@async.com.br>
342 Annotate transfer, direction and allow none for
343 g_file_load_contents, g_file_load_contents_finish and
344 g_file_load_partial_contents_finish parameters.
346 2008-12-12 Owen Taylor <otaylor@redhat.com>
348 Disable array auto-detection for out-annotated parameters (#563934)
350 If we have a parameter annotated as (out), then having a ctype of
351 'char **' (or similar) doesn't necessarily indicate an array.
353 * giscanner/transformer.py: Skip array-detection logic for
354 (out)-annotated parameters.
355 * tests/scanner/annotation.h tests/scanner/annotation.c
356 tests/scanner/annotation-1.0-expected.gir
357 tests/scanner/annotation-1.0-expected.tgir: Add a test for
358 an (out) string parameter.
360 2008-12-12 Johan Dahlin <jdahlin@async.com.br>
362 * giscanner/dumper.py (DumpCompiler._link): Pass in
363 --tag=CC to libtool to avoid making libtool confused
364 when CC is different from gcc on some systems.
366 2008-12-10 Johan Bilien <jobi@via.ecp.fr>
368 Bug 563998 – Cache the GIBaseInfo for GTypes
370 * girepository/girepository.c (g_irepository_find_by_gtype):
371 add a cache of GType -> GIBaseInfo.
373 2008-12-09 Johan Bilien <jobi@via.ecp.fr>
375 Bug 562545 – Add function taking / returning GValue
377 * tests/everything/everything.[ch]: add a test of function taking and
378 returning "const GValue *"
380 2008-12-09 Johan Dahlin <johan@async.com.br>
382 * giscanner/cachestore.py (CacheStore.store): Use
383 shutil.move instead of os.rename, since it will
384 automatically fall back to copying+remove if the
385 src directory is on a different partition from
388 2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
390 Bug 563742 – introspection should record the introduced version of
391 symbols marked with the "Since:" tag
396 * giscanner/girwriter.py:
397 * giscanner/scannerlexer.l:
398 * giscanner/transformer.py:
399 * tests/scanner/annotation-1.0-expected.gir:
400 * tests/scanner/annotation-1.0-expected.tgir:
401 * tests/scanner/annotation.c (annotation_versioned):
402 * tests/scanner/annotation.h:
404 2008-12-08 Johan Dahlin <johan@async.com.br>
406 * giscanner/cachestore.py (_get_cachedir): Don't require
407 HOME to be set and if it set, don't require the
410 2008-12-08 Johan Dahlin <johan@async.com.br>
412 * giscanner/cachestore.py (CacheStore.store): Dump the cache
413 file to a temporary file and rename it the expected filename
414 only when it's completely written.
415 This should make the cache more roboust when run in parallel,
416 and hopefully avoid triggering bugs in Python.
418 2008-12-03 Christophe Fergeau <teuf@gnome.org>
420 Bug 562971 – g-ir-scanner failure on libgpod headers
422 * giscanner/scannerlexer.l: raise YY_BUF_SIZE to 65536 up from the
423 default 16384. Without it, the lexer was aborting with a cryptic
424 error message on source files containing really long comment
427 2008-12-01 Colin Walters <walters@verbum.org>
429 * girepository/gfield.c: Fix memory leak; unref type info we
430 created, not field info
432 2008-11-30 Johan Dahlin <jdahlin@async.com.br>
434 Bug 562289 – Race when removing invalid cache
436 * giscanner/cachestore.py:
437 ENOENT is mapped to a OSError, not IOError.
439 2008-11-27 Johan Dahlin <jdahlin@async.com.br>
441 * gir/glib-2.0.c: Add return value transfer annotation
442 for g_markup_escape_text.
444 2008-11-25 Colin Walters <walters@verbum.org>
446 * tools/g-ir-scanner: Add --libtool option which we expect Automake-using
448 * giscanner/dumper.py: Implement it.
449 * gir/Makefile.am, tests/**/Makefile.am: Use it.
451 2008-11-25 Colin Walters <walters@verbum.org>
453 * tests/scanner/Makefile.am: Remove hand-rolled generation of .tgir; easier
454 to just use a Makefile rule and dependencies. This corresponds with a change
455 made to gir-repository to fix srcdir != builddir issues.
457 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
460 Post release version bump
463 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
468 2008-11-25 Colin Walters <walters@verbum.org>
470 Bug 559705 – Missing association between static methods and classes
472 * docs/typelib-format.txt:
473 * girepository/ginfo.c (g_function_info_get_flags):
474 * girepository/girmodule.c (g_ir_module_build_typelib):
475 * girepository/girnode.c (g_ir_node_get_size),
476 (g_ir_node_build_typelib):
477 * girepository/girparser.c (start_function):
478 * girepository/gtypelib.c (g_typelib_check_sanity),
479 (validate_header), (validate_function_blob):
480 * girepository/gtypelib.h:
482 * giscanner/girwriter.py:
483 * giscanner/glibtransformer.py:
484 * tests/scanner/foo-1.0-expected.gir:
485 * tests/scanner/foo-1.0-expected.tgir:
486 * tests/scanner/foo.h:
488 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
490 * giscanner/ast.py: Define socklen_t as an alias for int32.
492 2008-11-24 Johan Dahlin <jdahlin@async.com.br>
494 * girepository/gdump.c (dump_type): Remove a warning,
495 be less verbose on error on fundamental types.
497 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
499 * giscanner/dumper.py: Add license headers,
500 refactor into a class, avoid some duplication and do some
501 extra pedantic checks.
503 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
505 Make it compilable with -Werror on my system by adding
506 a couple of prototypes and including headers.
508 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
510 Bug 562022 – gobject-introspection needs python headers
512 * configure.ac: fail without python headers present.
515 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
517 Bug 561617 – Return value array annotations
519 * giscanner/transformer.py:
520 * tests/scanner/annotation.c (annotation_return_array):
521 * tests/scanner/annotation.h:
522 Add support for (array) for return value annotations as well.
524 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
526 * tests/everything/everything.[ch]: add a test function which calls a
529 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
531 * giscanner/cachestore.py:
532 Catch ValueError exceptions.
534 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
536 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
538 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
540 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
541 instead of hard-coding struct sizes.
543 2008-11-18 Owen Taylor <otaylor@redhat.com>
545 Bug 561296 - Add "storage type" to the typelib data for enums
547 In order to set and get enum and flag fields in structures, we need
548 to know the integral type that the enumeration is stored as. We are already
549 computing that at compile time in order to compute struct offsets, so the
550 easiest thing to do is to save that in the typelib.
552 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
553 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
554 and compute and save it at compile time.
556 * girepository/girepository.h girepository/ginfo.c:
557 Add g_enum_info_get_storage_type().
559 * girepository/gfield.c: Implement reading and writing enum and flags fields
560 based on the storage type.
562 2008-11-18 Owen Taylor <otaylor@redhat.com>
564 Add enums to the Everything test module
566 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
567 test module and register them as GTypes.
569 https://bugzilla.gnome.org/show_bug.cgi?id=561296
571 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
573 * giscanner/cachestore.py:
574 Catch BadPickleGet exceptions as well.
576 2008-11-17 Owen Taylor <otaylor@redhat.com>
578 * tests/everything/everything.c: Fix doc comment annotations
579 for test_struct_b_clone() to refer to the right function.
581 2008-11-17 Dan Winship <danw@gnome.org>
583 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
584 spelling of GHashTable. #561135
586 * tests/scanner/annotation.c (annotation_object_get_hash):
587 * tests/scanner/annotation-1.0-expected.gir:
588 * tests/scanner/annotation-1.0-expected.tgir: add a test of
589 GHashTable annotations
591 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
593 * giscanner/ast.py: Change string array match type to be in terms
594 of canonicalized type.
595 * giscanner/transformer.py: Add canonicalize_ctype which gives us
596 a version of a c:type without aliases, so we can deep canonicalize
597 char** to utf8*. Update parse_ctype to use it.
598 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
600 2008-11-16 Colin Walters <walters@verbum.org>
602 * girepository/girepository.c: Ensure we always call init_globals,
603 even if passed a non-default repository.
605 2008-11-16 Colin Walters <walters@verbum.org>
607 Bug 559706 - Interface prerequisites
609 * common.mk: Dep on libgirepository.la for scanner libs so that
610 we rebuild things even if just gdump.c changes.
611 * girepository/gdump.c: Dump prerequisites.
612 * giscanner/ast.py: Add prerequisite list.
613 * giscanner/girparser.py: Parse them from gdump.
614 * giscanner/girwriter.py: Write them.
615 * giscanner/glibtransformer.py: Resolve them.
618 2008-11-16 Owen Taylor <otaylor@redhat.com>
620 Bug 561087 - Respect is_pointer in serialize_type()
622 Add a '*' to the serialization for the cases where we set is_pointer
623 in the type blob we write out depending on node->is_pointer. Don't
624 add the '*' in the cases where is_pointer is set or not set in a
627 http://bugzilla.gnome.org/show_bug.cgi?id=561087
629 2008-11-16 Owen Taylor <otaylor@redhat.com>
631 Bug 560825 – Add size and alignment to typelib
633 Include the size and alignment of structures and unions in the typelib,
634 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
636 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
637 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
638 to StructBlob and UnionBlob.
640 * girepository/ginfo.c girepository/girepository.h:
641 Add g_[struct|union]_get[size|alignment]().
643 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
645 2008-11-16 Owen Taylor <otaylor@redhat.com>
647 Bug 552371 – implement struct field get/set
649 * girepository/gfield.c girepository/girepository.h: Add
650 convenience functions g_field_info_set_field() and
651 g_field_info_get_field() to set and get fields based on the
652 offsets in GIFieldInfo.
654 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
656 Bug 560241 - Out-arguments should not be marked as being pointers
659 * girepository/girparser.c: Improved logic for out arguments.
661 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
663 Bug 559601 - Pointers in structs/unions unduly treated as arrays
665 * giscanner/transformer.py: Differentiate type creation logic
666 between parameters and struct components.
668 2008-11-15 Colin Walters <walters@verbum.org>
670 * giscanner/dumper.py: Check return code from pkg-config
673 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
675 * tests/everything/everything.c (test_array_int_in),
676 (test_array_gtype_in):
677 * tests/everything/everything.h:
678 Rename the int/gtype array tests. Make the return value
679 useful, an aggregation of the array input values.
681 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
683 * tests/everything/Makefile.am:
684 * tests/everything/everything.c:
685 * tests/everything/everything.h:
686 * tests/everything/gitesttypes.c:
687 * tests/everything/gitesttypes.h:
688 Rename gitesttypes.[ch] to everything.[ch]
690 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
692 Bug 560708 – Don't treat arrays that have a length specified as
693 zero-terminated by default
695 * giscanner/transformer.py: Default to non zero terminated for
697 * tests/*: Update, add test for zero vs not.
699 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
701 Bug 557788 - Return types for constructors in generated typelib bogus
703 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
704 obviously broken in the face of duplicate names in different
706 * tests/scanner/*expected.gir: Fix up.
708 2008-11-13 Owen Taylor <otaylor@redhat.com>
710 * girepository/girffi.c: Fix "Unexpected time for time_t"
713 2008-11-13 Colin Walters <walters@verbum.org>
715 Bug 558436 - avoid having scanner load app code
717 * giscanner/cgobject.py: Delete; we no longer load shared
719 * giscanner/dumper.py: Support for linking a library to
720 a stub binary for introspection.
721 * giscanner/glibtransformer.py: Rewrite to use gdump XML
722 from invocation of child binary.
723 * giscanner/transformer.py: Fix up to use fully qualified
724 name in parse tree. Make parse_ctype public so we can use
725 it inside glibtransformer.
726 * tests/scanner/barapp.c: New test, using --program arg
728 * tests/*: Update to use common.mk for invoking scanner.
729 * tools/g-ir-scanner: Add options --program, --program-arg,
731 * docs/g-ir-scanner.1: Update.
733 2008-11-13 Colin Walters <walters@verbum.org>
735 * configure.ac: Depend on Gio, we use it in gdump.c.
736 * girepository/gdump.c: Code to dump GType data to XML.
737 * girepository/girepository.c: Add option group for dumping.
738 * girepository/girepository.h: Define API for the above.
740 2008-11-13 Colin Walters <walters@verbum.org>
742 * common.mk: Add a file to include with Makefile fragments
743 useful for scanner invocation.
745 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
747 * tests/everything/gitesttypes.c (test_filename_return): Return
748 strings in filename encoding.
750 2008-11-13 Owen Taylor <otaylor@redhat.com>
752 Bug 560253 – Add structure and boxed types to Everything test module
754 * tests/everything/gitesttypes.[ch]: Add examples of:
756 Plain old data structs
757 Plain old data structs with nested fields
759 Plain old data boxed with nested fields
760 More complicated boxed types with internal state
762 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
764 * tests/everything/gitesttypes.c (test_gtype_in):
765 * tests/everything/gitesttypes.h:
766 Add a test of GType arrays, a la gtk_list_store_set_columns.
768 2008-11-12 Owen Taylor <otaylor@redhat.com>
770 Bug 560419 – Cache includes when parsing
772 Keep track of all modules parsed within a GIrParser, and when a
773 module is referenced a second time, use the existing parsed copy
774 instead of reparsing.
776 2008-11-12 Owen Taylor <otaylor@redhat.com>
778 Fix management of ParseContext.includes_modules (#560419)
780 * girepository/girparser.c: Fix some trivial bugs in managing the
781 list of include modules. (Add to module's list twice, not
782 initialized to NULL, not freed.)
784 2008-11-12 Owen Taylor <otaylor@redhat.com>
786 Keep aliases and disguised_structures local to each module (#560419)
788 * girepository/girmodule.[ch]: When parsing, keep keep a separate
789 hash tables of aliases and 'disguised' flags for each module, and
790 store that on the module.
792 After parsing an include merge the aliases/disguised flags to the
795 * girepository/girparser.c: Remove 'prefix_aliases' flag and
796 always prefix aliases/disguised structure types when parsing; this
797 simplifies the code considerably.
799 2008-11-12 Owen Taylor <otaylor@redhat.com>
801 Fix mismatches between .gir name and 'name' attribute (#560419)
803 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
804 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
805 where the 'name' element of <namespace/> didn't match the filename of the
806 gir, an assumption that the compiler has always expected and now enforces.
808 2008-11-12 Owen Taylor <otaylor@redhat.com>
810 Only allow one <namespace/> element per <repository/> (#560419)
812 * girepository/girparser.c: The logic in girparser.c didn't work
813 very well if there were multiple <namespace/> nodes within a
814 single <repository/> (context->namespace was always the overall
815 filename and not the the name specified in the <namespace/>
816 element for one thing; this would cause aliases to be mis-prefixed
817 in include modules.) Also check that the "name" in the
818 <namespace/> node matches the filename.
820 2008-11-12 Owen Taylor <otaylor@redhat.com>
822 Add a GirParser object to hold the state of a compilation
824 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
825 GirParser object to hold state that is global across a
826 compilation. Currently just holds the include path, but will
827 eventually also keep a cached list of parsed modules.
829 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
831 * girepository/girepository.c (find_namespace_latest): Fix
834 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
836 * configure.ac: use 'introspection' component for bugs
838 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
840 * tests/everything/gitesttypes.c (test_filename_return):
841 * tests/everything/gitesttypes.h:
842 Add a filename return test.
844 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
846 * tests/offsets/Makefile.am (gitestoffsets.c): fix
847 gen-gitestoffsets invocation with builddir != srcdir
849 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
851 * girepository/girepository.c:
852 Change the element type from utf8 to filename
853 * girepository/girnode.c (g_ir_node_build_typelib):
854 Special case filename equally to utf8 here.
856 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
859 Remove unused variables, add a dependency of girepository.ch, so when
860 they change we rebuild the gir automatically.
862 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
864 * girepository/girepository.c (g_irepository_get_search_path):
865 * girepository/girepository.h:
866 Add a g_irepository_get_search_path, so we can access the search
869 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
871 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
873 * girepository/girparser.c: avoid freeing an uninitialized pointer
875 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
878 * giscanner/glibtransformer.py:
879 * tools/g-ir-scanner:
880 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
881 so we can just pass in --library=foo/bar/baz.la and the scanner
882 does the right thing.
883 Don't warn for _get_type() functions if they don't take any
886 2008-11-11 Owen Taylor <otaylor@redhat.com>
888 Bug 560404 – Prefix types when resolving aliases in included modules
890 * girepository/girparser.c: When resolving aliases in an included
891 module, prefix types before looking them up.
893 2008-11-11 Owen Taylor <otaylor@redhat.com>
895 Compute field offsets and overall size for object structures
897 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
898 field of type object in structure"
900 Do basic computation of field offsets for objects and interfaces;
901 this doesn't attempt to address all of the "mess" for virtual
902 functions described in Bug 560281.
904 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
906 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
908 Based on patch by Johan Bilien.
910 * giscanner/transformer.py (_create_member, _create_parameter):
911 Resolve types here as well.
912 (_resolve_type_name_1): Try resolving using 'ctype' first since
913 it's least ambiguous. Fixes struct member type resolution with
914 similarly named types, e.g. Gdk.PangoRendererClass and
916 * tests/scanner/foo*: Add test.
918 2008-11-11 Owen Taylor <otaylor@redhat.com>
920 * girepository/girparser.c: Search provided include dirs before
921 the default directories.
923 2008-11-11 Owen Taylor <otaylor@redhat.com>
925 * girepository/giroffsets.c: Include fully-qualified names in
928 2008-11-11 Owen Taylor <otaylor@redhat.com>
930 * girepository/giroffsets.c: Fail gracefully with an informative
931 error message when recursion is encountered when computing a
934 2008-11-11 Owen Taylor <otaylor@redhat.com>
936 * girepository/girparser.c: Remove an unused variable.
938 2008-11-10 Owen Taylor <otaylor@redhat.com>
940 Add tests for field offset computations
942 * tests/offsets/offsets.h: Header file with structure definitions to test
944 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
945 field offsets for the structures in offsets.h two ways: using
946 the information from a generated typelib, and as computed by the
949 We diff these two versions to test that everything is OK.
951 2008-11-10 Owen Taylor <otaylor@redhat.com>
953 Remove field offsets from g-ir-generate output and test inputs
955 Field offsets are a) architecture dependent so they shouldn't be part
956 of the architecture-independent gir format which is installed in
957 datadir. b) Are architecture-dependent so they shouldn't be in test
960 * girepository/girparser.c: Don't parse offset for fields
961 * tools/generate.c: Don't parse offset for fields
962 * tests/*.gir test/scanner/*.tgir: Remove offsets
964 (Virtual function and discriminator offsets are not removed, as they
965 aren't fully hooked up to the field-offset computation machinery yet.)
967 2008-11-10 Owen Taylor <otaylor@redhat.com>
969 Bug 560252 - Compute field offsets before writing typelib
971 * girepository/girnode.h: Store the total size and alignment for
972 GIrNodeStruct/Boxed/Union.
974 * girepository/giroffset.c: New file implementing computation of
975 structure field offsets.
977 * girepository/girnode.c: Compute structure field offsets before
978 writing types into the typelib.
980 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
981 means "unknown". Also fix description of the discriminator_offset
984 2008-11-10 Owen Taylor <otaylor@redhat.com>
986 Bug 560250 - Fully parse included modules
988 For some things, like computing structure offsets to put into the typelib
989 we need more than just the aliases from included modules. Do a completel
990 parse of included modules and store in module->included_modules.
992 Also add g_ir_find_node() to find node information from within the
993 active set of modules and their includes.
995 2008-11-10 Owen Taylor <otaylor@redhat.com>
997 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
999 Extract a function to convert GITypeTag to ffi_type from the internals
1000 of ginvoke.c. This will be useful in figure out structure alignment.
1002 Also fix handling of gsize and time_t to be portable. (Add a check
1003 to configure.ac to figure out the width of time_t.)
1005 2008-11-10 Owen Taylor <otaylor@redhat.com>
1007 Bug 560248 – "disguised structures"
1009 Certain types like GIConv and GdkAtom are pointers internally but don't
1010 look like pointers when referenced. They have the form.
1012 typedef struct _X *X;
1014 Parse these as structures/records but mark them in the gir with a 'disguised'
1015 attribute so that we know that they need special handling.
1017 In the typelib treat them like any other structure.
1019 2008-11-09 Jürg Billeter <j@bitron.ch>
1022 * giscanner/girwriter.py:
1024 Write throws attribute for virtual functions, fixes bug 559703
1026 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
1028 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
1029 up some confusion about the second argument to find_module, it's
1030 actually the packages __path__ attribute which we can safely ignore
1032 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
1034 2008-11-07 Owen Taylor <otaylor@redhat.com>
1036 Bug 559737 – Deal with continuations in macros
1038 * giscanner/giscannerlexer.l: Treat continuation lines the same
1039 as regular newlines. This makes the scanner not complain about
1040 #define foo(x) \ <stuff> inside a C file. There's no attempt
1041 however to handle parsing macro definitions split across lines.
1043 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
1045 * giscanner/cachestore.py:
1046 Handle broken cache entries, write only filesystems and
1047 running out of diskspace.
1049 2008-11-07 Owen Taylor <otaylor@redhat.com>
1051 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
1052 Set current_filename before lexing the file so error messages
1053 are reported in the right file.
1055 2008-11-06 Colin Walters <walters@verbum.org>
1057 * tests/everything/*: Add some tests for strv.
1059 2008-11-05 Colin Walters <walters@verbum.org>
1061 * girepository/ginvoke.c (g_function_info_invoke): Don't use
1062 nested scope local variable for error which may go away after
1063 conditional is complete.
1065 2008-11-05 Colin Walters <walters@verbum.org>
1067 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
1068 manipulate hackily; just use GString. This avoids an
1069 uninitialized memory read pointed out by Havoc.
1071 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
1073 * giscanner/__init__.py:
1075 * giscanner/cachestore.py:
1076 * giscanner/cgobject.py:
1077 * giscanner/girparser.py:
1078 * giscanner/girwriter.py:
1079 * giscanner/giscannermodule.c:
1080 * giscanner/glibast.py:
1081 * giscanner/glibtransformer.py:
1082 * giscanner/libtoolimporter.py:
1083 * giscanner/minixpath.py:
1084 * giscanner/odict.py:
1085 * giscanner/sourcescanner.c:
1086 * giscanner/sourcescanner.h:
1087 * giscanner/sourcescanner.py:
1088 * giscanner/transformer.py:
1089 * giscanner/utils.py:
1090 * giscanner/xmlwriter.py:
1092 Relicense the giscanner library under LGPLv2+.
1093 This has been approved by all contributors.
1095 2008-11-01 Owen Taylor <otaylor@redhat.com>
1097 Bug 558848 giparser.py: shared library should be optional
1099 When parsing a .gir, allow the shared-library attribute
1100 of <namespace/> to be missing: this corresponds to the handling
1101 in libgirepository and elsewhere.
1103 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
1105 Bug 557898 – Fails to build on OSX 10.4
1107 * configure.ac: Check for $shrext_cmds that should be implicitly
1108 available if you're using libtool >= 2.0. If undefined, call
1109 libtool --config explicitly to get its value.
1110 * girepository/gtypelib.c: Remove special case for (non-)Darwin
1111 systems as unneeded.
1113 2008-10-31 Colin Walters <walters@verbum.org>
1115 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
1117 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1119 * configure.ac: Post release version bump
1122 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1126 * docs/release-checklist.txt:
1129 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1131 * Makefile.am: add an upload-release target
1132 * docs/release-checklist.txt:
1133 Release process documentation
1135 2008-10-31 Colin Walters <walters@verbum.org>
1137 Bug 558109 – _g_typelib_init fails to find shared libraries
1139 * transformer/glibtransformer.py: Use ctypes' find_library
1140 on passed libraries and write that for the shared-library
1141 entry. We want to avoid depending on -devel packages.
1143 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1145 * docs/g-ir-scanner.1:
1146 Document the renaming options.
1148 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
1150 * giscanner/Makefile.am:
1151 * tests/invoke/Makefile.am:
1152 * tests/repository/Makefile.am: List in-tree libraries first in
1153 LDADD / LIBADD. If installed library is listed first, the
1154 resulting binary will prefer installed version to one in .libs,
1155 possibly making 'make check' behave strangely.
1157 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
1159 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
1160 gir-repository from choking with gdk/quartz
1162 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1164 * giscanner/giscannermodule.c (calc_attrs_length),
1165 (pygi_collect_attributes):
1166 * giscanner/xmlwriter.py:
1167 Write a C version of the xml namespace formatter.
1168 Saves 15% of the time it takes to create a gtk gir.
1170 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1172 * giscanner/xmlwriter.py: Abstract attribute formatting
1173 to a function external to the XMLWriter class.
1175 * giscanner/scannerlexer.l:
1176 Parse and discard __typeof and __attribute.
1178 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1180 * giscanner/girparser.py:
1181 Remove arguments from the constructor, move them to
1182 separate accessors. Add a new parse_tree method
1183 which takes an element tree instance.
1184 * tools/g-ir-scanner:
1185 Update callsite for this
1187 * giscanner/Makefile.am:
1188 * giscanner/cachestore.py:
1189 * giscanner/transformer.py:
1190 Cache the include parsing. Saves ~25% time when
1191 creating vte (which includes everything up to gtk+).
1193 2008-10-30 Colin Walters <walters@verbum.org>
1195 * giscanner/transformer.py: Don't reparse includes
1196 we've already processed.
1198 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1200 * giscanner/girparser.py:
1201 * giscanner/transformer.py:
1202 Avoid parsing parameters, types etc when parsing
1203 includes. Should speed up include parsing a bit.
1205 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1207 * giscanner/girparser.py:
1208 Avoid big if/else and use a dispatch table like
1211 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1213 * giscanner/transformer.py:
1214 Clean up include parsing and registration.
1216 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1218 * giscanner/transformer.py:
1221 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1223 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
1226 construct PYTHONPATH just once
1228 * tests/everything/Makefile.am:
1229 * tests/scanner/Makefile.am:
1230 add $(top_srcdir) to PYTHONPATH to
1231 handle builddir != srcdir
1233 * giscanner/libtoolimporter.py:
1234 * giscanner/sourcescanner.py:
1235 Make the libtoolimporter work when distchecking too.
1237 Mostly based on patch by Tommi Komulainen
1239 2008-10-29 Owen Taylor <otaylor@redhat.com>
1241 * giscanner/glibtransformer.py: If a filename of an existing
1242 file is passed to --library, hunt for it directly, rather than
1243 searching for a corresponding library.
1245 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
1247 * giscanner/libtoolimporter.py:
1248 * giscanner/sourcescanner.py:
1249 Clean up the libtool importer a bit. Add a context so we
1250 can use it through a with statement.
1251 Don't just look in the current directory, look in the whole
1254 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
1256 Bug 558065 – gitesttypes should be installed
1259 * tests/Makefile.am:
1260 * tests/types/Makefile.am -> tests/everything/Makefile.am
1261 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
1262 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
1263 move tests/types to tests/everything
1265 * tests/everything/Makefile.am: build normal shared library
1266 libgirepository-everything.so.1.0.0 and corresponding typelib
1267 Everything-1.0.typelib
1269 * tests/everything/Makefile.am: explicitly link libtool
1270 versioning with typelib versioning with variables
1272 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
1274 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
1276 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1278 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
1281 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1283 Bug 558068 – when invoking a method, offset the in arguments by one,
1286 * tests/invoke/invoke.c, tests/invoke/testfns.c,
1287 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
1288 * girepository/ginvoke.c: do not offset the index of given out
1289 arguments by one for methods, "this" is provided as in argument only.
1291 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1293 * gir/gio-2.0.c: add annotation for g_file_delete
1295 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
1297 Bug 558062 – provide and use paths in the .pc file
1299 * gobject-introspection-1.0.pc.in: provide typelibdir variable
1300 for where .typelibs should be installed (callers shouldn't need
1301 to construct paths from bits and pieces)
1303 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1305 Bug 557791 – g_irepository_require() could return a GTypelib *
1307 * girepository/girepository.c: Return GTypelib; this is useful
1308 for low level manipulation.
1310 2008-10-25 Colin Walters <walters@verbum.org>
1312 Bug 557788 – Return types for constructors in generated typelib bogus
1314 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
1315 rely on end pass resolution.
1317 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1319 Bug 557786 - support fixed size arrays
1321 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
1322 * giscanner/scannerparser.y: Retain fixed array size.
1323 * giscanner/ast.py: Add to note.
1324 * giscanner/girwriter.py: Write to gir.
1325 * girepository/girnode.c: Write it to typelib.
1326 * tools/generate.c: Generate.
1327 * tests/*: Add tests.
1329 2008-10-25 Colin Walters <walters@verbum.org>
1331 Bug 557076 - move typelibs to $libdir
1333 * configure.ac: Steal some configury bits from dbus to expand
1335 * gir/Makefile.am: Move to libdir.
1336 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
1337 instead just look at one hardcoded path in libdir.
1338 * acinclude.m4: Bits from dbus.
1340 2008-10-24 Johan Dahlin <johan@gnome.org>
1342 * girepository/girnode.c (g_ir_node_check_unhandled_members):
1343 Be quiet, do not warn about unhandled members.
1345 2008-10-24 Johan Dahlin <johan@gnome.org>
1347 * girepository/gtypelib.c:
1348 Only use SHLIB_SUFFIX on darwin, otherwise use
1349 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
1351 2008-10-24 Lucas Rocha <lucasr@gnome.org>
1353 Bug 557623 - Constructors shouldn't be flagged as methods.
1355 * girepository/ginfo.c (g_function_info_get_flags): ditto.
1357 2008-10-24 Johan Dahlin <johan@gnome.org>
1359 * giscanner/scannerparser.y:
1360 Check against division by zero for the modula operator.
1361 This fixes header parsing of OSX system headers included
1364 2008-10-24 Johan Dahlin <johan@gnome.org>
1368 Add a CONTRIBUTORS file and dist it.
1370 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1372 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
1374 * girepository/girparser.c (parse_param_transfer):
1375 * giscanner/transformer.py (_create_parameter, _create_return):
1376 * giscanner/girwriter.py (_write_return, _write_parameter):
1377 * tools/generate.c (write_callable_info): always write and
1378 require "transfer-ownership" for return-values and parameters
1381 * tests/invoke/testfns-1.0.gir:
1383 * tests/scanner/DrawableAdditions.xml:
1384 * tests/scanner/GtkFrob-1.0-expected.tgir:
1385 * tests/scanner/annotation-1.0-expected.tgir:
1386 * tests/scanner/drawable-1.0-expected.tgir:
1387 * tests/scanner/drawable-injected-1.0-expected.gir:
1388 * tests/scanner/drawable-injected-1.0-expected.tgir:
1389 * tests/scanner/foo-1.0-expected.tgir: Updated
1391 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1393 * giscanner/cgobject.py: build fundamental types same way as glib
1395 * giscanner/glibtransformer.py (_type_from_gtype): record GType
1396 when constructing the Type from it
1398 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
1399 the parameter is a GObject from its GType, if available.
1401 * giscanner/glibtransformer.py (_adjust_transfer):
1402 * tests/scanner/foo-1.0-expected.gir:
1403 * tests/scanner/foo-1.0-expected.tgir: deduce
1404 transfer-ownership from GTypes
1406 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1408 * giscanner/transformer.py (_create_parameter):
1409 * tests/scanner/foo-1.0-expected.gir: make varargs
1410 transfer-ownership="none"
1412 2008-10-23 Colin Walters <walters@verbum.org>
1414 Bug 556739 - transfer ownership
1416 * giscanner/ast.py: Refactor Parameter/Return to share
1417 common attributes. Add transfer_inferred attribute
1418 which says whether or not we made a guess.
1419 * giscanner/transformer.py: Add much more extensive
1420 heuristics around parameter and return transfer.
1421 * giscanner/glibtransformer.py: Adjust to inspect
1425 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1427 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
1429 * tests/scanner/Makefile.am:
1430 * tests/scanner/annotation-1.0-expected.tgir:
1431 * tests/scanner/drawable-1.0-expected.tgir:
1432 * tests/scanner/drawable-injected-1.0-expected.tgir:
1433 * tests/scanner/foo-1.0-expected.tgir:
1434 * tests/scanner/GtkFrob-1.0-expected.tgir:
1435 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
1436 annotations survive the roundtrip via typelib
1438 The expectations are as currently produced by g-ir-generate,
1439 comparison with the .gir files shows there are differences.
1441 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
1443 Bug 557468 – Support for GI_TYPELIB_PATH
1445 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
1446 provided paths to the global search path.
1448 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1450 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
1452 * tests/scanner/drawable-1.0-expected.tgir:
1453 * tests/scanner/drawable-injected-1.0-expected.tgir:
1454 * tests/scanner/foo-1.0-expected.tgir:
1455 * tools/generate.c (write_object_info): write 'abstract'
1456 attribute for classes
1458 2008-10-22 Lucas Rocha <lucasr@gnome.org>
1460 * girepository/girmodule.c, girepository/gtypelib.c,
1461 girepository/girparser.[ch]: fix some build warnings.
1463 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1465 Bug 557405 – Use 'allow-none' consistently
1467 * docs/typelib-format.txt:
1468 * girepository/ginfo.c (g_arg_info_may_be_null):
1469 * girepository/girnode.c (g_ir_node_build_typelib):
1470 * girepository/girnode.h (struct _GIrNodeParam):
1471 * girepository/girparser.c (start_parameter):
1472 * girepository/girwriter.c (function_generate):
1473 * girepository/gtypelib.h (ArgBlob):
1475 * tests/function.gir:
1476 * tools/generate.c (write_callable_info): Use 'allow-none'
1477 consistently throughout
1479 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1481 Bug 557092 – Callback annotations not used
1483 * giscanner/transformer.py (_create_callback): use annotations
1485 * tests/scanner/annotation.h
1486 * tests/scanner/annotation-1.0-expected.gir: add tests
1488 2008-10-21 Colin Walters <walters@verbum.org>
1490 * giscanner/scannerlexer.l: Don't require trailing whitespace after
1491 uncommented parameters.
1494 2008-10-21 Colin Walters <walters@verbum.org>
1496 * girepository/girepository.c: Ensure that when doing an unversioned
1497 require, we prefer items earlier in the search path to later ones.
1499 2008-10-21 Owen Taylor <otaylor@redhat.com>
1501 * giscanner/transformer.py: For string parameters allow transfer annotation
1502 to override the standard automatic guessing based on 'const'.
1504 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1506 Bug 557241 – "throws" flag for functions
1508 * tests/scanner/drawable-1.0-expected.gir,
1509 tests/scanner/drawable-injected-1.0-expected.gir,
1510 tests/scanner/drawable.[ch]: add simple test for throwing
1511 function (has GError ** as last argument)
1513 * giscanner/ast.py: add a 'throws' flag to Function
1514 * giscanner/glibtransformer.py: if a function's last paramerter is
1515 a GError, set the 'throws' flag and remove that parameter
1516 * giscanner/girwriter.py: write out the 'throws' attribute
1517 * giscanner/girparser.py: support parsing the 'throws' attribute
1519 * tests/repository/gitestthrows.c: add a simple test to check the
1520 throws flag in a typelib and invoke the function
1522 * girepository/ginfo.c, girepository/girnode.[ch],
1523 girepository/girnode.h, girepository/girparser.c,
1524 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1526 * girepository/ginvoke.c: if a function throws, add a GError as last
1527 arguments, and propagate the error to the invoker.
1529 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1531 * giscanner/transformer.py (_create_parameters): Warn if we see
1532 annotations for unknown parameters. If .h and .c files name
1533 parameters differently, the annotations may be lost.
1535 2008-10-21 Johan Dahlin <johan@gnome.org>
1537 Bug 556358 - don't use libtool internals
1539 * giscanner/Makefile.am:
1540 * giscanner/libtoolimporter.py:
1541 * giscanner/sourcescanner.py:
1542 * giscanner/utils.py:
1543 Add a python meta importer and remove a libtool symlink hack.
1545 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1547 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1548 and --add-include-path appropriately when invoking the scanner.
1549 * tests/types/Makefile.am (%typelib): Likewise.
1551 2008-10-20 Colin Walters <walters@verbum.org>
1553 Bug 556777 - validate properties
1555 * giscanner/transformer.py: Add option to throw on unknown types.
1556 * giscanner/glibtransformer.py: Use it on properties.
1557 * tests/*: Add a test.
1559 2008-10-20 Colin Walters <walters@verbum.org>
1561 * giscanner/glibast.py: Also register g variants of
1562 default_array_types. This is not beautiful, but
1563 good alternatives aren't easy to come by.
1564 This fixes gchar ** parsing.
1566 2008-10-20 Colin Walters <walters@verbum.org>
1568 * docs/typelib-format.txt, girepository/gtypelib.h:
1569 Take a bit from ObjectInfo to represent abstract flag.
1570 * giscanner/cgobject.py: Expose g_type_get_flags.
1571 * girepository/girepository.h: Add accessor.
1572 * girepository/ginfo.c: Implement it.
1573 * giscanner/ast.py: Add is_abstract flag to generic
1575 * giscanner/glibast.py: Use it.
1576 * giscanner/girwriter.py: Write it.
1577 * girepository/girparser.c: Parse it.
1580 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1582 * giscanner/girparser.py (_parse_function): don't lose
1583 'transfer-ownership' attributes when injecting, check for the
1586 2008-10-19 Johan Dahlin <johan@gnome.org>
1588 * giscanner/scannerlexer.l: Parse and ignore __asm.
1590 2008-10-19 Colin Walters <walters@verbum.org>
1592 * giscanner/girparser.py: Parse array length= to ensure
1593 it doesn't get lost from --inject.
1595 2008-10-17 Colin Walters <walters@verbum.org>
1597 Bug 556795 - char ** regression
1599 * giscanner/transformer.py: Fix parsing of ctypes, add some
1600 comments about what's going on.
1601 * tests/*: Add a test for char **.
1603 2008-10-17 Colin Walters <walters@verbum.org>
1605 Bug 556783 - change namespace handling to be more consistent
1607 * giscanner/transformer.py: Eliminate usage of
1608 strip_namespace_object. We now treat --namespace as the default
1609 --strip-prefix; however, if --strip-prefix is specified it
1610 overrides --namespace. This applies to everything except function
1611 names, where we do also strip the namespace.
1612 * giscanner/glibtransformer.py: Remove usage of
1613 strip_namespace_object.
1615 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1616 --namespace and --strip-prefix.
1618 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1620 Bug 556732 – generate gir files consistently
1622 * girepository/girparser.c (start_parameter):
1624 * tests/invoke/testfns-1.0.gir:
1625 * tools/generate.c (write_callable_info): write
1626 'transfer-ownership' attribute consistently with both
1627 return-value and parameter elements
1629 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1631 Bug 556732 – generate gir files consistently
1633 * tools/generate.c (write_callable_info): write 'direction'
1634 attribute only if other than 'in' to be consistent with
1637 * tests/object.gir: remove direction="in" which is the default
1639 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1641 Bug 556732 – generate gir files consistently
1643 * giscanner/ast.py (Field): add readable and writable properties
1644 * giscanner/girparser.py (_parse_field): copy 'readable' and
1645 'writable' attributes
1646 * giscanner/transformer.py (_create_member): create fields as
1648 * giscanner/glibtransformer.py (_introspect_object,
1649 _pair_class_struct): make object instance and class fields
1651 * giscanner/girwriter.py (_write_field):
1652 * tools/generate.c (write_field_info): write field 'readable'
1653 and 'writable' attributes only if non-default (read-only)
1654 * girepository/girparser.c (start_field): in the absence of
1655 attributes assume fields are read-only
1657 * tests/struct.gir: remove redundant readable="1" from fields
1658 * tests/scanner/foo-1.0-expected.gir:
1659 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1660 all record and union fields
1662 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1664 Bug 556732 – generate gir files consistently
1666 * giscanner/girwriter.py (_write_property): write properties
1667 'construct' attribute if set
1668 * tools/generate.c (write_property_info): write properties
1669 'readable' and 'writable' attributes only if non-default
1670 * tests/object.gir: add writable="0"
1671 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1673 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1675 * gir/glib-2.0.c: added annotations
1677 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1679 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1682 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1684 Bug 556610 – giscanner/girparser.py drops parameter options
1686 * tests/scanner/drawable-injected-1.0-expected.gir,
1687 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1688 * giscanner/ast.py: allow Parameter to take options in the constructor
1689 * giscanner/girparser.py: parse parameter options (transfer,
1690 direction, allow-none)
1692 2008-10-16 Colin Walters <walters@verbum.org>
1694 Bug 556185 - segfault on g_callable_info_get_return_type
1696 Initial patch from John Ehresman.
1698 * tests/repository/*: Add a test using
1699 g_callable_info_get_return_type. Instead of casting a
1700 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1701 to call g_type_info_get_interface.
1703 2008-10-16 Colin Walters <walters@verbum.org>
1705 Bug 556579 - union and struct name misresolved
1707 * giscanner/transformer.py: The calls to _resolve_type_name
1708 for struct/union names was a legacy holdover from when type
1709 resolution had multiple phases. Now it's actively harmful
1710 since we might pull in an identical name from another
1714 2008-10-16 Colin Walters <walters@verbum.org>
1716 Bug 556432 - transfer annotations and defaults
1718 * giscanner/transformer.py: Canonicalize type
1719 after removing *, not before. This ensures that
1720 guchar* is transformed to 'uint8'.
1721 Add some comments here.
1722 * giscanner/glibtransformer.py: Add _adjust_transfer
1723 phase for tweaking GObject transfers.
1726 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1728 * configure.ac: enable bunch of gcc warning CFLAGS
1730 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1732 Bug 556543 – reduce compiler warnings
1734 * girepository/ginfo.c:
1735 * girepository/girepository.c (register_internal,
1736 count_interfaces, find_interface, find_namespace_version,
1737 parse_version, g_irepository_require):
1738 * girepository/girmodule.c (g_ir_module_build_typelib):
1739 * girepository/girnode.c (init_stats, dump_stats,
1740 _g_irnode_init_stats, _g_irnode_dump_stats,
1741 g_ir_node_can_have_member):
1742 * girepository/girparser.c (firstpass_end_element_handler,
1743 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1744 start_alias, start_type, end_type_top, parse_include, cleanup,
1746 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1747 * giscanner/giscannermodule.c (directive_get_options,
1748 type_get_child_list):
1749 * giscanner/scannerlexer.l (parse_gtkdoc):
1750 * giscanner/scannerparser.y (ctype_free):
1751 * giscanner/sourcescanner.c:
1752 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1753 * tests/types/gitesttypes.c:
1754 * tools/compiler.c (main):
1755 * tools/generate.c (write_repository): Remove unused variables
1756 and code, add missing includes, declarations and case
1759 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1761 Bug 556541 – access union members through UnionBlob rather than
1764 * girepository/ginfo.c (g_union_info_find_method): access union
1765 members through UnionBlob rather than StructBlob
1767 2008-10-15 Colin Walters <walters@verbum.org>
1769 Bug 556331 - clean up includes handling
1771 * tools/g-ir-scanner: Rework command line arguments; now we take
1772 --add-include-path and --include separately.
1773 * giscanner/girwriter.py: Separate name= and version= in include
1775 * giscanner/ast.py: Add Include type.
1776 * giscanner/transformer.py: Cleanups to register_include now that
1777 we don't need to handle mixed filenames and relative arguments.
1778 * girepository/girparser.c: Parse name and version separately;
1779 this fixes a bug as a side effect where we weren't resolving
1780 through aliases for basic types.
1781 * girepository/girepository.c: Fix format string args.
1782 * gir/Makefile.am: Update.
1785 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1787 Bug 556434 – unhandled interface/object/... member types
1789 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1790 g_ir_node_build_typelib): Check all
1791 interface/object/boxed/struct/union members are processed and
1792 abort if they are not. (Mostly callbacks in structs, but also
1793 fields in interfaces.)
1795 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1797 * a/girepository/girnode.c (g_ir_node_build_members,
1798 g_ir_node_build_typelib): refactor common code for processing
1799 members to a function
1801 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1803 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1804 transformation is lossless (it's not)
1806 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1808 * tests/Makefile.am: fix tests to compare xml to xml instead of
1809 typelib to xml, and stop on error
1811 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1813 * tools/generate.c (write_type_name, write_type_info,
1814 write_type_info, write_object_info, write_object_info,
1815 write_interface_info, write_error_domain_info): reduce code
1818 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1820 Bug 556174 – parse types for lists etc.
1822 * girepository/girparser.c (end_type_recurse):
1824 * tools/generate.c (write_type_info, write_field_info,
1825 write_callable_info, write_callable_info, write_constant_info,
1826 write_property_info): use nested <type>s for lists and hashes
1828 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1831 * tests/object.gir: remove trailing whitespace from inside
1832 elements to match g-ir-generate output
1834 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1836 * tools/generate.c (xml_printf): quote printf arguments so that
1837 we don't generate invalid XML by writing unescaped double quotes
1838 and such in attributes
1840 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1842 * tools/generate.c (write_field_info, write_callable_info,
1843 write_function_info, write_callback_info, write_struct_info,
1844 write_constant_value, write_signal_info, write_vfunc_info,
1845 write_object_info, write_interface_info, write_union_info,
1846 write_repository): remove unused indent parameters, xmlwriter
1847 keeps track of necessary indentation
1849 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1851 * tools/generate.c (xml_element_new, xml_element_free,
1852 xml_start_element, xml_end_element, xml_end_element_unchecked,
1853 xml_open, xml_close): Keep track of generated XML tree and
1854 handle indentation and closing tags properly.
1855 (write_field_info, write_callable_info, write_function_info,
1856 write_callback_info, write_struct_info, write_value_info,
1857 write_constant_info, write_enum_info, write_signal_info,
1858 write_vfunc_info, write_property_info, write_object_info,
1859 write_interface_info, write_error_domain_info, write_union_info,
1860 write_repository): Use xml_start_element and xml_end_element to
1863 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1865 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1866 (write_type_name, write_type_info, write_field_info,
1867 write_callable_info, write_function_info, write_callback_info,
1868 write_struct_info, write_value_info, write_constant_value,
1869 write_constant_info, write_enum_info, write_signal_info,
1870 write_vfunc_info, write_property_info, write_object_info,
1871 write_interface_info, write_error_domain_info, write_union_info,
1872 write_repository): wrap all FILE access to go through simple xmlwriter
1874 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1876 Bug 556400 – Fails to build on OS X 10.4
1878 * configure.ac: check for functions backtrace and backtrace_symbols
1879 * girepository/girparser.c (backtrace_stderr): Comment out
1880 implementation if the functions are not available.
1881 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1882 directory for better portability
1884 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1886 Bug 556433 – assume direction = out for int * parameters
1888 * giscanner/ast.py: define a list of types for which, if passed as
1889 reference, we assume a default direction of 'out'
1890 * giscanner/transformer.py: if a type has type pointer to one of the
1891 previously defined types, and no direction is set, assume out.
1892 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1894 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1896 * tests/scanner/annotation.c: fixed a few copy-paste errors
1898 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1900 Bug 556323 – transfer-ownership is wrong for functions returning const
1903 * giscanner/transformer.py: check for a const string as return value,
1904 not just const char*. Suggested by Colin Walters
1905 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1907 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1909 * girepository/ginfo.c, girepository/girepository.h: add
1910 g_union_info_find_method
1912 2008-10-14 Colin Walters <walters@verbum.org>
1914 * tests/repository/Makefile.am: Reenable repo test.
1915 * tests/repository/gitestrepo.c: Prepend search
1916 path for $(top_builddir)/gir dir so that we don't
1917 require installation for "make check" to pass.
1919 2008-10-13 Jürg Billeter <j@bitron.ch>
1921 * giscanner/glibtransformer.py:
1922 * tests/scanner/annotation-1.0-expected.gir:
1923 * tests/scanner/drawable-1.0-expected.gir:
1924 * tests/scanner/foo-1.0-expected.gir:
1925 * tests/scanner/utility-1.0-expected.gir:
1927 Support fields in GObject structs
1929 2008-10-13 Jürg Billeter <j@bitron.ch>
1931 * giscanner/ast.py: add signed integer and off_t to type_names
1933 2008-10-12 Jürg Billeter <j@bitron.ch>
1935 * giscanner/girparser.py: Parse bits attribute of fields
1937 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1939 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1940 * tests/repository/gitestrepo.c (main): instantiate
1941 'GCancellable' to ensure the GType is registered before using
1944 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1946 * giscanner/girparser.py: actually add the parsed constant nodes
1948 2008-10-12 Colin Walters <walters@verbum.org>
1950 * girepository/girepository.c: Don't cast DirEntry to Blob,
1951 actually look it up by offset.
1953 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1955 * giscanner/girparser.py: parse constant nodes in gir files
1957 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1959 * giscanner/transformer.py: prefix for constants have an underscore,
1960 so remove them as if they were functions, not objects.
1962 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1964 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1967 2008-10-12 Colin Walters <walters@verbum.org>
1969 Initial patch from Jani Monoses.
1971 * girepository/gtypelib.c: Fix inverted test for success
1974 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1976 * tools/generate.c (write_callable_info): use "transfer-ownership"
1977 attribute for return values
1979 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1981 * tools/generate.c (write_callable_info): move "transfer" and
1982 "null-ok" attributes from <function> to <return-value> element
1984 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1986 * girepository/girparser.c (start_return_value): handle
1987 "transfer-ownership" attribute
1989 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1991 * girepository/girparser.c (parse_param_transfer):
1992 * tools/generate.c (write_callable_info): use "container" for
1993 container/shallow ownership transfer (not "shallow")
1995 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1997 * girepository/girparser.c (parse_param_transfer,
1998 start_parameter): Refactor handling of transfer=none/shallow/full
1999 to separate function
2001 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2003 Bug 556048 – Crash in g_irepository_find_by_gtype
2005 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
2006 * girepository/girepository.c (find_interface): Fix
2007 find_by_gtype case to get the type name from right offset
2009 2008-10-12 Jürg Billeter <j@bitron.ch>
2011 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
2014 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2016 * girepository/gtypelib.h (RegisteredTypeBlob): make
2017 'unregistered' one bit wide as everywhere else
2019 2008-10-12 Jürg Billeter <j@bitron.ch>
2021 * giscanner/glibtransformer.py:
2022 * tests/scanner/annotation-1.0-expected.gir:
2023 * tests/scanner/drawable-1.0-expected.gir:
2024 * tests/scanner/drawable.h:
2025 * tests/scanner/foo-1.0-expected.gir:
2026 * tests/scanner/utility-1.0-expected.gir:
2028 Readd class records as workaround to not break Gtk typelib
2030 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2032 * tests/types/Makefile.am: fix typo in gitesttypes namespace
2034 2008-10-12 Jürg Billeter <j@bitron.ch>
2036 * giscanner/glibtransformer.py: Don't generate <record> elements
2038 * tests/scanner/*: Update test cases
2040 2008-10-11 Colin Walters <walters@verbum.org>
2042 Bug 552858: versioning
2044 This is a big patch. You should probably remove your installation
2047 * docs/typelib-format.txt: Add nsversion entry which holds
2048 version of namespace.
2049 * girepository/girepository.h: Add 'version' parameter to
2050 g_irepository_require. This may be NULL. Normally
2051 bindings should pass an explicit version though.
2052 * girepository/girepository.c: Lots of infrastructure to
2053 support versioning. Add some more documentation. Disallow
2054 some usage of NULL namespaces.
2055 * girepository/girmodule.c: Add version parameter.
2056 * girepository/gtypelib.c: Update header size.
2057 * giscanner/ast.py: Add version to Namespace.
2058 * giscanner/girparser.py: Parse version attribute from
2059 XML, pass to Namespace.
2060 * giscanner/girwriter.py: Write out version parameter.
2061 * giscanner/transformer.py: Clean up include registration.
2062 * tests/*: Add version attribute.
2063 * tests/invoke/invoke.c: Don't try looking up test before
2064 it's loaded in repository.
2065 * tools/generate.c: Output version parameter.
2066 * gir/Makefile.am: Add 2.0 version to .gir files.
2068 2008-10-11 Colin Walters <walters@verbum.org>
2070 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
2071 if we have mismatched parens.
2073 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2075 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
2076 on 'members' variable.
2078 2008-10-11 Colin Walters <walters@verbum.org>
2080 Bug 555947 - update annotations syntax
2082 * giscanner/ast.py: Default to None for transfer. Remove
2083 default transfers for container types; we require this to
2085 * giscanner/girwriter.py: Transfer is now 'none', 'container',
2086 'full' to match repository.
2087 * giscanner/scannerlexer.l: Annotations now are parenthesized.
2088 * giscanner/transformer.py: Update for new annotations syntax.
2091 2008-10-11 Johan Bilien <jobi@litl.com>
2093 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
2095 2008-10-11 Johan Bilien <jobi@litl.com>
2097 Bug 552347: Parse #defines constants
2099 * girepository/gtypelib.c: update the list of value_size
2100 with recently defined type tags
2101 * giscanner/scannerparser.y: brought back parsing of #defined, as
2102 present in older version
2103 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
2104 * giscanner/girwriter.py: write out constant tags in the gir
2105 * giscanner/sourcescanner.py: add accessor for const_string
2106 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
2109 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
2111 Bug 555946: Install a test module exercising all types, transfer
2116 * tests/types/*: Add and install a test module that has functions
2117 accepting and returning most of the basic types to enable bindings
2118 implementors to more easily test their type conversion routines.
2120 2008-10-11 Jürg Billeter <j@bitron.ch>
2122 Bug 552374: Const strings should be identified in the gir.
2124 * giscanner/transformer.py: support string memory management
2125 * tests/scanner/foo.h: use char * and const char *
2126 * tests/scanner/foo-expected.gir: test that
2128 2008-10-11 Johan Dahlin <johan@gnome.org>
2130 * giscanner/girparser.py:
2131 Also parse enums which are not glib types.
2133 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2135 Bug 552370: add one more test for unsigned as a type, not as
2138 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
2139 * test/scanner/foo.h: add function which uses unsigned as a type.
2140 * test/scanner/foo-expected.gir: test that.
2142 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
2144 Bug 555712: Struct and union issues
2146 * giscanner/scannerparser.y (struct_declarator): Use information
2147 provided about the bit width of a field.
2148 * giscanner/transformer.py (Transformer._create_member): Pass the
2149 symbol's const_int member to the created field (it represents the
2151 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
2152 field attribute, if present.
2153 * giscanner/ast.py (Field): Add 'bits' member, specifying the
2154 width in bits of the field (only relevant for bitfields).
2157 * giscanner/transformer.py (Transformer._create_typedef_struct)
2158 (Transformer._create_typedef_union): Add calls to _create_struct()
2159 and _create_union(), respectively. This causes the scanner to
2160 generate output for fields of struct and union typedefs.
2163 2008-10-11 Jürg Billeter <j@bitron.ch>
2165 Bug 552370: unsigned not scanned properly
2167 * giscanner/scannerparser.y: combine basic types such as unsigned
2168 int and long long when scanning
2169 * tests/scanner/foo-expected.gir:
2170 * tests/scanner/foo.c: (foo_test_unsigned):
2171 * tests/scanner/foo.h: test that
2173 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2175 Bug 554854: The --typelib-xml and --inject options should reuse
2176 giscanner parser/writer.
2178 * giscanner/ast.py: add constructor list to Struct and Union.
2179 Add new param in Return's contructor to define transfer.
2180 * giscanner/girparser.py: several additions to the parser in order
2181 to have parsing all nodes of the gir xml files.
2182 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
2183 and writer in --inject and --typelib-xml options.
2184 * giscanner/xmlwriter.py: ignore empty attributes instead of
2185 raising an error as this basically exposes a bug in GIRParser.
2186 This should be reverted as soon as the parser is fixed.
2188 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2190 Bug 552376: scanner generates wrong names for enum members when
2191 there's no defined gtype.
2193 * giscanner/utils.py (strip_common_prefix): Always strip common
2194 prefix exactly up to the last "_", and not beyond.
2195 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
2196 here is that the first character after the last '_' should should be
2197 the same as the character in the same position on the type name.
2198 * tests/scanner/foo-expected.gir: test that
2200 2008-10-10 Lucas Rocha <lucasr@gnome.org>
2202 Bug 555293: append library_paths to LPATH env variable to work
2203 around a bug in find_library when using ldconfig.
2205 * tools/g-ir-scanner (main): ditto.
2207 2008-10-09 Lucas Rocha <lucasr@gnome.org>
2209 * girepository/girepository.c (register_internal): fix regression on
2210 invoke test case by making sure we load the global module in the
2211 typelib when dealing with inline typelibs.
2212 * girepository/gtypelib.c: a couple of coding style fixes.
2214 2008-10-06 Lucas Rocha <lucasr@gnome.org>
2216 Bug 555294: Add support for multiple shared libraries per typelib.
2218 * girepository/ginvoke.c (g_function_info_invoke),
2219 girepository/ginfo.c(g_registered_type_info_get_g_type): use
2220 g_typelib_symbol instead of g_module_symbol.
2221 * girepository/girepository.h: remove g_typelib_set_module and add
2223 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
2224 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
2225 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
2226 modules instead of just one. The symbol lookup is now abstracted
2227 behind g_typelib_symbol which tries to find the passed symbol name in
2229 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
2230 and write shared_library attribute as a comma-separated list of libs.
2232 2008-10-06 Colin Walters <walters@verbum.org>
2234 * giscanner/transformer.py: Parse length= annotation as
2235 a parameter name, not a raw int.
2238 2008-10-03 Colin Walters <walters@verbum.org>
2240 Bug 551744: Non-GObject types aren't aggregating ctors and methods
2242 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
2244 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
2248 2008-10-03 Colin Walters <walters@verbum.org>
2250 Bug 554576: scan problem with ev_selection_render_selection()
2252 * giscanner/transformer.py: Only do type resolution once we've
2253 scanned all types. What could happen before is that we'd strip
2254 the namespace from local type "EvSelection" => Selection, and
2255 then later pull a "Selection" from some other namespace because
2256 we hadn't yet seen the local EvSelection. This could come
2257 down to hash table ordering and other things so not easy
2258 to write a test for.
2260 2008-10-03 Lucas Rocha <lucasr@gnome.org>
2262 * giscanner/girwriter.py (_parser_member): fix the last parameter of
2263 GLibEnumMember constructor as it should be the enum member nick.
2265 2008-10-02 Colin Walters <walters@verbum.org>
2267 Bug 552961: remove this parameter for methods
2269 * giscanner/glibtransformer.py: Delete this parameter; it is
2271 * girepository/ginvoke.c: Insert this parameter for methods.
2272 * girepository/gtypelib.c: Remove no longer needed verification of
2273 method this parameter.
2276 2008-09-30 Dan Winship <danw@gnome.org>
2278 Bug 554490: g-ir-scanner gets confused by '\\'
2280 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
2281 backslashes so it will correctly parse '\\' and "\\"
2283 * tests/scanner/annotation.c: add a use of '\\' to make sure that
2286 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
2288 2008-10-02 Colin Walters <walters@verbum.org>
2290 bug 552393: Note variadic functions
2292 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
2293 to use parameter_list directly.
2294 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
2295 * giscanner/ast.py: Add Varargs type.
2296 * giscanner/transformer.py: Check for ellipsis symbol, transform
2298 * girepository/girnode.h: Add varargs flag to in-memory nodes.
2299 Parse varargs functions, but filter them out before we start
2300 compiling the typelib.
2302 2008-10-02 Colin Walters <walters@verbum.org>
2304 Bug 554632: type tag for GType
2306 * girepository/girepository.h, girepository/girepository.c:
2307 Add type tag for GType - it's a special type we don't want
2308 to resolve to just "long".
2309 * docs/typelib-format.txt: Update.
2310 * girepository/girparser.c: Parse it.
2311 * giscanner/glibtransformer.py: Ensure we don't put GType in
2313 * tools/generate.c: Remove hardcoded type list.
2316 2008-09-30 Dan Winship <danw@gnome.org>
2318 Bug 554521: scanner generates wrong names for enum members with
2319 full type name prefix
2321 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
2322 right amount when the entire "first" string is a prefix of
2325 * tests/scanner/foo.h (FooEnumFullname):
2326 * tests/scanner/foo-expected.gir: test that
2328 2008-09-29 Colin Walters <walters@verbum.org>
2330 Bug 552380: Array parameters should be marked in the gir
2332 * giscanner/ast.py: Default char** to utf8[], and guchar* to
2333 uint8[]. Add Array, List, and Map subclasses of Type;
2334 these types can be generic. Return transfer defaults
2335 to true if return value is string or container type.
2336 Delete Sequence type.
2337 * giscanner/scannerlexer.l: Syntax change for annotations;
2338 use <> since it's more readable.
2339 * giscanner/girwriter.py: Write out these changes.
2340 * giscanner/girparser.py: Parse them.
2341 * giscanner/transformer.py: Have a defined set of
2342 both list and map types. When creating a type,
2343 check if the ctype we've parsed is one of them,
2344 if so create a container type subclass as appropriate.
2345 * girepository/girparser.c: Parse in generic types.
2348 2008-09-27 Colin Walters <walters@verbum.org>
2350 * tools/g-ir-scanner: Add --inject option.
2352 2008-09-25 Colin Walters <walters@verbum.org>
2354 Remove non-repository types from GIR
2356 * giscanner/ast.py: The canonical name is 'utf8', not
2358 * giscanner/glibast.py: A few more glib type mappings.
2359 * girepository/girparser.c: We only parse repository types.
2360 * tests/*.gir: Update.
2362 2008-09-23 Colin Walters <walters@verbum.org>
2364 Bug 552566: Add time_t type
2366 We need a type for time_t since it's special in C, and just
2367 mapping it to long precluded bindings from handling it
2370 2008-09-19 Colin Walters <walters@verbum.org>
2372 Bug 552390: Handle capitialization like "DBus" more robustly
2374 The to_underscores function was designed for use against prefixed
2375 names; we need a separate function which will convert names like
2376 DBusFoo into dbus_foo, not d_bus_foo.
2378 2008-09-19 Colin Walters <walters@verbum.org>
2380 Add check to make sure we're not hitting out unresolved types
2382 Validate the "this" argument for methods
2384 Remove heuristic matching of methods to classes based on prefix
2386 It was a broken hack that dated from when we handled underscoring
2387 and capitalization conventions less well.
2389 2008-09-18 Colin Walters <walters@verbum.org>
2391 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
2393 On Darwin, the suffix for installed shared libraries (.dylib) is
2394 different from loadable modules (.so). We use a bit of magic shell
2395 script from Behdad Esfahbod to figure out the right suffix.
2397 2008-09-15 Johan Dahlin <johan@gnome.org>
2399 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
2400 a wrapper for type_qualifier as well.
2402 2008-09-15 Colin Walters <walters@verbum.org>
2404 http://bugzilla.gnome.org/show_bug.cgi?id=552065
2406 * giscanner/ast.py: Add deprecation attributes.
2407 * giscanner/girwriter.py: Write out deprecation data.
2408 * girepository/girparser.c: Relax parsing; deprecated
2409 attribute now includes freeform string.
2410 * giscanner/scannerlexer.l: Parse Deprecated.
2411 * giscanner/transformer.py: Look for deprecated attribute
2413 * tests/scanner/*: Add a Deprecated test.
2415 2008-09-14 Tor Lillqvist <tml@novell.com>
2417 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
2419 2008-09-14 Colin Walters <walters@verbum.org>
2421 * giscanner/glibtransformer.py: Ignore functions with
2424 2008-09-12 Colin Walters <walters@verbum.org>
2426 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
2428 2008-09-12 Colin Walters <walters@verbum.org>
2430 * giscanner/ast.py: Bind pid_t to INT for vte.
2432 2008-09-12 Colin Walters <walters@verbum.org>
2434 * giscanner/girparser.py: Parse c:type for boxed records/unions.
2435 * giscanner/glibast.py: Avoid overwriting ctype.
2436 * giscsanner/transformer.py: Try resolving types using the GType names.
2438 2008-09-12 Colin Walters <walters@verbum.org>
2440 * giscanner/minixpath.py: Code to run an "XPath"
2441 assertion against an XML tree, taken from
2442 gir-repository/gir/tests.py.
2443 * giscanner/Makefile.am: Ship it.
2444 * tools/g-ir-scanner: Add --xpath-assertions option.
2445 * gir/GLib-assertions.txt: Add a few assertions.
2446 * gir/Makefile.am: Run them.
2448 2008-09-11 Colin Walters <walters@verbum.org>
2450 http://bugzilla.gnome.org/show_bug.cgi?id=551737
2452 * giscanner/transformer.py: Fix strip_namespace_func to only strip
2453 prefix if it ends with _. Tweak callback stripping to determine
2454 based on presence of _ whether we need to use strip_namespace_func
2455 or strip_namespace_object.
2457 2008-09-09 Owen Taylor <otaylor@redhat.com>
2459 * docs/typelib-format.txt: Wether => Whether
2461 2008-09-08 Colin Walters <walters@verbum.org>
2463 * girepository/girparser.c: Default to "readable" for properties.
2464 * giscanner/ast.py: Add readable, writable etc.
2465 * giscanner/girwriter.py: Writ them.
2466 * giscanner/glibtransformer.py: Inspect them.
2469 2008-09-07 Colin Walters <walters@verbum.org>
2471 * giscanner/cgobject.py: Add comment.
2473 2008-09-07 Colin Walters <walters@verbum.org>
2475 * giscanner/cgobject.py: Also call g_thread_init.
2477 2008-09-07 Colin Walters <walters@verbum.org>
2479 * giscanner/transformer.py: Fix regression by not
2480 stripping prefix before stripping namespace for unions
2483 2008-09-06 Colin Walters <walters@verbum.org>
2485 * giscanner/transformer.py: If a namespace contains
2486 multiple caps, try stripping both gnomekeyring_ and
2489 2008-09-07 Johan Dahlin <johan@gnome.org>
2491 Bug 551162 – giscanner does not recognize asm and __asm__
2492 * giscanner/scannerlexer.l:
2493 Patch by Jani Monoses.
2495 2008-09-06 Colin Walters <walters@verbum.org>
2497 * girepository/girnode.c: Allow gtype_name
2498 and gtype_init in struct and union.
2499 * girepository/girparser.c: Parse glib:
2500 boxed bits for both structure and union.
2501 * girepository/gtypelib.c: Don't barf
2502 if structure is boxed.
2503 * giscanner/girparser.py: Parse new XML
2505 * giscanner/girwriter.py: Write out new
2507 * giscanner/glibast.py: Define new classes
2508 which are both Boxed and Struct/Union, as
2509 well as an "Other" for everything else.
2510 * giscanner/glibtransformer.py: Handle
2511 boxed types specially; we try to merge
2512 them with a struct/union if one exists,
2513 otherwise fall back to generic boxed.
2515 * tools/generate.c: Write out new format.
2517 2008-09-06 Johan Dahlin <johan@gnome.org>
2519 * giscanner/grealpath.h: Include stdlib.h
2521 * docs/g-ir-generate.1: Remove leading %
2523 2008-09-01 Colin Walters <walters@verbum.org>
2525 * girepository/girparser.c: Look at c:type to determine
2526 whether or not an item is a pointer.
2528 2008-09-01 Johan Dahlin <johan@gnome.org>
2530 * tests/scanner/Makefile.am:
2531 Set PYTHONPATH so the scanner can run
2532 even if you didn't install anything.
2534 2008-09-01 Johan Dahlin <johan@gnome.org>
2537 Post-release version bump
2540 2008-09-01 Johan Dahlin <johan@gnome.org>
2544 2008-08-31 Colin Walters <walters@verbum.org>
2546 * giscanner/glibtransformer.py: Quiet info
2549 2008-08-31 Johan Dahlin <johan@gnome.org>
2552 Bump version to 0.5.0
2554 2008-08-31 Colin Walters <walters@verbum.org>
2556 * giscanner/glibtransformer.py: Follow aliases to ensure
2557 we don't get a constructor returning a basic type.
2558 * giscanner/transformer.py: Add function to follow aliases.
2561 2008-08-31 Johan Dahlin <johan@gnome.org>
2563 * giscanner/scannerlexer.l:
2564 * giscanner/scannerparser.y:
2565 * giscanner/sourcescanner.h:
2566 * giscanner/sourcescanner.py:
2567 Parse GCC extensions in the parser instead of just undeffing them
2568 in the pre-processor.
2570 2008-08-31 Johan Dahlin <johan@gnome.org>
2572 * giscanner/glibtransformer.py:
2573 Clean up a huge if. Do not add methods or constructors
2575 * giscanner/utils.py:
2576 second might be longer than first, check that.
2578 2008-08-31 Johan Dahlin <johan@gnome.org>
2583 2008-08-31 Colin Walters <walters@verbum.org>
2585 * girepository/girparser.c: Don't lose if we
2588 2008-08-31 Colin Walters <walters@verbum.org>
2590 * giscanner/glibtransformer.py: Look for libtool
2591 library in current directory
2592 * tests/scanner - Update.
2594 2008-08-30 Colin Walters <walters@verbum.org>
2596 * docs/typelib-format.txt: Add a guint32
2598 * gir/Makefile.am: Dep on Makefile
2599 * girepository/ginfo.c:
2600 * girepository/girepository.c: Clean up
2601 default typelib handling; remove global
2602 default_typelib variable. Ensure we handle
2603 NULL repository in more places.
2604 Support dependency resolution.
2605 Support lazy loading.
2606 * girepository/girepository.h: Remove
2607 g_irepository_unregister; we don't support
2608 unloading typelibs since really they're
2609 process-global. Update for lazy loading
2611 * girepository/girmodule.c: Use g_new0.
2612 Add dependencies to GirModule.
2613 * girepository/girparser.c: Parse dependencies.
2614 * girepository/gtypelib.c: Add 4 bytes for
2616 * tests/Makefile.am: Kill off gobject.gir,
2617 it conflicts with the real one.
2618 * tests/object.gir: Dep on GObject.
2619 * tools/generate.c: Take --includedir
2620 argument to say which directories to search
2621 for typelibs. Print out dependencies.
2623 2008-08-30 Colin Walters <walters@verbum.org>
2625 * giscanner/glibtransformer.py: Reduce warning noise.
2627 2008-08-29 Colin Walters <walters@verbum.org>
2629 * girepository/ginfo.c: Add some assertions regarding
2630 refcounts, just to be sure.
2631 * giscanner/glibtransformer.py: Blacklist a few more
2634 2008-08-29 Colin Walters <walters@verbum.org>
2636 * giscanner/glibtransformer.py: Blacklist a few
2637 functions that use GError oddly
2639 2008-08-29 Colin Walters <walters@verbum.org>
2641 * girepository/gtypelib.c: Don't crash if no
2644 2008-08-29 Colin Walters <walters@verbum.org>
2646 * girepository/girparser.c: Handle chains of aliases
2647 across modules by ensuring we fully qualify aliases
2650 2008-08-29 Colin Walters <walters@verbum.org>
2652 * girepository/girparser.c: Don't search aliases
2655 2008-08-29 Colin Walters <walters@verbum.org>
2657 * girepository/girparser.c: Rewrite type parsing
2658 to handle both GLib parsing case as well as correctly
2659 handling GLib.List and friends. Don't try to treat
2660 e.g. ListStore as a List.
2662 2008-08-29 Colin Walters <walters@verbum.org>
2664 * girepository/gtypelib.c: Add more context
2667 2008-08-29 Colin Walters <walters@verbum.org>
2669 * giscanner/glibtransformer.py: Add some informative
2670 logging messages in corner cases. Be sure we use
2671 the most recent node set instead of a cache
2672 when generating result set.
2673 * tests/: Remove duplicated bits in expected girs
2674 * girepository/girparser.c: Accept both List (for
2675 compiling GLib) and GLib.List (what the scanner
2678 * tools/generate.c: Generate canonical form.
2680 2008-08-29 Johan Dahlin <johan@gnome.org>
2682 * giscanner/config.py.in:
2683 Use datarootdir instead of datadir to avoid
2684 an autoconf warning.
2686 2008-08-29 Johan Dahlin <johan@gnome.org>
2690 * examples/gdk-pixbuf.gidl:
2692 Update and remove old cruft.
2694 2008-08-29 Johan Dahlin <johan@gnome.org>
2697 * docs/g-ir-compiler.1:
2698 * docs/g-ir-generate.1:
2699 * docs/g-ir-scanner.1:
2700 Add man pages for the generator and compiler.
2702 2008-08-29 Johan Dahlin <johan@gnome.org>
2704 * docs/g-ir-scanner.1: Document
2706 * giscanner/Makefile.am:
2707 * giscanner/gidlparser.py:
2708 * giscanner/gidlwriter.py:
2709 * tools/g-ir-scanner:
2710 Remove gidl support.
2712 2008-08-28 Colin Walters <walters@verbum.org>
2714 * tests/scanner/Makefile.am: Pass the right
2715 --includedir args. Add a Makefile dep.
2716 * tools/compiler.c: Pass includedirs down.
2717 * girepository/girparser.c: Actually put
2718 includedirs in context, pass down. Fix
2721 2008-08-28 Colin Walters <walters@verbum.org>
2723 * gir/Makefile.am: Use --includedir
2724 * girepository/girparser.c: Recursively parse
2725 includes to pull in aliases and expand them.
2726 We need this to avoid putting unknown names in
2728 * tools/compiler.c: Add --includedir option.
2729 * giscanner/ast.py: Map size/ssize to types
2732 2008-08-28 Tor Lillqvist <tml@novell.com>
2734 Make check now runs successfully on Windows.
2736 * tools/compiler.c (write_out_typelib): Use binary mode for output
2739 * girepository/girnode.c: Don't print NULL strings.
2741 * tests/invoke/Makefile.am
2742 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2743 convince libtool to build shared libraries.
2745 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2746 g_assert() instead of printing out expected errors.
2748 2008-08-28 Tor Lillqvist <tml@novell.com>
2750 * girepository/gtypelib.h: Change type of bitfield fields from
2751 guint to the most suitable smaller type. This makes the struct
2752 sizes match the ones on Linux that the sanity check expects when
2753 using gcc -mms-bitfields on Windows.
2755 2008-08-28 Johan Dahlin <johan@gnome.org>
2760 * giscanner/Makefile.am:
2761 * tests/Makefile.am:
2762 * tests/scanner/Makefile.am:
2763 Make distcheck pass.
2765 2008-08-27 Johan Dahlin <johan@gnome.org>
2767 * giscanner/Makefile.am:
2768 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2770 2008-08-27 Tor Lillqvist <tml@novell.com>
2772 Make g-ir-scanner work on Windows. Still problems with the typelib
2773 code. Changes okayed by jdahlin.
2775 * configure.ac: Check for Windows, set Automake conditional
2776 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2777 avoid shell quoting issues
2779 * girepository/Makefile.am: Use -no-undefined so that libtool
2780 agrees to build a shared library on Windows.
2782 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2783 Windows. Empty implementation on Windows so far.
2785 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2786 informative error message for the assertion failures. Tell also
2787 what the expected size of the struct is. Check all sizes first and
2788 fail afterwards if at least one size was different from expected.
2790 * tools/Makefile.am: Reorder libraries into proper logical
2793 * tools/generate.c: Don't include <dlfcn.h>, not used.
2795 * giscanner/Makefile.am: On Windows, link with the Python library,
2796 and install the module DLL as _giscanner.pyd. Remove the
2797 unnecessary import library and libtool library that libtool has
2800 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2801 and just skip it. Recognize also two "l" suffixes for long long
2802 constants. Recognize also __inline__.
2804 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2805 GetFullPathName(). As such, GetFullPathName() does more than the
2806 UNIX realpath(). It also changes relative paths into absolute
2807 paths. But for our purposes that shouldn't matter.
2809 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2810 Windows the file descriptor passed to us is from Python. Python
2811 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2812 uses msvcrt.dll. On Windows, file descriptors are specific to
2813 which C library is used. So we must find out what underlying OS
2814 handle corresponds to the file descriptor Python passes us, and
2815 then make that into a file descriptor valid for the C library this
2818 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2819 __attribute__ as the lexer now handles it. The definition as empty
2820 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2821 __attribute__. Close the temp file before unlinking it.
2823 * giscanner/cgobject.py: Use correct library name for the gobject
2826 * gir/Makefile.am: Must pass the full basename of the DLLs on
2827 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2828 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2829 reality they won't change, until there is a GLib 3, and then also
2830 the Unix code here needs changing.
2832 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2835 2008-08-26 Colin Walters <walters@verbum.org>
2837 * girepository/girepository.c: Search
2838 $DATADIR/girepository instead of
2839 $DATADIR/gitypelibs; this naming makes
2840 it clearer that e.g. jgir can install
2842 * gir/Makefile.am: Install there.
2844 2008-08-26 Colin Walters <walters@verbum.org>
2846 * girepository/gtypelib.c (_g_typelib_init): Also
2847 use G_MODULE_SUFFIX instead of hardcoding .so.
2849 2008-08-26 Colin Walters <walters@verbum.org>
2851 * girepository/gtypelib.c (_g_typelib_init): Free
2852 string in the right place.
2854 2008-08-26 Colin Walters <walters@verbum.org>
2856 * girepository/gtypelib.c (_g_typelib_init): Handle
2857 both .la and .so names; this works better in the
2858 uninstalled library case.
2860 2008-08-26 Johan Dahlin <johan@gnome.org>
2863 * giscanner/Makefile.am:
2864 * giscanner/cgobject.py:
2865 * giscanner/config.py.in:
2866 * giscanner/sourcescanner.py:
2867 Avoid undeffing __GNUC__, instead define
2868 __attribute__ & friends. Remove glibconfig.h hack.
2869 This makes gobject-introspection work better on
2870 MacOS X, Thanks to Richard Hult for kind help.
2872 2008-08-25 Colin Walters <walters@verbum.org>
2874 * giscanner/glibtransformer.py: Always print
2877 2008-08-25 Colin Walters <walters@verbum.org>
2879 * giscanner/glibtransformer.py: Skip over
2880 interfaces we don't know.
2882 2008-08-25 Colin Walters <walters@verbum.org>
2884 * girepository/girparser.c: Parse new implements
2885 syntax, drop gapi one.
2886 * tests/object.gir: Update.
2887 * tools/generate.c: Generate new syntax.
2889 2008-08-25 Colin Walters <walters@verbum.org>
2891 * giscanner/ast.py: Add interfaces property
2893 * giscanner/girwriter.py: Write out implemented
2895 * giscanner/glibtransformer.py: Introspect
2896 implemented interfaces.
2897 * tests/scanner/*: Make FooObject implement
2900 2008-08-25 Colin Walters <walters@verbum.org>
2902 * giscanner/glibtransformer.py: More correctly pair
2903 methods; if we have a symbol that starts with
2904 e.g. hippo_canvas look for a matching HippoCanvas
2905 class before accepting e.g. HippoCanvasImage.
2907 2008-08-24 Colin Walters <walters@verbum.org>
2909 * tools/g-ir-scanner: Filter out unknown options from
2912 2008-08-24 Colin Walters <walters@verbum.org>
2914 * giscanner/glibtransformer.py: Fail with better
2915 error if we can't find library.
2917 2008-08-24 Colin Walters <walters@verbum.org>
2919 * tools/g-ir-scanner: Use subprocess instead of
2920 commands, works on Windows and avoids the evil
2923 2008-08-24 Colin Walters <walters@verbum.org>
2925 * giscanner/glibtransformer.py: Skip over
2926 g_object_get_type from GLib trunk.
2928 2008-08-24 Colin Walters <walters@verbum.org>
2930 * girepository/girepository.c (g_irepository_require):
2931 Don't open shared library here; we already do it
2934 2008-08-24 Colin Walters <walters@verbum.org>
2936 * girepository/gtypelib.c: Add context stack so
2937 when we get an error we can print out nicely
2940 2008-08-24 Johan Dahlin <johan@gnome.org>
2942 * girepository/girparser.c (start_glib_boxed), (start_function),
2943 (start_field), (start_alias):
2944 Refactor a couple of parsing functions to be simpler to follow.
2947 2008-08-24 Johan Dahlin <johan@gnome.org>
2949 * girepository/girparser.c (start_function):
2950 Remove left-over code, checking type of function.
2952 2008-08-23 Colin Walters <walters@verbum.org>
2954 * giscanner/config.py: Define DATADIR.
2955 * giscanner/transformer.py: Look in DATADIR.
2957 2008-08-23 Colin Walters <walters@verbum.org>
2959 * girepository/gtypelib.c: Check constructor
2961 * girepository/girnode.c: Small tweaks.
2962 * girepository/ginfo.c: Calculate signature offsets
2964 * girepository/girparser.c: Remove duplicate
2966 * giscanner/glibtransformer.py: Avoid marking
2967 functions which return a basic type as
2970 2008-08-23 Colin Walters <walters@verbum.org>
2972 * girepository/girparser.c: Ignore <include>.
2973 * giscanner/girparser.py: Parse them.
2974 * giscanner/girwriter.py: Generate them.
2975 * giscanner/transformer.py: Process <include>
2976 recursively. Don't require full path for
2977 includes, look in {$XDG_DATA_DIRS}/gir.
2978 * tools/g-ir-scanner: Pass through includes.
2979 * Makefile.am: Remove extra --include
2981 * *-expected.gir: Add expected includes.
2983 2008-08-23 Johan Dahlin <johan@gnome.org>
2985 * tests/scanner/Makefile.am:
2986 * tests/scanner/annotation-expected.gir:
2987 * tests/scanner/drawable-expected.gir:
2988 Avoid duplication in the Makefile, regenerate with new
2989 namespaces (same as the filename)
2991 2008-08-22 Colin Walters <walters@verbum.org>
2993 * girepository/girnode.c: Don't hardcode integers,
2996 2008-08-22 Johan Dahlin <johan@gnome.org>
2998 * giscanner/sourcescanner.py:
2999 Check for ../gobject-introspection-1.0.pc.in to determine
3000 if we run installed or uninstalled.
3002 2008-08-22 Johan Dahlin <johan@gnome.org>
3005 * giscanner/sourcescanner.py:
3006 Send in undefs/defines via writing it directly to stdin
3007 of cpp instead of via arguments.
3009 2008-08-22 Colin Walters <walters@verbum.org>
3011 * tools/generate.c, tools/compiler.c: Default
3013 * all Makefile.am: Update.
3015 2008-08-22 Colin Walters <walters@verbum.org>
3017 * girepository/girparser.c: Pass through
3018 recursive types. Avoid overwriting errors.
3019 * giscanner/xmlwriter.py: Always write the
3021 * tests/*.gir: Adjust.
3022 * tests/scanner/Makefile.am: Build typelibs,
3023 and generate XML from those. Once we
3024 have a good diff mechanism...
3025 * tests/scanner/*-expected.gir: Add XML
3027 * tools/g-ir-scanner: Accept --typelib-xml
3029 * tools/generate.c: Better defaults for transfer.
3031 2008-08-22 Johan Dahlin <johan@gnome.org>
3035 * giscanner/Makefile.am:
3036 * giscanner/config.py.in:
3037 * giscanner/sourcescanner.py:
3038 Use the generated glibconfig.h for all scanner invokations.
3039 Rename it to glibconfig-scanner.h and install it.
3040 Add a config.py which so far contains the include dir.
3042 2008-08-22 Johan Dahlin <johan@gnome.org>
3045 Replace glibconfig.h with our own, do some replacement
3046 for CPP/C features we do not support
3048 2008-08-22 Colin Walters <walters@verbum.org>
3050 * tools/generate.c (write_callable_info): Fix unref
3053 2008-08-22 Colin Walters <walters@verbum.org>
3055 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
3056 * tests/Makefile.am: Support $(DEBUG)
3057 * tools/generate.c: Do immediate close tags if no
3060 2008-08-21 Colin Walters <walters@verbum.org>
3062 * tests/scanner/drawable-expected.gir,
3063 * tests/scanner/drawable.c,
3064 * tests/scanner/drawable.h:
3067 2008-08-21 Colin Walters <walters@verbum.org>
3069 * giscanner/glibtransformer.py: Compute prefix
3070 by searching through the symbol for bits
3071 rather than going directly from ctype; this fixes
3074 2008-08-21 Colin Walters <walters@verbum.org>
3076 * giscanner/glibtransformer.py: Also try squashing
3077 underscores from namespace, fixes webkit_web_view_new.
3079 2008-08-21 Colin Walters <walters@verbum.org>
3081 * giscanner/glibtransformer.py: More ctor work,
3082 avoid having gtk_window_group_new end up under
3085 2008-08-21 Colin Walters <walters@verbum.org>
3087 * giscanner/glibtransformer.py: Much simpler approach
3088 of mapping uscored names to classes.
3089 * giscanner/utils.py: Remove unnecessary function.
3091 2008-08-21 Johan Dahlin <johan@gnome.org>
3093 * girepository/girepository.c (g_irepository_require):
3094 Plug memory leak and avoid using freed memory.
3095 Resolve the whole module path, here as well.
3097 2008-08-21 Colin Walters <walters@verbum.org>
3099 * giscanner/glibtransformer.py: Look up all permutations
3100 of class names when scanning methods/ctors based on
3101 the prefix instead of using the return value. This
3102 associates gtk_window_new with the right class.
3104 2008-08-21 Colin Walters <walters@verbum.org>
3106 * girepository/girmodule.c (g_ir_module_build_typelib):
3107 Revert change to increment header_size; we do that in
3110 2008-08-21 Colin Walters <walters@verbum.org>
3112 * girepository/girnode.c (write_string): Tweak to
3113 use UINT instead of INT. Not likely to matter.
3114 * girepository/girmodule.c (g_ir_module_build_typelib):
3115 Add to header_offset as well for header strings
3116 to match what write_string does.
3117 * girepository/gtypelib.c: Replace is_name with
3118 validate_name, which more strongly validates and
3119 handles errors in a better way. Update all callers.
3120 * giscanner/glibtransformer.py: Handle constructors
3123 2008-08-21 Johan Dahlin <johan@gnome.org>
3125 * gir/Makefile.am (typelibs_DATA): Build and
3126 install the Gio.typelib too
3128 * girepository/gtypelib.c (_g_typelib_init):
3129 Use g_module_build_path to resolve the shlib name
3131 2008-08-21 Colin Walters <walters@verbum.org>
3133 * gir/Makefile.am: CLEANFILES typelibs too.
3135 2008-08-21 Johan Dahlin <johan@gnome.org>
3137 * giscanner/glibtransformer.py:
3138 Do not send .la files through find_library.
3140 2008-08-21 Colin Walters <walters@verbum.org>
3142 * girepository/girparser.c (g_irepository_require):
3143 Fix one small leak in error case.
3145 2008-08-21 Johan Dahlin <johan@gnome.org>
3148 Parse glibconfig.h as well and install the compiled
3151 2008-08-21 Johan Dahlin <johan@gnome.org>
3154 * giscanner/glibtransformer.py:
3155 * tools/g-ir-scanner:
3156 Do not hard-core library names in the Makefile, reuse
3157 ctypes find_library instead.
3159 2008-08-21 Johan Dahlin <johan@gnome.org>
3161 * girepository/girparser.c (resolve_aliases):
3162 Remove compilation warnings
3164 2008-08-21 Johan Dahlin <johan@gnome.org>
3166 * girepository/girepository.c (g_irepository_require):
3167 Rewrap and fix double free bug by leaking a bit.
3169 2008-08-20 Colin Walters <walters@verbum.org>
3171 * girepository/girepository.c: Add new function
3172 g_irepository_get_typelib_path which tells
3173 us from where we loaded a namespace.
3175 2008-08-20 Colin Walters <walters@verbum.org>
3177 * tests/scanner/*-expected.gir: Adjust for
3178 added shared-library.
3179 * giscanner/giwriter.py: Make pylint happy.
3181 2008-08-20 Colin Walters <walters@verbum.org>
3183 * girepository/girmodule.c (g_ir_module_build_typelib):
3184 Calculate size correctly, avoid use-after-free.
3186 2008-08-20 Colin Walters <walters@verbum.org>
3188 * girepository/girepository.c: Remove
3189 g_irepository_register_file in favor of
3190 g_irepository_require. There are two
3191 possible deployment scenarios for typelibs:
3192 First, separate in $DATADIR/gitypelibs/. Second,
3193 they may be embedded in shlibs. However since
3194 the first is now the normal case, the API is
3195 optimized around it.
3197 Refactor internals to look up typelibs for
3198 namespaces just-in-time, but we expect
3199 consumers to call g_irepository_require.
3201 Also, add some docs. No one has died from that
3203 * gir/Makefile.am: Need --library for glib.
3204 * giscanner/girwriter.py: Write out shared-library.
3205 * tools/g-ir-writer: Take the first --library
3206 argument as the target of shared-library. In
3207 the future we should make this nicer with pkg-config
3210 2008-08-20 Colin Walters <walters@verbum.org>
3212 * girepository/girparser.py: And parse them.
3214 2008-08-20 Johan Dahlin <johan@gnome.org>
3216 * giscanner/glibast.py: Add gshort/gushort types
3218 2008-08-20 Colin Walters <walters@verbum.org>
3220 * gir/Makefile.am: Rename .gir files using GI namespace.
3221 * girepository/girepository.c: Use XDG_DATA_DIRS for
3222 looking up typelibs. Also typelibs are now suffixed
3224 * tests/invoke/Makefile.am: Only use metadata.
3225 * girepository/Makefile.am: Remove unnecessary include.
3226 * tests/scanner/Makefile.am: Update using GI namespaces
3227 for scanner includes.
3229 2008-08-20 Colin Walters <walters@verbum.org>
3231 * girepository/transformer.py: Suppress aliases whose
3233 * girepository/ast.py: Define some more aliases.
3235 2008-08-20 Colin Walters <walters@verbum.org>
3237 * girepository/girparser.c: Avoid alias infloops.
3239 2008-08-20 Colin Walters <walters@verbum.org>
3241 * tests/scanner/foo-expected.gir: Fix expected list type.
3243 2008-08-20 Johan Dahlin <johan@gnome.org>
3245 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
3246 Add a workaround for #548689.
3247 We can now compile gtk!
3249 2008-08-20 Colin Walters <walters@verbum.org>
3251 * giscanner/glibtransformer.py: Try to look up
3252 aliases using the c:type too.
3254 2008-08-20 Colin Walters <walters@verbum.org>
3256 * girepository/girparser.c: Parse union fields.
3258 2008-08-20 Johan Dahlin <johan@gnome.org>
3260 * giscanner/ast.py: Make time_t an alias for long
3262 * gir/gio-2.0-good.gir:
3263 * gir/glib-2.0-good.gir:
3264 * gir/gobject-2.0-good.gir:
3266 * giscanner/glibtransformer.py:
3267 Do not delete Class structures, we need them in gdk/gtk.
3268 * tests/scanner/drawable-expected.gir:
3269 * tests/scanner/foo-expected.gir:
3270 * tests/scanner/utility-expected.gir:
3273 2008-08-20 Johan Dahlin <johan@gnome.org>
3275 * tests/scanner/Makefile.am:
3276 * tests/scanner/annotation-expected.gir:
3277 * tests/scanner/annotation.c (annotation_object_class_init),
3278 (annotation_object_init), (annotation_object_method),
3279 (annotation_object_in), (annotation_object_out),
3280 (annotation_object_inout), (annotation_object_inout2),
3281 (annotation_object_inout3), (annotation_object_calleeowns),
3282 (annotation_object_calleesowns), (annotation_object_get_strings),
3283 (annotation_object_with_voidp), (annotation_object_get_objects),
3284 (annotation_object_create_object), (annotation_object_allow_none):
3285 * tests/scanner/annotation.h:
3286 * tests/scanner/foo-expected.gir:
3287 * tests/scanner/foo.c:
3288 * tests/scanner/foo.h:
3289 Split out annotation tests out of foo
3291 2008-08-20 Johan Dahlin <johan@gnome.org>
3293 * tests/scanner/Foo-expected.gir:
3294 * tests/scanner/Makefile.am:
3295 * tests/scanner/foo-expected.gir:
3296 * tests/scanner/foo-object.h:
3297 * tests/scanner/foo.c:
3298 Foo->foo, foo-object.h -> foo.h
3300 2008-08-20 Johan Dahlin <johan@gnome.org>
3302 * tests/scanner/Foo-expected.gir:
3303 * tests/scanner/Makefile.am:
3304 * tests/scanner/drawable-expected.gir:
3305 * tests/scanner/drawable.c (test_drawable_class_init),
3306 (test_drawable_init):
3307 * tests/scanner/drawable.h:
3308 * tests/scanner/foo-object.h:
3309 * tests/scanner/foo.c (foo_boxed_method):
3310 Move the drawable parts out of Foo to its own test.
3312 2008-08-20 Johan Dahlin <johan@gnome.org>
3314 * tests/scanner/Foo-expected.gir:
3315 * tests/scanner/foo-object.h:
3316 * tests/scanner/foo.c (foo_drawable_class_init),
3317 (foo_drawable_init):
3318 Add a based on GdkDrawable which generates
3321 2008-08-19 Colin Walters <walters@verbum.org>
3323 * giscanner/transformer.py: Don't try
3324 to strip prefix before namespace.
3326 2008-08-19 Johan Dahlin <johan@gnome.org>
3328 * giscanner/transformer.py:
3329 * tests/scanner/Foo-expected.gir:
3330 * tests/scanner/foo-object.h:
3331 Add support for typedef void foo type of
3334 2008-08-19 Johan Dahlin <johan@gnome.org>
3337 * giscanner/girwriter.py:
3338 * giscanner/glibtransformer.py:
3339 * giscanner/transformer.py:
3340 * tests/scanner/Foo-expected.gir:
3341 Add basic support for union, base the code much
3342 on Struct. Add a testcase.
3344 2008-08-19 Johan Dahlin <johan@gnome.org>
3346 * tests/scanner/Foo-expected.gir:
3347 * tests/scanner/foo-object.h:
3348 Add a union testcase which the compiler currently
3351 2008-08-19 Johan Dahlin <johan@gnome.org>
3353 * gobject-introspection-1.0.pc.in:
3354 Add a g_ir_compiler variable
3356 2008-08-19 Colin Walters <walters@verbum.org>
3358 * giscanner/ast.py: Rework types to be more closely
3360 * giscanner/girparser.py: Parse more bits.
3361 * giscanner/girwriter.py: Write sequences in a new
3362 way that specifies container type.
3363 * giscanner/glibast.py: Adjust for ast.py changes,
3364 add 'ctype' property to GLibObject and GLibInterface
3365 so we can look things up by it later.
3366 * gicanner/transformer.py: Names is new class holding
3367 the various namespaces we manage. Do not confuse
3368 with Namespace which is toplevel XML node effectively.
3369 Rework all type resolution to go through
3370 _resolve_type_name_1.
3371 * giscanner/glibtransformer.py: Raise UnknownTypeError
3372 instead of ValueError for cleanliness. Add Unresolved
3373 class to mark types whose parent we haven't seen yet.
3374 Use new Names object from transformer.py.
3375 Correctly look up parent=.
3376 Fix type validation to handle sequences.
3377 * tests/scanner/Foo-expected.gir: Update for sequence
3378 work, int instead of int32.
3379 * tools/g-ir-scanner: Add --noclosure option
3380 * gir/Makefile.am: Use --noclosure by default for
3383 2008-08-18 Johan Dahlin <johan@gnome.org>
3385 * gir/gio-2.0-good.gir:
3386 * gir/glib-2.0-good.gir:
3387 * gir/gobject-2.0-good.gir:
3390 2008-08-18 Johan Dahlin <johan@gnome.org>
3393 * giscanner/girparser.py:
3394 * giscanner/girwriter.py:
3395 * giscanner/glibast.py:
3396 * giscanner/glibtransformer.py:
3397 * giscanner/transformer.py:
3398 * tests/scanner/Foo-expected.gir:
3399 * tests/scanner/foo-object.h:
3400 * tests/scanner/utility-expected.gir:
3401 * tests/scanner/utility.h:
3402 Redo type resolving and validation.
3403 Add a couple of new tests.
3404 Patch mostly written by Colin.
3406 2008-08-18 Johan Dahlin <johan@gnome.org>
3409 * giscanner/girparser.py:
3411 * giscanner/transformer.py:
3412 Improve enum parsing for enums without a GType.
3413 Make flags/enum references to other girs work
3414 * giscanner/utils.py:
3416 * tests/scanner/Makefile.am:
3417 * tests/scanner/foo-object.h:
3418 * tests/scanner/utility-expected.gir:
3419 * tests/scanner/utility.h:
3420 Add a new test for external enum references
3422 2008-08-18 Johan Dahlin <johan@gnome.org>
3424 * docs/global-module-registry.txt: Update
3426 * tests/array.gir: Update with new type proposal
3428 * girepository/girepository.c (g_type_tag_to_string):
3429 * girepository/girepository.h:
3430 * girepository/girnode.c (g_ir_node_get_full_size_internal),
3432 * girepository/girnode.h:
3433 Make enum serializing functions public. Clean up some whitespace.
3435 2008-08-17 Johan Dahlin <johan@gnome.org>
3437 * docs/global-module-registry.txt:
3438 Add a document for an on disk module registry format
3440 2008-08-17 Johan Dahlin <johan@gnome.org>
3443 * gir/gio-2.0-good.gir:
3446 2008-08-17 Johan Dahlin <johan@gnome.org>
3449 * gir/glib-2.0-good.gir:
3450 * gir/gobject-2.0-good.gir:
3451 * giscanner/cgobject.py:
3452 * giscanner/glibtransformer.py:
3453 Regenerate GObject & GType.
3454 Avoid warnings when generating gobject-2.0.gir.
3455 Introspect a little more, and skip *_get_type functions.
3457 2008-08-17 Colin Walters <walters@verbum.org>
3459 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
3460 Rename to -good, always generate during build.
3461 * gir/Makefile.am: Ensure .gir files dep on
3462 all scanner sources.
3463 * Makefile.am: Switch build order to ensure
3464 the scanner is ready before we do gir/.
3465 * tools/g-ir-scanner: Look for .git too.
3467 2008-08-17 Johan Dahlin <johan@gnome.org>
3469 * girepository/gtypelib.c (validate_enum_blob):
3470 * giscanner/glibtransformer.py:
3471 * giscanner/transformer.py:
3472 Remove resolve_possible_typedefs, it was unused.
3473 Allow multiple enum values of the sample value in an enum,
3474 since it's actually pretty common.
3475 Register enums so they can be resolved too.
3477 2008-08-16 Johan Dahlin <johan@gnome.org>
3479 * giscanner/girparser.py:
3480 Parse enumeration/bitfield.
3482 2008-08-16 Johan Dahlin <johan@gnome.org>
3484 * giscanner/girparser.py:
3487 2008-08-16 Johan Dahlin <johan@gnome.org>
3489 * giscanner/glibtransformer.py:
3490 Resolve type names for alias targets
3491 * giscanner/transformer.py:
3492 Skip FILE* parameters fow now
3494 2008-08-16 Johan Dahlin <johan@gnome.org>
3497 * gir/gobject-2.0.gir:
3500 * tests/scanner/Makefile.am:
3503 2008-08-15 Colin Walters <walters@verbum.org>
3505 * giscanner/glibtransformer.py: Explicitly construct
3506 new list, since we're deleting as we iterate.
3507 Don't delete all structures which end in Class; just
3508 ones which have a paired GObject.
3509 Fix printing of type warning.
3510 * giscanner/transformer.py: Make strip_namespace_object
3511 be the identity function if it doesn't match the
3514 2008-08-15 Colin Walters <walters@verbum.org>
3516 * giscanner/cgobject.py: Define yet more argument
3517 prototypes; fix prototype for g_type_fundamental.
3519 2008-08-14 Johan Dahlin <johan@gnome.org>
3521 * tests/Makefile.am:
3522 * tests/constant.gir:
3523 * tests/gobject.gir:
3525 * tools/generate.c (write_struct_info):
3526 Fix generator for constant/gobject/struct
3528 2008-08-14 Johan Dahlin <johan@gnome.org>
3530 * tests/Makefile.am:
3532 * tools/generate.c (write_enum_info):
3533 Fix generation of enum/bitfields
3535 2008-08-14 Johan Dahlin <johan@gnome.org>
3537 * girepository/girparser.c (start_field), (start_constant),
3538 (start_type), (end_element_handler):
3539 Clear up constant parsing
3544 * tools/generate.c (write_callable_info), (write_function_info),
3545 (write_callback_info), (write_constant_info), (write_signal_info),
3546 (write_vfunc_info), (write_property_info), (write_object_info),
3547 (write_interface_info):
3548 Constants/Signals are handled now.
3550 2008-08-14 Johan Dahlin <johan@gnome.org>
3552 * girepository/girparser.c (start_type):
3553 Don't require c:type.
3554 * tests/Makefile.am:
3557 Update, remove parts we don't support yet
3558 * tests/roundtrips.sh:
3560 * tools/generate.c (write_type_info), (write_field_info),
3561 (write_callable_info), (write_struct_info):
3562 Make it emit proper gir.
3564 2008-08-14 Johan Dahlin <johan@gnome.org>
3566 * giscanner/transformer.py:
3567 New internal function for adding a new node.
3569 2008-08-14 Johan Dahlin <johan@gnome.org>
3572 Define an internal _H_ variable so we skip parsing both
3573 i18n headers, only one is needed.
3575 Add the glib-2.0.gir too.
3576 * giscanner/glibast.py:
3577 Add gconstpointer as an alias for ANY
3578 * giscanner/transformer.py:
3579 Do not lower case enumeration names per se.
3580 Skip functions which has parameters called 'va_list'
3582 2008-08-14 Colin Walters <walters@verbum.org>
3584 * giscanner/transformer.py: Comment data structures.
3585 Also squash pointers in resolve_type_name to correspond
3586 with what we do for params.
3587 * giscanner/glibtransformer.py: Print warnings in more
3588 situations. Rework checks for method/constructor to
3589 look up in our GType database instead of just checking
3590 for *. Avoid generating <record> for GObject which
3591 duplicate the <class>.
3592 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3595 2008-08-14 Johan Dahlin <johan@gnome.org>
3597 * giscanner/girwriter.py:
3598 * giscanner/glibast.py:
3599 * giscanner/glibtransformer.py:
3600 * giscanner/transformer.py:
3602 * tests/Makefile.am:
3603 Add pyflakes.py and run it in make check.
3604 Update the source code to fix the errors reported by
3607 2008-08-14 Johan Dahlin <johan@gnome.org>
3610 * giscanner/girparser.py:
3611 * giscanner/glibast.py:
3612 * giscanner/glibtransformer.py:
3613 Refactor the parser a bit.
3614 Add parent type to interfaces and update callsites.
3616 2008-08-14 Johan Dahlin <johan@gnome.org>
3618 * giscanner/glibtransformer.py:
3619 * giscanner/utils.py:
3620 Refactor a bit, avoid isinstance and add a method
3621 for each type we parse.
3623 2008-08-14 Johan Dahlin <johan@gnome.org>
3626 * giscanner/girparser.py:
3627 * giscanner/glibtransformer.py:
3628 * tests/Makefile.am:
3629 Run pep8.py in make check, fix old errors.
3631 2008-08-13 Colin Walters <walters@verbum.org>
3633 * giscanner/girparser.py: Parse records.
3635 2008-08-13 Colin Walters <walters@verbum.org>
3637 * gir/Makefile.am: Install again.
3638 * gir/gobject-2.0.gir: Add some more bits.
3640 2008-08-13 Colin Walters <walters@verbum.org>
3642 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3643 * giscanner/girparser.py: Handle aliases.
3644 * giscanner/transformer.py: Record aliases. Make resolver
3645 functions public; we now call into these explicitly from
3646 glibtransformer. Handle resolving aliases.
3647 * giscanner/glibtransformer.py: Separate our internal namespace
3648 from included ones. Call up into transformer's resolver functions.
3650 2008-08-13 Johan Dahlin <johan@gnome.org>
3652 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3653 * girepository/girparser.c (start_class):
3654 * giscanner/glibtransformer.py:
3655 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3657 2008-08-13 Johan Dahlin <johan@gnome.org>
3659 * giscanner/cgobject.py:
3660 Register GInitiallyUnowned
3661 * giscanner/girwriter.py:
3662 * giscanner/glibtransformer.py:
3663 Special case GObject/GInitially owned as they are a bit special to use.
3665 2008-08-13 Colin Walters <walters@verbum.org>
3667 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3668 Object is in GObject namespace.
3670 2008-08-13 Colin Walters <walters@verbum.org>
3672 * giscanner/girparser.py: Fix processing of functions
3675 2008-08-13 Colin Walters <walters@verbum.org>
3677 * giscanner/girparser.py: Parse more than just <class.
3678 * giscanner/glibtransformer.py: Put aliases in a separate
3679 data structure since their name is not canonicall.
3680 * giscanner/transformer.py: Handle resolving type names
3683 2008-08-13 Johan Dahlin <johan@gnome.org>
3685 * tools/g-ir-scanner:
3686 Allow multiple libraries
3687 * giscanner/glibtransformer.py:
3688 Rename load_library to add_library, traverse over all libraries
3689 when trying to resolve a function
3691 2008-08-12 Colin Walters <walters@verbum.org>
3693 * giscanner/transformer.py: Record typedefs as <alias> elements.
3694 Also attempt to look up types in external namespaces.
3695 * giscanner/girwriter.py: Write them.
3696 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3697 checks. Resolve interface methods and properties.
3698 * tests/scanner/foo-object.h: Add a method with typedef.
3699 * tests/scanner/Foo-expected.gir: Update.
3700 * girepository/girnode.c: Debug tweaks.
3701 * girepository/girparser.c: Make a first pass through the XML where we
3702 record all the aliases. This lets us resolve them as we go through the
3704 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3705 from gir-repository.
3707 2008-08-12 Colin Walters <walters@verbum.org>
3709 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3710 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3712 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3714 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3716 2008-08-12 Colin Walters <walters@verbum.org>
3718 * giscanner/glibtransformer.py: Also transform object properties.
3720 2008-08-12 Colin Walters <walters@verbum.org>
3722 * giscanner/glibtransformer.py: Also transform callbacks
3723 and structure field types.
3724 * tests/scanner/Fooe-expected.gir: Update to expect correct
3725 names for callbacks and structs.
3727 2008-08-12 Colin Walters <walters@verbum.org>
3729 * girepository/girparser.c: Handle 'any'.
3730 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3731 Add test for void *.
3733 2008-08-12 Colin Walters <walters@verbum.org>
3735 * giscanner/glibtransformer.py: We need to do type
3736 resolution in a second pass after we've seen all the
3737 enums, records, etc.
3739 2008-08-12 Colin Walters <walters@verbum.org>
3741 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3742 Add enum return value.
3743 * giscanner/glibtransformer.py: Transform function return types
3746 2008-08-12 Colin Walters <walters@verbum.org>
3748 * tests/scanner/Makefile.am: Dep .gir files on scanner
3749 sources too. Also remove @ so we see scanner invocations.
3751 2008-08-12 Colin Walters <walters@verbum.org>
3753 * girepository/girparser.c, girepository/gtypelib.c,
3754 girepository/gtypelib.h, girepository/girnode.c:
3755 Remove usage of (GAPI-oriented) TypeTag in favor of
3756 GITypeTag from girepository.h.
3758 2008-08-10 Colin Walters <walters@verbum.org>
3760 * tests/roundtrips.sh: Use the correct tests.
3762 2008-08-10 Colin Walters <walters@verbum.org>
3764 * giscanner/cgobject.py: Declare/wrap a few more functions.
3765 Fix parameter types for g_object_new and g_type_fundamental.
3767 2008-08-10 Colin Walters <walters@verbum.org>
3769 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3770 us to declare types for both return value and parameters. The
3771 ctypes default of 'int' is bad because it hides 32/64 bit
3772 problems. Convert all existing functions to use it.
3774 2008-08-09 Johan Dahlin <johan@gnome.org>
3776 * giscanner/__init__.py:
3778 * giscanner/cgobject.py:
3779 * giscanner/gidlparser.py:
3780 * giscanner/gidlwriter.py:
3781 * giscanner/girparser.py:
3782 * giscanner/girwriter.py:
3783 * giscanner/glibast.py:
3784 * giscanner/glibtransformer.py:
3785 * giscanner/odict.py:
3786 * giscanner/sourcescanner.py:
3787 * giscanner/transformer.py:
3788 * giscanner/utils.py:
3789 * giscanner/xmlwriter.py:
3790 * tools/g-ir-scanner:
3794 2008-08-09 Johan Dahlin <johan@gnome.org>
3797 * relaxng/c-types.xml:
3798 * relaxng/g-types.xml:
3799 * relaxng/relaxng.rng:
3801 Remove outdated relaxng schemas.
3803 2008-08-09 Johan Dahlin <johan@gnome.org>
3806 Rename metadata to typelib in variable names,
3809 2008-08-09 Johan Dahlin <johan@gnome.org>
3813 Remove old C scanner, which got rewritten in python.
3815 2008-08-09 Johan Dahlin <johan@gnome.org>
3817 * girepository/Makefile.am:
3818 * tools/Makefile.am:
3819 * tools/girmodule.c:
3820 * tools/girmodule.h:
3823 * tools/girparser.c:
3824 * tools/girparser.h:
3825 * tools/girwriter.c:
3826 * tools/girwriter.h:
3827 Move shared *.[ch] files to girepository from tools
3829 2008-08-09 Johan Dahlin <johan@gnome.org>
3831 * tests/Makefile.am:
3834 * tests/constant.test:
3836 * tests/errors.test:
3837 * tests/function.test:
3838 * tests/gobject.test:
3839 * tests/interface.test:
3840 * tests/object.test:
3841 * tests/struct.test:
3846 Rename *.test to *.gir
3848 2008-08-09 Johan Dahlin <johan@gnome.org>
3851 * tests/Makefile.am:
3852 * tests/parser/Foo-expected.gir:
3853 * tests/parser/Makefile.am:
3854 * tests/parser/foo-object.h:
3855 * tests/parser/foo.c:
3856 * tests/parser/utility-expected.gir:
3857 * tests/parser/utility.c:
3858 * tests/parser/utility.h:
3859 * tests/scanner/Makefile.am:
3860 Rename tests/parser to test/scanner
3862 2008-08-08 Colin Walters <walters@verbum.org>
3864 * tests/roundtrips.sh: Use local .gir files again.
3866 2008-08-08 Colin Walters <walters@verbum.org>
3868 * tests/invoke/Makefile.am: .gir file depends on libtool
3871 2008-08-08 Colin Walters <walters@verbum.org>
3873 * tools/girnode.c: Pass through parent node so we can
3874 print the node whose child is NULL, if that occurs.
3876 2008-08-08 Johan Dahlin <johan@gnome.org>
3878 * tests/Makefile.am:
3879 Disable roundtrip tests which are not yet working
3880 * tests/invoke/testfns.gir:
3883 2008-08-08 Johan Dahlin <johan@gnome.org>
3885 * giscanner/girwriter.py:
3887 * giscanner/glibast.py:
3888 * giscanner/glibtransformer.py:
3889 Swap order of members, to keep it consistent with
3892 2008-08-08 Johan Dahlin <johan@gnome.org>
3894 * girepository/gtypelib.c (validate_header):
3895 * girepository/gtypelib.h:
3897 * giscanner/girwriter.py:
3898 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3899 (gi_source_symbol_unref):
3902 * tests/constant.test:
3904 * tests/errors.test:
3905 * tests/function.test:
3906 * tests/gobject.test:
3907 * tests/interface.test:
3908 * tests/invoke/Makefile.am:
3909 * tests/invoke/testfns.xml:
3910 * tests/object.test:
3911 * tests/parser/Makefile.am:
3912 * tests/roundtrips.sh:
3913 * tests/struct.test:
3918 * tools/Makefile.am:
3919 * tools/compiler.c (main):
3920 * tools/generate.c (write_callable_info), (write_function_info),
3922 * tools/gidlmodule.c:
3923 * tools/gidlmodule.h:
3926 * tools/gidlparser.c:
3927 * tools/gidlparser.h:
3928 * tools/gidlwriter.c:
3929 * tools/gidlwriter.h:
3930 * tools/scanner.c (create_node_from_gtype),
3931 (create_node_from_ctype), (g_igenerator_process_properties),
3932 (g_igenerator_process_signals), (g_igenerator_create_object),
3933 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3934 (g_igenerator_create_enum), (g_igenerator_create_flags),
3935 (g_igenerator_process_function_symbol),
3936 (g_igenerator_process_unregistered_struct_typedef),
3937 (g_igenerator_process_struct_typedef),
3938 (g_igenerator_process_union_typedef),
3939 (g_igenerator_process_enum_typedef),
3940 (g_igenerator_process_function_typedef),
3941 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3942 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3943 Merge in the gir-compiler branch.
3944 Thanks to Philip and Colin for their help.
3946 2008-07-26 Colin Walters <walters@verbum.org>
3948 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3949 and g-idl-generate to go along with how we're changing this
3950 module to be installed.
3951 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3953 2008-07-24 Colin Walters <walters@verbum.org>
3955 * girepository/girepository.c (g_irepository_register): Add
3956 environment variable G_IREPOSITORY_VERBOSE so we can print
3957 out what we're doing.
3958 * girepository/girepository.c (g_irepository_register_file):
3959 Add GError error message to g_debug call.
3961 2008-07-08 Jürg Billeter <j@bitron.ch>
3963 * giscanner/glibast.py:
3967 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3969 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3972 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3975 * giscanner/girwriter.py:
3976 * giscanner/transformer.py:
3977 * tests/parser/Foo-expected.gir:
3978 * tests/parser/foo-object.h:
3979 * tests/parser/foo.c (foo_object_allow_none):
3980 Add support for gtk-doc annotations for allow-none.
3983 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3986 * giscanner/girwriter.py:
3987 * giscanner/glibast.py:
3988 * giscanner/glibtransformer.py:
3989 * giscanner/transformer.py:
3990 * tests/parser/Foo-expected.gir:
3991 Start using abstract type instead of the raw C types.
3992 Register a bunch of glib types we care about.
3994 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3999 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
4001 * girepository/girepository.c:
4002 * girepository/gtypelib.c:
4003 * girepository/ginfo.c:
4004 * girepository/ginvoke.c:
4005 * girepository/girepository.h:
4006 * girepository/gtypelib.h:
4007 * girepository/gmetadata.c:
4008 * girepository/Makefile.am:
4009 * girepository/gmetadata.h:
4011 * tools/gidlmodule.c:
4014 * tools/gidlmodule.h:
4015 * tools/gidlparser.c:
4017 Renamed GMetadata to GTypelib
4019 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
4021 * giscanner/xmlwriter.py:
4022 Improve line wrapping when > 79 charaters
4024 2008-06-05 Jürg Billeter <j@bitron.ch>
4027 * giscanner/girwriter.py:
4028 * giscanner/transformer.py:
4029 Use <type> element for field types
4030 * tests/parser/Foo-expected.gir:
4033 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
4035 * giscanner/glibtransformer.py:
4036 Fix a bug which prevented GdkEvent from being generated
4038 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
4040 * giscanner/Makefile.am:
4042 * giscanner/girwriter.py:
4043 * giscanner/glibast.py:
4044 * giscanner/glibtransformer.py:
4045 * giscanner/transformer.py:
4046 * giscanner/utils.py:
4047 * tests/parser/Foo-expected.gir:
4048 Improve enum member parsing and introspection
4050 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4052 * giscanner/scannerparser.y:
4053 * giscanner/sourcescanner.h:
4054 * giscanner/sourcescanner.py:
4055 Add a new source type enum for member.
4056 Use __repr__ for improved debugging
4057 * giscanner/girparser.py:
4059 * giscanner/transformer.py:
4060 Improve parsing of struct members.
4061 * tests/parser/foo-object.h:
4064 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4066 * giscanner/xmlwriter.py:
4067 Improve error reporting when trying to quote None.
4068 * giscanner/girparser.py:
4069 Do not print warnings when including more complete .gir files
4070 * giscanner/girwriter.py:
4071 Do not require a name for parameters, add a todo for singletons
4072 * giscanner/glibtransformer.py:
4073 Refactor the way structs are done, add a couple of hacks to allow
4075 * giscanner/transformer.py:
4076 Add enough hacks so cairo, atk and pango.gir can be parsed properly
4077 * gobject-introspection-1.0.pc.in:
4078 Export girdir, so we can access gobject-2.0.gir from outside
4080 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4082 * tools/g-ir-scanner:
4083 * tests/parser/Makefile.am:
4084 Update sys.path before running the parser so we don't have
4085 to setup PYTHONPATH ourselves.
4089 * girepository/Makefile.am:
4090 * giscanner/transformer.py:
4091 * gobject-introspection-1.0.pc.in:
4092 * gobject-introspection.pc.in:
4093 * tools/Makefile.am:
4095 Rename pkg-config name to gobject-introspection-1.0,
4096 Do not installed anything which is not using the gir format.
4097 Disable compililation the old C scanner, but still keep the source
4098 until all the remaning functionallity has been ported.
4100 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4102 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
4103 a crash when symbol->indent is NULL.
4105 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
4106 a function to convert a CTYPE symbol to a string
4108 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
4111 * giscanner/girwriter.py:
4112 * giscanner/giscannermodule.c
4113 (pygi_source_scanner_append_filename),
4114 (pygi_source_scanner_parse_file):
4115 * giscanner/glibtransformer.py:
4116 * giscanner/sourcescanner.py:
4117 Revert back to using temporary files to send in headers.
4118 Allow Functions to be passed in as callbacks, add a couple
4119 of try/excepts missing features.
4120 We can now scan pango
4122 2008-05-08 Johan Dahlin <johan@gnome.org>
4124 * giscanner/glibtransformer.py:
4125 * giscanner/transformer.py:
4126 Move namespace stripping glibtransformer->transformer
4128 2008-05-08 Johan Dahlin <johan@gnome.org>
4131 * giscanner/girwriter.py:
4132 * giscanner/glibtransformer.py:
4133 * giscanner/transformer.py:
4134 * tools/g-ir-scanner:
4135 Introduce a namespace ast node
4137 2008-05-05 Johan Dahlin <johan@gnome.org>
4139 * giscanner/__init__.py:
4140 * giscanner/sourcescanner.py:
4141 * giscanner/transformer.py:
4142 Move sourcescanner symbols to the sourcescanner module, instead
4143 of in the global __init__ namespace.
4145 2008-05-03 Johan Dahlin <johan@gnome.org>
4147 * giscanner/glibtransformer.py:
4148 * tools/g-ir-scanner:
4149 Handle missing parameters better, allow - and + in .la dlname
4152 2008-05-03 Johan Dahlin <johan@gnome.org>
4154 * giscanner/__init__.py:
4156 * giscanner/girwriter.py:
4157 * giscanner/glibtransformer.py:
4158 * giscanner/transformer.py:
4159 Parse struct fields properly, improve debugging.
4161 2008-04-29 Johan Dahlin <johan@gnome.org>
4164 * giscanner/girwriter.py:
4165 * giscanner/transformer.py:
4166 * tests/parser/Foo-expected.gir:
4168 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
4170 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4173 * docs/g-ir-scanner.1:
4174 * metadata-annotations-proposal.txt:
4175 * metadata-format.txt:
4176 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
4178 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4180 * giscanner/girwriter.py:
4181 * giscanner/glibtransformer.py:
4182 * giscanner/transformer.py:
4183 * giscanner/xmlwriter.py:
4184 * tests/parser/Foo-expected.gir:
4185 * tests/parser/foo-object.h:
4186 Write record/structs to gir file too. Add a couple of tests,
4187 fix an off by one error in xmlwriter.py.
4189 2008-04-28 Johan Dahlin <johan@gnome.org>
4191 * giscanner/xmlwriter.py: Calculate the line length properly,
4192 include the provided extra indentation in the calculation, really.
4194 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4197 * giscanner/glibast.py:
4198 * giscanner/glibtransformer.py:
4199 * giscanner/transformer.py:
4200 * tools/g-ir-scanner:
4201 Add a --strip-prefix and sort out confusion between names and symbols
4202 for functions and struct + derivaties.
4203 Refactor bootstrap of g-ir-scanner, so we can set options on
4204 Transformer() before parsing everything.
4206 2008-04-28 Johan Dahlin <johan@gnome.org>
4208 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
4209 when scanning girepository.h
4211 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
4212 a __GI_SCANNER__ when we run.
4214 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4217 * giscanner/girwriter.py:
4218 * giscanner/glibast.py:
4219 * giscanner/glibtransformer.py:
4220 * tests/parser/Foo-expected.gir:
4221 * tests/parser/utility-expected.gir:
4222 Rename most c:identifier to c:type. Add new ones to
4223 class/interface/enum/boxed.
4225 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4228 * giscanner/girwriter.py:
4229 * giscanner/glibtransformer.py:
4230 * tests/parser/Foo-expected.gidl:
4231 * tests/parser/Makefile.am:
4232 Move c:identifier from return-value to subchild type,
4233 as per Jürgs suggestion
4235 2008-04-28 Johan Dahlin <johan@gnome.org>
4237 * giscanner/girwriter.py:
4238 * tests/parser/Foo-expected.gir:
4239 Write property.type as a child node.
4241 2008-04-27 Johan Dahlin <johan@gnome.org>
4246 * gidl/gobject-2.0.gidl:
4248 * gir/gobject-2.0.gir:
4249 * tests/parser/Makefile.am:
4250 Replace the GObject gidl with a GObject gir.
4252 2008-04-27 Johan Dahlin <johan@gnome.org>
4254 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
4257 * giscanner/xmlwriter.py:
4258 * tests/parser/Foo-expected.gir:
4259 Include indentation in line length calculation
4261 2008-04-27 Johan Dahlin <johan@gnome.org>
4263 * giscanner/girparser.py:
4264 Prettify NS parsing using elementtree.
4266 2008-04-27 Johan Dahlin <johan@gnome.org>
4269 * giscanner/Makefile.am:
4270 * giscanner/girparser.py:
4271 * giscanner/glibtransformer.py:
4272 * tests/parser/Foo-expected.gidl:
4273 * tests/parser/Foo-expected.gir:
4274 * tests/parser/Makefile.am:
4275 * tests/parser/utility-expected.gidl:
4276 * tests/parser/utility-expected.gir:
4277 * tools/g-ir-scanner:
4278 Switch over to GIR as the default format. Add a simple GIDL
4280 Update tests and fix simplify makefiles by depending
4281 on GNU make extensions.
4283 2008-04-27 Johan Dahlin <johan@gnome.org>
4285 * giscanner/xmlwriter.py:
4286 Wrap attributes for lines which are wider than 79 characters
4288 * giscanner/scannerlexer.l:
4289 Allow parenthesis in annotations
4292 * giscanner/gidlwriter.py:
4293 * giscanner/girwriter.py:
4294 * giscanner/glibtransformer.py:
4295 * giscanner/transformer.py:
4296 Add initial sequence support, including annotation.
4297 Refactor type handling a bit.
4299 2008-04-27 Johan Dahlin <johan@gnome.org>
4301 * tests/parser/Foo-expected.gidl:
4302 * tests/parser/foo-object.h:
4303 * tests/parser/foo.c (foo_object_class_init),
4304 (foo_object_get_strings), (foo_object_get_objects):
4305 Add two new functions to check sequence return values.
4306 Also fixes a compilation warning.
4308 2008-04-27 Johan Dahlin <johan@gnome.org>
4310 * giscanner/giscannermodule.c (]): Cast the getter, avoids
4311 a compilation warning.
4313 * tools/Makefile.am (g_ir_scanner_SOURCES):
4314 g-ir-scanner has no sources.
4316 2008-04-25 Johan Dahlin <johan@gnome.org>
4318 * giscanner/Makefile.am:
4320 * giscanner/gidlparser.py:
4321 * giscanner/gidlwriter.py:
4322 * giscanner/girwriter.py:
4323 * giscanner/glibast.py:
4324 * giscanner/glibtransformer.py:
4325 * giscanner/transformer.py:
4326 Split out nodes to ast.py and glibast.py
4328 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4330 * giscanner/Makefile.am:
4331 * giscanner/gidlparser.py:
4332 * giscanner/gidlwriter.py:
4333 * giscanner/girwriter.py:
4334 * giscanner/glibtransformer.py:
4335 * giscanner/gobjecttreebuilder.py:
4336 * giscanner/transformer.py:
4337 * giscanner/treebuilder.py:
4338 * tools/g-ir-scanner:
4339 Rename treebuilder to transformer and
4340 gobjectreebuilder to glibtransformer.
4342 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4344 * giscanner/Makefile.am:
4345 * giscanner/__init__.py:
4346 * giscanner/cgobject.py:
4347 * giscanner/gidlparser.py:
4348 * giscanner/gidlwriter.py:
4349 * giscanner/girwriter.py:
4350 * giscanner/gobjecttreebuilder.py:
4351 * giscanner/odict.py:
4352 * giscanner/sourcescanner.py:
4353 * giscanner/treebuilder.py:
4354 * giscanner/xmlwriter.py:
4355 * tools/Makefile.am:
4356 * tools/g-ir-scanner:
4357 Add LGPLv2 license header and install all python files
4359 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4362 * giscanner/gidlwriter.py:
4363 * giscanner/giscannermodule.c (pygi_source_directive_new),
4364 (directive_get_options), (pygi_source_symbol_new),
4365 (symbol_get_base_type), (pygi_source_type_new),
4366 (type_get_base_type), (type_get_child_list),
4367 (pygi_source_scanner_get_symbols),
4368 (pygi_source_scanner_get_directives):
4369 * giscanner/gobjecttreebuilder.py:
4370 * giscanner/sourcescanner.py:
4371 * giscanner/treebuilder.py:
4372 * tests/parser/foo-object.h:
4373 Add support for virtual methods.
4374 Pair struct FooClass with struct Foo.
4375 Clean up the SourceScanner bindings a bit.
4376 Add a testcase for virtual methods.
4378 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4380 * giscanner/cgobject.py:
4381 * giscanner/gidlwriter.py:
4382 * giscanner/gobjecttreebuilder.py:
4383 Add support for signals
4385 * tests/parser/foo.c (foo_object_class_init):
4386 * Foo-expected.gidl:
4387 Add a signal and update the expected output.
4389 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
4391 * giscanner/gidlwriter.py:
4392 * giscanner/girwriter.py:
4393 * giscanner/giscannermodule.c (directive_get_name),
4394 (directive_get_value), (directive_get_options),
4395 (symbol_get_directives), (symbol_set_directives),
4396 (pygi_source_scanner_parse_file),
4397 (pygi_source_scanner_lex_filename),
4398 (pygi_source_scanner_get_directives), (init_giscanner):
4399 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
4400 * giscanner/sourcescanner.h:
4401 * giscanner/sourcescanner.py:
4402 * giscanner/treebuilder.py:
4403 * tools/g-ir-scanner:
4404 Add support for source/header annotations.
4406 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4408 * giscanner/gidlwriter.py:
4409 * giscanner/girwriter.py:
4410 * giscanner/gobjecttreebuilder.py:
4411 * giscanner/treebuilder.py:
4412 Add support for Callbacks
4414 2008-04-22 Havoc Pennington <hp@pobox.com>
4416 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
4417 not in metadata->module, look for it in the global module, in case
4418 some other object or the app itself provides the symbol.
4420 2008-04-22 Havoc Pennington <hp@pobox.com>
4422 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
4423 dlopening a library that is already in the main app, by checking
4424 whether one of the lib's symbols is already loaded.
4426 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4428 * tests/parser/Foo-expected.gidl:
4429 * tests/parser/foo-object.h:
4432 2008-04-22 Havoc Pennington <hp@pobox.com>
4434 * girepository/ginfo.c (g_interface_info_find_method):
4435 Use interface_blob_size not object_blob_size to compute offset.
4437 2008-04-22 Havoc Pennington <hp@pobox.com>
4439 * girepository/gmetadata.c (_g_metadata_init): remove
4440 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
4441 (Glade and Clutter for example) rely on being loaded globally.
4443 2008-04-22 Havoc Pennington <hp@pobox.com>
4445 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
4446 function to get the GType given a RegisteredTypeInfo
4448 2008-04-22 Johan Dahlin <johan@gnome.org>
4450 * COPYING: Add a LGPL license, to prevent automake to
4451 put in a copy of GPL here. Pointed out by Havoc.
4453 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
4454 (g_type_info_is_pointer), (g_type_info_get_tag),
4455 (g_type_info_get_param_type), (g_type_info_get_interface),
4456 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
4457 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4458 (g_error_domain_info_get_codes), (g_enum_info_get_value),
4459 (g_object_info_get_interface), (g_object_info_get_field),
4460 (g_interface_info_get_prerequisite),
4461 (g_signal_info_get_class_closure), (g_constant_info_get_value):
4462 * girepository/ginvoke.c (get_ffi_type):
4463 * girepository/girepository.h:
4464 * girepository/gmetadata.c (g_metadata_get_dir_entry),
4465 (g_metadata_check_sanity), (validate_header),
4466 (validate_array_type_blob), (validate_iface_type_blob),
4467 (validate_param_type_blob), (validate_error_type_blob),
4468 (validate_type_blob), (validate_constant_blob),
4469 (validate_struct_blob), (validate_enum_blob):
4470 * girepository/gmetadata.h:
4471 * tests/Makefile.am:
4472 * tests/invoke/Makefile.am:
4473 * tests/invoke/invoke.c (main):
4474 * tests/roundtrips.sh:
4475 * tools/Makefile.am:
4476 * tools/compiler.c (format_output), (write_out_metadata), (main):
4477 * tools/generate.c (write_type_name), (write_type_info),
4478 (write_constant_value), (write_enum_info), (load_metadata), (main):
4479 * tools/gidlcompilercontext.c:
4480 * tools/gidlcompilercontext.h:
4481 * tools/gidlcompilerentrynode.c:
4482 * tools/gidlcompilerentrynode.h:
4483 * tools/gidlcompilertypenode.c:
4484 * tools/gidlcompilertypenode.h:
4485 * tools/gidlmodule.c (g_idl_module_build_metadata):
4486 * tools/gidlmodule.h:
4487 * tools/gidlnode.c (init_stats), (dump_stats),
4488 (g_idl_node_get_size), (g_idl_node_get_full_size),
4489 (g_idl_node_cmp), (g_idl_node_can_have_member),
4490 (g_idl_node_add_member), (g_idl_node_param_direction_string),
4491 (parse_int_value), (parse_uint_value), (parse_float_value),
4492 (parse_boolean_value), (find_entry_node), (find_entry),
4493 (serialize_type), (g_idl_node_build_metadata), (write_string):
4495 * tools/gidlparser.c (parse_type_internal):
4496 * tools/quote-file.sh:
4497 Revert revisions 157,149-148,136-129 and 120.
4498 Move back to using g-idl-generate to generate the metadata and
4499 avoids dependency on a c compiler.
4501 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4503 * giscanner/girwriter.py:
4504 * tools/g-ir-scanner:
4505 Add an initial GIR writer and a --format option to g-ir-scanner
4507 2008-04-21 Johan Dahlin <johan@gnome.org>
4509 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4510 gobject-2.0 and raise ImportError if not found.
4512 * giscanner/gidlparser.py:
4513 * giscanner/gidlwriter.py:
4514 * giscanner/gobjecttreebuilder.py:
4515 * tools/g-ir-scanner:
4516 Add a --include argument to include types from other idls.
4517 Add a minimalistic GIDL parser (just objects for now)
4518 Implement resolving of external type references and use it to
4519 resolve parent types, argument types and return types.
4521 2008-04-21 Johan Dahlin <johan@gnome.org>
4523 * giscanner/gidlwriter.py:
4524 * giscanner/gobjecttreebuilder.py:
4525 * giscanner/treebuilder.py:
4526 Add support for properties.
4527 Refactor Class/Interface support a bit, to share more code and
4528 always initialize their method attribute to an empty list.
4530 2008-04-21 Johan Dahlin <johan@gnome.org>
4532 * giscanner/cgobject.py:
4533 Add a workaround for a glib bug interface introspection bug
4534 (object_interface_list_properties, object_class_list_properties):
4535 Cast the return value to GParamSpec.
4537 * tests/parser/Foo-expected.gidl: Update
4538 * tests/parser/foo.c: Add a string property
4540 * giscanner/gobjecttreebuilder.py:
4541 After stripping namespaces, remove the original
4542 item to avoid duplication (GtkButton struct and Button object)
4544 2008-04-21 Johan Dahlin <johan@gnome.org>
4546 * giscanner/gobjecttreebuilder.py:
4547 * giscanner/treebuilder.py:
4548 Strip namespaces before objects, so we'll export
4549 GtkButton as Button in the gtk namespace
4551 2008-04-21 Johan Dahlin <johan@gnome.org>
4553 * giscanner/gidlwriter.py:
4554 * giscanner/gobjecttreebuilder.py:
4555 * giscanner/treebuilder.py:
4556 Add constructors for object/boxed types.
4558 2008-04-21 Johan Dahlin <johan@gnome.org>
4560 * giscanner/gidlwriter.py:
4561 * giscanner/gobjecttreebuilder.py:
4562 Add support for boxed types
4564 2008-04-21 Johan Dahlin <johan@gnome.org>
4566 * giscanner/giscannermodule.c: Mark structures as const,
4567 wrap SourceType.const_string.
4569 * tests/parser/foo-object.h: Add a couple of constants.
4571 * giscanner/gidlwriter.py:
4572 * giscanner/gobjecttreebuilder.py:
4573 * giscanner/treebuilder.py:
4574 Add basic support for interfaces
4576 * tools/g-ir-scanner:
4577 Add -o/--output for writing to a file
4579 2008-04-21 Havoc Pennington <hp@redhat.com>
4581 * TODO: add some C API wishlist items I could think of quickly
4583 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4585 * giscanner/gidlwriter.py:
4586 * giscanner/xmlwriter.py:
4587 Add a simple api for writing tags which can be used
4588 with the new 'with statement' in python 2.5
4590 2008-04-21 Johan Dahlin <johan@gnome.org>
4592 * giscanner/gobjecttreebuilder.py:
4593 Strip namespace and object prefix from method names.
4595 2008-04-21 Johan Dahlin <johan@gnome.org>
4597 * tools/g-ir-scanner (main): Add --pkg option to pass in
4598 pkg-config modules to get cflags from.
4600 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4601 Avoid duplication, reuse function writer for methods.
4603 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4605 * giscanner/gidlwriter.py:
4606 * giscanner/gobjecttreebuilder.py:
4607 * giscanner/treebuilder.py:
4608 * tools/g-ir-scanner:
4609 Resolve libtool .la files.
4610 Strip name spaces for methods.
4611 Add function symbols
4613 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4615 * giscanner/cgobject.py:
4616 * giscanner/gidlwriter.py:
4617 * giscanner/gobjecttreebuilder.py:
4618 * giscanner/treebuilder.py:
4619 Add support for classes and methods
4621 2008-04-20 Johan Dahlin <johan@gnome.org>
4623 * giscanner/gidlwriter.py:
4624 * giscanner/gobjecttreebuilder.py:
4625 * giscanner/odict.py:
4626 Avoid conflicts, keep the output ordered similar to
4627 the order of the input.
4628 Add a simple ordered dictionary implemenation
4630 2008-04-19 Johan Dahlin <johan@gnome.org>
4632 * giscanner/cgobject.py:
4633 * giscanner/gidlwriter.py:
4634 * giscanner/gobjecttreebuilder.py:
4635 * tools/g-ir-scanner:
4636 Start introspecting get-type functions.
4637 Implement support for GLib/GFlags GTypes.
4638 Add a ctype based GObject binding.
4640 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4642 * giscanner/gidlwriter.py:
4643 * giscanner/xmlwriter.py:
4644 * tools/g-ir-scanner:
4645 Add a simplistic gidl writer, which can't do too much.
4647 2008-04-18 Johan Dahlin <johan@gnome.org>
4649 * giscanner/sourcescanner.py:
4650 * giscanner/treebuilder.py:
4651 * tools/g-ir-scanner:
4652 split tree building and source scanning interface to separate files.
4654 2008-04-18 Johan Dahlin <johan@gnome.org>
4656 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4658 - Add support for struct/parameter/return, start parsing of ctypes
4660 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4663 2008-03-31 Johan Dahlin <johan@gnome.org>
4665 * tools/g-ir-scanner:
4666 Start to build abstract syntax node of scanned sources.
4667 Add support for cpp options.
4669 2008-03-27 Johan Dahlin <johan@gnome.org>
4671 * giscanner/giscannermodule.c:
4672 * giscanner/scannerlexer.l:
4673 * giscanner/sourcescanner.c:
4674 * tools/g-ir-scanner:
4676 Add simple pre-processor using subprocess and a PIPE.
4677 Change the parse_file apis to accept a file descriptor.
4679 2008-03-25 Johan Dahlin <johan@gnome.org>
4681 * giscanner/__init__.py:
4682 * tools/g-ir-scanner:
4683 Fix a typo and add an example python test program.
4685 2008-03-25 Johan Dahlin <johan@gnome.org>
4687 * giscanner/__init__.py:
4688 * giscanner/giscannermodule.c:
4689 * giscanner/sourcescanner.c:
4690 * giscanner/sourcescanner.h:
4691 Add constants and wrap a few more SymbolType fields
4693 2008-03-25 Johan Dahlin <johan@gnome.org>
4697 * giscanner/__init__.py:
4698 * giscanner/giscannermodule.c:
4699 * giscanner/Makefile.am:
4701 Add initial python bindings for the scanner and
4702 depend on python 2.5.
4704 2008-03-25 Johan Dahlin <johan@gnome.org>
4708 * giscanner/Makefile.am:
4709 * giscanner/sourcescanner.c:
4710 * giscanner/sourcescanner.h:
4711 * tools/Makefile.am:
4712 * tools/grealpath.h:
4713 * tools/sourcescanner.c:
4714 * tools/sourcescanner.h:
4716 Move the scanner to a separate library.
4718 2008-03-23 Johan Dahlin <johan@gnome.org>
4720 * tools/Makefile.am:
4723 * tools/scannerlexer.l:
4724 * tools/scannerparser.y:
4725 * tools/sourcescanner.c:
4726 * tools/sourcescanner.h:
4727 Split out the source scanner from the generator.
4728 Rename the symbols used in the scanner to use the gi_ prefix.
4729 This should make it possible to use the raw C parser from
4732 2008-03-23 Johan Dahlin <johan@gnome.org>
4734 * tests/parser/Makefile.am (utility.gidl):
4735 * tests/parser/utility-expected.gidl:
4736 Pass in the gobject.gidl since we're defining a GObject.
4738 2008-03-12 Johan Dahlin <johan@gnome.org>
4740 * relaxng/relaxng.rng:
4741 Add a releaxng in relaxng we can use to validate the relaxngs
4744 2008-03-12 Jürg Billeter <j@bitron.ch>
4746 * tools/scanner.c: (g_igenerator_new):
4747 * tools/scannerparser.y:
4748 Fix compiler warnings.
4750 2008-03-12 Jürg Billeter <j@bitron.ch>
4754 * tools/scannerparser.y:
4755 Start fixing memory management in g-idl-scanner.
4757 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4759 * tools/gidlcompilercontext.c: (write_compiled):
4760 Fix critical warning when no shlib passed to g-idl-compiler.
4762 2008-03-12 Johan Dahlin <johan@gnome.org>
4764 * tests/parser/utility-expected.gidl:
4765 * tests/parser/utility.h:
4766 Add a get_type-function, so the scanner actually
4767 parses it as an object.
4769 2008-03-12 Johan Dahlin <johan@gnome.org>
4771 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4774 * tests/parser/Foo-expected.gidl:
4775 * tests/parser/Makefile.am:
4776 * tests/parser/foo-object.h:
4777 * tests/parser/foo.c:
4778 * tests/parser/utility-expected.gidl:
4779 * tests/parser/utility.c:
4780 * tests/parser/utility.h:
4782 Add a new gidl test. 'utility.gidl', which is used to be able
4783 to test external type references. Add a reference to UtilityObject*
4786 2008-03-11 Johan Dahlin <johan@gnome.org>
4790 Remove most global variables
4792 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4794 * tools/scannerlexer.l:
4796 * tests/parser/Foo-expected.gidl:
4797 * tests/parser/foo.c:
4798 * tests/parser/Makefile.am:
4799 * tests/parser/foo-object.h:
4801 Added a few extra tests. Which resulted in finding a few
4802 bugs. Which resulted in me fixing those bugs
4804 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4806 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4807 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4808 Add some comments for strings into generated output for
4811 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4813 * tools/gidlcompilercontext.c: (write_compiled):
4814 Write out the shlibs variable before writing out the strings
4815 length. Fixes compiler warning when using '-l' flag with
4818 2008-03-11 Johan Dahlin <johan@gnome.org>
4820 * tests/parser/Foo-expected.gidl:
4821 * tests/parser/foo-object.h:
4824 * tools/scannerlexer.l:
4825 Add support for parsing return arguments. Add support for
4826 caller-owns return types.
4827 Patch by Philip Van Hoof.
4829 * tools/scannerparser.y:
4830 Remove parsing of the @deprecated syntax used in headers.
4831 We will support gtk-doc deprecation in the future instead.
4833 2008-03-11 Johan Dahlin <johan@gnome.org>
4835 * tools/compiler.c (main): Coding style fixes
4837 2008-03-10 Johan Dahlin <johan@gnome.org>
4840 Add GCOV_LIBS to GILIBS
4842 2008-03-10 Johan Dahlin <johan@gnome.org>
4844 * tests/parser/Foo-expected.gidl:
4845 * tests/parser/foo.c:
4846 Rename null-ok to direction=out
4848 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4850 reviewed and extensively tested by Johan
4852 * tests/parser/Foo-expected.gidl:
4853 * tests/parser/foo-object.h:
4854 * tests/parser/foo.c:
4857 * tools/gidlwriter.c:
4860 * tools/scannerlexer.l:
4861 * tools/scannerparser.y:
4863 Add support for scanning for gtk-doc comments inside
4864 C source files. Add tests
4866 2008-03-10 Johan Dahlin <johan@gnome.org>
4868 * tests/parser/Makefile.am:
4869 * tests/parser/foo.c:
4872 * tools/scannerparser.y:
4873 Add an api to lex filenames.
4874 Lex all source .c files passed in on the command line.
4875 Scan sources in a test and a couple of private structures
4876 which should not be included in the generated gidl
4878 2008-03-10 Johan Dahlin <johan@gnome.org>
4880 * tests/invoke/Makefile.am: Make the generated metadata
4881 depend on the g-idl-compiler
4883 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4885 * tools/gidlmodule.c
4886 * tools/gidlmodule.h
4889 Remove the old g-idl-compiler code.
4892 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4894 * tools/quote-file.sh
4897 Move to using the 'C' struct compiler code.
4899 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4901 * girepository/ginfo.c
4903 Change the way that external references with no namespace
4904 are dealt with. External references with no namespace
4905 are placed into the XML as-if they are a local reference.
4906 This is temporary, but helps with roundtrip tests.
4908 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4910 * girepository/ginfo.c
4911 Add the ability to get the value of a constant of
4912 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4913 is provided as a string.
4915 This would deal properly with:
4916 typedef char* random;
4917 const random = "A string";
4919 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4921 * girepository/ginfo.c
4922 * girepository/girepository.h
4924 Add a function to check if an enum is registered or not.
4925 Previously anything testing this relied on the g-type
4926 string offset having a value of 0.
4928 * girepository/gmetadata.c
4929 * girepository/gmetadata.h
4931 Remove unneccesary or erroneous checks. There were two
4932 metadata validation checks which made sure that the blob
4933 sizes were the same as some magic numbers compiled into the code.
4934 This is wrong as it breaks any forwards compatibility that may
4937 Checks were also present that made sure that unregistered type
4938 blobs had a value of 0 in the g-type offset field. This is
4939 unneccessary. If a type blob is unregistered then any value
4940 in its g-type field is simply invalid.
4942 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4944 * girepository/ginfo.c
4945 * girepository/gmetadata.c
4946 * girepository/gmetadata.h
4948 Change the metadata format to have a standard header
4949 for all the type blobs. Merge the SimpleTypeBlob
4950 and InterfaceTypeBlob into a union. A union of these
4951 two blobs existed previously but was not explicit
4952 in the metadata format.
4954 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4956 * tools/gidlcompilercontext.c
4957 * tools/gidlcompilercontext.h
4958 * tools/gidlcompilerentrynode.c
4959 * tools/gidlcompilerentrynode.h
4960 * tools/gidlcompilertypenode.c
4961 * tools/gidlcompilertypenode.h
4963 Add code to compile a tree of GIdlNodes to
4964 a 'C' struct representing the metadata.
4965 This is to aid cross-compiling. Previously
4966 the g-idl-compiler created a binary blob with
4967 data written in the byte order and alignment
4968 of the tool rather than the intended target.
4970 Cleaned up and improved by Johan and Robert :-)
4972 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4974 * girepository/ginvoke.c
4975 * girepository/girepository.h
4976 * girepository/gmetadata.c
4977 * girepository/gmetadata.h
4979 * tools/gidlparser.c
4980 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4981 to avoid confusion with the interface blob.
4984 * tools/gidlparser.c
4985 Remove magic numbers and replace with type-tag
4986 enumeration symbols.
4988 * girepository/gmetadata.c
4989 Add validate declaration.
4991 2008-03-10 Jürg Billeter <j@bitron.ch>
4993 * tools/gidlparser.c: (parse_type_internal):
4994 * tools/scannerlexer.l:
4995 * tools/scannerparser.y:
4996 Support C99 _Bool type in scanner.
4998 2008-03-10 Jürg Billeter <j@bitron.ch>
5000 * tests/parser/Foo-expected.gidl:
5001 * tests/parser/foo-object.h:
5002 * tests/parser/foo.c: (foo_enum_method):
5003 * tools/scanner.c: (g_igenerator_process_function_symbol):
5004 Don't skip functions that are defined in the namespace of a type
5005 that doesn't support methods, as for example enums.
5007 2008-03-10 Johan Dahlin <johan@gnome.org>
5009 * gidl.dtd: Remove, we're using relaxng for now
5011 * tests/parser/Foo-expected.gidl:
5012 * tests/parser/foo-object.h:
5013 * tests/parser/foo.c:
5014 Rename the enum/flags get_type functions to include the whole type.
5016 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
5018 * tools/gidlwriter.c (enum_generate): added "type-name",
5019 "get-type" and "deprecated" missing arguments.
5020 * tests/parser/Foo-expected.gidl:
5021 * tests/parser/foo-object.h: test enum type, and no type.
5023 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
5026 Consistent checks, add missing 'test'
5028 2008-03-05 Havoc Pennington <hp@redhat.com>
5030 * configure.ac: Take advantage of a libffi.pc if one exists, as it
5031 does on Fedora 8. Make libffi a hard requirement, since it was in
5032 practice anyway (was not really conditional in the code or
5033 makefile, only in configure).
5035 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
5037 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
5038 reviewed by: Johan Dahlin <johan@gnome.org>
5040 * tests/Makefile.am:
5041 * tests/roundtrips.sh:
5042 Modify the roundtrips test so that they do not use the
5043 --raw option of the gidl compiler but instead compile a
5044 shared library to use with g_module.
5046 * tests/invoke/Makefile.am:
5047 * tests/invoke/invoke.c:
5048 Modify the invoke tests to build a shared library rather
5049 than use the --raw option.
5051 * tests/invoke/invoke-namespace-find.sh: Removed:
5052 Noone knows why this was here, so removed.
5054 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
5056 * tools/scanner.c: (g_igenerator_process_function_symbol):
5057 Move g_idl_node_can_have_member test later, as it broke spotting
5058 get_type's for nodes that can't have members.
5060 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5063 * tools/gidlnode.c: (g_idl_node_can_have_member):
5064 Add g_idl_node_can_have_member.
5066 * tools/scanner.c: (g_igenerator_process_function_symbol):
5067 Use g_idl_node_can_have_member to test if we should add a function
5068 as a member of the type node.
5070 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5072 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
5074 * tests/parser/Makefile.am:
5075 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
5077 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5079 * tools/scanner.c: (main):
5080 Ignore -pthread when passed to g-idl-scanner.
5082 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5084 * tools/grealpath.h: Added:
5085 * tools/scanner.c: (main):
5086 * tools/scannerlexer.l:
5087 * tools/Makefile.am:
5088 Always use absolute paths with symbolic links resolved when
5089 comparing filenames.
5091 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5093 * gobject-introspection.pc.in:
5094 Provide variables for g-idl-parser, scanner and compiler in the
5097 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
5100 * girepository/Makefile.am:
5101 * tools/Makefile.am:
5102 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
5104 2008-02-10 Johan Dahlin <johan@gnome.org>
5106 * tests/parser/Foo-expected.gidl:
5107 * tests/parser/foo-object.h:
5108 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
5109 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
5112 2008-02-10 Johan Dahlin <johan@gnome.org>
5114 * tests/parser/Foo-expected.gidl:
5115 * tests/parser/foo-object.h:
5116 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
5117 Add enum and flags test.
5119 2008-02-10 Johan Dahlin <johan@gnome.org>
5123 * girepository/Makefile.am:
5124 Make 'make distcheck' work again.
5126 2008-02-10 Johan Dahlin <johan@gnome.org>
5128 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
5131 * tests/parser/Makefile.am: Only create Foo.gidl when running make
5132 check, eg exclude it from BUILT_SOURCES.
5134 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5139 * girepository/Makefile.am:
5140 * m4/Makefile.am: Added:
5141 * m4/as-compiler-flag.m4: Added:
5142 * m4/gcov.m4: Added:
5143 * tools/Makefile.am:
5144 Add ability to generate a coverage report.
5145 Adds configure option --enable-gcov and make rule 'check-coverage'.
5147 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5151 * gidl/Makefile.am: Added:
5152 * girepository/Makefile.am: Added:
5153 * src/Makefile.am: Renamed to tools/Makefile.am:
5154 * src/compiler.c: Renamed to tools/compiler.c:
5155 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
5156 * src/generate.c: Renamed to tools/generate.c:
5157 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
5158 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
5159 * src/gidlnode.c: Renamed to tools/gidlnode.c:
5160 * src/gidlnode.h: Renamed to tools/gidlnode.h:
5161 * src/gidlparser.c: Renamed to tools/gidlparser.c:
5162 * src/gidlparser.h: Renamed to tools/gidlparser.h:
5163 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
5164 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
5165 * src/ginfo.c: Renamed to girepository/ginfo.c:
5166 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
5167 * src/girepository.c: Renamed to girepository/girepository.c:
5168 * src/girepository.h: Renamed to girepository/girepository.h:
5169 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
5170 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
5171 * src/scanner.c: Renamed to tools/scanner.c:
5172 * src/scanner.h: Renamed to tools/scanner.h:
5173 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
5174 * src/scannerparser.y: Renamed to tools/scannerparser.y:
5175 * tests/invoke/Makefile.am:
5176 Split src/ into girepository/ and tools/
5180 * girepository/Makefile.am:
5181 * tests/Makefile.am:
5182 * tests/invoke/Makefile.am:
5183 * tests/parser/Makefile.am:
5184 * tests/roundtrips.sh:
5185 * tools/Makefile.am:
5186 Make distcheck work.
5188 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
5190 * tests/invoke/invoke.c: (main):
5191 * tests/invoke/testfns.c: (test6), (test7):
5192 * tests/invoke/testfns.xml:
5193 Add tests for invokation with a GList argument.
5194 Also tests caller-owns return values.
5196 2008-02-04 Rob Taylor <robtaylor@floopily.org>
5199 Add some documentation for GICallableInfo
5201 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
5204 Correct syntax errors in the DTD file.
5206 * relaxng/c-types.xml:
5207 * relaxng/g-types.xml:
5209 Add a RelaxNG specification for the GObject Introspection XML data.
5210 The Specification has validated all of the test files.
5212 2008-01-25 Rob Taylor <robtaylor@floopily.org>
5214 * tests/roundtrips.sh:
5215 * tests/struct.test:
5216 Add roundtrip tests for structs.
5218 2008-01-11 Johan Dahlin <johan@gnome.org>
5220 * src/scanner.c (g_igenerator_process_function_symbol):
5221 Refactor out g_idle_node_add_member.
5222 (create_node_from_gtype, create_node_from_ctype):
5223 Use case instead of if...else
5224 (get_type_from_type_id):
5225 Rename to create_node_from_gtype
5226 (get_type_from_ctype):
5227 Rename to create_node_from_ctype
5229 Rename ginode -> node, gitype -> type, gifunc -> func.
5231 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
5232 Two new functions, refactor out of scanner.c
5234 * src/scanner.c: (g_igenerator_process_function_symbol):
5235 * src/scannerlexer.l:
5236 Do not save the content of the deprecated variable, only
5239 2008-01-11 Johan Dahlin <johan@gnome.org>
5241 * tests/parser/foo-object.h: Add a couple of comment parser tests.
5243 2008-01-11 Jürg Billeter <j@bitron.ch>
5245 * src/scannerlexer.l:
5246 Fix GTK-Doc parsing.
5248 2008-01-11 Jürg Billeter <j@bitron.ch>
5250 * src/scannerlexer.l:
5251 Fix GTK-Doc parsing.
5253 2008-01-11 Jürg Billeter <j@bitron.ch>
5255 * src/scanner.c: (lookup_symbol):
5256 Return unresolved name if we find unknown symbol.
5258 2008-01-11 Jürg Billeter <j@bitron.ch>
5260 * src/scanner.c: (g_igenerator_generate):
5261 Initialize GObject to fix scanning interface properties.
5263 * tests/parser/Foo-expected.gidl:
5264 * tests/parser/foo-object.h:
5265 * tests/parser/foo.c: (foo_interface_get_type):
5266 Test interfaces with GObject prerequisite.
5268 * tests/parser/Makefile.am:
5269 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
5271 2007-12-27 Johan Dahlin <johan@gnome.org>
5273 * src/scannerlexer.l:
5274 Parse gtk-doc comments.
5276 * src/gidlwriter.c: (function_generate):
5277 Reorganize, avoid duplication and add support for
5278 writing deprecated functions.
5280 * src/scannerparser.y:
5282 Add new structure CDirective and functions to create/free them.
5284 * src/scanner.c: (g_igenerator_process_function_symbol),
5285 (g_igenerator_process_unregistered_struct_typedef),
5286 (g_igenerator_process_struct_typedef),
5287 (g_igenerator_process_union_typedef),
5288 (g_igenerator_process_enum_typedef),
5289 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
5290 (g_igenerator_start_preprocessor):
5291 Parse @deprecated directive for functions.
5292 Remove some more C99isms.
5293 Send in -C to cpp to avoid stripping comments.
5295 * tests/parser/foo-object.h:
5296 * tests/parser/Foo-expected.gidl:
5297 Add deprecated directive
5299 2007-12-27 Johan Dahlin <johan@gnome.org>
5301 * src/scannerlexer.l (intsuffix): Add emacs mode line and
5302 escape ' and " so it looks more like C.
5305 Unlink temporary file used.
5307 2007-12-27 Johan Dahlin <johan@gnome.org>
5309 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
5310 (g_igenerator_start_preprocessor), (main):
5312 * src/scannerparser.y:
5313 Plug a couple of simple memory leaks.
5315 2007-12-27 Johan Dahlin <johan@gnome.org>
5317 * src/scanner.c: (g_igenerator_parse_macros),
5318 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
5321 * src/scannerparser.y:
5322 * tests/parser/Makefile.am:
5324 Improve error reporting, return when the preprocessor fails.
5325 Add a verbose parameter, to aid debugging.
5326 Revert to using a temporary file to communicate between the
5327 preprocessor and the parser, because we need to wait for
5328 the exit code from the pre-processor before starting to parse.
5330 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
5332 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
5333 cparser.y to scannerparser.y
5335 2007-12-11 Johan Dahlin <johan@gnome.org>
5339 * src/scanner.c: (g_igenerator_new):
5341 Get rid of the global the_generator variable.
5343 2007-12-10 Johan Dahlin <johan@gnome.org>
5345 * src/scanner.c (main): Add an output option,
5346 add checks for required parameters
5349 set BUILD_SOURCES and CLEANFILES properly
5351 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
5352 (g_writer_write_indent), (g_writer_write_unindent),
5353 (field_generate), (value_generate), (constant_generate),
5354 (property_generate), (function_generate), (vfunc_generate),
5355 (signal_generate), (interface_generate), (struct_generate),
5356 (union_generate), (boxed_generate), (enum_generate),
5357 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
5359 * src/scanner.c: (g_igenerator_generate):
5361 * src/scannerwriter.c:
5363 Refactor scannerwriter to only be tied to a GIdlModule and move
5364 it (again!) to gidlwriter.c. Change the writer function to take
5367 2007-12-10 Johan Dahlin <johan@gnome.org>
5370 * src/scanner.c: (g_igenerator_generate):
5372 * src/scannerwriter.c: (g_igenerator_write_inline),
5373 (g_igenerator_write), (g_igenerator_write_indent),
5374 (g_igenerator_write_unindent), (field_generate), (value_generate),
5375 (constant_generate), (property_generate), (function_generate),
5376 (vfunc_generate), (signal_generate), (interface_generate),
5377 (struct_generate), (union_generate), (boxed_generate),
5378 (enum_generate), (node_generate), (module_generate),
5379 (g_scanner_write_file):
5381 Move the scanner gidl writing to a separate source file.
5383 2007-12-10 Johan Dahlin <johan@gnome.org>
5388 Move over all CType construction functions.
5390 * tests/parser/Makefile.am:
5391 Be verbose when printing parsing tests results.
5393 2007-12-10 Johan Dahlin <johan@gnome.org>
5395 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
5396 preprocessor handling to here. Start cpp insteado of cc -E,
5397 always include -U__GNUC__, since it's specific to the preprocessor
5400 * tests/parser/Makefile.am (check-local): Silent diff and skip
5401 -U__GNUC__ which is always defined now
5403 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
5405 reviewed by: <delete if not using a buddy>
5407 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
5408 * tests/parser/Makefile.am:
5410 2007-12-09 Johan Dahlin <johan@gnome.org>
5413 Use GOption for command line options.
5414 (g_igenerator_new, main): Simplify constructor and they way
5415 parameters are passed into it.
5421 * src/gen-introspect.c:
5422 * src/gen-introspect.h:
5424 Rename gen-introspect.[ch] to scanner.[ch]
5426 2007-12-09 Johan Dahlin <johan@gnome.org>
5430 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
5431 don't make the repository library and the other utilites link against
5434 * src/gen-introspect.c: (g_igenerator_create_object),
5435 (g_igenerator_create_interface), (g_igenerator_create_boxed),
5436 (g_igenerator_create_enum), (g_igenerator_create_flags),
5437 (g_igenerator_process_module_symbol),
5438 (g_igenerator_process_module), (g_igenerator_generate), (main):
5439 * src/gen-introspect.h:
5440 Refactor g_igenerator_process_types into smaller pieces.
5442 * tests/parser/Makefile.am:
5443 Depend on the gen-introspect binary
5445 2007-12-09 Johan Dahlin <johan@gnome.org>
5447 * src/gen-introspect.c (g_igenerator_process_types):
5448 Break into smaller pieces, one for each generated node type.
5450 2007-12-08 Johan Dahlin <johan@gnome.org>
5452 * src/gen-introspect.c: (g_igenerator_process_types),
5453 (g_igenerator_add_module):
5454 * tests/parser/Foo-expected.gidl:
5455 * tests/parser/foo-object.h:
5456 * tests/parser/foo.c: (foo_subobject_class_init),
5457 (foo_subobject_init):
5459 Add a subobject test and make sure to register defined classes
5460 in the lookup symbol hash table.
5462 2007-12-08 Johan Dahlin <johan@gnome.org>
5466 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
5467 (g_igenerator_process_types), (g_igenerator_add_module),
5468 (g_igenerator_add_include_idl), (main):
5469 * src/gen-introspect.h:
5470 * tests/parser/Makefile.am:
5471 * tests/parser/Foo-expected.gidl:
5473 Change the gen-introspect to generate namespaced module names,
5474 such as GLib.Object instead of GObject.
5475 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
5476 add a --include-idl parameter to gen-introspect,
5477 and update the parser test.
5479 2007-12-08 Johan Dahlin <johan@gnome.org>
5481 * src/gen-introspect.c:
5482 Move main to the end of the file and attempt to make it valid
5485 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
5486 we're not quite ready to generate metadata yet.
5491 Add a simple gen-introspect parser test
5493 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
5495 reviewed by: Johan Dahlin <johan@gnome.org>
5498 * gobject-introspection.pc.in:
5500 * src/compiler.c: (format_output), (write_out_metadata), (main):
5501 * src/gen-introspect.c: (main):
5502 * src/gen-introspect.h:
5503 * src/generate.c: (write_callable_info), (write_repository),
5504 (load_metadata), (main):
5505 * src/gidlmodule.c: (g_idl_module_new),
5506 (g_idl_module_build_metadata):
5508 * src/gidlparser.c: (start_element_handler):
5509 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5510 (g_base_info_get_name), (g_base_info_get_namespace),
5511 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5512 (g_base_info_get_metadata), (g_function_info_get_symbol),
5513 (g_function_info_get_flags), (g_function_info_get_property),
5514 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5515 (g_callable_info_may_return_null),
5516 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5517 (g_callable_info_get_arg), (g_arg_info_get_direction),
5518 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5519 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5520 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5521 (g_type_info_get_tag), (g_type_info_get_param_type),
5522 (g_type_info_get_interface), (g_type_info_get_array_length),
5523 (g_type_info_is_zero_terminated),
5524 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5525 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5526 (g_value_info_get_value), (g_field_info_get_flags),
5527 (g_field_info_get_size), (g_field_info_get_offset),
5528 (g_registered_type_info_get_type_name),
5529 (g_registered_type_info_get_type_init),
5530 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5531 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5532 (find_method), (g_struct_info_find_method),
5533 (g_enum_info_get_n_values), (g_enum_info_get_value),
5534 (g_object_info_get_parent), (g_object_info_get_type_name),
5535 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5536 (g_object_info_get_interface), (g_object_info_get_n_fields),
5537 (g_object_info_get_field), (g_object_info_get_n_properties),
5538 (g_object_info_get_property), (g_object_info_get_n_methods),
5539 (g_object_info_get_method), (g_object_info_find_method),
5540 (g_object_info_get_n_signals), (g_object_info_get_signal),
5541 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5542 (g_object_info_get_n_constants), (g_object_info_get_constant),
5543 (g_interface_info_get_n_prerequisites),
5544 (g_interface_info_get_prerequisite),
5545 (g_interface_info_get_n_properties),
5546 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5547 (g_interface_info_get_method), (g_interface_info_find_method),
5548 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5549 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5550 (g_interface_info_get_n_constants),
5551 (g_interface_info_get_constant), (g_property_info_get_flags),
5552 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5553 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5554 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5555 (g_constant_info_get_value), (g_union_info_get_n_fields),
5556 (g_union_info_get_field), (g_union_info_get_n_methods),
5557 (g_union_info_get_method), (g_union_info_is_discriminated),
5558 (g_union_info_get_discriminator_offset),
5559 (g_union_info_get_discriminator):
5560 * src/ginvoke.c: (g_function_info_invoke):
5561 * src/girepository.c: (g_irepository_register),
5562 (g_irepository_unregister), (g_irepository_get_default),
5563 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5564 (g_irepository_get_info), (g_irepository_find_by_name),
5565 (g_irepository_get_shared_library),
5566 (g_irepository_build_search_path), (g_irepository_register_file),
5567 (g_irepository_error_quark):
5568 * src/girepository.h:
5569 * src/gmetadata.c: (g_metadata_get_dir_entry),
5570 (g_metadata_check_sanity), (validate_header),
5571 (validate_array_type_blob), (validate_iface_type_blob),
5572 (validate_param_type_blob), (validate_error_type_blob),
5573 (validate_type_blob), (validate_arg_blob),
5574 (validate_signature_blob), (validate_function_blob),
5575 (validate_callback_blob), (validate_constant_blob),
5576 (validate_value_blob), (validate_field_blob),
5577 (validate_property_blob), (validate_signal_blob),
5578 (validate_vfunc_blob), (validate_struct_blob),
5579 (validate_enum_blob), (validate_object_blob),
5580 (validate_interface_blob), (validate_errordomain_blob),
5581 (validate_union_blob), (validate_blob), (validate_directory),
5582 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5583 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5584 (g_metadata_new_from_mapped_file), (g_metadata_free),
5585 (g_metadata_set_module), (g_metadata_get_namespace):
5587 * tests/Makefile.am:
5588 * tests/invoke/Makefile.am:
5589 * tests/invoke/invoke-namespace-find.sh:
5590 * tests/invoke/invoke.c: (main):
5592 Add a namespace/shared library mapping. fixes #313268.
5594 2007-12-03 Johan Dahlin <johan@gnome.org>
5596 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5599 2007-11-30 Jürg Billeter <j@bitron.ch>
5605 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5606 (g_igenerator_write_inline), (g_igenerator_write),
5607 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5608 (field_generate), (value_generate), (constant_generate),
5609 (property_generate), (function_generate), (vfunc_generate),
5610 (signal_generate), (interface_generate), (struct_generate),
5611 (union_generate), (boxed_generate), (enum_generate),
5612 (node_generate), (module_generate), (get_type_from_type_id),
5613 (str_replace), (g_igenerator_process_properties),
5614 (g_igenerator_process_signals), (g_igenerator_process_types),
5615 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5616 (g_igenerator_process_unregistered_struct_typedef),
5617 (g_igenerator_process_struct_typedef),
5618 (g_igenerator_process_union_typedef),
5619 (g_igenerator_process_enum_typedef),
5620 (g_igenerator_process_function_typedef),
5621 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5622 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5623 (g_igenerator_generate), (main), (csymbol_new),
5624 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5625 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5626 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5627 (eat_hspace), (eat_line), (read_identifier),
5628 (g_igenerator_parse_macros):
5629 * src/gen-introspect.h:
5631 Import gen-introspect to generate introspection information by
5634 2007-11-30 Jürg Billeter <j@bitron.ch>
5636 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5638 2007-11-30 Jürg Billeter <j@bitron.ch>
5640 * src/gidlparser.c: (end_element_handler): Don't leave requires
5643 2007-11-29 Johan Dahlin <johan@gnome.org>
5645 * src/gidlparser.c (parse_type_internal): Add char,
5646 gchar and guchar to the builtin types.
5648 2007-11-26 Johan Dahlin <johan@gnome.org>
5650 * src/ginfo.c: (g_object_info_get_type_name),
5651 (g_object_info_get_type_init):
5652 * src/girepository.c: (g_irepository_is_registered):
5653 * src/girepository.h:
5655 Add g_object_info_get_type_name, g_object_info_get_type_init and
5656 g_irepository_is_registered.
5658 2006-08-14 Jürg Billeter <j@bitron.ch>
5660 * src/gidlparser.c: (end_element_handler): Don't leave
5661 namespace and implements states too early.
5664 2007-11-26 Johan Dahlin <johan@gnome.org>
5666 * src/gmetadata.c (validate_struct_blob):
5667 pass blob_type to validate_function_blob instead of
5668 hard-coding BLOB_TYPE_STRUCT.
5670 Patch by Torsten Schoenfeld, fixes #314190
5672 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5674 * src/compiler.c, src/generate.c, src/gidlnode.c,
5675 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5676 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5677 warnings about return values, signedness mismatches, unused
5678 variables, and unhandles enum values in switch statements.
5680 * tests/invoke/Makefile.am: Don't install the invoke test program.
5681 Add -I ../../src to the cflags used for the test functions files.
5683 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5685 * src/girepository.h: Export g_invoke_error_quark.
5687 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5689 * src/ginvoke.c: Remove the fallback implementation of
5690 g_function_info_invoke since we now formally depend on libffi.
5692 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5694 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5695 Remove these files from cvs, as they are now generated.
5697 * src/gmetadata.c (validate_iface_type_blob): Don't
5698 complain if blob->pointer is not set, since that
5699 happens for enum and flag types. (#308935, Gustavo
5702 * Commit an autoconf-conversion patch by
5703 Gustavo Carneiro (#308708)
5705 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5707 * src/compiler.c (main): Use it here to validate
5708 the generated metadata.
5710 * src/gmetadata.[hc]: Add code to validate a
5713 * metadata-format.txt: Updates
5715 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5717 * tests/*: Add struct offsets to field and vfunc
5720 * src/generate.c (write_vfunc_info): Write offset
5721 information for vfuncs.
5723 * src/gidlnode.c (g_idl_node_build_metadata): Write
5724 the struct offsets into the metadata.
5726 * src/gidlparser.c: Parse the offset attributes of
5727 field and vfunc elements.
5729 * src/gidlnode.h: Add offset members to field and
5732 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5736 * gidl.dtd: Updates.
5738 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5739 file, creates, compiles and runs a C file, and folds the
5740 resulting struct offsets back into the .gidl file.
5742 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5744 * src/gidlparser.c (start_field): Make fields in objects
5747 * src/gidlmodule.c: Include string.h
5752 * metadata-format.txt: Cleanup basic types.
5753 * src/*: Adapt to the changes.
5754 * tests/*: Adapt to the changes.
5755 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5757 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5758 size for enum blobs.
5759 (g_idl_node_get_full_size): Report the correct size for
5762 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5763 error checking for blob sizes.
5765 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5767 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5768 interface types for which is_pointer is FALSE, e.g. enums.
5770 * src/gidlnode.c (g_idl_node_get_full_size)
5771 * src/gidlparser.c (parse_type_internal):
5772 * src/generate.c (write_type_info): Support unspecialized
5773 lists, hashtables and errors. Also emit a '*' after these.
5777 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5781 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5783 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5785 * src/*.c: Change the directory to be addressed by
5786 1-based indexes, and use an index of zero to mean
5789 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5791 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5793 * tests/union.test: Add a union test.
5795 * src/generate.c: Handle unions.
5797 * src/girepository.h:
5798 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5800 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5802 * src/gidlparser.c (start_union): Parse <union> elements.
5804 * src/gidlnode.h: Add a GIdlNodeUnion.
5806 * gidl.dtd: Add a <union> element.
5808 * src/gmetadata.c (g_metadata_check_sanity): Check
5811 * src/gmetadata.h: Add union_blob_size to Header,
5814 * metadata-format.txt: Add a UnionBlob.
5816 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5818 * tests/*: Update testcases.
5820 * src/generate.c (write_callable_info): Don't forget to
5821 write transfer and null-ok attributes for return types
5824 * src/girepository.h:
5825 * src/ginfo.c (g_callable_info_may_return_null):
5826 New function to find out if a function may return NULL.
5828 * src/compiler.c (format_output): Make the generated
5831 * README: Point to a recent libffi snapshot.
5833 * tests/invoke/*: Some invoke tests.
5835 * src/Makefile: Add ginvoke.c and the necessary
5838 * src/girepository.h (g_function_info_invoke): Add
5841 * src/ginvoke.c (g_function_info_invoke): Initial
5842 implementation of invoke functionality based on libffi.
5844 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5845 strings and types hash tables in the right order when
5847 (find_entry_node): Free the name parts.
5849 2005-05-12 Johan Dahlin <johan@gnome.org>
5851 * src/generate.c: Generate consistent end tags.
5855 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5859 * src/gidlparser.c (start_function): Actually add
5860 methods to objects. (Steven Walter)
5862 * src/girepository.h:
5863 * src/ginfo.c: Rename Transfer and Direction to
5864 GITransfer and GIDirection. (Torsten Schoenfeld)
5866 * tests/*: Make tests work with the changes in name
5869 * src/gidlnode.c (find_entry_node): Parse qualified
5870 names and generate xref nodes for them if needed. Don't
5871 require all modules to be loaded any more.
5873 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5876 * src/ginfo.c (g_object_info_get_parent): Return NULL
5877 if blob->parent is 0. Still need to make sure index
5880 * src/generate.c: Generate qualified names when
5881 referring to non-local types. Emit transfer attribute
5884 * src/compiler.c (format_output): Put the function
5885 attributes where gcc accepts them.
5887 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5889 * src/compiler.c (main): Add a --verbose cmdline option
5890 and only log messages if it is specified.
5893 * src/gidlnode.c (init_stats, dump_stats): Collect some
5894 statistics on string and type sharing.
5896 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5897 g_message() instead of fprintf().
5899 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5900 (g_idl_node_get_size): Implement for structs.
5901 (g_idl_node_get_full_size): Handle parent being NULL.
5902 (serialize_type): Handle lookup failures more gracefully.
5904 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5906 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5907 size calculation for 2-parameter types and for objects.
5909 * src/compiler.c: Add a cmdline option for debug output
5910 and install a log handler to implement it.
5911 * src/gidlnode.c: Add some debug spew.
5915 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5916 forget to count the module name when calculating the
5917 required size for the metadata.
5920 * src/gidlparser.c: Fix compiler warnings.
5922 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5924 * src/compiler.c (main): Free the option context.
5926 * gidl.dtd: Clean up handling of names. All elements
5927 have a "name", only the elements corresponding to
5928 actual callable functions (function, method, constructor),
5929 have an additional "symbol" attribute holding the
5930 dlsym()-able function name.
5932 * src/generate.c: Adapt to generate xml matching the
5936 * src/gidlnode.c: Adapt to parse the new dtd.
5938 * tests/*.test: Adjust to the new dtd.
5940 * metadata-format.txt:
5941 * src/gmetadata.h: Remove the short_name field
5943 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5944 * src/girepository.h:
5945 * src/ginfo.c (g_value_info_get_short_name): Removed
5947 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5949 * gidl.dtd: Allow constructors for boxed types,
5950 patch by Jonathan Blandford.
5953 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5955 * --- Initial import ---