1 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
4 Post-release version bump
7 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
11 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
13 Bug 562622 – Errordomains missing
15 * giscanner/girwriter.py:
16 * giscanner/glibast.py:
17 * giscanner/glibtransformer.py:
18 * tests/scanner/Makefile.am:
19 * tests/scanner/foo-1.0-expected.gir:
20 * tests/scanner/foo-1.0-expected.tgir:
21 * tests/scanner/foo.c (foo_error_get_type), (foo_error_quark):
22 * tests/scanner/foo.h:
24 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
26 * giscanner/scannerlexer.l:
27 Increase the buffer size to 1M, so
28 gtkalias.h can be parsed.
30 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
32 * giscanner/glibtransformer.py:
33 When trying to map functions to structs, do
34 not require a public structure to exist, should
35 fix Gst gir generation in.
37 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
39 Bug 562615 – Struct methods missing
41 * giscanner/annotationparser.py:
43 * giscanner/girwriter.py:
44 * giscanner/glibast.py:
45 * giscanner/glibtransformer.py:
46 * tests/scanner/foo-1.0-expected.gir:
47 * tests/scanner/foo-1.0-expected.tgir:
49 2009-01-16 Dan Winship <danw@gnome.org>
51 * gir/GL-1.0.gir: add back GLvoid, which got lost during the
52 gir-repository -> gobject-introspection migration
54 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
56 * gir/freetype2-2.0.gir: add FT_Int32
57 * gir/xft-2.0.gir: add XftFont
58 * girepository/gdump.c (g_irepository_dump):
59 Report errors when an invalid type is encountered
60 * giscanner/glibtransformer.py:
61 Make the error message a bit nicer.
63 Part of preparating for gir generating inside pango.
65 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
70 * gir/fontconfig-2.0.gir:
71 * gir/freetype2-2.0.gir:
72 * gir/libxml2-2.0.gir:
77 Move over the hand-written girs from gir-repository
78 so upstream libraries depending on these can avoid
79 a gir-repository dependency.
81 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
83 Bug 567813 – Everything should be versioned
86 * girepository/Makefile.am:
87 * girepository/girepository.c (init_globals):
88 * girepository/girparser.c (locate_gir):
89 * giscanner/dumper.py:
90 * giscanner/transformer.py:
91 * gobject-introspection-1.0.pc.in:
92 * tests/everything/Makefile.am:
93 * tests/invoke/Makefile.am:
94 * tests/offsets/Makefile.am:
95 * tests/repository/Makefile.am:
96 * tests/scanner/Makefile.am:
99 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
101 Bug 555036 – put gtk-doc in GIR
103 * giscanner/annotationparser.py:
105 * giscanner/girwriter.py:
106 * giscanner/glibast.py:
107 * tests/scanner/annotation-1.0-expected.gir:
108 * tests/scanner/annotation.h:
109 * tests/scanner/foo-1.0-expected.gir:
111 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
113 * giscanner/cachestore.py (CacheStore.load): Catch AttributeError
114 which seems to be occasionally raised for Record.
116 * giscanner/annotationparser.py:
117 Fix a bug where \n was not present in a comment
119 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
121 Bug 562467 – Property annotation
123 * giscanner/annotationparser.py:
124 * tests/scanner/annotation-1.0-expected.gir:
125 * tests/scanner/annotation-1.0-expected.tgir:
126 * tests/scanner/annotation.c (annotation_object_set_property),
127 (annotation_object_get_property), (annotation_object_class_init):
129 Annotations are parsed for properties.
131 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
133 Bug 546739 – Introspection should know precise signal parameter types
135 * giscanner/annotationparser.py:
136 * tests/scanner/annotation-1.0-expected.gir:
137 * tests/scanner/annotation-1.0-expected.tgir:
138 * tests/scanner/annotation.c (annotation_object_class_init):
140 Annotations are parsed for signals, the (type) annotation is introduced.
142 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
144 Bug 563591 – Flags not recognized when there is no introspection data
147 * giscanner/girwriter.py:
148 * giscanner/giscannermodule.c (type_get_is_bitfield):
149 * giscanner/glibast.py:
150 * giscanner/glibtransformer.py:
151 * giscanner/scannerparser.y:
152 * giscanner/sourcescanner.c (gi_source_type_copy):
153 * giscanner/sourcescanner.h:
154 * giscanner/sourcescanner.py:
155 * giscanner/transformer.py:
156 * tests/scanner/foo-1.0-expected.gir:
157 * tests/scanner/foo-1.0-expected.tgir:
158 * tests/scanner/foo.h:
160 Large parts of this patch was done by Jürg Billeter.
162 2009-01-12 Havoc Pennington <hp@pobox.com>
164 Bug 563386 – scanner ignores "const" on boxed return values
166 * tests/everything/everything.c (test_simple_boxed_a_const_return):
167 * tests/everything/everything.h:
169 This adds just the tests specified in the bug above, the fix itself
170 was included in Bug 563794
172 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
174 Bug 566404 – Annotations for GLib
176 * gir/glib-2.0.c: Added allow-none annotations for g_thread_init()
177 and g_main_loop_new().
179 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
181 Bug 566419 – Element type of arrays not properly handled in all cases
183 * giscanner/annotationparser.py:
184 * tests/scanner/annotation-1.0-expected.gir:
185 * tests/scanner/annotation-1.0-expected.tgir:
186 * tests/scanner/annotation.c (annotation_object_set_data),
187 (annotation_object_set_data2), (annotation_object_set_data3):
188 * tests/scanner/annotation.h:
190 Based on patch by Andreas Rottmann
192 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
194 Bug 566560 – giscanner.transformer.SkipError
196 * giscanner/transformer.py:
198 Catch SkipError for all nodes, not just functions.
199 Makes it possible to skip unsupported parameter types in
202 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
204 Bug 563794 - Redo annotation parsing & applying
206 Thanks to Colin for helping out considerably in landing this.
208 * giscanner/Makefile.am:
210 * giscanner/dumper.py:
211 * giscanner/girparser.py:
212 * giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
213 (calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
214 * giscanner/glibtransformer.py:
215 * giscanner/scannerlexer.l:
216 * giscanner/sourcescanner.c (gi_source_symbol_unref),
217 (gi_source_scanner_new), (gi_source_scanner_free),
218 (gi_source_scanner_get_comments):
219 * giscanner/sourcescanner.h:
220 * giscanner/sourcescanner.py:
221 * giscanner/transformer.py:
222 * giscanner/xmlwriter.py:
223 * tests/scanner/annotation-1.0-expected.gir:
224 * tests/scanner/annotation-1.0-expected.tgir:
225 * tests/scanner/annotation.c:
226 * tests/scanner/annotation.h:
227 * tests/scanner/foo-1.0-expected.gir:
228 * tests/scanner/foo-1.0-expected.tgir:
229 * tests/scanner/foo.h:
230 * tools/g-ir-scanner:
232 This commit merges the annotation parser rewrite branch.
233 It'll change the annotation parsing to be done completely in python
234 code which will make it easier to do further annotation parsing
237 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
239 Bug 563469 – Arrays not treated correctly in struct offset calculation
241 * tests/scanner/foo.h (FooObject): Added field `some_int'.
242 * tests/scanner/foo-1.0-expected.gir,
243 * tests/scanner/foo-1.0-expected.tgir: Adapted.
245 * giscanner/glibtransformer.py (GLibTransformer._create_gobject):
246 carry over object fields from original (struct) node.
247 (GLibTransformer._pair_class_struct): Don't add fields of the
248 class struct to to the node for the class, they should go under a
249 nested <record> element (see also Bug 551738). This is needed as
250 otherwise offset calculation would not work, as the instance
251 fields are mingled with the class fields without a way to
254 2009-01-03 Johan Dahlin <jdahlin@async.com.br>
257 Disable blank line check, it works differently under
258 Python 2.5 from 2.6 and was rather annoying from the start.
260 2008-01-03 Andreas Rottmann <a.rottmann@gmx.at>
262 Bug 556489 – callback annotations
264 * giscanner/transformer.py
266 * tools/generate.c (write_callable_info): Write out the new scope,
267 closure and destroy attributes.
269 * giscanner/transformer.py (Transformer._type_is_callback): New
270 method, checking if a given type is a callback.
271 (Transformer._augment_callback_params): New method; adds
272 information (closure, destroy) to callback parameters.
273 (Transformer._handle_closure, Transformer._handle_destroy): New methods,
274 auxiliary to _augment_callback_params.
275 (Transformer._create_function): Call _augment_callback_params().
276 (Transformer._create_parameter): Handle scope option.
278 (Transformer._create_typedef_callback): New method, creates a
279 callback, and registers it in the typedef namespace
280 (Transformer._create_typedef): Use _create_typedef_callback()
281 instead of the plain _create_callback().
283 * giscanner/ast.py (Parameter): Added callback-related fields.
284 * giscanner/girwriter.py: Write out new Parameter fields.
286 * girepository/girnode.h (GIrNodeParam): Added fields scope,
288 * girepository/gtypelib.h (ArgBlob): Ditto.
289 * girepository/girparser.c (start_parameter): Handle new fields.
291 * girepository/girmodule.c (g_ir_module_build_typelib): Adjust
292 arg_blob_size, bump major version due to this change.
293 * girepository/girnode.c (g_ir_node_get_full_size_internal)
294 (g_ir_node_build_typelib)
295 * girepository/gtypelib.c (g_typelib_check_sanity): ArgBlob size
297 (g_ir_node_build_typelib): Fill in new ArgBlob flags from param.
299 * girepository/girepository.h (GIScope): New enumeration, listing
300 the different possible scopes for callbacks.
302 * girepository/ginfo.c (g_arg_info_get_scope)
303 (g_arg_info_get_closure, g_arg_info_get_destroy): Accessors for
304 callback-related argument indices (callback scope, closure for a
305 callback, destroy notification for a callback).
307 * tests/scanner/: Added testcases for new features.
309 2009-01-03 Jürg Billeter <j@bitron.ch>
312 * giscanner/dumper.py:
313 * giscanner/girparser.py:
314 * giscanner/glibtransformer.py:
315 * giscanner/sourcescanner.py:
316 * giscanner/transformer.py:
317 * giscanner/xmlwriter.py:
319 Fix inconsistencies with PEP8
321 2008-12-21 Johan Dahlin <jdahlin@async.com.br>
324 Annotate transfer, direction and allow none for
325 g_file_load_contents, g_file_load_contents_finish and
326 g_file_load_partial_contents_finish parameters.
328 2008-12-12 Owen Taylor <otaylor@redhat.com>
330 Disable array auto-detection for out-annotated parameters (#563934)
332 If we have a parameter annotated as (out), then having a ctype of
333 'char **' (or similar) doesn't necessarily indicate an array.
335 * giscanner/transformer.py: Skip array-detection logic for
336 (out)-annotated parameters.
337 * tests/scanner/annotation.h tests/scanner/annotation.c
338 tests/scanner/annotation-1.0-expected.gir
339 tests/scanner/annotation-1.0-expected.tgir: Add a test for
340 an (out) string parameter.
342 2008-12-12 Johan Dahlin <jdahlin@async.com.br>
344 * giscanner/dumper.py (DumpCompiler._link): Pass in
345 --tag=CC to libtool to avoid making libtool confused
346 when CC is different from gcc on some systems.
348 2008-12-10 Johan Bilien <jobi@via.ecp.fr>
350 Bug 563998 – Cache the GIBaseInfo for GTypes
352 * girepository/girepository.c (g_irepository_find_by_gtype):
353 add a cache of GType -> GIBaseInfo.
355 2008-12-09 Johan Bilien <jobi@via.ecp.fr>
357 Bug 562545 – Add function taking / returning GValue
359 * tests/everything/everything.[ch]: add a test of function taking and
360 returning "const GValue *"
362 2008-12-09 Johan Dahlin <johan@async.com.br>
364 * giscanner/cachestore.py (CacheStore.store): Use
365 shutil.move instead of os.rename, since it will
366 automatically fall back to copying+remove if the
367 src directory is on a different partition from
370 2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
372 Bug 563742 – introspection should record the introduced version of
373 symbols marked with the "Since:" tag
378 * giscanner/girwriter.py:
379 * giscanner/scannerlexer.l:
380 * giscanner/transformer.py:
381 * tests/scanner/annotation-1.0-expected.gir:
382 * tests/scanner/annotation-1.0-expected.tgir:
383 * tests/scanner/annotation.c (annotation_versioned):
384 * tests/scanner/annotation.h:
386 2008-12-08 Johan Dahlin <johan@async.com.br>
388 * giscanner/cachestore.py (_get_cachedir): Don't require
389 HOME to be set and if it set, don't require the
392 2008-12-08 Johan Dahlin <johan@async.com.br>
394 * giscanner/cachestore.py (CacheStore.store): Dump the cache
395 file to a temporary file and rename it the expected filename
396 only when it's completely written.
397 This should make the cache more roboust when run in parallel,
398 and hopefully avoid triggering bugs in Python.
400 2008-12-03 Christophe Fergeau <teuf@gnome.org>
402 Bug 562971 – g-ir-scanner failure on libgpod headers
404 * giscanner/scannerlexer.l: raise YY_BUF_SIZE to 65536 up from the
405 default 16384. Without it, the lexer was aborting with a cryptic
406 error message on source files containing really long comment
409 2008-12-01 Colin Walters <walters@verbum.org>
411 * girepository/gfield.c: Fix memory leak; unref type info we
412 created, not field info
414 2008-11-30 Johan Dahlin <jdahlin@async.com.br>
416 Bug 562289 – Race when removing invalid cache
418 * giscanner/cachestore.py:
419 ENOENT is mapped to a OSError, not IOError.
421 2008-11-27 Johan Dahlin <jdahlin@async.com.br>
423 * gir/glib-2.0.c: Add return value transfer annotation
424 for g_markup_escape_text.
426 2008-11-25 Colin Walters <walters@verbum.org>
428 * tools/g-ir-scanner: Add --libtool option which we expect Automake-using
430 * giscanner/dumper.py: Implement it.
431 * gir/Makefile.am, tests/**/Makefile.am: Use it.
433 2008-11-25 Colin Walters <walters@verbum.org>
435 * tests/scanner/Makefile.am: Remove hand-rolled generation of .tgir; easier
436 to just use a Makefile rule and dependencies. This corresponds with a change
437 made to gir-repository to fix srcdir != builddir issues.
439 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
442 Post release version bump
445 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
450 2008-11-25 Colin Walters <walters@verbum.org>
452 Bug 559705 – Missing association between static methods and classes
454 * docs/typelib-format.txt:
455 * girepository/ginfo.c (g_function_info_get_flags):
456 * girepository/girmodule.c (g_ir_module_build_typelib):
457 * girepository/girnode.c (g_ir_node_get_size),
458 (g_ir_node_build_typelib):
459 * girepository/girparser.c (start_function):
460 * girepository/gtypelib.c (g_typelib_check_sanity),
461 (validate_header), (validate_function_blob):
462 * girepository/gtypelib.h:
464 * giscanner/girwriter.py:
465 * giscanner/glibtransformer.py:
466 * tests/scanner/foo-1.0-expected.gir:
467 * tests/scanner/foo-1.0-expected.tgir:
468 * tests/scanner/foo.h:
470 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
472 * giscanner/ast.py: Define socklen_t as an alias for int32.
474 2008-11-24 Johan Dahlin <jdahlin@async.com.br>
476 * girepository/gdump.c (dump_type): Remove a warning,
477 be less verbose on error on fundamental types.
479 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
481 * giscanner/dumper.py: Add license headers,
482 refactor into a class, avoid some duplication and do some
483 extra pedantic checks.
485 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
487 Make it compilable with -Werror on my system by adding
488 a couple of prototypes and including headers.
490 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
492 Bug 562022 – gobject-introspection needs python headers
494 * configure.ac: fail without python headers present.
497 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
499 Bug 561617 – Return value array annotations
501 * giscanner/transformer.py:
502 * tests/scanner/annotation.c (annotation_return_array):
503 * tests/scanner/annotation.h:
504 Add support for (array) for return value annotations as well.
506 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
508 * tests/everything/everything.[ch]: add a test function which calls a
511 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
513 * giscanner/cachestore.py:
514 Catch ValueError exceptions.
516 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
518 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
520 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
522 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
523 instead of hard-coding struct sizes.
525 2008-11-18 Owen Taylor <otaylor@redhat.com>
527 Bug 561296 - Add "storage type" to the typelib data for enums
529 In order to set and get enum and flag fields in structures, we need
530 to know the integral type that the enumeration is stored as. We are already
531 computing that at compile time in order to compute struct offsets, so the
532 easiest thing to do is to save that in the typelib.
534 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
535 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
536 and compute and save it at compile time.
538 * girepository/girepository.h girepository/ginfo.c:
539 Add g_enum_info_get_storage_type().
541 * girepository/gfield.c: Implement reading and writing enum and flags fields
542 based on the storage type.
544 2008-11-18 Owen Taylor <otaylor@redhat.com>
546 Add enums to the Everything test module
548 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
549 test module and register them as GTypes.
551 https://bugzilla.gnome.org/show_bug.cgi?id=561296
553 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
555 * giscanner/cachestore.py:
556 Catch BadPickleGet exceptions as well.
558 2008-11-17 Owen Taylor <otaylor@redhat.com>
560 * tests/everything/everything.c: Fix doc comment annotations
561 for test_struct_b_clone() to refer to the right function.
563 2008-11-17 Dan Winship <danw@gnome.org>
565 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
566 spelling of GHashTable. #561135
568 * tests/scanner/annotation.c (annotation_object_get_hash):
569 * tests/scanner/annotation-1.0-expected.gir:
570 * tests/scanner/annotation-1.0-expected.tgir: add a test of
571 GHashTable annotations
573 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
575 * giscanner/ast.py: Change string array match type to be in terms
576 of canonicalized type.
577 * giscanner/transformer.py: Add canonicalize_ctype which gives us
578 a version of a c:type without aliases, so we can deep canonicalize
579 char** to utf8*. Update parse_ctype to use it.
580 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
582 2008-11-16 Colin Walters <walters@verbum.org>
584 * girepository/girepository.c: Ensure we always call init_globals,
585 even if passed a non-default repository.
587 2008-11-16 Colin Walters <walters@verbum.org>
589 Bug 559706 - Interface prerequisites
591 * common.mk: Dep on libgirepository.la for scanner libs so that
592 we rebuild things even if just gdump.c changes.
593 * girepository/gdump.c: Dump prerequisites.
594 * giscanner/ast.py: Add prerequisite list.
595 * giscanner/girparser.py: Parse them from gdump.
596 * giscanner/girwriter.py: Write them.
597 * giscanner/glibtransformer.py: Resolve them.
600 2008-11-16 Owen Taylor <otaylor@redhat.com>
602 Bug 561087 - Respect is_pointer in serialize_type()
604 Add a '*' to the serialization for the cases where we set is_pointer
605 in the type blob we write out depending on node->is_pointer. Don't
606 add the '*' in the cases where is_pointer is set or not set in a
609 http://bugzilla.gnome.org/show_bug.cgi?id=561087
611 2008-11-16 Owen Taylor <otaylor@redhat.com>
613 Bug 560825 – Add size and alignment to typelib
615 Include the size and alignment of structures and unions in the typelib,
616 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
618 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
619 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
620 to StructBlob and UnionBlob.
622 * girepository/ginfo.c girepository/girepository.h:
623 Add g_[struct|union]_get[size|alignment]().
625 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
627 2008-11-16 Owen Taylor <otaylor@redhat.com>
629 Bug 552371 – implement struct field get/set
631 * girepository/gfield.c girepository/girepository.h: Add
632 convenience functions g_field_info_set_field() and
633 g_field_info_get_field() to set and get fields based on the
634 offsets in GIFieldInfo.
636 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
638 Bug 560241 - Out-arguments should not be marked as being pointers
641 * girepository/girparser.c: Improved logic for out arguments.
643 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
645 Bug 559601 - Pointers in structs/unions unduly treated as arrays
647 * giscanner/transformer.py: Differentiate type creation logic
648 between parameters and struct components.
650 2008-11-15 Colin Walters <walters@verbum.org>
652 * giscanner/dumper.py: Check return code from pkg-config
655 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
657 * tests/everything/everything.c (test_array_int_in),
658 (test_array_gtype_in):
659 * tests/everything/everything.h:
660 Rename the int/gtype array tests. Make the return value
661 useful, an aggregation of the array input values.
663 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
665 * tests/everything/Makefile.am:
666 * tests/everything/everything.c:
667 * tests/everything/everything.h:
668 * tests/everything/gitesttypes.c:
669 * tests/everything/gitesttypes.h:
670 Rename gitesttypes.[ch] to everything.[ch]
672 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
674 Bug 560708 – Don't treat arrays that have a length specified as
675 zero-terminated by default
677 * giscanner/transformer.py: Default to non zero terminated for
679 * tests/*: Update, add test for zero vs not.
681 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
683 Bug 557788 - Return types for constructors in generated typelib bogus
685 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
686 obviously broken in the face of duplicate names in different
688 * tests/scanner/*expected.gir: Fix up.
690 2008-11-13 Owen Taylor <otaylor@redhat.com>
692 * girepository/girffi.c: Fix "Unexpected time for time_t"
695 2008-11-13 Colin Walters <walters@verbum.org>
697 Bug 558436 - avoid having scanner load app code
699 * giscanner/cgobject.py: Delete; we no longer load shared
701 * giscanner/dumper.py: Support for linking a library to
702 a stub binary for introspection.
703 * giscanner/glibtransformer.py: Rewrite to use gdump XML
704 from invocation of child binary.
705 * giscanner/transformer.py: Fix up to use fully qualified
706 name in parse tree. Make parse_ctype public so we can use
707 it inside glibtransformer.
708 * tests/scanner/barapp.c: New test, using --program arg
710 * tests/*: Update to use common.mk for invoking scanner.
711 * tools/g-ir-scanner: Add options --program, --program-arg,
713 * docs/g-ir-scanner.1: Update.
715 2008-11-13 Colin Walters <walters@verbum.org>
717 * configure.ac: Depend on Gio, we use it in gdump.c.
718 * girepository/gdump.c: Code to dump GType data to XML.
719 * girepository/girepository.c: Add option group for dumping.
720 * girepository/girepository.h: Define API for the above.
722 2008-11-13 Colin Walters <walters@verbum.org>
724 * common.mk: Add a file to include with Makefile fragments
725 useful for scanner invocation.
727 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
729 * tests/everything/gitesttypes.c (test_filename_return): Return
730 strings in filename encoding.
732 2008-11-13 Owen Taylor <otaylor@redhat.com>
734 Bug 560253 – Add structure and boxed types to Everything test module
736 * tests/everything/gitesttypes.[ch]: Add examples of:
738 Plain old data structs
739 Plain old data structs with nested fields
741 Plain old data boxed with nested fields
742 More complicated boxed types with internal state
744 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
746 * tests/everything/gitesttypes.c (test_gtype_in):
747 * tests/everything/gitesttypes.h:
748 Add a test of GType arrays, a la gtk_list_store_set_columns.
750 2008-11-12 Owen Taylor <otaylor@redhat.com>
752 Bug 560419 – Cache includes when parsing
754 Keep track of all modules parsed within a GIrParser, and when a
755 module is referenced a second time, use the existing parsed copy
756 instead of reparsing.
758 2008-11-12 Owen Taylor <otaylor@redhat.com>
760 Fix management of ParseContext.includes_modules (#560419)
762 * girepository/girparser.c: Fix some trivial bugs in managing the
763 list of include modules. (Add to module's list twice, not
764 initialized to NULL, not freed.)
766 2008-11-12 Owen Taylor <otaylor@redhat.com>
768 Keep aliases and disguised_structures local to each module (#560419)
770 * girepository/girmodule.[ch]: When parsing, keep keep a separate
771 hash tables of aliases and 'disguised' flags for each module, and
772 store that on the module.
774 After parsing an include merge the aliases/disguised flags to the
777 * girepository/girparser.c: Remove 'prefix_aliases' flag and
778 always prefix aliases/disguised structure types when parsing; this
779 simplifies the code considerably.
781 2008-11-12 Owen Taylor <otaylor@redhat.com>
783 Fix mismatches between .gir name and 'name' attribute (#560419)
785 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
786 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
787 where the 'name' element of <namespace/> didn't match the filename of the
788 gir, an assumption that the compiler has always expected and now enforces.
790 2008-11-12 Owen Taylor <otaylor@redhat.com>
792 Only allow one <namespace/> element per <repository/> (#560419)
794 * girepository/girparser.c: The logic in girparser.c didn't work
795 very well if there were multiple <namespace/> nodes within a
796 single <repository/> (context->namespace was always the overall
797 filename and not the the name specified in the <namespace/>
798 element for one thing; this would cause aliases to be mis-prefixed
799 in include modules.) Also check that the "name" in the
800 <namespace/> node matches the filename.
802 2008-11-12 Owen Taylor <otaylor@redhat.com>
804 Add a GirParser object to hold the state of a compilation
806 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
807 GirParser object to hold state that is global across a
808 compilation. Currently just holds the include path, but will
809 eventually also keep a cached list of parsed modules.
811 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
813 * girepository/girepository.c (find_namespace_latest): Fix
816 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
818 * configure.ac: use 'introspection' component for bugs
820 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
822 * tests/everything/gitesttypes.c (test_filename_return):
823 * tests/everything/gitesttypes.h:
824 Add a filename return test.
826 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
828 * tests/offsets/Makefile.am (gitestoffsets.c): fix
829 gen-gitestoffsets invocation with builddir != srcdir
831 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
833 * girepository/girepository.c:
834 Change the element type from utf8 to filename
835 * girepository/girnode.c (g_ir_node_build_typelib):
836 Special case filename equally to utf8 here.
838 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
841 Remove unused variables, add a dependency of girepository.ch, so when
842 they change we rebuild the gir automatically.
844 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
846 * girepository/girepository.c (g_irepository_get_search_path):
847 * girepository/girepository.h:
848 Add a g_irepository_get_search_path, so we can access the search
851 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
853 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
855 * girepository/girparser.c: avoid freeing an uninitialized pointer
857 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
860 * giscanner/glibtransformer.py:
861 * tools/g-ir-scanner:
862 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
863 so we can just pass in --library=foo/bar/baz.la and the scanner
864 does the right thing.
865 Don't warn for _get_type() functions if they don't take any
868 2008-11-11 Owen Taylor <otaylor@redhat.com>
870 Bug 560404 – Prefix types when resolving aliases in included modules
872 * girepository/girparser.c: When resolving aliases in an included
873 module, prefix types before looking them up.
875 2008-11-11 Owen Taylor <otaylor@redhat.com>
877 Compute field offsets and overall size for object structures
879 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
880 field of type object in structure"
882 Do basic computation of field offsets for objects and interfaces;
883 this doesn't attempt to address all of the "mess" for virtual
884 functions described in Bug 560281.
886 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
888 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
890 Based on patch by Johan Bilien.
892 * giscanner/transformer.py (_create_member, _create_parameter):
893 Resolve types here as well.
894 (_resolve_type_name_1): Try resolving using 'ctype' first since
895 it's least ambiguous. Fixes struct member type resolution with
896 similarly named types, e.g. Gdk.PangoRendererClass and
898 * tests/scanner/foo*: Add test.
900 2008-11-11 Owen Taylor <otaylor@redhat.com>
902 * girepository/girparser.c: Search provided include dirs before
903 the default directories.
905 2008-11-11 Owen Taylor <otaylor@redhat.com>
907 * girepository/giroffsets.c: Include fully-qualified names in
910 2008-11-11 Owen Taylor <otaylor@redhat.com>
912 * girepository/giroffsets.c: Fail gracefully with an informative
913 error message when recursion is encountered when computing a
916 2008-11-11 Owen Taylor <otaylor@redhat.com>
918 * girepository/girparser.c: Remove an unused variable.
920 2008-11-10 Owen Taylor <otaylor@redhat.com>
922 Add tests for field offset computations
924 * tests/offsets/offsets.h: Header file with structure definitions to test
926 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
927 field offsets for the structures in offsets.h two ways: using
928 the information from a generated typelib, and as computed by the
931 We diff these two versions to test that everything is OK.
933 2008-11-10 Owen Taylor <otaylor@redhat.com>
935 Remove field offsets from g-ir-generate output and test inputs
937 Field offsets are a) architecture dependent so they shouldn't be part
938 of the architecture-independent gir format which is installed in
939 datadir. b) Are architecture-dependent so they shouldn't be in test
942 * girepository/girparser.c: Don't parse offset for fields
943 * tools/generate.c: Don't parse offset for fields
944 * tests/*.gir test/scanner/*.tgir: Remove offsets
946 (Virtual function and discriminator offsets are not removed, as they
947 aren't fully hooked up to the field-offset computation machinery yet.)
949 2008-11-10 Owen Taylor <otaylor@redhat.com>
951 Bug 560252 - Compute field offsets before writing typelib
953 * girepository/girnode.h: Store the total size and alignment for
954 GIrNodeStruct/Boxed/Union.
956 * girepository/giroffset.c: New file implementing computation of
957 structure field offsets.
959 * girepository/girnode.c: Compute structure field offsets before
960 writing types into the typelib.
962 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
963 means "unknown". Also fix description of the discriminator_offset
966 2008-11-10 Owen Taylor <otaylor@redhat.com>
968 Bug 560250 - Fully parse included modules
970 For some things, like computing structure offsets to put into the typelib
971 we need more than just the aliases from included modules. Do a completel
972 parse of included modules and store in module->included_modules.
974 Also add g_ir_find_node() to find node information from within the
975 active set of modules and their includes.
977 2008-11-10 Owen Taylor <otaylor@redhat.com>
979 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
981 Extract a function to convert GITypeTag to ffi_type from the internals
982 of ginvoke.c. This will be useful in figure out structure alignment.
984 Also fix handling of gsize and time_t to be portable. (Add a check
985 to configure.ac to figure out the width of time_t.)
987 2008-11-10 Owen Taylor <otaylor@redhat.com>
989 Bug 560248 – "disguised structures"
991 Certain types like GIConv and GdkAtom are pointers internally but don't
992 look like pointers when referenced. They have the form.
994 typedef struct _X *X;
996 Parse these as structures/records but mark them in the gir with a 'disguised'
997 attribute so that we know that they need special handling.
999 In the typelib treat them like any other structure.
1001 2008-11-09 Jürg Billeter <j@bitron.ch>
1004 * giscanner/girwriter.py:
1006 Write throws attribute for virtual functions, fixes bug 559703
1008 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
1010 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
1011 up some confusion about the second argument to find_module, it's
1012 actually the packages __path__ attribute which we can safely ignore
1014 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
1016 2008-11-07 Owen Taylor <otaylor@redhat.com>
1018 Bug 559737 – Deal with continuations in macros
1020 * giscanner/giscannerlexer.l: Treat continuation lines the same
1021 as regular newlines. This makes the scanner not complain about
1022 #define foo(x) \ <stuff> inside a C file. There's no attempt
1023 however to handle parsing macro definitions split across lines.
1025 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
1027 * giscanner/cachestore.py:
1028 Handle broken cache entries, write only filesystems and
1029 running out of diskspace.
1031 2008-11-07 Owen Taylor <otaylor@redhat.com>
1033 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
1034 Set current_filename before lexing the file so error messages
1035 are reported in the right file.
1037 2008-11-06 Colin Walters <walters@verbum.org>
1039 * tests/everything/*: Add some tests for strv.
1041 2008-11-05 Colin Walters <walters@verbum.org>
1043 * girepository/ginvoke.c (g_function_info_invoke): Don't use
1044 nested scope local variable for error which may go away after
1045 conditional is complete.
1047 2008-11-05 Colin Walters <walters@verbum.org>
1049 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
1050 manipulate hackily; just use GString. This avoids an
1051 uninitialized memory read pointed out by Havoc.
1053 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
1055 * giscanner/__init__.py:
1057 * giscanner/cachestore.py:
1058 * giscanner/cgobject.py:
1059 * giscanner/girparser.py:
1060 * giscanner/girwriter.py:
1061 * giscanner/giscannermodule.c:
1062 * giscanner/glibast.py:
1063 * giscanner/glibtransformer.py:
1064 * giscanner/libtoolimporter.py:
1065 * giscanner/minixpath.py:
1066 * giscanner/odict.py:
1067 * giscanner/sourcescanner.c:
1068 * giscanner/sourcescanner.h:
1069 * giscanner/sourcescanner.py:
1070 * giscanner/transformer.py:
1071 * giscanner/utils.py:
1072 * giscanner/xmlwriter.py:
1074 Relicense the giscanner library under LGPLv2+.
1075 This has been approved by all contributors.
1077 2008-11-01 Owen Taylor <otaylor@redhat.com>
1079 Bug 558848 giparser.py: shared library should be optional
1081 When parsing a .gir, allow the shared-library attribute
1082 of <namespace/> to be missing: this corresponds to the handling
1083 in libgirepository and elsewhere.
1085 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
1087 Bug 557898 – Fails to build on OSX 10.4
1089 * configure.ac: Check for $shrext_cmds that should be implicitly
1090 available if you're using libtool >= 2.0. If undefined, call
1091 libtool --config explicitly to get its value.
1092 * girepository/gtypelib.c: Remove special case for (non-)Darwin
1093 systems as unneeded.
1095 2008-10-31 Colin Walters <walters@verbum.org>
1097 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
1099 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1101 * configure.ac: Post release version bump
1104 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1108 * docs/release-checklist.txt:
1111 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1113 * Makefile.am: add an upload-release target
1114 * docs/release-checklist.txt:
1115 Release process documentation
1117 2008-10-31 Colin Walters <walters@verbum.org>
1119 Bug 558109 – _g_typelib_init fails to find shared libraries
1121 * transformer/glibtransformer.py: Use ctypes' find_library
1122 on passed libraries and write that for the shared-library
1123 entry. We want to avoid depending on -devel packages.
1125 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1127 * docs/g-ir-scanner.1:
1128 Document the renaming options.
1130 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
1132 * giscanner/Makefile.am:
1133 * tests/invoke/Makefile.am:
1134 * tests/repository/Makefile.am: List in-tree libraries first in
1135 LDADD / LIBADD. If installed library is listed first, the
1136 resulting binary will prefer installed version to one in .libs,
1137 possibly making 'make check' behave strangely.
1139 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
1141 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
1142 gir-repository from choking with gdk/quartz
1144 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1146 * giscanner/giscannermodule.c (calc_attrs_length),
1147 (pygi_collect_attributes):
1148 * giscanner/xmlwriter.py:
1149 Write a C version of the xml namespace formatter.
1150 Saves 15% of the time it takes to create a gtk gir.
1152 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1154 * giscanner/xmlwriter.py: Abstract attribute formatting
1155 to a function external to the XMLWriter class.
1157 * giscanner/scannerlexer.l:
1158 Parse and discard __typeof and __attribute.
1160 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1162 * giscanner/girparser.py:
1163 Remove arguments from the constructor, move them to
1164 separate accessors. Add a new parse_tree method
1165 which takes an element tree instance.
1166 * tools/g-ir-scanner:
1167 Update callsite for this
1169 * giscanner/Makefile.am:
1170 * giscanner/cachestore.py:
1171 * giscanner/transformer.py:
1172 Cache the include parsing. Saves ~25% time when
1173 creating vte (which includes everything up to gtk+).
1175 2008-10-30 Colin Walters <walters@verbum.org>
1177 * giscanner/transformer.py: Don't reparse includes
1178 we've already processed.
1180 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1182 * giscanner/girparser.py:
1183 * giscanner/transformer.py:
1184 Avoid parsing parameters, types etc when parsing
1185 includes. Should speed up include parsing a bit.
1187 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1189 * giscanner/girparser.py:
1190 Avoid big if/else and use a dispatch table like
1193 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1195 * giscanner/transformer.py:
1196 Clean up include parsing and registration.
1198 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1200 * giscanner/transformer.py:
1203 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1205 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
1208 construct PYTHONPATH just once
1210 * tests/everything/Makefile.am:
1211 * tests/scanner/Makefile.am:
1212 add $(top_srcdir) to PYTHONPATH to
1213 handle builddir != srcdir
1215 * giscanner/libtoolimporter.py:
1216 * giscanner/sourcescanner.py:
1217 Make the libtoolimporter work when distchecking too.
1219 Mostly based on patch by Tommi Komulainen
1221 2008-10-29 Owen Taylor <otaylor@redhat.com>
1223 * giscanner/glibtransformer.py: If a filename of an existing
1224 file is passed to --library, hunt for it directly, rather than
1225 searching for a corresponding library.
1227 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
1229 * giscanner/libtoolimporter.py:
1230 * giscanner/sourcescanner.py:
1231 Clean up the libtool importer a bit. Add a context so we
1232 can use it through a with statement.
1233 Don't just look in the current directory, look in the whole
1236 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
1238 Bug 558065 – gitesttypes should be installed
1241 * tests/Makefile.am:
1242 * tests/types/Makefile.am -> tests/everything/Makefile.am
1243 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
1244 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
1245 move tests/types to tests/everything
1247 * tests/everything/Makefile.am: build normal shared library
1248 libgirepository-everything.so.1.0.0 and corresponding typelib
1249 Everything-1.0.typelib
1251 * tests/everything/Makefile.am: explicitly link libtool
1252 versioning with typelib versioning with variables
1254 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
1256 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
1258 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1260 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
1263 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1265 Bug 558068 – when invoking a method, offset the in arguments by one,
1268 * tests/invoke/invoke.c, tests/invoke/testfns.c,
1269 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
1270 * girepository/ginvoke.c: do not offset the index of given out
1271 arguments by one for methods, "this" is provided as in argument only.
1273 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1275 * gir/gio-2.0.c: add annotation for g_file_delete
1277 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
1279 Bug 558062 – provide and use paths in the .pc file
1281 * gobject-introspection-1.0.pc.in: provide typelibdir variable
1282 for where .typelibs should be installed (callers shouldn't need
1283 to construct paths from bits and pieces)
1285 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1287 Bug 557791 – g_irepository_require() could return a GTypelib *
1289 * girepository/girepository.c: Return GTypelib; this is useful
1290 for low level manipulation.
1292 2008-10-25 Colin Walters <walters@verbum.org>
1294 Bug 557788 – Return types for constructors in generated typelib bogus
1296 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
1297 rely on end pass resolution.
1299 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1301 Bug 557786 - support fixed size arrays
1303 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
1304 * giscanner/scannerparser.y: Retain fixed array size.
1305 * giscanner/ast.py: Add to note.
1306 * giscanner/girwriter.py: Write to gir.
1307 * girepository/girnode.c: Write it to typelib.
1308 * tools/generate.c: Generate.
1309 * tests/*: Add tests.
1311 2008-10-25 Colin Walters <walters@verbum.org>
1313 Bug 557076 - move typelibs to $libdir
1315 * configure.ac: Steal some configury bits from dbus to expand
1317 * gir/Makefile.am: Move to libdir.
1318 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
1319 instead just look at one hardcoded path in libdir.
1320 * acinclude.m4: Bits from dbus.
1322 2008-10-24 Johan Dahlin <johan@gnome.org>
1324 * girepository/girnode.c (g_ir_node_check_unhandled_members):
1325 Be quiet, do not warn about unhandled members.
1327 2008-10-24 Johan Dahlin <johan@gnome.org>
1329 * girepository/gtypelib.c:
1330 Only use SHLIB_SUFFIX on darwin, otherwise use
1331 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
1333 2008-10-24 Lucas Rocha <lucasr@gnome.org>
1335 Bug 557623 - Constructors shouldn't be flagged as methods.
1337 * girepository/ginfo.c (g_function_info_get_flags): ditto.
1339 2008-10-24 Johan Dahlin <johan@gnome.org>
1341 * giscanner/scannerparser.y:
1342 Check against division by zero for the modula operator.
1343 This fixes header parsing of OSX system headers included
1346 2008-10-24 Johan Dahlin <johan@gnome.org>
1350 Add a CONTRIBUTORS file and dist it.
1352 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1354 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
1356 * girepository/girparser.c (parse_param_transfer):
1357 * giscanner/transformer.py (_create_parameter, _create_return):
1358 * giscanner/girwriter.py (_write_return, _write_parameter):
1359 * tools/generate.c (write_callable_info): always write and
1360 require "transfer-ownership" for return-values and parameters
1363 * tests/invoke/testfns-1.0.gir:
1365 * tests/scanner/DrawableAdditions.xml:
1366 * tests/scanner/GtkFrob-1.0-expected.tgir:
1367 * tests/scanner/annotation-1.0-expected.tgir:
1368 * tests/scanner/drawable-1.0-expected.tgir:
1369 * tests/scanner/drawable-injected-1.0-expected.gir:
1370 * tests/scanner/drawable-injected-1.0-expected.tgir:
1371 * tests/scanner/foo-1.0-expected.tgir: Updated
1373 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1375 * giscanner/cgobject.py: build fundamental types same way as glib
1377 * giscanner/glibtransformer.py (_type_from_gtype): record GType
1378 when constructing the Type from it
1380 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
1381 the parameter is a GObject from its GType, if available.
1383 * giscanner/glibtransformer.py (_adjust_transfer):
1384 * tests/scanner/foo-1.0-expected.gir:
1385 * tests/scanner/foo-1.0-expected.tgir: deduce
1386 transfer-ownership from GTypes
1388 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1390 * giscanner/transformer.py (_create_parameter):
1391 * tests/scanner/foo-1.0-expected.gir: make varargs
1392 transfer-ownership="none"
1394 2008-10-23 Colin Walters <walters@verbum.org>
1396 Bug 556739 - transfer ownership
1398 * giscanner/ast.py: Refactor Parameter/Return to share
1399 common attributes. Add transfer_inferred attribute
1400 which says whether or not we made a guess.
1401 * giscanner/transformer.py: Add much more extensive
1402 heuristics around parameter and return transfer.
1403 * giscanner/glibtransformer.py: Adjust to inspect
1407 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1409 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
1411 * tests/scanner/Makefile.am:
1412 * tests/scanner/annotation-1.0-expected.tgir:
1413 * tests/scanner/drawable-1.0-expected.tgir:
1414 * tests/scanner/drawable-injected-1.0-expected.tgir:
1415 * tests/scanner/foo-1.0-expected.tgir:
1416 * tests/scanner/GtkFrob-1.0-expected.tgir:
1417 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
1418 annotations survive the roundtrip via typelib
1420 The expectations are as currently produced by g-ir-generate,
1421 comparison with the .gir files shows there are differences.
1423 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
1425 Bug 557468 – Support for GI_TYPELIB_PATH
1427 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
1428 provided paths to the global search path.
1430 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1432 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
1434 * tests/scanner/drawable-1.0-expected.tgir:
1435 * tests/scanner/drawable-injected-1.0-expected.tgir:
1436 * tests/scanner/foo-1.0-expected.tgir:
1437 * tools/generate.c (write_object_info): write 'abstract'
1438 attribute for classes
1440 2008-10-22 Lucas Rocha <lucasr@gnome.org>
1442 * girepository/girmodule.c, girepository/gtypelib.c,
1443 girepository/girparser.[ch]: fix some build warnings.
1445 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1447 Bug 557405 – Use 'allow-none' consistently
1449 * docs/typelib-format.txt:
1450 * girepository/ginfo.c (g_arg_info_may_be_null):
1451 * girepository/girnode.c (g_ir_node_build_typelib):
1452 * girepository/girnode.h (struct _GIrNodeParam):
1453 * girepository/girparser.c (start_parameter):
1454 * girepository/girwriter.c (function_generate):
1455 * girepository/gtypelib.h (ArgBlob):
1457 * tests/function.gir:
1458 * tools/generate.c (write_callable_info): Use 'allow-none'
1459 consistently throughout
1461 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1463 Bug 557092 – Callback annotations not used
1465 * giscanner/transformer.py (_create_callback): use annotations
1467 * tests/scanner/annotation.h
1468 * tests/scanner/annotation-1.0-expected.gir: add tests
1470 2008-10-21 Colin Walters <walters@verbum.org>
1472 * giscanner/scannerlexer.l: Don't require trailing whitespace after
1473 uncommented parameters.
1476 2008-10-21 Colin Walters <walters@verbum.org>
1478 * girepository/girepository.c: Ensure that when doing an unversioned
1479 require, we prefer items earlier in the search path to later ones.
1481 2008-10-21 Owen Taylor <otaylor@redhat.com>
1483 * giscanner/transformer.py: For string parameters allow transfer annotation
1484 to override the standard automatic guessing based on 'const'.
1486 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1488 Bug 557241 – "throws" flag for functions
1490 * tests/scanner/drawable-1.0-expected.gir,
1491 tests/scanner/drawable-injected-1.0-expected.gir,
1492 tests/scanner/drawable.[ch]: add simple test for throwing
1493 function (has GError ** as last argument)
1495 * giscanner/ast.py: add a 'throws' flag to Function
1496 * giscanner/glibtransformer.py: if a function's last paramerter is
1497 a GError, set the 'throws' flag and remove that parameter
1498 * giscanner/girwriter.py: write out the 'throws' attribute
1499 * giscanner/girparser.py: support parsing the 'throws' attribute
1501 * tests/repository/gitestthrows.c: add a simple test to check the
1502 throws flag in a typelib and invoke the function
1504 * girepository/ginfo.c, girepository/girnode.[ch],
1505 girepository/girnode.h, girepository/girparser.c,
1506 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1508 * girepository/ginvoke.c: if a function throws, add a GError as last
1509 arguments, and propagate the error to the invoker.
1511 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1513 * giscanner/transformer.py (_create_parameters): Warn if we see
1514 annotations for unknown parameters. If .h and .c files name
1515 parameters differently, the annotations may be lost.
1517 2008-10-21 Johan Dahlin <johan@gnome.org>
1519 Bug 556358 - don't use libtool internals
1521 * giscanner/Makefile.am:
1522 * giscanner/libtoolimporter.py:
1523 * giscanner/sourcescanner.py:
1524 * giscanner/utils.py:
1525 Add a python meta importer and remove a libtool symlink hack.
1527 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1529 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1530 and --add-include-path appropriately when invoking the scanner.
1531 * tests/types/Makefile.am (%typelib): Likewise.
1533 2008-10-20 Colin Walters <walters@verbum.org>
1535 Bug 556777 - validate properties
1537 * giscanner/transformer.py: Add option to throw on unknown types.
1538 * giscanner/glibtransformer.py: Use it on properties.
1539 * tests/*: Add a test.
1541 2008-10-20 Colin Walters <walters@verbum.org>
1543 * giscanner/glibast.py: Also register g variants of
1544 default_array_types. This is not beautiful, but
1545 good alternatives aren't easy to come by.
1546 This fixes gchar ** parsing.
1548 2008-10-20 Colin Walters <walters@verbum.org>
1550 * docs/typelib-format.txt, girepository/gtypelib.h:
1551 Take a bit from ObjectInfo to represent abstract flag.
1552 * giscanner/cgobject.py: Expose g_type_get_flags.
1553 * girepository/girepository.h: Add accessor.
1554 * girepository/ginfo.c: Implement it.
1555 * giscanner/ast.py: Add is_abstract flag to generic
1557 * giscanner/glibast.py: Use it.
1558 * giscanner/girwriter.py: Write it.
1559 * girepository/girparser.c: Parse it.
1562 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1564 * giscanner/girparser.py (_parse_function): don't lose
1565 'transfer-ownership' attributes when injecting, check for the
1568 2008-10-19 Johan Dahlin <johan@gnome.org>
1570 * giscanner/scannerlexer.l: Parse and ignore __asm.
1572 2008-10-19 Colin Walters <walters@verbum.org>
1574 * giscanner/girparser.py: Parse array length= to ensure
1575 it doesn't get lost from --inject.
1577 2008-10-17 Colin Walters <walters@verbum.org>
1579 Bug 556795 - char ** regression
1581 * giscanner/transformer.py: Fix parsing of ctypes, add some
1582 comments about what's going on.
1583 * tests/*: Add a test for char **.
1585 2008-10-17 Colin Walters <walters@verbum.org>
1587 Bug 556783 - change namespace handling to be more consistent
1589 * giscanner/transformer.py: Eliminate usage of
1590 strip_namespace_object. We now treat --namespace as the default
1591 --strip-prefix; however, if --strip-prefix is specified it
1592 overrides --namespace. This applies to everything except function
1593 names, where we do also strip the namespace.
1594 * giscanner/glibtransformer.py: Remove usage of
1595 strip_namespace_object.
1597 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1598 --namespace and --strip-prefix.
1600 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1602 Bug 556732 – generate gir files consistently
1604 * girepository/girparser.c (start_parameter):
1606 * tests/invoke/testfns-1.0.gir:
1607 * tools/generate.c (write_callable_info): write
1608 'transfer-ownership' attribute consistently with both
1609 return-value and parameter elements
1611 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1613 Bug 556732 – generate gir files consistently
1615 * tools/generate.c (write_callable_info): write 'direction'
1616 attribute only if other than 'in' to be consistent with
1619 * tests/object.gir: remove direction="in" which is the default
1621 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1623 Bug 556732 – generate gir files consistently
1625 * giscanner/ast.py (Field): add readable and writable properties
1626 * giscanner/girparser.py (_parse_field): copy 'readable' and
1627 'writable' attributes
1628 * giscanner/transformer.py (_create_member): create fields as
1630 * giscanner/glibtransformer.py (_introspect_object,
1631 _pair_class_struct): make object instance and class fields
1633 * giscanner/girwriter.py (_write_field):
1634 * tools/generate.c (write_field_info): write field 'readable'
1635 and 'writable' attributes only if non-default (read-only)
1636 * girepository/girparser.c (start_field): in the absence of
1637 attributes assume fields are read-only
1639 * tests/struct.gir: remove redundant readable="1" from fields
1640 * tests/scanner/foo-1.0-expected.gir:
1641 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1642 all record and union fields
1644 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1646 Bug 556732 – generate gir files consistently
1648 * giscanner/girwriter.py (_write_property): write properties
1649 'construct' attribute if set
1650 * tools/generate.c (write_property_info): write properties
1651 'readable' and 'writable' attributes only if non-default
1652 * tests/object.gir: add writable="0"
1653 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1655 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1657 * gir/glib-2.0.c: added annotations
1659 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1661 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1664 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1666 Bug 556610 – giscanner/girparser.py drops parameter options
1668 * tests/scanner/drawable-injected-1.0-expected.gir,
1669 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1670 * giscanner/ast.py: allow Parameter to take options in the constructor
1671 * giscanner/girparser.py: parse parameter options (transfer,
1672 direction, allow-none)
1674 2008-10-16 Colin Walters <walters@verbum.org>
1676 Bug 556185 - segfault on g_callable_info_get_return_type
1678 Initial patch from John Ehresman.
1680 * tests/repository/*: Add a test using
1681 g_callable_info_get_return_type. Instead of casting a
1682 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1683 to call g_type_info_get_interface.
1685 2008-10-16 Colin Walters <walters@verbum.org>
1687 Bug 556579 - union and struct name misresolved
1689 * giscanner/transformer.py: The calls to _resolve_type_name
1690 for struct/union names was a legacy holdover from when type
1691 resolution had multiple phases. Now it's actively harmful
1692 since we might pull in an identical name from another
1696 2008-10-16 Colin Walters <walters@verbum.org>
1698 Bug 556432 - transfer annotations and defaults
1700 * giscanner/transformer.py: Canonicalize type
1701 after removing *, not before. This ensures that
1702 guchar* is transformed to 'uint8'.
1703 Add some comments here.
1704 * giscanner/glibtransformer.py: Add _adjust_transfer
1705 phase for tweaking GObject transfers.
1708 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1710 * configure.ac: enable bunch of gcc warning CFLAGS
1712 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1714 Bug 556543 – reduce compiler warnings
1716 * girepository/ginfo.c:
1717 * girepository/girepository.c (register_internal,
1718 count_interfaces, find_interface, find_namespace_version,
1719 parse_version, g_irepository_require):
1720 * girepository/girmodule.c (g_ir_module_build_typelib):
1721 * girepository/girnode.c (init_stats, dump_stats,
1722 _g_irnode_init_stats, _g_irnode_dump_stats,
1723 g_ir_node_can_have_member):
1724 * girepository/girparser.c (firstpass_end_element_handler,
1725 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1726 start_alias, start_type, end_type_top, parse_include, cleanup,
1728 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1729 * giscanner/giscannermodule.c (directive_get_options,
1730 type_get_child_list):
1731 * giscanner/scannerlexer.l (parse_gtkdoc):
1732 * giscanner/scannerparser.y (ctype_free):
1733 * giscanner/sourcescanner.c:
1734 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1735 * tests/types/gitesttypes.c:
1736 * tools/compiler.c (main):
1737 * tools/generate.c (write_repository): Remove unused variables
1738 and code, add missing includes, declarations and case
1741 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1743 Bug 556541 – access union members through UnionBlob rather than
1746 * girepository/ginfo.c (g_union_info_find_method): access union
1747 members through UnionBlob rather than StructBlob
1749 2008-10-15 Colin Walters <walters@verbum.org>
1751 Bug 556331 - clean up includes handling
1753 * tools/g-ir-scanner: Rework command line arguments; now we take
1754 --add-include-path and --include separately.
1755 * giscanner/girwriter.py: Separate name= and version= in include
1757 * giscanner/ast.py: Add Include type.
1758 * giscanner/transformer.py: Cleanups to register_include now that
1759 we don't need to handle mixed filenames and relative arguments.
1760 * girepository/girparser.c: Parse name and version separately;
1761 this fixes a bug as a side effect where we weren't resolving
1762 through aliases for basic types.
1763 * girepository/girepository.c: Fix format string args.
1764 * gir/Makefile.am: Update.
1767 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1769 Bug 556434 – unhandled interface/object/... member types
1771 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1772 g_ir_node_build_typelib): Check all
1773 interface/object/boxed/struct/union members are processed and
1774 abort if they are not. (Mostly callbacks in structs, but also
1775 fields in interfaces.)
1777 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1779 * a/girepository/girnode.c (g_ir_node_build_members,
1780 g_ir_node_build_typelib): refactor common code for processing
1781 members to a function
1783 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1785 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1786 transformation is lossless (it's not)
1788 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1790 * tests/Makefile.am: fix tests to compare xml to xml instead of
1791 typelib to xml, and stop on error
1793 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1795 * tools/generate.c (write_type_name, write_type_info,
1796 write_type_info, write_object_info, write_object_info,
1797 write_interface_info, write_error_domain_info): reduce code
1800 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1802 Bug 556174 – parse types for lists etc.
1804 * girepository/girparser.c (end_type_recurse):
1806 * tools/generate.c (write_type_info, write_field_info,
1807 write_callable_info, write_callable_info, write_constant_info,
1808 write_property_info): use nested <type>s for lists and hashes
1810 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1813 * tests/object.gir: remove trailing whitespace from inside
1814 elements to match g-ir-generate output
1816 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1818 * tools/generate.c (xml_printf): quote printf arguments so that
1819 we don't generate invalid XML by writing unescaped double quotes
1820 and such in attributes
1822 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1824 * tools/generate.c (write_field_info, write_callable_info,
1825 write_function_info, write_callback_info, write_struct_info,
1826 write_constant_value, write_signal_info, write_vfunc_info,
1827 write_object_info, write_interface_info, write_union_info,
1828 write_repository): remove unused indent parameters, xmlwriter
1829 keeps track of necessary indentation
1831 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1833 * tools/generate.c (xml_element_new, xml_element_free,
1834 xml_start_element, xml_end_element, xml_end_element_unchecked,
1835 xml_open, xml_close): Keep track of generated XML tree and
1836 handle indentation and closing tags properly.
1837 (write_field_info, write_callable_info, write_function_info,
1838 write_callback_info, write_struct_info, write_value_info,
1839 write_constant_info, write_enum_info, write_signal_info,
1840 write_vfunc_info, write_property_info, write_object_info,
1841 write_interface_info, write_error_domain_info, write_union_info,
1842 write_repository): Use xml_start_element and xml_end_element to
1845 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1847 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1848 (write_type_name, write_type_info, write_field_info,
1849 write_callable_info, write_function_info, write_callback_info,
1850 write_struct_info, write_value_info, write_constant_value,
1851 write_constant_info, write_enum_info, write_signal_info,
1852 write_vfunc_info, write_property_info, write_object_info,
1853 write_interface_info, write_error_domain_info, write_union_info,
1854 write_repository): wrap all FILE access to go through simple xmlwriter
1856 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1858 Bug 556400 – Fails to build on OS X 10.4
1860 * configure.ac: check for functions backtrace and backtrace_symbols
1861 * girepository/girparser.c (backtrace_stderr): Comment out
1862 implementation if the functions are not available.
1863 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1864 directory for better portability
1866 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1868 Bug 556433 – assume direction = out for int * parameters
1870 * giscanner/ast.py: define a list of types for which, if passed as
1871 reference, we assume a default direction of 'out'
1872 * giscanner/transformer.py: if a type has type pointer to one of the
1873 previously defined types, and no direction is set, assume out.
1874 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1876 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1878 * tests/scanner/annotation.c: fixed a few copy-paste errors
1880 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1882 Bug 556323 – transfer-ownership is wrong for functions returning const
1885 * giscanner/transformer.py: check for a const string as return value,
1886 not just const char*. Suggested by Colin Walters
1887 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1889 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1891 * girepository/ginfo.c, girepository/girepository.h: add
1892 g_union_info_find_method
1894 2008-10-14 Colin Walters <walters@verbum.org>
1896 * tests/repository/Makefile.am: Reenable repo test.
1897 * tests/repository/gitestrepo.c: Prepend search
1898 path for $(top_builddir)/gir dir so that we don't
1899 require installation for "make check" to pass.
1901 2008-10-13 Jürg Billeter <j@bitron.ch>
1903 * giscanner/glibtransformer.py:
1904 * tests/scanner/annotation-1.0-expected.gir:
1905 * tests/scanner/drawable-1.0-expected.gir:
1906 * tests/scanner/foo-1.0-expected.gir:
1907 * tests/scanner/utility-1.0-expected.gir:
1909 Support fields in GObject structs
1911 2008-10-13 Jürg Billeter <j@bitron.ch>
1913 * giscanner/ast.py: add signed integer and off_t to type_names
1915 2008-10-12 Jürg Billeter <j@bitron.ch>
1917 * giscanner/girparser.py: Parse bits attribute of fields
1919 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1921 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1922 * tests/repository/gitestrepo.c (main): instantiate
1923 'GCancellable' to ensure the GType is registered before using
1926 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1928 * giscanner/girparser.py: actually add the parsed constant nodes
1930 2008-10-12 Colin Walters <walters@verbum.org>
1932 * girepository/girepository.c: Don't cast DirEntry to Blob,
1933 actually look it up by offset.
1935 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1937 * giscanner/girparser.py: parse constant nodes in gir files
1939 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1941 * giscanner/transformer.py: prefix for constants have an underscore,
1942 so remove them as if they were functions, not objects.
1944 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1946 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1949 2008-10-12 Colin Walters <walters@verbum.org>
1951 Initial patch from Jani Monoses.
1953 * girepository/gtypelib.c: Fix inverted test for success
1956 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1958 * tools/generate.c (write_callable_info): use "transfer-ownership"
1959 attribute for return values
1961 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1963 * tools/generate.c (write_callable_info): move "transfer" and
1964 "null-ok" attributes from <function> to <return-value> element
1966 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1968 * girepository/girparser.c (start_return_value): handle
1969 "transfer-ownership" attribute
1971 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1973 * girepository/girparser.c (parse_param_transfer):
1974 * tools/generate.c (write_callable_info): use "container" for
1975 container/shallow ownership transfer (not "shallow")
1977 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1979 * girepository/girparser.c (parse_param_transfer,
1980 start_parameter): Refactor handling of transfer=none/shallow/full
1981 to separate function
1983 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1985 Bug 556048 – Crash in g_irepository_find_by_gtype
1987 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1988 * girepository/girepository.c (find_interface): Fix
1989 find_by_gtype case to get the type name from right offset
1991 2008-10-12 Jürg Billeter <j@bitron.ch>
1993 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1996 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1998 * girepository/gtypelib.h (RegisteredTypeBlob): make
1999 'unregistered' one bit wide as everywhere else
2001 2008-10-12 Jürg Billeter <j@bitron.ch>
2003 * giscanner/glibtransformer.py:
2004 * tests/scanner/annotation-1.0-expected.gir:
2005 * tests/scanner/drawable-1.0-expected.gir:
2006 * tests/scanner/drawable.h:
2007 * tests/scanner/foo-1.0-expected.gir:
2008 * tests/scanner/utility-1.0-expected.gir:
2010 Readd class records as workaround to not break Gtk typelib
2012 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2014 * tests/types/Makefile.am: fix typo in gitesttypes namespace
2016 2008-10-12 Jürg Billeter <j@bitron.ch>
2018 * giscanner/glibtransformer.py: Don't generate <record> elements
2020 * tests/scanner/*: Update test cases
2022 2008-10-11 Colin Walters <walters@verbum.org>
2024 Bug 552858: versioning
2026 This is a big patch. You should probably remove your installation
2029 * docs/typelib-format.txt: Add nsversion entry which holds
2030 version of namespace.
2031 * girepository/girepository.h: Add 'version' parameter to
2032 g_irepository_require. This may be NULL. Normally
2033 bindings should pass an explicit version though.
2034 * girepository/girepository.c: Lots of infrastructure to
2035 support versioning. Add some more documentation. Disallow
2036 some usage of NULL namespaces.
2037 * girepository/girmodule.c: Add version parameter.
2038 * girepository/gtypelib.c: Update header size.
2039 * giscanner/ast.py: Add version to Namespace.
2040 * giscanner/girparser.py: Parse version attribute from
2041 XML, pass to Namespace.
2042 * giscanner/girwriter.py: Write out version parameter.
2043 * giscanner/transformer.py: Clean up include registration.
2044 * tests/*: Add version attribute.
2045 * tests/invoke/invoke.c: Don't try looking up test before
2046 it's loaded in repository.
2047 * tools/generate.c: Output version parameter.
2048 * gir/Makefile.am: Add 2.0 version to .gir files.
2050 2008-10-11 Colin Walters <walters@verbum.org>
2052 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
2053 if we have mismatched parens.
2055 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2057 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
2058 on 'members' variable.
2060 2008-10-11 Colin Walters <walters@verbum.org>
2062 Bug 555947 - update annotations syntax
2064 * giscanner/ast.py: Default to None for transfer. Remove
2065 default transfers for container types; we require this to
2067 * giscanner/girwriter.py: Transfer is now 'none', 'container',
2068 'full' to match repository.
2069 * giscanner/scannerlexer.l: Annotations now are parenthesized.
2070 * giscanner/transformer.py: Update for new annotations syntax.
2073 2008-10-11 Johan Bilien <jobi@litl.com>
2075 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
2077 2008-10-11 Johan Bilien <jobi@litl.com>
2079 Bug 552347: Parse #defines constants
2081 * girepository/gtypelib.c: update the list of value_size
2082 with recently defined type tags
2083 * giscanner/scannerparser.y: brought back parsing of #defined, as
2084 present in older version
2085 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
2086 * giscanner/girwriter.py: write out constant tags in the gir
2087 * giscanner/sourcescanner.py: add accessor for const_string
2088 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
2091 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
2093 Bug 555946: Install a test module exercising all types, transfer
2098 * tests/types/*: Add and install a test module that has functions
2099 accepting and returning most of the basic types to enable bindings
2100 implementors to more easily test their type conversion routines.
2102 2008-10-11 Jürg Billeter <j@bitron.ch>
2104 Bug 552374: Const strings should be identified in the gir.
2106 * giscanner/transformer.py: support string memory management
2107 * tests/scanner/foo.h: use char * and const char *
2108 * tests/scanner/foo-expected.gir: test that
2110 2008-10-11 Johan Dahlin <johan@gnome.org>
2112 * giscanner/girparser.py:
2113 Also parse enums which are not glib types.
2115 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2117 Bug 552370: add one more test for unsigned as a type, not as
2120 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
2121 * test/scanner/foo.h: add function which uses unsigned as a type.
2122 * test/scanner/foo-expected.gir: test that.
2124 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
2126 Bug 555712: Struct and union issues
2128 * giscanner/scannerparser.y (struct_declarator): Use information
2129 provided about the bit width of a field.
2130 * giscanner/transformer.py (Transformer._create_member): Pass the
2131 symbol's const_int member to the created field (it represents the
2133 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
2134 field attribute, if present.
2135 * giscanner/ast.py (Field): Add 'bits' member, specifying the
2136 width in bits of the field (only relevant for bitfields).
2139 * giscanner/transformer.py (Transformer._create_typedef_struct)
2140 (Transformer._create_typedef_union): Add calls to _create_struct()
2141 and _create_union(), respectively. This causes the scanner to
2142 generate output for fields of struct and union typedefs.
2145 2008-10-11 Jürg Billeter <j@bitron.ch>
2147 Bug 552370: unsigned not scanned properly
2149 * giscanner/scannerparser.y: combine basic types such as unsigned
2150 int and long long when scanning
2151 * tests/scanner/foo-expected.gir:
2152 * tests/scanner/foo.c: (foo_test_unsigned):
2153 * tests/scanner/foo.h: test that
2155 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2157 Bug 554854: The --typelib-xml and --inject options should reuse
2158 giscanner parser/writer.
2160 * giscanner/ast.py: add constructor list to Struct and Union.
2161 Add new param in Return's contructor to define transfer.
2162 * giscanner/girparser.py: several additions to the parser in order
2163 to have parsing all nodes of the gir xml files.
2164 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
2165 and writer in --inject and --typelib-xml options.
2166 * giscanner/xmlwriter.py: ignore empty attributes instead of
2167 raising an error as this basically exposes a bug in GIRParser.
2168 This should be reverted as soon as the parser is fixed.
2170 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2172 Bug 552376: scanner generates wrong names for enum members when
2173 there's no defined gtype.
2175 * giscanner/utils.py (strip_common_prefix): Always strip common
2176 prefix exactly up to the last "_", and not beyond.
2177 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
2178 here is that the first character after the last '_' should should be
2179 the same as the character in the same position on the type name.
2180 * tests/scanner/foo-expected.gir: test that
2182 2008-10-10 Lucas Rocha <lucasr@gnome.org>
2184 Bug 555293: append library_paths to LPATH env variable to work
2185 around a bug in find_library when using ldconfig.
2187 * tools/g-ir-scanner (main): ditto.
2189 2008-10-09 Lucas Rocha <lucasr@gnome.org>
2191 * girepository/girepository.c (register_internal): fix regression on
2192 invoke test case by making sure we load the global module in the
2193 typelib when dealing with inline typelibs.
2194 * girepository/gtypelib.c: a couple of coding style fixes.
2196 2008-10-06 Lucas Rocha <lucasr@gnome.org>
2198 Bug 555294: Add support for multiple shared libraries per typelib.
2200 * girepository/ginvoke.c (g_function_info_invoke),
2201 girepository/ginfo.c(g_registered_type_info_get_g_type): use
2202 g_typelib_symbol instead of g_module_symbol.
2203 * girepository/girepository.h: remove g_typelib_set_module and add
2205 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
2206 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
2207 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
2208 modules instead of just one. The symbol lookup is now abstracted
2209 behind g_typelib_symbol which tries to find the passed symbol name in
2211 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
2212 and write shared_library attribute as a comma-separated list of libs.
2214 2008-10-06 Colin Walters <walters@verbum.org>
2216 * giscanner/transformer.py: Parse length= annotation as
2217 a parameter name, not a raw int.
2220 2008-10-03 Colin Walters <walters@verbum.org>
2222 Bug 551744: Non-GObject types aren't aggregating ctors and methods
2224 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
2226 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
2230 2008-10-03 Colin Walters <walters@verbum.org>
2232 Bug 554576: scan problem with ev_selection_render_selection()
2234 * giscanner/transformer.py: Only do type resolution once we've
2235 scanned all types. What could happen before is that we'd strip
2236 the namespace from local type "EvSelection" => Selection, and
2237 then later pull a "Selection" from some other namespace because
2238 we hadn't yet seen the local EvSelection. This could come
2239 down to hash table ordering and other things so not easy
2240 to write a test for.
2242 2008-10-03 Lucas Rocha <lucasr@gnome.org>
2244 * giscanner/girwriter.py (_parser_member): fix the last parameter of
2245 GLibEnumMember constructor as it should be the enum member nick.
2247 2008-10-02 Colin Walters <walters@verbum.org>
2249 Bug 552961: remove this parameter for methods
2251 * giscanner/glibtransformer.py: Delete this parameter; it is
2253 * girepository/ginvoke.c: Insert this parameter for methods.
2254 * girepository/gtypelib.c: Remove no longer needed verification of
2255 method this parameter.
2258 2008-09-30 Dan Winship <danw@gnome.org>
2260 Bug 554490: g-ir-scanner gets confused by '\\'
2262 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
2263 backslashes so it will correctly parse '\\' and "\\"
2265 * tests/scanner/annotation.c: add a use of '\\' to make sure that
2268 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
2270 2008-10-02 Colin Walters <walters@verbum.org>
2272 bug 552393: Note variadic functions
2274 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
2275 to use parameter_list directly.
2276 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
2277 * giscanner/ast.py: Add Varargs type.
2278 * giscanner/transformer.py: Check for ellipsis symbol, transform
2280 * girepository/girnode.h: Add varargs flag to in-memory nodes.
2281 Parse varargs functions, but filter them out before we start
2282 compiling the typelib.
2284 2008-10-02 Colin Walters <walters@verbum.org>
2286 Bug 554632: type tag for GType
2288 * girepository/girepository.h, girepository/girepository.c:
2289 Add type tag for GType - it's a special type we don't want
2290 to resolve to just "long".
2291 * docs/typelib-format.txt: Update.
2292 * girepository/girparser.c: Parse it.
2293 * giscanner/glibtransformer.py: Ensure we don't put GType in
2295 * tools/generate.c: Remove hardcoded type list.
2298 2008-09-30 Dan Winship <danw@gnome.org>
2300 Bug 554521: scanner generates wrong names for enum members with
2301 full type name prefix
2303 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
2304 right amount when the entire "first" string is a prefix of
2307 * tests/scanner/foo.h (FooEnumFullname):
2308 * tests/scanner/foo-expected.gir: test that
2310 2008-09-29 Colin Walters <walters@verbum.org>
2312 Bug 552380: Array parameters should be marked in the gir
2314 * giscanner/ast.py: Default char** to utf8[], and guchar* to
2315 uint8[]. Add Array, List, and Map subclasses of Type;
2316 these types can be generic. Return transfer defaults
2317 to true if return value is string or container type.
2318 Delete Sequence type.
2319 * giscanner/scannerlexer.l: Syntax change for annotations;
2320 use <> since it's more readable.
2321 * giscanner/girwriter.py: Write out these changes.
2322 * giscanner/girparser.py: Parse them.
2323 * giscanner/transformer.py: Have a defined set of
2324 both list and map types. When creating a type,
2325 check if the ctype we've parsed is one of them,
2326 if so create a container type subclass as appropriate.
2327 * girepository/girparser.c: Parse in generic types.
2330 2008-09-27 Colin Walters <walters@verbum.org>
2332 * tools/g-ir-scanner: Add --inject option.
2334 2008-09-25 Colin Walters <walters@verbum.org>
2336 Remove non-repository types from GIR
2338 * giscanner/ast.py: The canonical name is 'utf8', not
2340 * giscanner/glibast.py: A few more glib type mappings.
2341 * girepository/girparser.c: We only parse repository types.
2342 * tests/*.gir: Update.
2344 2008-09-23 Colin Walters <walters@verbum.org>
2346 Bug 552566: Add time_t type
2348 We need a type for time_t since it's special in C, and just
2349 mapping it to long precluded bindings from handling it
2352 2008-09-19 Colin Walters <walters@verbum.org>
2354 Bug 552390: Handle capitialization like "DBus" more robustly
2356 The to_underscores function was designed for use against prefixed
2357 names; we need a separate function which will convert names like
2358 DBusFoo into dbus_foo, not d_bus_foo.
2360 2008-09-19 Colin Walters <walters@verbum.org>
2362 Add check to make sure we're not hitting out unresolved types
2364 Validate the "this" argument for methods
2366 Remove heuristic matching of methods to classes based on prefix
2368 It was a broken hack that dated from when we handled underscoring
2369 and capitalization conventions less well.
2371 2008-09-18 Colin Walters <walters@verbum.org>
2373 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
2375 On Darwin, the suffix for installed shared libraries (.dylib) is
2376 different from loadable modules (.so). We use a bit of magic shell
2377 script from Behdad Esfahbod to figure out the right suffix.
2379 2008-09-15 Johan Dahlin <johan@gnome.org>
2381 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
2382 a wrapper for type_qualifier as well.
2384 2008-09-15 Colin Walters <walters@verbum.org>
2386 http://bugzilla.gnome.org/show_bug.cgi?id=552065
2388 * giscanner/ast.py: Add deprecation attributes.
2389 * giscanner/girwriter.py: Write out deprecation data.
2390 * girepository/girparser.c: Relax parsing; deprecated
2391 attribute now includes freeform string.
2392 * giscanner/scannerlexer.l: Parse Deprecated.
2393 * giscanner/transformer.py: Look for deprecated attribute
2395 * tests/scanner/*: Add a Deprecated test.
2397 2008-09-14 Tor Lillqvist <tml@novell.com>
2399 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
2401 2008-09-14 Colin Walters <walters@verbum.org>
2403 * giscanner/glibtransformer.py: Ignore functions with
2406 2008-09-12 Colin Walters <walters@verbum.org>
2408 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
2410 2008-09-12 Colin Walters <walters@verbum.org>
2412 * giscanner/ast.py: Bind pid_t to INT for vte.
2414 2008-09-12 Colin Walters <walters@verbum.org>
2416 * giscanner/girparser.py: Parse c:type for boxed records/unions.
2417 * giscanner/glibast.py: Avoid overwriting ctype.
2418 * giscsanner/transformer.py: Try resolving types using the GType names.
2420 2008-09-12 Colin Walters <walters@verbum.org>
2422 * giscanner/minixpath.py: Code to run an "XPath"
2423 assertion against an XML tree, taken from
2424 gir-repository/gir/tests.py.
2425 * giscanner/Makefile.am: Ship it.
2426 * tools/g-ir-scanner: Add --xpath-assertions option.
2427 * gir/GLib-assertions.txt: Add a few assertions.
2428 * gir/Makefile.am: Run them.
2430 2008-09-11 Colin Walters <walters@verbum.org>
2432 http://bugzilla.gnome.org/show_bug.cgi?id=551737
2434 * giscanner/transformer.py: Fix strip_namespace_func to only strip
2435 prefix if it ends with _. Tweak callback stripping to determine
2436 based on presence of _ whether we need to use strip_namespace_func
2437 or strip_namespace_object.
2439 2008-09-09 Owen Taylor <otaylor@redhat.com>
2441 * docs/typelib-format.txt: Wether => Whether
2443 2008-09-08 Colin Walters <walters@verbum.org>
2445 * girepository/girparser.c: Default to "readable" for properties.
2446 * giscanner/ast.py: Add readable, writable etc.
2447 * giscanner/girwriter.py: Writ them.
2448 * giscanner/glibtransformer.py: Inspect them.
2451 2008-09-07 Colin Walters <walters@verbum.org>
2453 * giscanner/cgobject.py: Add comment.
2455 2008-09-07 Colin Walters <walters@verbum.org>
2457 * giscanner/cgobject.py: Also call g_thread_init.
2459 2008-09-07 Colin Walters <walters@verbum.org>
2461 * giscanner/transformer.py: Fix regression by not
2462 stripping prefix before stripping namespace for unions
2465 2008-09-06 Colin Walters <walters@verbum.org>
2467 * giscanner/transformer.py: If a namespace contains
2468 multiple caps, try stripping both gnomekeyring_ and
2471 2008-09-07 Johan Dahlin <johan@gnome.org>
2473 Bug 551162 – giscanner does not recognize asm and __asm__
2474 * giscanner/scannerlexer.l:
2475 Patch by Jani Monoses.
2477 2008-09-06 Colin Walters <walters@verbum.org>
2479 * girepository/girnode.c: Allow gtype_name
2480 and gtype_init in struct and union.
2481 * girepository/girparser.c: Parse glib:
2482 boxed bits for both structure and union.
2483 * girepository/gtypelib.c: Don't barf
2484 if structure is boxed.
2485 * giscanner/girparser.py: Parse new XML
2487 * giscanner/girwriter.py: Write out new
2489 * giscanner/glibast.py: Define new classes
2490 which are both Boxed and Struct/Union, as
2491 well as an "Other" for everything else.
2492 * giscanner/glibtransformer.py: Handle
2493 boxed types specially; we try to merge
2494 them with a struct/union if one exists,
2495 otherwise fall back to generic boxed.
2497 * tools/generate.c: Write out new format.
2499 2008-09-06 Johan Dahlin <johan@gnome.org>
2501 * giscanner/grealpath.h: Include stdlib.h
2503 * docs/g-ir-generate.1: Remove leading %
2505 2008-09-01 Colin Walters <walters@verbum.org>
2507 * girepository/girparser.c: Look at c:type to determine
2508 whether or not an item is a pointer.
2510 2008-09-01 Johan Dahlin <johan@gnome.org>
2512 * tests/scanner/Makefile.am:
2513 Set PYTHONPATH so the scanner can run
2514 even if you didn't install anything.
2516 2008-09-01 Johan Dahlin <johan@gnome.org>
2519 Post-release version bump
2522 2008-09-01 Johan Dahlin <johan@gnome.org>
2526 2008-08-31 Colin Walters <walters@verbum.org>
2528 * giscanner/glibtransformer.py: Quiet info
2531 2008-08-31 Johan Dahlin <johan@gnome.org>
2534 Bump version to 0.5.0
2536 2008-08-31 Colin Walters <walters@verbum.org>
2538 * giscanner/glibtransformer.py: Follow aliases to ensure
2539 we don't get a constructor returning a basic type.
2540 * giscanner/transformer.py: Add function to follow aliases.
2543 2008-08-31 Johan Dahlin <johan@gnome.org>
2545 * giscanner/scannerlexer.l:
2546 * giscanner/scannerparser.y:
2547 * giscanner/sourcescanner.h:
2548 * giscanner/sourcescanner.py:
2549 Parse GCC extensions in the parser instead of just undeffing them
2550 in the pre-processor.
2552 2008-08-31 Johan Dahlin <johan@gnome.org>
2554 * giscanner/glibtransformer.py:
2555 Clean up a huge if. Do not add methods or constructors
2557 * giscanner/utils.py:
2558 second might be longer than first, check that.
2560 2008-08-31 Johan Dahlin <johan@gnome.org>
2565 2008-08-31 Colin Walters <walters@verbum.org>
2567 * girepository/girparser.c: Don't lose if we
2570 2008-08-31 Colin Walters <walters@verbum.org>
2572 * giscanner/glibtransformer.py: Look for libtool
2573 library in current directory
2574 * tests/scanner - Update.
2576 2008-08-30 Colin Walters <walters@verbum.org>
2578 * docs/typelib-format.txt: Add a guint32
2580 * gir/Makefile.am: Dep on Makefile
2581 * girepository/ginfo.c:
2582 * girepository/girepository.c: Clean up
2583 default typelib handling; remove global
2584 default_typelib variable. Ensure we handle
2585 NULL repository in more places.
2586 Support dependency resolution.
2587 Support lazy loading.
2588 * girepository/girepository.h: Remove
2589 g_irepository_unregister; we don't support
2590 unloading typelibs since really they're
2591 process-global. Update for lazy loading
2593 * girepository/girmodule.c: Use g_new0.
2594 Add dependencies to GirModule.
2595 * girepository/girparser.c: Parse dependencies.
2596 * girepository/gtypelib.c: Add 4 bytes for
2598 * tests/Makefile.am: Kill off gobject.gir,
2599 it conflicts with the real one.
2600 * tests/object.gir: Dep on GObject.
2601 * tools/generate.c: Take --includedir
2602 argument to say which directories to search
2603 for typelibs. Print out dependencies.
2605 2008-08-30 Colin Walters <walters@verbum.org>
2607 * giscanner/glibtransformer.py: Reduce warning noise.
2609 2008-08-29 Colin Walters <walters@verbum.org>
2611 * girepository/ginfo.c: Add some assertions regarding
2612 refcounts, just to be sure.
2613 * giscanner/glibtransformer.py: Blacklist a few more
2616 2008-08-29 Colin Walters <walters@verbum.org>
2618 * giscanner/glibtransformer.py: Blacklist a few
2619 functions that use GError oddly
2621 2008-08-29 Colin Walters <walters@verbum.org>
2623 * girepository/gtypelib.c: Don't crash if no
2626 2008-08-29 Colin Walters <walters@verbum.org>
2628 * girepository/girparser.c: Handle chains of aliases
2629 across modules by ensuring we fully qualify aliases
2632 2008-08-29 Colin Walters <walters@verbum.org>
2634 * girepository/girparser.c: Don't search aliases
2637 2008-08-29 Colin Walters <walters@verbum.org>
2639 * girepository/girparser.c: Rewrite type parsing
2640 to handle both GLib parsing case as well as correctly
2641 handling GLib.List and friends. Don't try to treat
2642 e.g. ListStore as a List.
2644 2008-08-29 Colin Walters <walters@verbum.org>
2646 * girepository/gtypelib.c: Add more context
2649 2008-08-29 Colin Walters <walters@verbum.org>
2651 * giscanner/glibtransformer.py: Add some informative
2652 logging messages in corner cases. Be sure we use
2653 the most recent node set instead of a cache
2654 when generating result set.
2655 * tests/: Remove duplicated bits in expected girs
2656 * girepository/girparser.c: Accept both List (for
2657 compiling GLib) and GLib.List (what the scanner
2660 * tools/generate.c: Generate canonical form.
2662 2008-08-29 Johan Dahlin <johan@gnome.org>
2664 * giscanner/config.py.in:
2665 Use datarootdir instead of datadir to avoid
2666 an autoconf warning.
2668 2008-08-29 Johan Dahlin <johan@gnome.org>
2672 * examples/gdk-pixbuf.gidl:
2674 Update and remove old cruft.
2676 2008-08-29 Johan Dahlin <johan@gnome.org>
2679 * docs/g-ir-compiler.1:
2680 * docs/g-ir-generate.1:
2681 * docs/g-ir-scanner.1:
2682 Add man pages for the generator and compiler.
2684 2008-08-29 Johan Dahlin <johan@gnome.org>
2686 * docs/g-ir-scanner.1: Document
2688 * giscanner/Makefile.am:
2689 * giscanner/gidlparser.py:
2690 * giscanner/gidlwriter.py:
2691 * tools/g-ir-scanner:
2692 Remove gidl support.
2694 2008-08-28 Colin Walters <walters@verbum.org>
2696 * tests/scanner/Makefile.am: Pass the right
2697 --includedir args. Add a Makefile dep.
2698 * tools/compiler.c: Pass includedirs down.
2699 * girepository/girparser.c: Actually put
2700 includedirs in context, pass down. Fix
2703 2008-08-28 Colin Walters <walters@verbum.org>
2705 * gir/Makefile.am: Use --includedir
2706 * girepository/girparser.c: Recursively parse
2707 includes to pull in aliases and expand them.
2708 We need this to avoid putting unknown names in
2710 * tools/compiler.c: Add --includedir option.
2711 * giscanner/ast.py: Map size/ssize to types
2714 2008-08-28 Tor Lillqvist <tml@novell.com>
2716 Make check now runs successfully on Windows.
2718 * tools/compiler.c (write_out_typelib): Use binary mode for output
2721 * girepository/girnode.c: Don't print NULL strings.
2723 * tests/invoke/Makefile.am
2724 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2725 convince libtool to build shared libraries.
2727 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2728 g_assert() instead of printing out expected errors.
2730 2008-08-28 Tor Lillqvist <tml@novell.com>
2732 * girepository/gtypelib.h: Change type of bitfield fields from
2733 guint to the most suitable smaller type. This makes the struct
2734 sizes match the ones on Linux that the sanity check expects when
2735 using gcc -mms-bitfields on Windows.
2737 2008-08-28 Johan Dahlin <johan@gnome.org>
2742 * giscanner/Makefile.am:
2743 * tests/Makefile.am:
2744 * tests/scanner/Makefile.am:
2745 Make distcheck pass.
2747 2008-08-27 Johan Dahlin <johan@gnome.org>
2749 * giscanner/Makefile.am:
2750 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2752 2008-08-27 Tor Lillqvist <tml@novell.com>
2754 Make g-ir-scanner work on Windows. Still problems with the typelib
2755 code. Changes okayed by jdahlin.
2757 * configure.ac: Check for Windows, set Automake conditional
2758 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2759 avoid shell quoting issues
2761 * girepository/Makefile.am: Use -no-undefined so that libtool
2762 agrees to build a shared library on Windows.
2764 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2765 Windows. Empty implementation on Windows so far.
2767 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2768 informative error message for the assertion failures. Tell also
2769 what the expected size of the struct is. Check all sizes first and
2770 fail afterwards if at least one size was different from expected.
2772 * tools/Makefile.am: Reorder libraries into proper logical
2775 * tools/generate.c: Don't include <dlfcn.h>, not used.
2777 * giscanner/Makefile.am: On Windows, link with the Python library,
2778 and install the module DLL as _giscanner.pyd. Remove the
2779 unnecessary import library and libtool library that libtool has
2782 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2783 and just skip it. Recognize also two "l" suffixes for long long
2784 constants. Recognize also __inline__.
2786 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2787 GetFullPathName(). As such, GetFullPathName() does more than the
2788 UNIX realpath(). It also changes relative paths into absolute
2789 paths. But for our purposes that shouldn't matter.
2791 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2792 Windows the file descriptor passed to us is from Python. Python
2793 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2794 uses msvcrt.dll. On Windows, file descriptors are specific to
2795 which C library is used. So we must find out what underlying OS
2796 handle corresponds to the file descriptor Python passes us, and
2797 then make that into a file descriptor valid for the C library this
2800 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2801 __attribute__ as the lexer now handles it. The definition as empty
2802 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2803 __attribute__. Close the temp file before unlinking it.
2805 * giscanner/cgobject.py: Use correct library name for the gobject
2808 * gir/Makefile.am: Must pass the full basename of the DLLs on
2809 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2810 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2811 reality they won't change, until there is a GLib 3, and then also
2812 the Unix code here needs changing.
2814 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2817 2008-08-26 Colin Walters <walters@verbum.org>
2819 * girepository/girepository.c: Search
2820 $DATADIR/girepository instead of
2821 $DATADIR/gitypelibs; this naming makes
2822 it clearer that e.g. jgir can install
2824 * gir/Makefile.am: Install there.
2826 2008-08-26 Colin Walters <walters@verbum.org>
2828 * girepository/gtypelib.c (_g_typelib_init): Also
2829 use G_MODULE_SUFFIX instead of hardcoding .so.
2831 2008-08-26 Colin Walters <walters@verbum.org>
2833 * girepository/gtypelib.c (_g_typelib_init): Free
2834 string in the right place.
2836 2008-08-26 Colin Walters <walters@verbum.org>
2838 * girepository/gtypelib.c (_g_typelib_init): Handle
2839 both .la and .so names; this works better in the
2840 uninstalled library case.
2842 2008-08-26 Johan Dahlin <johan@gnome.org>
2845 * giscanner/Makefile.am:
2846 * giscanner/cgobject.py:
2847 * giscanner/config.py.in:
2848 * giscanner/sourcescanner.py:
2849 Avoid undeffing __GNUC__, instead define
2850 __attribute__ & friends. Remove glibconfig.h hack.
2851 This makes gobject-introspection work better on
2852 MacOS X, Thanks to Richard Hult for kind help.
2854 2008-08-25 Colin Walters <walters@verbum.org>
2856 * giscanner/glibtransformer.py: Always print
2859 2008-08-25 Colin Walters <walters@verbum.org>
2861 * giscanner/glibtransformer.py: Skip over
2862 interfaces we don't know.
2864 2008-08-25 Colin Walters <walters@verbum.org>
2866 * girepository/girparser.c: Parse new implements
2867 syntax, drop gapi one.
2868 * tests/object.gir: Update.
2869 * tools/generate.c: Generate new syntax.
2871 2008-08-25 Colin Walters <walters@verbum.org>
2873 * giscanner/ast.py: Add interfaces property
2875 * giscanner/girwriter.py: Write out implemented
2877 * giscanner/glibtransformer.py: Introspect
2878 implemented interfaces.
2879 * tests/scanner/*: Make FooObject implement
2882 2008-08-25 Colin Walters <walters@verbum.org>
2884 * giscanner/glibtransformer.py: More correctly pair
2885 methods; if we have a symbol that starts with
2886 e.g. hippo_canvas look for a matching HippoCanvas
2887 class before accepting e.g. HippoCanvasImage.
2889 2008-08-24 Colin Walters <walters@verbum.org>
2891 * tools/g-ir-scanner: Filter out unknown options from
2894 2008-08-24 Colin Walters <walters@verbum.org>
2896 * giscanner/glibtransformer.py: Fail with better
2897 error if we can't find library.
2899 2008-08-24 Colin Walters <walters@verbum.org>
2901 * tools/g-ir-scanner: Use subprocess instead of
2902 commands, works on Windows and avoids the evil
2905 2008-08-24 Colin Walters <walters@verbum.org>
2907 * giscanner/glibtransformer.py: Skip over
2908 g_object_get_type from GLib trunk.
2910 2008-08-24 Colin Walters <walters@verbum.org>
2912 * girepository/girepository.c (g_irepository_require):
2913 Don't open shared library here; we already do it
2916 2008-08-24 Colin Walters <walters@verbum.org>
2918 * girepository/gtypelib.c: Add context stack so
2919 when we get an error we can print out nicely
2922 2008-08-24 Johan Dahlin <johan@gnome.org>
2924 * girepository/girparser.c (start_glib_boxed), (start_function),
2925 (start_field), (start_alias):
2926 Refactor a couple of parsing functions to be simpler to follow.
2929 2008-08-24 Johan Dahlin <johan@gnome.org>
2931 * girepository/girparser.c (start_function):
2932 Remove left-over code, checking type of function.
2934 2008-08-23 Colin Walters <walters@verbum.org>
2936 * giscanner/config.py: Define DATADIR.
2937 * giscanner/transformer.py: Look in DATADIR.
2939 2008-08-23 Colin Walters <walters@verbum.org>
2941 * girepository/gtypelib.c: Check constructor
2943 * girepository/girnode.c: Small tweaks.
2944 * girepository/ginfo.c: Calculate signature offsets
2946 * girepository/girparser.c: Remove duplicate
2948 * giscanner/glibtransformer.py: Avoid marking
2949 functions which return a basic type as
2952 2008-08-23 Colin Walters <walters@verbum.org>
2954 * girepository/girparser.c: Ignore <include>.
2955 * giscanner/girparser.py: Parse them.
2956 * giscanner/girwriter.py: Generate them.
2957 * giscanner/transformer.py: Process <include>
2958 recursively. Don't require full path for
2959 includes, look in {$XDG_DATA_DIRS}/gir.
2960 * tools/g-ir-scanner: Pass through includes.
2961 * Makefile.am: Remove extra --include
2963 * *-expected.gir: Add expected includes.
2965 2008-08-23 Johan Dahlin <johan@gnome.org>
2967 * tests/scanner/Makefile.am:
2968 * tests/scanner/annotation-expected.gir:
2969 * tests/scanner/drawable-expected.gir:
2970 Avoid duplication in the Makefile, regenerate with new
2971 namespaces (same as the filename)
2973 2008-08-22 Colin Walters <walters@verbum.org>
2975 * girepository/girnode.c: Don't hardcode integers,
2978 2008-08-22 Johan Dahlin <johan@gnome.org>
2980 * giscanner/sourcescanner.py:
2981 Check for ../gobject-introspection-1.0.pc.in to determine
2982 if we run installed or uninstalled.
2984 2008-08-22 Johan Dahlin <johan@gnome.org>
2987 * giscanner/sourcescanner.py:
2988 Send in undefs/defines via writing it directly to stdin
2989 of cpp instead of via arguments.
2991 2008-08-22 Colin Walters <walters@verbum.org>
2993 * tools/generate.c, tools/compiler.c: Default
2995 * all Makefile.am: Update.
2997 2008-08-22 Colin Walters <walters@verbum.org>
2999 * girepository/girparser.c: Pass through
3000 recursive types. Avoid overwriting errors.
3001 * giscanner/xmlwriter.py: Always write the
3003 * tests/*.gir: Adjust.
3004 * tests/scanner/Makefile.am: Build typelibs,
3005 and generate XML from those. Once we
3006 have a good diff mechanism...
3007 * tests/scanner/*-expected.gir: Add XML
3009 * tools/g-ir-scanner: Accept --typelib-xml
3011 * tools/generate.c: Better defaults for transfer.
3013 2008-08-22 Johan Dahlin <johan@gnome.org>
3017 * giscanner/Makefile.am:
3018 * giscanner/config.py.in:
3019 * giscanner/sourcescanner.py:
3020 Use the generated glibconfig.h for all scanner invokations.
3021 Rename it to glibconfig-scanner.h and install it.
3022 Add a config.py which so far contains the include dir.
3024 2008-08-22 Johan Dahlin <johan@gnome.org>
3027 Replace glibconfig.h with our own, do some replacement
3028 for CPP/C features we do not support
3030 2008-08-22 Colin Walters <walters@verbum.org>
3032 * tools/generate.c (write_callable_info): Fix unref
3035 2008-08-22 Colin Walters <walters@verbum.org>
3037 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
3038 * tests/Makefile.am: Support $(DEBUG)
3039 * tools/generate.c: Do immediate close tags if no
3042 2008-08-21 Colin Walters <walters@verbum.org>
3044 * tests/scanner/drawable-expected.gir,
3045 * tests/scanner/drawable.c,
3046 * tests/scanner/drawable.h:
3049 2008-08-21 Colin Walters <walters@verbum.org>
3051 * giscanner/glibtransformer.py: Compute prefix
3052 by searching through the symbol for bits
3053 rather than going directly from ctype; this fixes
3056 2008-08-21 Colin Walters <walters@verbum.org>
3058 * giscanner/glibtransformer.py: Also try squashing
3059 underscores from namespace, fixes webkit_web_view_new.
3061 2008-08-21 Colin Walters <walters@verbum.org>
3063 * giscanner/glibtransformer.py: More ctor work,
3064 avoid having gtk_window_group_new end up under
3067 2008-08-21 Colin Walters <walters@verbum.org>
3069 * giscanner/glibtransformer.py: Much simpler approach
3070 of mapping uscored names to classes.
3071 * giscanner/utils.py: Remove unnecessary function.
3073 2008-08-21 Johan Dahlin <johan@gnome.org>
3075 * girepository/girepository.c (g_irepository_require):
3076 Plug memory leak and avoid using freed memory.
3077 Resolve the whole module path, here as well.
3079 2008-08-21 Colin Walters <walters@verbum.org>
3081 * giscanner/glibtransformer.py: Look up all permutations
3082 of class names when scanning methods/ctors based on
3083 the prefix instead of using the return value. This
3084 associates gtk_window_new with the right class.
3086 2008-08-21 Colin Walters <walters@verbum.org>
3088 * girepository/girmodule.c (g_ir_module_build_typelib):
3089 Revert change to increment header_size; we do that in
3092 2008-08-21 Colin Walters <walters@verbum.org>
3094 * girepository/girnode.c (write_string): Tweak to
3095 use UINT instead of INT. Not likely to matter.
3096 * girepository/girmodule.c (g_ir_module_build_typelib):
3097 Add to header_offset as well for header strings
3098 to match what write_string does.
3099 * girepository/gtypelib.c: Replace is_name with
3100 validate_name, which more strongly validates and
3101 handles errors in a better way. Update all callers.
3102 * giscanner/glibtransformer.py: Handle constructors
3105 2008-08-21 Johan Dahlin <johan@gnome.org>
3107 * gir/Makefile.am (typelibs_DATA): Build and
3108 install the Gio.typelib too
3110 * girepository/gtypelib.c (_g_typelib_init):
3111 Use g_module_build_path to resolve the shlib name
3113 2008-08-21 Colin Walters <walters@verbum.org>
3115 * gir/Makefile.am: CLEANFILES typelibs too.
3117 2008-08-21 Johan Dahlin <johan@gnome.org>
3119 * giscanner/glibtransformer.py:
3120 Do not send .la files through find_library.
3122 2008-08-21 Colin Walters <walters@verbum.org>
3124 * girepository/girparser.c (g_irepository_require):
3125 Fix one small leak in error case.
3127 2008-08-21 Johan Dahlin <johan@gnome.org>
3130 Parse glibconfig.h as well and install the compiled
3133 2008-08-21 Johan Dahlin <johan@gnome.org>
3136 * giscanner/glibtransformer.py:
3137 * tools/g-ir-scanner:
3138 Do not hard-core library names in the Makefile, reuse
3139 ctypes find_library instead.
3141 2008-08-21 Johan Dahlin <johan@gnome.org>
3143 * girepository/girparser.c (resolve_aliases):
3144 Remove compilation warnings
3146 2008-08-21 Johan Dahlin <johan@gnome.org>
3148 * girepository/girepository.c (g_irepository_require):
3149 Rewrap and fix double free bug by leaking a bit.
3151 2008-08-20 Colin Walters <walters@verbum.org>
3153 * girepository/girepository.c: Add new function
3154 g_irepository_get_typelib_path which tells
3155 us from where we loaded a namespace.
3157 2008-08-20 Colin Walters <walters@verbum.org>
3159 * tests/scanner/*-expected.gir: Adjust for
3160 added shared-library.
3161 * giscanner/giwriter.py: Make pylint happy.
3163 2008-08-20 Colin Walters <walters@verbum.org>
3165 * girepository/girmodule.c (g_ir_module_build_typelib):
3166 Calculate size correctly, avoid use-after-free.
3168 2008-08-20 Colin Walters <walters@verbum.org>
3170 * girepository/girepository.c: Remove
3171 g_irepository_register_file in favor of
3172 g_irepository_require. There are two
3173 possible deployment scenarios for typelibs:
3174 First, separate in $DATADIR/gitypelibs/. Second,
3175 they may be embedded in shlibs. However since
3176 the first is now the normal case, the API is
3177 optimized around it.
3179 Refactor internals to look up typelibs for
3180 namespaces just-in-time, but we expect
3181 consumers to call g_irepository_require.
3183 Also, add some docs. No one has died from that
3185 * gir/Makefile.am: Need --library for glib.
3186 * giscanner/girwriter.py: Write out shared-library.
3187 * tools/g-ir-writer: Take the first --library
3188 argument as the target of shared-library. In
3189 the future we should make this nicer with pkg-config
3192 2008-08-20 Colin Walters <walters@verbum.org>
3194 * girepository/girparser.py: And parse them.
3196 2008-08-20 Johan Dahlin <johan@gnome.org>
3198 * giscanner/glibast.py: Add gshort/gushort types
3200 2008-08-20 Colin Walters <walters@verbum.org>
3202 * gir/Makefile.am: Rename .gir files using GI namespace.
3203 * girepository/girepository.c: Use XDG_DATA_DIRS for
3204 looking up typelibs. Also typelibs are now suffixed
3206 * tests/invoke/Makefile.am: Only use metadata.
3207 * girepository/Makefile.am: Remove unnecessary include.
3208 * tests/scanner/Makefile.am: Update using GI namespaces
3209 for scanner includes.
3211 2008-08-20 Colin Walters <walters@verbum.org>
3213 * girepository/transformer.py: Suppress aliases whose
3215 * girepository/ast.py: Define some more aliases.
3217 2008-08-20 Colin Walters <walters@verbum.org>
3219 * girepository/girparser.c: Avoid alias infloops.
3221 2008-08-20 Colin Walters <walters@verbum.org>
3223 * tests/scanner/foo-expected.gir: Fix expected list type.
3225 2008-08-20 Johan Dahlin <johan@gnome.org>
3227 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
3228 Add a workaround for #548689.
3229 We can now compile gtk!
3231 2008-08-20 Colin Walters <walters@verbum.org>
3233 * giscanner/glibtransformer.py: Try to look up
3234 aliases using the c:type too.
3236 2008-08-20 Colin Walters <walters@verbum.org>
3238 * girepository/girparser.c: Parse union fields.
3240 2008-08-20 Johan Dahlin <johan@gnome.org>
3242 * giscanner/ast.py: Make time_t an alias for long
3244 * gir/gio-2.0-good.gir:
3245 * gir/glib-2.0-good.gir:
3246 * gir/gobject-2.0-good.gir:
3248 * giscanner/glibtransformer.py:
3249 Do not delete Class structures, we need them in gdk/gtk.
3250 * tests/scanner/drawable-expected.gir:
3251 * tests/scanner/foo-expected.gir:
3252 * tests/scanner/utility-expected.gir:
3255 2008-08-20 Johan Dahlin <johan@gnome.org>
3257 * tests/scanner/Makefile.am:
3258 * tests/scanner/annotation-expected.gir:
3259 * tests/scanner/annotation.c (annotation_object_class_init),
3260 (annotation_object_init), (annotation_object_method),
3261 (annotation_object_in), (annotation_object_out),
3262 (annotation_object_inout), (annotation_object_inout2),
3263 (annotation_object_inout3), (annotation_object_calleeowns),
3264 (annotation_object_calleesowns), (annotation_object_get_strings),
3265 (annotation_object_with_voidp), (annotation_object_get_objects),
3266 (annotation_object_create_object), (annotation_object_allow_none):
3267 * tests/scanner/annotation.h:
3268 * tests/scanner/foo-expected.gir:
3269 * tests/scanner/foo.c:
3270 * tests/scanner/foo.h:
3271 Split out annotation tests out of foo
3273 2008-08-20 Johan Dahlin <johan@gnome.org>
3275 * tests/scanner/Foo-expected.gir:
3276 * tests/scanner/Makefile.am:
3277 * tests/scanner/foo-expected.gir:
3278 * tests/scanner/foo-object.h:
3279 * tests/scanner/foo.c:
3280 Foo->foo, foo-object.h -> foo.h
3282 2008-08-20 Johan Dahlin <johan@gnome.org>
3284 * tests/scanner/Foo-expected.gir:
3285 * tests/scanner/Makefile.am:
3286 * tests/scanner/drawable-expected.gir:
3287 * tests/scanner/drawable.c (test_drawable_class_init),
3288 (test_drawable_init):
3289 * tests/scanner/drawable.h:
3290 * tests/scanner/foo-object.h:
3291 * tests/scanner/foo.c (foo_boxed_method):
3292 Move the drawable parts out of Foo to its own test.
3294 2008-08-20 Johan Dahlin <johan@gnome.org>
3296 * tests/scanner/Foo-expected.gir:
3297 * tests/scanner/foo-object.h:
3298 * tests/scanner/foo.c (foo_drawable_class_init),
3299 (foo_drawable_init):
3300 Add a based on GdkDrawable which generates
3303 2008-08-19 Colin Walters <walters@verbum.org>
3305 * giscanner/transformer.py: Don't try
3306 to strip prefix before namespace.
3308 2008-08-19 Johan Dahlin <johan@gnome.org>
3310 * giscanner/transformer.py:
3311 * tests/scanner/Foo-expected.gir:
3312 * tests/scanner/foo-object.h:
3313 Add support for typedef void foo type of
3316 2008-08-19 Johan Dahlin <johan@gnome.org>
3319 * giscanner/girwriter.py:
3320 * giscanner/glibtransformer.py:
3321 * giscanner/transformer.py:
3322 * tests/scanner/Foo-expected.gir:
3323 Add basic support for union, base the code much
3324 on Struct. Add a testcase.
3326 2008-08-19 Johan Dahlin <johan@gnome.org>
3328 * tests/scanner/Foo-expected.gir:
3329 * tests/scanner/foo-object.h:
3330 Add a union testcase which the compiler currently
3333 2008-08-19 Johan Dahlin <johan@gnome.org>
3335 * gobject-introspection-1.0.pc.in:
3336 Add a g_ir_compiler variable
3338 2008-08-19 Colin Walters <walters@verbum.org>
3340 * giscanner/ast.py: Rework types to be more closely
3342 * giscanner/girparser.py: Parse more bits.
3343 * giscanner/girwriter.py: Write sequences in a new
3344 way that specifies container type.
3345 * giscanner/glibast.py: Adjust for ast.py changes,
3346 add 'ctype' property to GLibObject and GLibInterface
3347 so we can look things up by it later.
3348 * gicanner/transformer.py: Names is new class holding
3349 the various namespaces we manage. Do not confuse
3350 with Namespace which is toplevel XML node effectively.
3351 Rework all type resolution to go through
3352 _resolve_type_name_1.
3353 * giscanner/glibtransformer.py: Raise UnknownTypeError
3354 instead of ValueError for cleanliness. Add Unresolved
3355 class to mark types whose parent we haven't seen yet.
3356 Use new Names object from transformer.py.
3357 Correctly look up parent=.
3358 Fix type validation to handle sequences.
3359 * tests/scanner/Foo-expected.gir: Update for sequence
3360 work, int instead of int32.
3361 * tools/g-ir-scanner: Add --noclosure option
3362 * gir/Makefile.am: Use --noclosure by default for
3365 2008-08-18 Johan Dahlin <johan@gnome.org>
3367 * gir/gio-2.0-good.gir:
3368 * gir/glib-2.0-good.gir:
3369 * gir/gobject-2.0-good.gir:
3372 2008-08-18 Johan Dahlin <johan@gnome.org>
3375 * giscanner/girparser.py:
3376 * giscanner/girwriter.py:
3377 * giscanner/glibast.py:
3378 * giscanner/glibtransformer.py:
3379 * giscanner/transformer.py:
3380 * tests/scanner/Foo-expected.gir:
3381 * tests/scanner/foo-object.h:
3382 * tests/scanner/utility-expected.gir:
3383 * tests/scanner/utility.h:
3384 Redo type resolving and validation.
3385 Add a couple of new tests.
3386 Patch mostly written by Colin.
3388 2008-08-18 Johan Dahlin <johan@gnome.org>
3391 * giscanner/girparser.py:
3393 * giscanner/transformer.py:
3394 Improve enum parsing for enums without a GType.
3395 Make flags/enum references to other girs work
3396 * giscanner/utils.py:
3398 * tests/scanner/Makefile.am:
3399 * tests/scanner/foo-object.h:
3400 * tests/scanner/utility-expected.gir:
3401 * tests/scanner/utility.h:
3402 Add a new test for external enum references
3404 2008-08-18 Johan Dahlin <johan@gnome.org>
3406 * docs/global-module-registry.txt: Update
3408 * tests/array.gir: Update with new type proposal
3410 * girepository/girepository.c (g_type_tag_to_string):
3411 * girepository/girepository.h:
3412 * girepository/girnode.c (g_ir_node_get_full_size_internal),
3414 * girepository/girnode.h:
3415 Make enum serializing functions public. Clean up some whitespace.
3417 2008-08-17 Johan Dahlin <johan@gnome.org>
3419 * docs/global-module-registry.txt:
3420 Add a document for an on disk module registry format
3422 2008-08-17 Johan Dahlin <johan@gnome.org>
3425 * gir/gio-2.0-good.gir:
3428 2008-08-17 Johan Dahlin <johan@gnome.org>
3431 * gir/glib-2.0-good.gir:
3432 * gir/gobject-2.0-good.gir:
3433 * giscanner/cgobject.py:
3434 * giscanner/glibtransformer.py:
3435 Regenerate GObject & GType.
3436 Avoid warnings when generating gobject-2.0.gir.
3437 Introspect a little more, and skip *_get_type functions.
3439 2008-08-17 Colin Walters <walters@verbum.org>
3441 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
3442 Rename to -good, always generate during build.
3443 * gir/Makefile.am: Ensure .gir files dep on
3444 all scanner sources.
3445 * Makefile.am: Switch build order to ensure
3446 the scanner is ready before we do gir/.
3447 * tools/g-ir-scanner: Look for .git too.
3449 2008-08-17 Johan Dahlin <johan@gnome.org>
3451 * girepository/gtypelib.c (validate_enum_blob):
3452 * giscanner/glibtransformer.py:
3453 * giscanner/transformer.py:
3454 Remove resolve_possible_typedefs, it was unused.
3455 Allow multiple enum values of the sample value in an enum,
3456 since it's actually pretty common.
3457 Register enums so they can be resolved too.
3459 2008-08-16 Johan Dahlin <johan@gnome.org>
3461 * giscanner/girparser.py:
3462 Parse enumeration/bitfield.
3464 2008-08-16 Johan Dahlin <johan@gnome.org>
3466 * giscanner/girparser.py:
3469 2008-08-16 Johan Dahlin <johan@gnome.org>
3471 * giscanner/glibtransformer.py:
3472 Resolve type names for alias targets
3473 * giscanner/transformer.py:
3474 Skip FILE* parameters fow now
3476 2008-08-16 Johan Dahlin <johan@gnome.org>
3479 * gir/gobject-2.0.gir:
3482 * tests/scanner/Makefile.am:
3485 2008-08-15 Colin Walters <walters@verbum.org>
3487 * giscanner/glibtransformer.py: Explicitly construct
3488 new list, since we're deleting as we iterate.
3489 Don't delete all structures which end in Class; just
3490 ones which have a paired GObject.
3491 Fix printing of type warning.
3492 * giscanner/transformer.py: Make strip_namespace_object
3493 be the identity function if it doesn't match the
3496 2008-08-15 Colin Walters <walters@verbum.org>
3498 * giscanner/cgobject.py: Define yet more argument
3499 prototypes; fix prototype for g_type_fundamental.
3501 2008-08-14 Johan Dahlin <johan@gnome.org>
3503 * tests/Makefile.am:
3504 * tests/constant.gir:
3505 * tests/gobject.gir:
3507 * tools/generate.c (write_struct_info):
3508 Fix generator for constant/gobject/struct
3510 2008-08-14 Johan Dahlin <johan@gnome.org>
3512 * tests/Makefile.am:
3514 * tools/generate.c (write_enum_info):
3515 Fix generation of enum/bitfields
3517 2008-08-14 Johan Dahlin <johan@gnome.org>
3519 * girepository/girparser.c (start_field), (start_constant),
3520 (start_type), (end_element_handler):
3521 Clear up constant parsing
3526 * tools/generate.c (write_callable_info), (write_function_info),
3527 (write_callback_info), (write_constant_info), (write_signal_info),
3528 (write_vfunc_info), (write_property_info), (write_object_info),
3529 (write_interface_info):
3530 Constants/Signals are handled now.
3532 2008-08-14 Johan Dahlin <johan@gnome.org>
3534 * girepository/girparser.c (start_type):
3535 Don't require c:type.
3536 * tests/Makefile.am:
3539 Update, remove parts we don't support yet
3540 * tests/roundtrips.sh:
3542 * tools/generate.c (write_type_info), (write_field_info),
3543 (write_callable_info), (write_struct_info):
3544 Make it emit proper gir.
3546 2008-08-14 Johan Dahlin <johan@gnome.org>
3548 * giscanner/transformer.py:
3549 New internal function for adding a new node.
3551 2008-08-14 Johan Dahlin <johan@gnome.org>
3554 Define an internal _H_ variable so we skip parsing both
3555 i18n headers, only one is needed.
3557 Add the glib-2.0.gir too.
3558 * giscanner/glibast.py:
3559 Add gconstpointer as an alias for ANY
3560 * giscanner/transformer.py:
3561 Do not lower case enumeration names per se.
3562 Skip functions which has parameters called 'va_list'
3564 2008-08-14 Colin Walters <walters@verbum.org>
3566 * giscanner/transformer.py: Comment data structures.
3567 Also squash pointers in resolve_type_name to correspond
3568 with what we do for params.
3569 * giscanner/glibtransformer.py: Print warnings in more
3570 situations. Rework checks for method/constructor to
3571 look up in our GType database instead of just checking
3572 for *. Avoid generating <record> for GObject which
3573 duplicate the <class>.
3574 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3577 2008-08-14 Johan Dahlin <johan@gnome.org>
3579 * giscanner/girwriter.py:
3580 * giscanner/glibast.py:
3581 * giscanner/glibtransformer.py:
3582 * giscanner/transformer.py:
3584 * tests/Makefile.am:
3585 Add pyflakes.py and run it in make check.
3586 Update the source code to fix the errors reported by
3589 2008-08-14 Johan Dahlin <johan@gnome.org>
3592 * giscanner/girparser.py:
3593 * giscanner/glibast.py:
3594 * giscanner/glibtransformer.py:
3595 Refactor the parser a bit.
3596 Add parent type to interfaces and update callsites.
3598 2008-08-14 Johan Dahlin <johan@gnome.org>
3600 * giscanner/glibtransformer.py:
3601 * giscanner/utils.py:
3602 Refactor a bit, avoid isinstance and add a method
3603 for each type we parse.
3605 2008-08-14 Johan Dahlin <johan@gnome.org>
3608 * giscanner/girparser.py:
3609 * giscanner/glibtransformer.py:
3610 * tests/Makefile.am:
3611 Run pep8.py in make check, fix old errors.
3613 2008-08-13 Colin Walters <walters@verbum.org>
3615 * giscanner/girparser.py: Parse records.
3617 2008-08-13 Colin Walters <walters@verbum.org>
3619 * gir/Makefile.am: Install again.
3620 * gir/gobject-2.0.gir: Add some more bits.
3622 2008-08-13 Colin Walters <walters@verbum.org>
3624 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3625 * giscanner/girparser.py: Handle aliases.
3626 * giscanner/transformer.py: Record aliases. Make resolver
3627 functions public; we now call into these explicitly from
3628 glibtransformer. Handle resolving aliases.
3629 * giscanner/glibtransformer.py: Separate our internal namespace
3630 from included ones. Call up into transformer's resolver functions.
3632 2008-08-13 Johan Dahlin <johan@gnome.org>
3634 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3635 * girepository/girparser.c (start_class):
3636 * giscanner/glibtransformer.py:
3637 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3639 2008-08-13 Johan Dahlin <johan@gnome.org>
3641 * giscanner/cgobject.py:
3642 Register GInitiallyUnowned
3643 * giscanner/girwriter.py:
3644 * giscanner/glibtransformer.py:
3645 Special case GObject/GInitially owned as they are a bit special to use.
3647 2008-08-13 Colin Walters <walters@verbum.org>
3649 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3650 Object is in GObject namespace.
3652 2008-08-13 Colin Walters <walters@verbum.org>
3654 * giscanner/girparser.py: Fix processing of functions
3657 2008-08-13 Colin Walters <walters@verbum.org>
3659 * giscanner/girparser.py: Parse more than just <class.
3660 * giscanner/glibtransformer.py: Put aliases in a separate
3661 data structure since their name is not canonicall.
3662 * giscanner/transformer.py: Handle resolving type names
3665 2008-08-13 Johan Dahlin <johan@gnome.org>
3667 * tools/g-ir-scanner:
3668 Allow multiple libraries
3669 * giscanner/glibtransformer.py:
3670 Rename load_library to add_library, traverse over all libraries
3671 when trying to resolve a function
3673 2008-08-12 Colin Walters <walters@verbum.org>
3675 * giscanner/transformer.py: Record typedefs as <alias> elements.
3676 Also attempt to look up types in external namespaces.
3677 * giscanner/girwriter.py: Write them.
3678 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3679 checks. Resolve interface methods and properties.
3680 * tests/scanner/foo-object.h: Add a method with typedef.
3681 * tests/scanner/Foo-expected.gir: Update.
3682 * girepository/girnode.c: Debug tweaks.
3683 * girepository/girparser.c: Make a first pass through the XML where we
3684 record all the aliases. This lets us resolve them as we go through the
3686 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3687 from gir-repository.
3689 2008-08-12 Colin Walters <walters@verbum.org>
3691 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3692 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3694 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3696 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3698 2008-08-12 Colin Walters <walters@verbum.org>
3700 * giscanner/glibtransformer.py: Also transform object properties.
3702 2008-08-12 Colin Walters <walters@verbum.org>
3704 * giscanner/glibtransformer.py: Also transform callbacks
3705 and structure field types.
3706 * tests/scanner/Fooe-expected.gir: Update to expect correct
3707 names for callbacks and structs.
3709 2008-08-12 Colin Walters <walters@verbum.org>
3711 * girepository/girparser.c: Handle 'any'.
3712 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3713 Add test for void *.
3715 2008-08-12 Colin Walters <walters@verbum.org>
3717 * giscanner/glibtransformer.py: We need to do type
3718 resolution in a second pass after we've seen all the
3719 enums, records, etc.
3721 2008-08-12 Colin Walters <walters@verbum.org>
3723 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3724 Add enum return value.
3725 * giscanner/glibtransformer.py: Transform function return types
3728 2008-08-12 Colin Walters <walters@verbum.org>
3730 * tests/scanner/Makefile.am: Dep .gir files on scanner
3731 sources too. Also remove @ so we see scanner invocations.
3733 2008-08-12 Colin Walters <walters@verbum.org>
3735 * girepository/girparser.c, girepository/gtypelib.c,
3736 girepository/gtypelib.h, girepository/girnode.c:
3737 Remove usage of (GAPI-oriented) TypeTag in favor of
3738 GITypeTag from girepository.h.
3740 2008-08-10 Colin Walters <walters@verbum.org>
3742 * tests/roundtrips.sh: Use the correct tests.
3744 2008-08-10 Colin Walters <walters@verbum.org>
3746 * giscanner/cgobject.py: Declare/wrap a few more functions.
3747 Fix parameter types for g_object_new and g_type_fundamental.
3749 2008-08-10 Colin Walters <walters@verbum.org>
3751 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3752 us to declare types for both return value and parameters. The
3753 ctypes default of 'int' is bad because it hides 32/64 bit
3754 problems. Convert all existing functions to use it.
3756 2008-08-09 Johan Dahlin <johan@gnome.org>
3758 * giscanner/__init__.py:
3760 * giscanner/cgobject.py:
3761 * giscanner/gidlparser.py:
3762 * giscanner/gidlwriter.py:
3763 * giscanner/girparser.py:
3764 * giscanner/girwriter.py:
3765 * giscanner/glibast.py:
3766 * giscanner/glibtransformer.py:
3767 * giscanner/odict.py:
3768 * giscanner/sourcescanner.py:
3769 * giscanner/transformer.py:
3770 * giscanner/utils.py:
3771 * giscanner/xmlwriter.py:
3772 * tools/g-ir-scanner:
3776 2008-08-09 Johan Dahlin <johan@gnome.org>
3779 * relaxng/c-types.xml:
3780 * relaxng/g-types.xml:
3781 * relaxng/relaxng.rng:
3783 Remove outdated relaxng schemas.
3785 2008-08-09 Johan Dahlin <johan@gnome.org>
3788 Rename metadata to typelib in variable names,
3791 2008-08-09 Johan Dahlin <johan@gnome.org>
3795 Remove old C scanner, which got rewritten in python.
3797 2008-08-09 Johan Dahlin <johan@gnome.org>
3799 * girepository/Makefile.am:
3800 * tools/Makefile.am:
3801 * tools/girmodule.c:
3802 * tools/girmodule.h:
3805 * tools/girparser.c:
3806 * tools/girparser.h:
3807 * tools/girwriter.c:
3808 * tools/girwriter.h:
3809 Move shared *.[ch] files to girepository from tools
3811 2008-08-09 Johan Dahlin <johan@gnome.org>
3813 * tests/Makefile.am:
3816 * tests/constant.test:
3818 * tests/errors.test:
3819 * tests/function.test:
3820 * tests/gobject.test:
3821 * tests/interface.test:
3822 * tests/object.test:
3823 * tests/struct.test:
3828 Rename *.test to *.gir
3830 2008-08-09 Johan Dahlin <johan@gnome.org>
3833 * tests/Makefile.am:
3834 * tests/parser/Foo-expected.gir:
3835 * tests/parser/Makefile.am:
3836 * tests/parser/foo-object.h:
3837 * tests/parser/foo.c:
3838 * tests/parser/utility-expected.gir:
3839 * tests/parser/utility.c:
3840 * tests/parser/utility.h:
3841 * tests/scanner/Makefile.am:
3842 Rename tests/parser to test/scanner
3844 2008-08-08 Colin Walters <walters@verbum.org>
3846 * tests/roundtrips.sh: Use local .gir files again.
3848 2008-08-08 Colin Walters <walters@verbum.org>
3850 * tests/invoke/Makefile.am: .gir file depends on libtool
3853 2008-08-08 Colin Walters <walters@verbum.org>
3855 * tools/girnode.c: Pass through parent node so we can
3856 print the node whose child is NULL, if that occurs.
3858 2008-08-08 Johan Dahlin <johan@gnome.org>
3860 * tests/Makefile.am:
3861 Disable roundtrip tests which are not yet working
3862 * tests/invoke/testfns.gir:
3865 2008-08-08 Johan Dahlin <johan@gnome.org>
3867 * giscanner/girwriter.py:
3869 * giscanner/glibast.py:
3870 * giscanner/glibtransformer.py:
3871 Swap order of members, to keep it consistent with
3874 2008-08-08 Johan Dahlin <johan@gnome.org>
3876 * girepository/gtypelib.c (validate_header):
3877 * girepository/gtypelib.h:
3879 * giscanner/girwriter.py:
3880 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3881 (gi_source_symbol_unref):
3884 * tests/constant.test:
3886 * tests/errors.test:
3887 * tests/function.test:
3888 * tests/gobject.test:
3889 * tests/interface.test:
3890 * tests/invoke/Makefile.am:
3891 * tests/invoke/testfns.xml:
3892 * tests/object.test:
3893 * tests/parser/Makefile.am:
3894 * tests/roundtrips.sh:
3895 * tests/struct.test:
3900 * tools/Makefile.am:
3901 * tools/compiler.c (main):
3902 * tools/generate.c (write_callable_info), (write_function_info),
3904 * tools/gidlmodule.c:
3905 * tools/gidlmodule.h:
3908 * tools/gidlparser.c:
3909 * tools/gidlparser.h:
3910 * tools/gidlwriter.c:
3911 * tools/gidlwriter.h:
3912 * tools/scanner.c (create_node_from_gtype),
3913 (create_node_from_ctype), (g_igenerator_process_properties),
3914 (g_igenerator_process_signals), (g_igenerator_create_object),
3915 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3916 (g_igenerator_create_enum), (g_igenerator_create_flags),
3917 (g_igenerator_process_function_symbol),
3918 (g_igenerator_process_unregistered_struct_typedef),
3919 (g_igenerator_process_struct_typedef),
3920 (g_igenerator_process_union_typedef),
3921 (g_igenerator_process_enum_typedef),
3922 (g_igenerator_process_function_typedef),
3923 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3924 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3925 Merge in the gir-compiler branch.
3926 Thanks to Philip and Colin for their help.
3928 2008-07-26 Colin Walters <walters@verbum.org>
3930 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3931 and g-idl-generate to go along with how we're changing this
3932 module to be installed.
3933 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3935 2008-07-24 Colin Walters <walters@verbum.org>
3937 * girepository/girepository.c (g_irepository_register): Add
3938 environment variable G_IREPOSITORY_VERBOSE so we can print
3939 out what we're doing.
3940 * girepository/girepository.c (g_irepository_register_file):
3941 Add GError error message to g_debug call.
3943 2008-07-08 Jürg Billeter <j@bitron.ch>
3945 * giscanner/glibast.py:
3949 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3951 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3954 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3957 * giscanner/girwriter.py:
3958 * giscanner/transformer.py:
3959 * tests/parser/Foo-expected.gir:
3960 * tests/parser/foo-object.h:
3961 * tests/parser/foo.c (foo_object_allow_none):
3962 Add support for gtk-doc annotations for allow-none.
3965 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3968 * giscanner/girwriter.py:
3969 * giscanner/glibast.py:
3970 * giscanner/glibtransformer.py:
3971 * giscanner/transformer.py:
3972 * tests/parser/Foo-expected.gir:
3973 Start using abstract type instead of the raw C types.
3974 Register a bunch of glib types we care about.
3976 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3981 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3983 * girepository/girepository.c:
3984 * girepository/gtypelib.c:
3985 * girepository/ginfo.c:
3986 * girepository/ginvoke.c:
3987 * girepository/girepository.h:
3988 * girepository/gtypelib.h:
3989 * girepository/gmetadata.c:
3990 * girepository/Makefile.am:
3991 * girepository/gmetadata.h:
3993 * tools/gidlmodule.c:
3996 * tools/gidlmodule.h:
3997 * tools/gidlparser.c:
3999 Renamed GMetadata to GTypelib
4001 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
4003 * giscanner/xmlwriter.py:
4004 Improve line wrapping when > 79 charaters
4006 2008-06-05 Jürg Billeter <j@bitron.ch>
4009 * giscanner/girwriter.py:
4010 * giscanner/transformer.py:
4011 Use <type> element for field types
4012 * tests/parser/Foo-expected.gir:
4015 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
4017 * giscanner/glibtransformer.py:
4018 Fix a bug which prevented GdkEvent from being generated
4020 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
4022 * giscanner/Makefile.am:
4024 * giscanner/girwriter.py:
4025 * giscanner/glibast.py:
4026 * giscanner/glibtransformer.py:
4027 * giscanner/transformer.py:
4028 * giscanner/utils.py:
4029 * tests/parser/Foo-expected.gir:
4030 Improve enum member parsing and introspection
4032 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4034 * giscanner/scannerparser.y:
4035 * giscanner/sourcescanner.h:
4036 * giscanner/sourcescanner.py:
4037 Add a new source type enum for member.
4038 Use __repr__ for improved debugging
4039 * giscanner/girparser.py:
4041 * giscanner/transformer.py:
4042 Improve parsing of struct members.
4043 * tests/parser/foo-object.h:
4046 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4048 * giscanner/xmlwriter.py:
4049 Improve error reporting when trying to quote None.
4050 * giscanner/girparser.py:
4051 Do not print warnings when including more complete .gir files
4052 * giscanner/girwriter.py:
4053 Do not require a name for parameters, add a todo for singletons
4054 * giscanner/glibtransformer.py:
4055 Refactor the way structs are done, add a couple of hacks to allow
4057 * giscanner/transformer.py:
4058 Add enough hacks so cairo, atk and pango.gir can be parsed properly
4059 * gobject-introspection-1.0.pc.in:
4060 Export girdir, so we can access gobject-2.0.gir from outside
4062 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4064 * tools/g-ir-scanner:
4065 * tests/parser/Makefile.am:
4066 Update sys.path before running the parser so we don't have
4067 to setup PYTHONPATH ourselves.
4071 * girepository/Makefile.am:
4072 * giscanner/transformer.py:
4073 * gobject-introspection-1.0.pc.in:
4074 * gobject-introspection.pc.in:
4075 * tools/Makefile.am:
4077 Rename pkg-config name to gobject-introspection-1.0,
4078 Do not installed anything which is not using the gir format.
4079 Disable compililation the old C scanner, but still keep the source
4080 until all the remaning functionallity has been ported.
4082 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4084 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
4085 a crash when symbol->indent is NULL.
4087 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
4088 a function to convert a CTYPE symbol to a string
4090 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
4093 * giscanner/girwriter.py:
4094 * giscanner/giscannermodule.c
4095 (pygi_source_scanner_append_filename),
4096 (pygi_source_scanner_parse_file):
4097 * giscanner/glibtransformer.py:
4098 * giscanner/sourcescanner.py:
4099 Revert back to using temporary files to send in headers.
4100 Allow Functions to be passed in as callbacks, add a couple
4101 of try/excepts missing features.
4102 We can now scan pango
4104 2008-05-08 Johan Dahlin <johan@gnome.org>
4106 * giscanner/glibtransformer.py:
4107 * giscanner/transformer.py:
4108 Move namespace stripping glibtransformer->transformer
4110 2008-05-08 Johan Dahlin <johan@gnome.org>
4113 * giscanner/girwriter.py:
4114 * giscanner/glibtransformer.py:
4115 * giscanner/transformer.py:
4116 * tools/g-ir-scanner:
4117 Introduce a namespace ast node
4119 2008-05-05 Johan Dahlin <johan@gnome.org>
4121 * giscanner/__init__.py:
4122 * giscanner/sourcescanner.py:
4123 * giscanner/transformer.py:
4124 Move sourcescanner symbols to the sourcescanner module, instead
4125 of in the global __init__ namespace.
4127 2008-05-03 Johan Dahlin <johan@gnome.org>
4129 * giscanner/glibtransformer.py:
4130 * tools/g-ir-scanner:
4131 Handle missing parameters better, allow - and + in .la dlname
4134 2008-05-03 Johan Dahlin <johan@gnome.org>
4136 * giscanner/__init__.py:
4138 * giscanner/girwriter.py:
4139 * giscanner/glibtransformer.py:
4140 * giscanner/transformer.py:
4141 Parse struct fields properly, improve debugging.
4143 2008-04-29 Johan Dahlin <johan@gnome.org>
4146 * giscanner/girwriter.py:
4147 * giscanner/transformer.py:
4148 * tests/parser/Foo-expected.gir:
4150 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
4152 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4155 * docs/g-ir-scanner.1:
4156 * metadata-annotations-proposal.txt:
4157 * metadata-format.txt:
4158 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
4160 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4162 * giscanner/girwriter.py:
4163 * giscanner/glibtransformer.py:
4164 * giscanner/transformer.py:
4165 * giscanner/xmlwriter.py:
4166 * tests/parser/Foo-expected.gir:
4167 * tests/parser/foo-object.h:
4168 Write record/structs to gir file too. Add a couple of tests,
4169 fix an off by one error in xmlwriter.py.
4171 2008-04-28 Johan Dahlin <johan@gnome.org>
4173 * giscanner/xmlwriter.py: Calculate the line length properly,
4174 include the provided extra indentation in the calculation, really.
4176 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4179 * giscanner/glibast.py:
4180 * giscanner/glibtransformer.py:
4181 * giscanner/transformer.py:
4182 * tools/g-ir-scanner:
4183 Add a --strip-prefix and sort out confusion between names and symbols
4184 for functions and struct + derivaties.
4185 Refactor bootstrap of g-ir-scanner, so we can set options on
4186 Transformer() before parsing everything.
4188 2008-04-28 Johan Dahlin <johan@gnome.org>
4190 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
4191 when scanning girepository.h
4193 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
4194 a __GI_SCANNER__ when we run.
4196 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4199 * giscanner/girwriter.py:
4200 * giscanner/glibast.py:
4201 * giscanner/glibtransformer.py:
4202 * tests/parser/Foo-expected.gir:
4203 * tests/parser/utility-expected.gir:
4204 Rename most c:identifier to c:type. Add new ones to
4205 class/interface/enum/boxed.
4207 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4210 * giscanner/girwriter.py:
4211 * giscanner/glibtransformer.py:
4212 * tests/parser/Foo-expected.gidl:
4213 * tests/parser/Makefile.am:
4214 Move c:identifier from return-value to subchild type,
4215 as per Jürgs suggestion
4217 2008-04-28 Johan Dahlin <johan@gnome.org>
4219 * giscanner/girwriter.py:
4220 * tests/parser/Foo-expected.gir:
4221 Write property.type as a child node.
4223 2008-04-27 Johan Dahlin <johan@gnome.org>
4228 * gidl/gobject-2.0.gidl:
4230 * gir/gobject-2.0.gir:
4231 * tests/parser/Makefile.am:
4232 Replace the GObject gidl with a GObject gir.
4234 2008-04-27 Johan Dahlin <johan@gnome.org>
4236 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
4239 * giscanner/xmlwriter.py:
4240 * tests/parser/Foo-expected.gir:
4241 Include indentation in line length calculation
4243 2008-04-27 Johan Dahlin <johan@gnome.org>
4245 * giscanner/girparser.py:
4246 Prettify NS parsing using elementtree.
4248 2008-04-27 Johan Dahlin <johan@gnome.org>
4251 * giscanner/Makefile.am:
4252 * giscanner/girparser.py:
4253 * giscanner/glibtransformer.py:
4254 * tests/parser/Foo-expected.gidl:
4255 * tests/parser/Foo-expected.gir:
4256 * tests/parser/Makefile.am:
4257 * tests/parser/utility-expected.gidl:
4258 * tests/parser/utility-expected.gir:
4259 * tools/g-ir-scanner:
4260 Switch over to GIR as the default format. Add a simple GIDL
4262 Update tests and fix simplify makefiles by depending
4263 on GNU make extensions.
4265 2008-04-27 Johan Dahlin <johan@gnome.org>
4267 * giscanner/xmlwriter.py:
4268 Wrap attributes for lines which are wider than 79 characters
4270 * giscanner/scannerlexer.l:
4271 Allow parenthesis in annotations
4274 * giscanner/gidlwriter.py:
4275 * giscanner/girwriter.py:
4276 * giscanner/glibtransformer.py:
4277 * giscanner/transformer.py:
4278 Add initial sequence support, including annotation.
4279 Refactor type handling a bit.
4281 2008-04-27 Johan Dahlin <johan@gnome.org>
4283 * tests/parser/Foo-expected.gidl:
4284 * tests/parser/foo-object.h:
4285 * tests/parser/foo.c (foo_object_class_init),
4286 (foo_object_get_strings), (foo_object_get_objects):
4287 Add two new functions to check sequence return values.
4288 Also fixes a compilation warning.
4290 2008-04-27 Johan Dahlin <johan@gnome.org>
4292 * giscanner/giscannermodule.c (]): Cast the getter, avoids
4293 a compilation warning.
4295 * tools/Makefile.am (g_ir_scanner_SOURCES):
4296 g-ir-scanner has no sources.
4298 2008-04-25 Johan Dahlin <johan@gnome.org>
4300 * giscanner/Makefile.am:
4302 * giscanner/gidlparser.py:
4303 * giscanner/gidlwriter.py:
4304 * giscanner/girwriter.py:
4305 * giscanner/glibast.py:
4306 * giscanner/glibtransformer.py:
4307 * giscanner/transformer.py:
4308 Split out nodes to ast.py and glibast.py
4310 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4312 * giscanner/Makefile.am:
4313 * giscanner/gidlparser.py:
4314 * giscanner/gidlwriter.py:
4315 * giscanner/girwriter.py:
4316 * giscanner/glibtransformer.py:
4317 * giscanner/gobjecttreebuilder.py:
4318 * giscanner/transformer.py:
4319 * giscanner/treebuilder.py:
4320 * tools/g-ir-scanner:
4321 Rename treebuilder to transformer and
4322 gobjectreebuilder to glibtransformer.
4324 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4326 * giscanner/Makefile.am:
4327 * giscanner/__init__.py:
4328 * giscanner/cgobject.py:
4329 * giscanner/gidlparser.py:
4330 * giscanner/gidlwriter.py:
4331 * giscanner/girwriter.py:
4332 * giscanner/gobjecttreebuilder.py:
4333 * giscanner/odict.py:
4334 * giscanner/sourcescanner.py:
4335 * giscanner/treebuilder.py:
4336 * giscanner/xmlwriter.py:
4337 * tools/Makefile.am:
4338 * tools/g-ir-scanner:
4339 Add LGPLv2 license header and install all python files
4341 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4344 * giscanner/gidlwriter.py:
4345 * giscanner/giscannermodule.c (pygi_source_directive_new),
4346 (directive_get_options), (pygi_source_symbol_new),
4347 (symbol_get_base_type), (pygi_source_type_new),
4348 (type_get_base_type), (type_get_child_list),
4349 (pygi_source_scanner_get_symbols),
4350 (pygi_source_scanner_get_directives):
4351 * giscanner/gobjecttreebuilder.py:
4352 * giscanner/sourcescanner.py:
4353 * giscanner/treebuilder.py:
4354 * tests/parser/foo-object.h:
4355 Add support for virtual methods.
4356 Pair struct FooClass with struct Foo.
4357 Clean up the SourceScanner bindings a bit.
4358 Add a testcase for virtual methods.
4360 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4362 * giscanner/cgobject.py:
4363 * giscanner/gidlwriter.py:
4364 * giscanner/gobjecttreebuilder.py:
4365 Add support for signals
4367 * tests/parser/foo.c (foo_object_class_init):
4368 * Foo-expected.gidl:
4369 Add a signal and update the expected output.
4371 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
4373 * giscanner/gidlwriter.py:
4374 * giscanner/girwriter.py:
4375 * giscanner/giscannermodule.c (directive_get_name),
4376 (directive_get_value), (directive_get_options),
4377 (symbol_get_directives), (symbol_set_directives),
4378 (pygi_source_scanner_parse_file),
4379 (pygi_source_scanner_lex_filename),
4380 (pygi_source_scanner_get_directives), (init_giscanner):
4381 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
4382 * giscanner/sourcescanner.h:
4383 * giscanner/sourcescanner.py:
4384 * giscanner/treebuilder.py:
4385 * tools/g-ir-scanner:
4386 Add support for source/header annotations.
4388 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4390 * giscanner/gidlwriter.py:
4391 * giscanner/girwriter.py:
4392 * giscanner/gobjecttreebuilder.py:
4393 * giscanner/treebuilder.py:
4394 Add support for Callbacks
4396 2008-04-22 Havoc Pennington <hp@pobox.com>
4398 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
4399 not in metadata->module, look for it in the global module, in case
4400 some other object or the app itself provides the symbol.
4402 2008-04-22 Havoc Pennington <hp@pobox.com>
4404 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
4405 dlopening a library that is already in the main app, by checking
4406 whether one of the lib's symbols is already loaded.
4408 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4410 * tests/parser/Foo-expected.gidl:
4411 * tests/parser/foo-object.h:
4414 2008-04-22 Havoc Pennington <hp@pobox.com>
4416 * girepository/ginfo.c (g_interface_info_find_method):
4417 Use interface_blob_size not object_blob_size to compute offset.
4419 2008-04-22 Havoc Pennington <hp@pobox.com>
4421 * girepository/gmetadata.c (_g_metadata_init): remove
4422 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
4423 (Glade and Clutter for example) rely on being loaded globally.
4425 2008-04-22 Havoc Pennington <hp@pobox.com>
4427 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
4428 function to get the GType given a RegisteredTypeInfo
4430 2008-04-22 Johan Dahlin <johan@gnome.org>
4432 * COPYING: Add a LGPL license, to prevent automake to
4433 put in a copy of GPL here. Pointed out by Havoc.
4435 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
4436 (g_type_info_is_pointer), (g_type_info_get_tag),
4437 (g_type_info_get_param_type), (g_type_info_get_interface),
4438 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
4439 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4440 (g_error_domain_info_get_codes), (g_enum_info_get_value),
4441 (g_object_info_get_interface), (g_object_info_get_field),
4442 (g_interface_info_get_prerequisite),
4443 (g_signal_info_get_class_closure), (g_constant_info_get_value):
4444 * girepository/ginvoke.c (get_ffi_type):
4445 * girepository/girepository.h:
4446 * girepository/gmetadata.c (g_metadata_get_dir_entry),
4447 (g_metadata_check_sanity), (validate_header),
4448 (validate_array_type_blob), (validate_iface_type_blob),
4449 (validate_param_type_blob), (validate_error_type_blob),
4450 (validate_type_blob), (validate_constant_blob),
4451 (validate_struct_blob), (validate_enum_blob):
4452 * girepository/gmetadata.h:
4453 * tests/Makefile.am:
4454 * tests/invoke/Makefile.am:
4455 * tests/invoke/invoke.c (main):
4456 * tests/roundtrips.sh:
4457 * tools/Makefile.am:
4458 * tools/compiler.c (format_output), (write_out_metadata), (main):
4459 * tools/generate.c (write_type_name), (write_type_info),
4460 (write_constant_value), (write_enum_info), (load_metadata), (main):
4461 * tools/gidlcompilercontext.c:
4462 * tools/gidlcompilercontext.h:
4463 * tools/gidlcompilerentrynode.c:
4464 * tools/gidlcompilerentrynode.h:
4465 * tools/gidlcompilertypenode.c:
4466 * tools/gidlcompilertypenode.h:
4467 * tools/gidlmodule.c (g_idl_module_build_metadata):
4468 * tools/gidlmodule.h:
4469 * tools/gidlnode.c (init_stats), (dump_stats),
4470 (g_idl_node_get_size), (g_idl_node_get_full_size),
4471 (g_idl_node_cmp), (g_idl_node_can_have_member),
4472 (g_idl_node_add_member), (g_idl_node_param_direction_string),
4473 (parse_int_value), (parse_uint_value), (parse_float_value),
4474 (parse_boolean_value), (find_entry_node), (find_entry),
4475 (serialize_type), (g_idl_node_build_metadata), (write_string):
4477 * tools/gidlparser.c (parse_type_internal):
4478 * tools/quote-file.sh:
4479 Revert revisions 157,149-148,136-129 and 120.
4480 Move back to using g-idl-generate to generate the metadata and
4481 avoids dependency on a c compiler.
4483 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4485 * giscanner/girwriter.py:
4486 * tools/g-ir-scanner:
4487 Add an initial GIR writer and a --format option to g-ir-scanner
4489 2008-04-21 Johan Dahlin <johan@gnome.org>
4491 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4492 gobject-2.0 and raise ImportError if not found.
4494 * giscanner/gidlparser.py:
4495 * giscanner/gidlwriter.py:
4496 * giscanner/gobjecttreebuilder.py:
4497 * tools/g-ir-scanner:
4498 Add a --include argument to include types from other idls.
4499 Add a minimalistic GIDL parser (just objects for now)
4500 Implement resolving of external type references and use it to
4501 resolve parent types, argument types and return types.
4503 2008-04-21 Johan Dahlin <johan@gnome.org>
4505 * giscanner/gidlwriter.py:
4506 * giscanner/gobjecttreebuilder.py:
4507 * giscanner/treebuilder.py:
4508 Add support for properties.
4509 Refactor Class/Interface support a bit, to share more code and
4510 always initialize their method attribute to an empty list.
4512 2008-04-21 Johan Dahlin <johan@gnome.org>
4514 * giscanner/cgobject.py:
4515 Add a workaround for a glib bug interface introspection bug
4516 (object_interface_list_properties, object_class_list_properties):
4517 Cast the return value to GParamSpec.
4519 * tests/parser/Foo-expected.gidl: Update
4520 * tests/parser/foo.c: Add a string property
4522 * giscanner/gobjecttreebuilder.py:
4523 After stripping namespaces, remove the original
4524 item to avoid duplication (GtkButton struct and Button object)
4526 2008-04-21 Johan Dahlin <johan@gnome.org>
4528 * giscanner/gobjecttreebuilder.py:
4529 * giscanner/treebuilder.py:
4530 Strip namespaces before objects, so we'll export
4531 GtkButton as Button in the gtk namespace
4533 2008-04-21 Johan Dahlin <johan@gnome.org>
4535 * giscanner/gidlwriter.py:
4536 * giscanner/gobjecttreebuilder.py:
4537 * giscanner/treebuilder.py:
4538 Add constructors for object/boxed types.
4540 2008-04-21 Johan Dahlin <johan@gnome.org>
4542 * giscanner/gidlwriter.py:
4543 * giscanner/gobjecttreebuilder.py:
4544 Add support for boxed types
4546 2008-04-21 Johan Dahlin <johan@gnome.org>
4548 * giscanner/giscannermodule.c: Mark structures as const,
4549 wrap SourceType.const_string.
4551 * tests/parser/foo-object.h: Add a couple of constants.
4553 * giscanner/gidlwriter.py:
4554 * giscanner/gobjecttreebuilder.py:
4555 * giscanner/treebuilder.py:
4556 Add basic support for interfaces
4558 * tools/g-ir-scanner:
4559 Add -o/--output for writing to a file
4561 2008-04-21 Havoc Pennington <hp@redhat.com>
4563 * TODO: add some C API wishlist items I could think of quickly
4565 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4567 * giscanner/gidlwriter.py:
4568 * giscanner/xmlwriter.py:
4569 Add a simple api for writing tags which can be used
4570 with the new 'with statement' in python 2.5
4572 2008-04-21 Johan Dahlin <johan@gnome.org>
4574 * giscanner/gobjecttreebuilder.py:
4575 Strip namespace and object prefix from method names.
4577 2008-04-21 Johan Dahlin <johan@gnome.org>
4579 * tools/g-ir-scanner (main): Add --pkg option to pass in
4580 pkg-config modules to get cflags from.
4582 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4583 Avoid duplication, reuse function writer for methods.
4585 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4587 * giscanner/gidlwriter.py:
4588 * giscanner/gobjecttreebuilder.py:
4589 * giscanner/treebuilder.py:
4590 * tools/g-ir-scanner:
4591 Resolve libtool .la files.
4592 Strip name spaces for methods.
4593 Add function symbols
4595 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4597 * giscanner/cgobject.py:
4598 * giscanner/gidlwriter.py:
4599 * giscanner/gobjecttreebuilder.py:
4600 * giscanner/treebuilder.py:
4601 Add support for classes and methods
4603 2008-04-20 Johan Dahlin <johan@gnome.org>
4605 * giscanner/gidlwriter.py:
4606 * giscanner/gobjecttreebuilder.py:
4607 * giscanner/odict.py:
4608 Avoid conflicts, keep the output ordered similar to
4609 the order of the input.
4610 Add a simple ordered dictionary implemenation
4612 2008-04-19 Johan Dahlin <johan@gnome.org>
4614 * giscanner/cgobject.py:
4615 * giscanner/gidlwriter.py:
4616 * giscanner/gobjecttreebuilder.py:
4617 * tools/g-ir-scanner:
4618 Start introspecting get-type functions.
4619 Implement support for GLib/GFlags GTypes.
4620 Add a ctype based GObject binding.
4622 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4624 * giscanner/gidlwriter.py:
4625 * giscanner/xmlwriter.py:
4626 * tools/g-ir-scanner:
4627 Add a simplistic gidl writer, which can't do too much.
4629 2008-04-18 Johan Dahlin <johan@gnome.org>
4631 * giscanner/sourcescanner.py:
4632 * giscanner/treebuilder.py:
4633 * tools/g-ir-scanner:
4634 split tree building and source scanning interface to separate files.
4636 2008-04-18 Johan Dahlin <johan@gnome.org>
4638 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4640 - Add support for struct/parameter/return, start parsing of ctypes
4642 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4645 2008-03-31 Johan Dahlin <johan@gnome.org>
4647 * tools/g-ir-scanner:
4648 Start to build abstract syntax node of scanned sources.
4649 Add support for cpp options.
4651 2008-03-27 Johan Dahlin <johan@gnome.org>
4653 * giscanner/giscannermodule.c:
4654 * giscanner/scannerlexer.l:
4655 * giscanner/sourcescanner.c:
4656 * tools/g-ir-scanner:
4658 Add simple pre-processor using subprocess and a PIPE.
4659 Change the parse_file apis to accept a file descriptor.
4661 2008-03-25 Johan Dahlin <johan@gnome.org>
4663 * giscanner/__init__.py:
4664 * tools/g-ir-scanner:
4665 Fix a typo and add an example python test program.
4667 2008-03-25 Johan Dahlin <johan@gnome.org>
4669 * giscanner/__init__.py:
4670 * giscanner/giscannermodule.c:
4671 * giscanner/sourcescanner.c:
4672 * giscanner/sourcescanner.h:
4673 Add constants and wrap a few more SymbolType fields
4675 2008-03-25 Johan Dahlin <johan@gnome.org>
4679 * giscanner/__init__.py:
4680 * giscanner/giscannermodule.c:
4681 * giscanner/Makefile.am:
4683 Add initial python bindings for the scanner and
4684 depend on python 2.5.
4686 2008-03-25 Johan Dahlin <johan@gnome.org>
4690 * giscanner/Makefile.am:
4691 * giscanner/sourcescanner.c:
4692 * giscanner/sourcescanner.h:
4693 * tools/Makefile.am:
4694 * tools/grealpath.h:
4695 * tools/sourcescanner.c:
4696 * tools/sourcescanner.h:
4698 Move the scanner to a separate library.
4700 2008-03-23 Johan Dahlin <johan@gnome.org>
4702 * tools/Makefile.am:
4705 * tools/scannerlexer.l:
4706 * tools/scannerparser.y:
4707 * tools/sourcescanner.c:
4708 * tools/sourcescanner.h:
4709 Split out the source scanner from the generator.
4710 Rename the symbols used in the scanner to use the gi_ prefix.
4711 This should make it possible to use the raw C parser from
4714 2008-03-23 Johan Dahlin <johan@gnome.org>
4716 * tests/parser/Makefile.am (utility.gidl):
4717 * tests/parser/utility-expected.gidl:
4718 Pass in the gobject.gidl since we're defining a GObject.
4720 2008-03-12 Johan Dahlin <johan@gnome.org>
4722 * relaxng/relaxng.rng:
4723 Add a releaxng in relaxng we can use to validate the relaxngs
4726 2008-03-12 Jürg Billeter <j@bitron.ch>
4728 * tools/scanner.c: (g_igenerator_new):
4729 * tools/scannerparser.y:
4730 Fix compiler warnings.
4732 2008-03-12 Jürg Billeter <j@bitron.ch>
4736 * tools/scannerparser.y:
4737 Start fixing memory management in g-idl-scanner.
4739 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4741 * tools/gidlcompilercontext.c: (write_compiled):
4742 Fix critical warning when no shlib passed to g-idl-compiler.
4744 2008-03-12 Johan Dahlin <johan@gnome.org>
4746 * tests/parser/utility-expected.gidl:
4747 * tests/parser/utility.h:
4748 Add a get_type-function, so the scanner actually
4749 parses it as an object.
4751 2008-03-12 Johan Dahlin <johan@gnome.org>
4753 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4756 * tests/parser/Foo-expected.gidl:
4757 * tests/parser/Makefile.am:
4758 * tests/parser/foo-object.h:
4759 * tests/parser/foo.c:
4760 * tests/parser/utility-expected.gidl:
4761 * tests/parser/utility.c:
4762 * tests/parser/utility.h:
4764 Add a new gidl test. 'utility.gidl', which is used to be able
4765 to test external type references. Add a reference to UtilityObject*
4768 2008-03-11 Johan Dahlin <johan@gnome.org>
4772 Remove most global variables
4774 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4776 * tools/scannerlexer.l:
4778 * tests/parser/Foo-expected.gidl:
4779 * tests/parser/foo.c:
4780 * tests/parser/Makefile.am:
4781 * tests/parser/foo-object.h:
4783 Added a few extra tests. Which resulted in finding a few
4784 bugs. Which resulted in me fixing those bugs
4786 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4788 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4789 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4790 Add some comments for strings into generated output for
4793 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4795 * tools/gidlcompilercontext.c: (write_compiled):
4796 Write out the shlibs variable before writing out the strings
4797 length. Fixes compiler warning when using '-l' flag with
4800 2008-03-11 Johan Dahlin <johan@gnome.org>
4802 * tests/parser/Foo-expected.gidl:
4803 * tests/parser/foo-object.h:
4806 * tools/scannerlexer.l:
4807 Add support for parsing return arguments. Add support for
4808 caller-owns return types.
4809 Patch by Philip Van Hoof.
4811 * tools/scannerparser.y:
4812 Remove parsing of the @deprecated syntax used in headers.
4813 We will support gtk-doc deprecation in the future instead.
4815 2008-03-11 Johan Dahlin <johan@gnome.org>
4817 * tools/compiler.c (main): Coding style fixes
4819 2008-03-10 Johan Dahlin <johan@gnome.org>
4822 Add GCOV_LIBS to GILIBS
4824 2008-03-10 Johan Dahlin <johan@gnome.org>
4826 * tests/parser/Foo-expected.gidl:
4827 * tests/parser/foo.c:
4828 Rename null-ok to direction=out
4830 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4832 reviewed and extensively tested by Johan
4834 * tests/parser/Foo-expected.gidl:
4835 * tests/parser/foo-object.h:
4836 * tests/parser/foo.c:
4839 * tools/gidlwriter.c:
4842 * tools/scannerlexer.l:
4843 * tools/scannerparser.y:
4845 Add support for scanning for gtk-doc comments inside
4846 C source files. Add tests
4848 2008-03-10 Johan Dahlin <johan@gnome.org>
4850 * tests/parser/Makefile.am:
4851 * tests/parser/foo.c:
4854 * tools/scannerparser.y:
4855 Add an api to lex filenames.
4856 Lex all source .c files passed in on the command line.
4857 Scan sources in a test and a couple of private structures
4858 which should not be included in the generated gidl
4860 2008-03-10 Johan Dahlin <johan@gnome.org>
4862 * tests/invoke/Makefile.am: Make the generated metadata
4863 depend on the g-idl-compiler
4865 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4867 * tools/gidlmodule.c
4868 * tools/gidlmodule.h
4871 Remove the old g-idl-compiler code.
4874 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4876 * tools/quote-file.sh
4879 Move to using the 'C' struct compiler code.
4881 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4883 * girepository/ginfo.c
4885 Change the way that external references with no namespace
4886 are dealt with. External references with no namespace
4887 are placed into the XML as-if they are a local reference.
4888 This is temporary, but helps with roundtrip tests.
4890 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4892 * girepository/ginfo.c
4893 Add the ability to get the value of a constant of
4894 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4895 is provided as a string.
4897 This would deal properly with:
4898 typedef char* random;
4899 const random = "A string";
4901 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4903 * girepository/ginfo.c
4904 * girepository/girepository.h
4906 Add a function to check if an enum is registered or not.
4907 Previously anything testing this relied on the g-type
4908 string offset having a value of 0.
4910 * girepository/gmetadata.c
4911 * girepository/gmetadata.h
4913 Remove unneccesary or erroneous checks. There were two
4914 metadata validation checks which made sure that the blob
4915 sizes were the same as some magic numbers compiled into the code.
4916 This is wrong as it breaks any forwards compatibility that may
4919 Checks were also present that made sure that unregistered type
4920 blobs had a value of 0 in the g-type offset field. This is
4921 unneccessary. If a type blob is unregistered then any value
4922 in its g-type field is simply invalid.
4924 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4926 * girepository/ginfo.c
4927 * girepository/gmetadata.c
4928 * girepository/gmetadata.h
4930 Change the metadata format to have a standard header
4931 for all the type blobs. Merge the SimpleTypeBlob
4932 and InterfaceTypeBlob into a union. A union of these
4933 two blobs existed previously but was not explicit
4934 in the metadata format.
4936 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4938 * tools/gidlcompilercontext.c
4939 * tools/gidlcompilercontext.h
4940 * tools/gidlcompilerentrynode.c
4941 * tools/gidlcompilerentrynode.h
4942 * tools/gidlcompilertypenode.c
4943 * tools/gidlcompilertypenode.h
4945 Add code to compile a tree of GIdlNodes to
4946 a 'C' struct representing the metadata.
4947 This is to aid cross-compiling. Previously
4948 the g-idl-compiler created a binary blob with
4949 data written in the byte order and alignment
4950 of the tool rather than the intended target.
4952 Cleaned up and improved by Johan and Robert :-)
4954 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4956 * girepository/ginvoke.c
4957 * girepository/girepository.h
4958 * girepository/gmetadata.c
4959 * girepository/gmetadata.h
4961 * tools/gidlparser.c
4962 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4963 to avoid confusion with the interface blob.
4966 * tools/gidlparser.c
4967 Remove magic numbers and replace with type-tag
4968 enumeration symbols.
4970 * girepository/gmetadata.c
4971 Add validate declaration.
4973 2008-03-10 Jürg Billeter <j@bitron.ch>
4975 * tools/gidlparser.c: (parse_type_internal):
4976 * tools/scannerlexer.l:
4977 * tools/scannerparser.y:
4978 Support C99 _Bool type in scanner.
4980 2008-03-10 Jürg Billeter <j@bitron.ch>
4982 * tests/parser/Foo-expected.gidl:
4983 * tests/parser/foo-object.h:
4984 * tests/parser/foo.c: (foo_enum_method):
4985 * tools/scanner.c: (g_igenerator_process_function_symbol):
4986 Don't skip functions that are defined in the namespace of a type
4987 that doesn't support methods, as for example enums.
4989 2008-03-10 Johan Dahlin <johan@gnome.org>
4991 * gidl.dtd: Remove, we're using relaxng for now
4993 * tests/parser/Foo-expected.gidl:
4994 * tests/parser/foo-object.h:
4995 * tests/parser/foo.c:
4996 Rename the enum/flags get_type functions to include the whole type.
4998 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
5000 * tools/gidlwriter.c (enum_generate): added "type-name",
5001 "get-type" and "deprecated" missing arguments.
5002 * tests/parser/Foo-expected.gidl:
5003 * tests/parser/foo-object.h: test enum type, and no type.
5005 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
5008 Consistent checks, add missing 'test'
5010 2008-03-05 Havoc Pennington <hp@redhat.com>
5012 * configure.ac: Take advantage of a libffi.pc if one exists, as it
5013 does on Fedora 8. Make libffi a hard requirement, since it was in
5014 practice anyway (was not really conditional in the code or
5015 makefile, only in configure).
5017 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
5019 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
5020 reviewed by: Johan Dahlin <johan@gnome.org>
5022 * tests/Makefile.am:
5023 * tests/roundtrips.sh:
5024 Modify the roundtrips test so that they do not use the
5025 --raw option of the gidl compiler but instead compile a
5026 shared library to use with g_module.
5028 * tests/invoke/Makefile.am:
5029 * tests/invoke/invoke.c:
5030 Modify the invoke tests to build a shared library rather
5031 than use the --raw option.
5033 * tests/invoke/invoke-namespace-find.sh: Removed:
5034 Noone knows why this was here, so removed.
5036 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
5038 * tools/scanner.c: (g_igenerator_process_function_symbol):
5039 Move g_idl_node_can_have_member test later, as it broke spotting
5040 get_type's for nodes that can't have members.
5042 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5045 * tools/gidlnode.c: (g_idl_node_can_have_member):
5046 Add g_idl_node_can_have_member.
5048 * tools/scanner.c: (g_igenerator_process_function_symbol):
5049 Use g_idl_node_can_have_member to test if we should add a function
5050 as a member of the type node.
5052 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5054 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
5056 * tests/parser/Makefile.am:
5057 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
5059 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5061 * tools/scanner.c: (main):
5062 Ignore -pthread when passed to g-idl-scanner.
5064 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5066 * tools/grealpath.h: Added:
5067 * tools/scanner.c: (main):
5068 * tools/scannerlexer.l:
5069 * tools/Makefile.am:
5070 Always use absolute paths with symbolic links resolved when
5071 comparing filenames.
5073 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5075 * gobject-introspection.pc.in:
5076 Provide variables for g-idl-parser, scanner and compiler in the
5079 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
5082 * girepository/Makefile.am:
5083 * tools/Makefile.am:
5084 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
5086 2008-02-10 Johan Dahlin <johan@gnome.org>
5088 * tests/parser/Foo-expected.gidl:
5089 * tests/parser/foo-object.h:
5090 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
5091 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
5094 2008-02-10 Johan Dahlin <johan@gnome.org>
5096 * tests/parser/Foo-expected.gidl:
5097 * tests/parser/foo-object.h:
5098 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
5099 Add enum and flags test.
5101 2008-02-10 Johan Dahlin <johan@gnome.org>
5105 * girepository/Makefile.am:
5106 Make 'make distcheck' work again.
5108 2008-02-10 Johan Dahlin <johan@gnome.org>
5110 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
5113 * tests/parser/Makefile.am: Only create Foo.gidl when running make
5114 check, eg exclude it from BUILT_SOURCES.
5116 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5121 * girepository/Makefile.am:
5122 * m4/Makefile.am: Added:
5123 * m4/as-compiler-flag.m4: Added:
5124 * m4/gcov.m4: Added:
5125 * tools/Makefile.am:
5126 Add ability to generate a coverage report.
5127 Adds configure option --enable-gcov and make rule 'check-coverage'.
5129 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5133 * gidl/Makefile.am: Added:
5134 * girepository/Makefile.am: Added:
5135 * src/Makefile.am: Renamed to tools/Makefile.am:
5136 * src/compiler.c: Renamed to tools/compiler.c:
5137 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
5138 * src/generate.c: Renamed to tools/generate.c:
5139 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
5140 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
5141 * src/gidlnode.c: Renamed to tools/gidlnode.c:
5142 * src/gidlnode.h: Renamed to tools/gidlnode.h:
5143 * src/gidlparser.c: Renamed to tools/gidlparser.c:
5144 * src/gidlparser.h: Renamed to tools/gidlparser.h:
5145 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
5146 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
5147 * src/ginfo.c: Renamed to girepository/ginfo.c:
5148 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
5149 * src/girepository.c: Renamed to girepository/girepository.c:
5150 * src/girepository.h: Renamed to girepository/girepository.h:
5151 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
5152 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
5153 * src/scanner.c: Renamed to tools/scanner.c:
5154 * src/scanner.h: Renamed to tools/scanner.h:
5155 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
5156 * src/scannerparser.y: Renamed to tools/scannerparser.y:
5157 * tests/invoke/Makefile.am:
5158 Split src/ into girepository/ and tools/
5162 * girepository/Makefile.am:
5163 * tests/Makefile.am:
5164 * tests/invoke/Makefile.am:
5165 * tests/parser/Makefile.am:
5166 * tests/roundtrips.sh:
5167 * tools/Makefile.am:
5168 Make distcheck work.
5170 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
5172 * tests/invoke/invoke.c: (main):
5173 * tests/invoke/testfns.c: (test6), (test7):
5174 * tests/invoke/testfns.xml:
5175 Add tests for invokation with a GList argument.
5176 Also tests caller-owns return values.
5178 2008-02-04 Rob Taylor <robtaylor@floopily.org>
5181 Add some documentation for GICallableInfo
5183 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
5186 Correct syntax errors in the DTD file.
5188 * relaxng/c-types.xml:
5189 * relaxng/g-types.xml:
5191 Add a RelaxNG specification for the GObject Introspection XML data.
5192 The Specification has validated all of the test files.
5194 2008-01-25 Rob Taylor <robtaylor@floopily.org>
5196 * tests/roundtrips.sh:
5197 * tests/struct.test:
5198 Add roundtrip tests for structs.
5200 2008-01-11 Johan Dahlin <johan@gnome.org>
5202 * src/scanner.c (g_igenerator_process_function_symbol):
5203 Refactor out g_idle_node_add_member.
5204 (create_node_from_gtype, create_node_from_ctype):
5205 Use case instead of if...else
5206 (get_type_from_type_id):
5207 Rename to create_node_from_gtype
5208 (get_type_from_ctype):
5209 Rename to create_node_from_ctype
5211 Rename ginode -> node, gitype -> type, gifunc -> func.
5213 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
5214 Two new functions, refactor out of scanner.c
5216 * src/scanner.c: (g_igenerator_process_function_symbol):
5217 * src/scannerlexer.l:
5218 Do not save the content of the deprecated variable, only
5221 2008-01-11 Johan Dahlin <johan@gnome.org>
5223 * tests/parser/foo-object.h: Add a couple of comment parser tests.
5225 2008-01-11 Jürg Billeter <j@bitron.ch>
5227 * src/scannerlexer.l:
5228 Fix GTK-Doc parsing.
5230 2008-01-11 Jürg Billeter <j@bitron.ch>
5232 * src/scannerlexer.l:
5233 Fix GTK-Doc parsing.
5235 2008-01-11 Jürg Billeter <j@bitron.ch>
5237 * src/scanner.c: (lookup_symbol):
5238 Return unresolved name if we find unknown symbol.
5240 2008-01-11 Jürg Billeter <j@bitron.ch>
5242 * src/scanner.c: (g_igenerator_generate):
5243 Initialize GObject to fix scanning interface properties.
5245 * tests/parser/Foo-expected.gidl:
5246 * tests/parser/foo-object.h:
5247 * tests/parser/foo.c: (foo_interface_get_type):
5248 Test interfaces with GObject prerequisite.
5250 * tests/parser/Makefile.am:
5251 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
5253 2007-12-27 Johan Dahlin <johan@gnome.org>
5255 * src/scannerlexer.l:
5256 Parse gtk-doc comments.
5258 * src/gidlwriter.c: (function_generate):
5259 Reorganize, avoid duplication and add support for
5260 writing deprecated functions.
5262 * src/scannerparser.y:
5264 Add new structure CDirective and functions to create/free them.
5266 * src/scanner.c: (g_igenerator_process_function_symbol),
5267 (g_igenerator_process_unregistered_struct_typedef),
5268 (g_igenerator_process_struct_typedef),
5269 (g_igenerator_process_union_typedef),
5270 (g_igenerator_process_enum_typedef),
5271 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
5272 (g_igenerator_start_preprocessor):
5273 Parse @deprecated directive for functions.
5274 Remove some more C99isms.
5275 Send in -C to cpp to avoid stripping comments.
5277 * tests/parser/foo-object.h:
5278 * tests/parser/Foo-expected.gidl:
5279 Add deprecated directive
5281 2007-12-27 Johan Dahlin <johan@gnome.org>
5283 * src/scannerlexer.l (intsuffix): Add emacs mode line and
5284 escape ' and " so it looks more like C.
5287 Unlink temporary file used.
5289 2007-12-27 Johan Dahlin <johan@gnome.org>
5291 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
5292 (g_igenerator_start_preprocessor), (main):
5294 * src/scannerparser.y:
5295 Plug a couple of simple memory leaks.
5297 2007-12-27 Johan Dahlin <johan@gnome.org>
5299 * src/scanner.c: (g_igenerator_parse_macros),
5300 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
5303 * src/scannerparser.y:
5304 * tests/parser/Makefile.am:
5306 Improve error reporting, return when the preprocessor fails.
5307 Add a verbose parameter, to aid debugging.
5308 Revert to using a temporary file to communicate between the
5309 preprocessor and the parser, because we need to wait for
5310 the exit code from the pre-processor before starting to parse.
5312 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
5314 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
5315 cparser.y to scannerparser.y
5317 2007-12-11 Johan Dahlin <johan@gnome.org>
5321 * src/scanner.c: (g_igenerator_new):
5323 Get rid of the global the_generator variable.
5325 2007-12-10 Johan Dahlin <johan@gnome.org>
5327 * src/scanner.c (main): Add an output option,
5328 add checks for required parameters
5331 set BUILD_SOURCES and CLEANFILES properly
5333 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
5334 (g_writer_write_indent), (g_writer_write_unindent),
5335 (field_generate), (value_generate), (constant_generate),
5336 (property_generate), (function_generate), (vfunc_generate),
5337 (signal_generate), (interface_generate), (struct_generate),
5338 (union_generate), (boxed_generate), (enum_generate),
5339 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
5341 * src/scanner.c: (g_igenerator_generate):
5343 * src/scannerwriter.c:
5345 Refactor scannerwriter to only be tied to a GIdlModule and move
5346 it (again!) to gidlwriter.c. Change the writer function to take
5349 2007-12-10 Johan Dahlin <johan@gnome.org>
5352 * src/scanner.c: (g_igenerator_generate):
5354 * src/scannerwriter.c: (g_igenerator_write_inline),
5355 (g_igenerator_write), (g_igenerator_write_indent),
5356 (g_igenerator_write_unindent), (field_generate), (value_generate),
5357 (constant_generate), (property_generate), (function_generate),
5358 (vfunc_generate), (signal_generate), (interface_generate),
5359 (struct_generate), (union_generate), (boxed_generate),
5360 (enum_generate), (node_generate), (module_generate),
5361 (g_scanner_write_file):
5363 Move the scanner gidl writing to a separate source file.
5365 2007-12-10 Johan Dahlin <johan@gnome.org>
5370 Move over all CType construction functions.
5372 * tests/parser/Makefile.am:
5373 Be verbose when printing parsing tests results.
5375 2007-12-10 Johan Dahlin <johan@gnome.org>
5377 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
5378 preprocessor handling to here. Start cpp insteado of cc -E,
5379 always include -U__GNUC__, since it's specific to the preprocessor
5382 * tests/parser/Makefile.am (check-local): Silent diff and skip
5383 -U__GNUC__ which is always defined now
5385 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
5387 reviewed by: <delete if not using a buddy>
5389 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
5390 * tests/parser/Makefile.am:
5392 2007-12-09 Johan Dahlin <johan@gnome.org>
5395 Use GOption for command line options.
5396 (g_igenerator_new, main): Simplify constructor and they way
5397 parameters are passed into it.
5403 * src/gen-introspect.c:
5404 * src/gen-introspect.h:
5406 Rename gen-introspect.[ch] to scanner.[ch]
5408 2007-12-09 Johan Dahlin <johan@gnome.org>
5412 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
5413 don't make the repository library and the other utilites link against
5416 * src/gen-introspect.c: (g_igenerator_create_object),
5417 (g_igenerator_create_interface), (g_igenerator_create_boxed),
5418 (g_igenerator_create_enum), (g_igenerator_create_flags),
5419 (g_igenerator_process_module_symbol),
5420 (g_igenerator_process_module), (g_igenerator_generate), (main):
5421 * src/gen-introspect.h:
5422 Refactor g_igenerator_process_types into smaller pieces.
5424 * tests/parser/Makefile.am:
5425 Depend on the gen-introspect binary
5427 2007-12-09 Johan Dahlin <johan@gnome.org>
5429 * src/gen-introspect.c (g_igenerator_process_types):
5430 Break into smaller pieces, one for each generated node type.
5432 2007-12-08 Johan Dahlin <johan@gnome.org>
5434 * src/gen-introspect.c: (g_igenerator_process_types),
5435 (g_igenerator_add_module):
5436 * tests/parser/Foo-expected.gidl:
5437 * tests/parser/foo-object.h:
5438 * tests/parser/foo.c: (foo_subobject_class_init),
5439 (foo_subobject_init):
5441 Add a subobject test and make sure to register defined classes
5442 in the lookup symbol hash table.
5444 2007-12-08 Johan Dahlin <johan@gnome.org>
5448 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
5449 (g_igenerator_process_types), (g_igenerator_add_module),
5450 (g_igenerator_add_include_idl), (main):
5451 * src/gen-introspect.h:
5452 * tests/parser/Makefile.am:
5453 * tests/parser/Foo-expected.gidl:
5455 Change the gen-introspect to generate namespaced module names,
5456 such as GLib.Object instead of GObject.
5457 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
5458 add a --include-idl parameter to gen-introspect,
5459 and update the parser test.
5461 2007-12-08 Johan Dahlin <johan@gnome.org>
5463 * src/gen-introspect.c:
5464 Move main to the end of the file and attempt to make it valid
5467 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
5468 we're not quite ready to generate metadata yet.
5473 Add a simple gen-introspect parser test
5475 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
5477 reviewed by: Johan Dahlin <johan@gnome.org>
5480 * gobject-introspection.pc.in:
5482 * src/compiler.c: (format_output), (write_out_metadata), (main):
5483 * src/gen-introspect.c: (main):
5484 * src/gen-introspect.h:
5485 * src/generate.c: (write_callable_info), (write_repository),
5486 (load_metadata), (main):
5487 * src/gidlmodule.c: (g_idl_module_new),
5488 (g_idl_module_build_metadata):
5490 * src/gidlparser.c: (start_element_handler):
5491 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5492 (g_base_info_get_name), (g_base_info_get_namespace),
5493 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5494 (g_base_info_get_metadata), (g_function_info_get_symbol),
5495 (g_function_info_get_flags), (g_function_info_get_property),
5496 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5497 (g_callable_info_may_return_null),
5498 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5499 (g_callable_info_get_arg), (g_arg_info_get_direction),
5500 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5501 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5502 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5503 (g_type_info_get_tag), (g_type_info_get_param_type),
5504 (g_type_info_get_interface), (g_type_info_get_array_length),
5505 (g_type_info_is_zero_terminated),
5506 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5507 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5508 (g_value_info_get_value), (g_field_info_get_flags),
5509 (g_field_info_get_size), (g_field_info_get_offset),
5510 (g_registered_type_info_get_type_name),
5511 (g_registered_type_info_get_type_init),
5512 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5513 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5514 (find_method), (g_struct_info_find_method),
5515 (g_enum_info_get_n_values), (g_enum_info_get_value),
5516 (g_object_info_get_parent), (g_object_info_get_type_name),
5517 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5518 (g_object_info_get_interface), (g_object_info_get_n_fields),
5519 (g_object_info_get_field), (g_object_info_get_n_properties),
5520 (g_object_info_get_property), (g_object_info_get_n_methods),
5521 (g_object_info_get_method), (g_object_info_find_method),
5522 (g_object_info_get_n_signals), (g_object_info_get_signal),
5523 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5524 (g_object_info_get_n_constants), (g_object_info_get_constant),
5525 (g_interface_info_get_n_prerequisites),
5526 (g_interface_info_get_prerequisite),
5527 (g_interface_info_get_n_properties),
5528 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5529 (g_interface_info_get_method), (g_interface_info_find_method),
5530 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5531 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5532 (g_interface_info_get_n_constants),
5533 (g_interface_info_get_constant), (g_property_info_get_flags),
5534 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5535 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5536 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5537 (g_constant_info_get_value), (g_union_info_get_n_fields),
5538 (g_union_info_get_field), (g_union_info_get_n_methods),
5539 (g_union_info_get_method), (g_union_info_is_discriminated),
5540 (g_union_info_get_discriminator_offset),
5541 (g_union_info_get_discriminator):
5542 * src/ginvoke.c: (g_function_info_invoke):
5543 * src/girepository.c: (g_irepository_register),
5544 (g_irepository_unregister), (g_irepository_get_default),
5545 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5546 (g_irepository_get_info), (g_irepository_find_by_name),
5547 (g_irepository_get_shared_library),
5548 (g_irepository_build_search_path), (g_irepository_register_file),
5549 (g_irepository_error_quark):
5550 * src/girepository.h:
5551 * src/gmetadata.c: (g_metadata_get_dir_entry),
5552 (g_metadata_check_sanity), (validate_header),
5553 (validate_array_type_blob), (validate_iface_type_blob),
5554 (validate_param_type_blob), (validate_error_type_blob),
5555 (validate_type_blob), (validate_arg_blob),
5556 (validate_signature_blob), (validate_function_blob),
5557 (validate_callback_blob), (validate_constant_blob),
5558 (validate_value_blob), (validate_field_blob),
5559 (validate_property_blob), (validate_signal_blob),
5560 (validate_vfunc_blob), (validate_struct_blob),
5561 (validate_enum_blob), (validate_object_blob),
5562 (validate_interface_blob), (validate_errordomain_blob),
5563 (validate_union_blob), (validate_blob), (validate_directory),
5564 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5565 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5566 (g_metadata_new_from_mapped_file), (g_metadata_free),
5567 (g_metadata_set_module), (g_metadata_get_namespace):
5569 * tests/Makefile.am:
5570 * tests/invoke/Makefile.am:
5571 * tests/invoke/invoke-namespace-find.sh:
5572 * tests/invoke/invoke.c: (main):
5574 Add a namespace/shared library mapping. fixes #313268.
5576 2007-12-03 Johan Dahlin <johan@gnome.org>
5578 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5581 2007-11-30 Jürg Billeter <j@bitron.ch>
5587 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5588 (g_igenerator_write_inline), (g_igenerator_write),
5589 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5590 (field_generate), (value_generate), (constant_generate),
5591 (property_generate), (function_generate), (vfunc_generate),
5592 (signal_generate), (interface_generate), (struct_generate),
5593 (union_generate), (boxed_generate), (enum_generate),
5594 (node_generate), (module_generate), (get_type_from_type_id),
5595 (str_replace), (g_igenerator_process_properties),
5596 (g_igenerator_process_signals), (g_igenerator_process_types),
5597 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5598 (g_igenerator_process_unregistered_struct_typedef),
5599 (g_igenerator_process_struct_typedef),
5600 (g_igenerator_process_union_typedef),
5601 (g_igenerator_process_enum_typedef),
5602 (g_igenerator_process_function_typedef),
5603 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5604 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5605 (g_igenerator_generate), (main), (csymbol_new),
5606 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5607 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5608 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5609 (eat_hspace), (eat_line), (read_identifier),
5610 (g_igenerator_parse_macros):
5611 * src/gen-introspect.h:
5613 Import gen-introspect to generate introspection information by
5616 2007-11-30 Jürg Billeter <j@bitron.ch>
5618 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5620 2007-11-30 Jürg Billeter <j@bitron.ch>
5622 * src/gidlparser.c: (end_element_handler): Don't leave requires
5625 2007-11-29 Johan Dahlin <johan@gnome.org>
5627 * src/gidlparser.c (parse_type_internal): Add char,
5628 gchar and guchar to the builtin types.
5630 2007-11-26 Johan Dahlin <johan@gnome.org>
5632 * src/ginfo.c: (g_object_info_get_type_name),
5633 (g_object_info_get_type_init):
5634 * src/girepository.c: (g_irepository_is_registered):
5635 * src/girepository.h:
5637 Add g_object_info_get_type_name, g_object_info_get_type_init and
5638 g_irepository_is_registered.
5640 2006-08-14 Jürg Billeter <j@bitron.ch>
5642 * src/gidlparser.c: (end_element_handler): Don't leave
5643 namespace and implements states too early.
5646 2007-11-26 Johan Dahlin <johan@gnome.org>
5648 * src/gmetadata.c (validate_struct_blob):
5649 pass blob_type to validate_function_blob instead of
5650 hard-coding BLOB_TYPE_STRUCT.
5652 Patch by Torsten Schoenfeld, fixes #314190
5654 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5656 * src/compiler.c, src/generate.c, src/gidlnode.c,
5657 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5658 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5659 warnings about return values, signedness mismatches, unused
5660 variables, and unhandles enum values in switch statements.
5662 * tests/invoke/Makefile.am: Don't install the invoke test program.
5663 Add -I ../../src to the cflags used for the test functions files.
5665 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5667 * src/girepository.h: Export g_invoke_error_quark.
5669 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5671 * src/ginvoke.c: Remove the fallback implementation of
5672 g_function_info_invoke since we now formally depend on libffi.
5674 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5676 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5677 Remove these files from cvs, as they are now generated.
5679 * src/gmetadata.c (validate_iface_type_blob): Don't
5680 complain if blob->pointer is not set, since that
5681 happens for enum and flag types. (#308935, Gustavo
5684 * Commit an autoconf-conversion patch by
5685 Gustavo Carneiro (#308708)
5687 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5689 * src/compiler.c (main): Use it here to validate
5690 the generated metadata.
5692 * src/gmetadata.[hc]: Add code to validate a
5695 * metadata-format.txt: Updates
5697 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5699 * tests/*: Add struct offsets to field and vfunc
5702 * src/generate.c (write_vfunc_info): Write offset
5703 information for vfuncs.
5705 * src/gidlnode.c (g_idl_node_build_metadata): Write
5706 the struct offsets into the metadata.
5708 * src/gidlparser.c: Parse the offset attributes of
5709 field and vfunc elements.
5711 * src/gidlnode.h: Add offset members to field and
5714 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5718 * gidl.dtd: Updates.
5720 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5721 file, creates, compiles and runs a C file, and folds the
5722 resulting struct offsets back into the .gidl file.
5724 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5726 * src/gidlparser.c (start_field): Make fields in objects
5729 * src/gidlmodule.c: Include string.h
5734 * metadata-format.txt: Cleanup basic types.
5735 * src/*: Adapt to the changes.
5736 * tests/*: Adapt to the changes.
5737 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5739 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5740 size for enum blobs.
5741 (g_idl_node_get_full_size): Report the correct size for
5744 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5745 error checking for blob sizes.
5747 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5749 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5750 interface types for which is_pointer is FALSE, e.g. enums.
5752 * src/gidlnode.c (g_idl_node_get_full_size)
5753 * src/gidlparser.c (parse_type_internal):
5754 * src/generate.c (write_type_info): Support unspecialized
5755 lists, hashtables and errors. Also emit a '*' after these.
5759 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5763 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5765 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5767 * src/*.c: Change the directory to be addressed by
5768 1-based indexes, and use an index of zero to mean
5771 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5773 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5775 * tests/union.test: Add a union test.
5777 * src/generate.c: Handle unions.
5779 * src/girepository.h:
5780 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5782 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5784 * src/gidlparser.c (start_union): Parse <union> elements.
5786 * src/gidlnode.h: Add a GIdlNodeUnion.
5788 * gidl.dtd: Add a <union> element.
5790 * src/gmetadata.c (g_metadata_check_sanity): Check
5793 * src/gmetadata.h: Add union_blob_size to Header,
5796 * metadata-format.txt: Add a UnionBlob.
5798 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5800 * tests/*: Update testcases.
5802 * src/generate.c (write_callable_info): Don't forget to
5803 write transfer and null-ok attributes for return types
5806 * src/girepository.h:
5807 * src/ginfo.c (g_callable_info_may_return_null):
5808 New function to find out if a function may return NULL.
5810 * src/compiler.c (format_output): Make the generated
5813 * README: Point to a recent libffi snapshot.
5815 * tests/invoke/*: Some invoke tests.
5817 * src/Makefile: Add ginvoke.c and the necessary
5820 * src/girepository.h (g_function_info_invoke): Add
5823 * src/ginvoke.c (g_function_info_invoke): Initial
5824 implementation of invoke functionality based on libffi.
5826 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5827 strings and types hash tables in the right order when
5829 (find_entry_node): Free the name parts.
5831 2005-05-12 Johan Dahlin <johan@gnome.org>
5833 * src/generate.c: Generate consistent end tags.
5837 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5841 * src/gidlparser.c (start_function): Actually add
5842 methods to objects. (Steven Walter)
5844 * src/girepository.h:
5845 * src/ginfo.c: Rename Transfer and Direction to
5846 GITransfer and GIDirection. (Torsten Schoenfeld)
5848 * tests/*: Make tests work with the changes in name
5851 * src/gidlnode.c (find_entry_node): Parse qualified
5852 names and generate xref nodes for them if needed. Don't
5853 require all modules to be loaded any more.
5855 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5858 * src/ginfo.c (g_object_info_get_parent): Return NULL
5859 if blob->parent is 0. Still need to make sure index
5862 * src/generate.c: Generate qualified names when
5863 referring to non-local types. Emit transfer attribute
5866 * src/compiler.c (format_output): Put the function
5867 attributes where gcc accepts them.
5869 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5871 * src/compiler.c (main): Add a --verbose cmdline option
5872 and only log messages if it is specified.
5875 * src/gidlnode.c (init_stats, dump_stats): Collect some
5876 statistics on string and type sharing.
5878 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5879 g_message() instead of fprintf().
5881 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5882 (g_idl_node_get_size): Implement for structs.
5883 (g_idl_node_get_full_size): Handle parent being NULL.
5884 (serialize_type): Handle lookup failures more gracefully.
5886 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5888 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5889 size calculation for 2-parameter types and for objects.
5891 * src/compiler.c: Add a cmdline option for debug output
5892 and install a log handler to implement it.
5893 * src/gidlnode.c: Add some debug spew.
5897 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5898 forget to count the module name when calculating the
5899 required size for the metadata.
5902 * src/gidlparser.c: Fix compiler warnings.
5904 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5906 * src/compiler.c (main): Free the option context.
5908 * gidl.dtd: Clean up handling of names. All elements
5909 have a "name", only the elements corresponding to
5910 actual callable functions (function, method, constructor),
5911 have an additional "symbol" attribute holding the
5912 dlsym()-able function name.
5914 * src/generate.c: Adapt to generate xml matching the
5918 * src/gidlnode.c: Adapt to parse the new dtd.
5920 * tests/*.test: Adjust to the new dtd.
5922 * metadata-format.txt:
5923 * src/gmetadata.h: Remove the short_name field
5925 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5926 * src/girepository.h:
5927 * src/ginfo.c (g_value_info_get_short_name): Removed
5929 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5931 * gidl.dtd: Allow constructors for boxed types,
5932 patch by Jonathan Blandford.
5935 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5937 * --- Initial import ---