1 2009-01-28 Johan Bilien <jobi@via.ecp.fr>
3 * tests/scanner/annotation-1.0-expected.gir: add missing
6 2009-01-27 Johan Dahlin <jdahlin@async.com.br>
9 * gir/fontconfig-2.0.gir:
10 * gir/freetype2-2.0.gir:
11 * gir/libxml2-2.0.gir:
15 Remove shared-library tags for these too.
17 2009-01-27 Johan Dahlin <jdahlin@async.com.br>
20 Remove shared-library which removes the build
21 time dependency on mesa.
23 2009-01-27 Dan Winship <danw@gnome.org>
27 * giscanner/scannerparser.y: Fix the "Ignoring non-UTF-8 constant
28 string" error to print the right value.
30 * tests/scanner/annotation.c (backslash_parsing_tester)
31 (backslash_parsing_tester_2): make these non-static to avoid a
33 (annotation_object_string_out)
34 (annotation_string_zero_terminated): fix return values
36 * tests/scanner/annotation.h (annotation_object_with_voidp):
39 * tests/scanner/gtkfrob.c:
40 * tests/scanner/gtkfrob.h (gtk_frob_language_manager_get_default):
41 fix prototype. (s/()/(void)/).
43 * tools/compiler.c (format_output): fix signed/unsigned warning.
44 Output a prototype for register_typelib() to avoid warnings later.
46 2009-01-26 Johan Dahlin <jdahlin@async.com.br>
48 * tests/everything/everything.c (test_callback):
49 * tests/everything/everything.h:
50 Add a couple of callback tests.
52 2009-01-26 Johan Dahlin <jdahlin@async.com.br>
54 * girepository/ginfo.c (g_base_info_unref):
55 Only unref the repository if it's actually set.
57 2009-01-23 Johan Dahlin <jdahlin@async.com.br>
59 * tests/everything/everything.c (test_enum_param):
60 * tests/everything/everything.h:
62 Add an enum param test function
64 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
67 Post-release version bump
70 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
74 2009-01-21 Johan Dahlin <jdahlin@async.com.br>
76 Bug 562622 – Errordomains missing
78 * giscanner/girwriter.py:
79 * giscanner/glibast.py:
80 * giscanner/glibtransformer.py:
81 * tests/scanner/Makefile.am:
82 * tests/scanner/foo-1.0-expected.gir:
83 * tests/scanner/foo-1.0-expected.tgir:
84 * tests/scanner/foo.c (foo_error_get_type), (foo_error_quark):
85 * tests/scanner/foo.h:
87 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
89 * giscanner/scannerlexer.l:
90 Increase the buffer size to 1M, so
91 gtkalias.h can be parsed.
93 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
95 * giscanner/glibtransformer.py:
96 When trying to map functions to structs, do
97 not require a public structure to exist, should
98 fix Gst gir generation in.
100 2009-01-20 Johan Dahlin <jdahlin@async.com.br>
102 Bug 562615 – Struct methods missing
104 * giscanner/annotationparser.py:
106 * giscanner/girwriter.py:
107 * giscanner/glibast.py:
108 * giscanner/glibtransformer.py:
109 * tests/scanner/foo-1.0-expected.gir:
110 * tests/scanner/foo-1.0-expected.tgir:
112 2009-01-16 Dan Winship <danw@gnome.org>
114 * gir/GL-1.0.gir: add back GLvoid, which got lost during the
115 gir-repository -> gobject-introspection migration
117 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
119 * gir/freetype2-2.0.gir: add FT_Int32
120 * gir/xft-2.0.gir: add XftFont
121 * girepository/gdump.c (g_irepository_dump):
122 Report errors when an invalid type is encountered
123 * giscanner/glibtransformer.py:
124 Make the error message a bit nicer.
126 Part of preparating for gir generating inside pango.
128 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
133 * gir/fontconfig-2.0.gir:
134 * gir/freetype2-2.0.gir:
135 * gir/libxml2-2.0.gir:
136 * gir/xfixes-4.0.gir:
140 Move over the hand-written girs from gir-repository
141 so upstream libraries depending on these can avoid
142 a gir-repository dependency.
144 2009-01-15 Johan Dahlin <jdahlin@async.com.br>
146 Bug 567813 – Everything should be versioned
149 * girepository/Makefile.am:
150 * girepository/girepository.c (init_globals):
151 * girepository/girparser.c (locate_gir):
152 * giscanner/dumper.py:
153 * giscanner/transformer.py:
154 * gobject-introspection-1.0.pc.in:
155 * tests/everything/Makefile.am:
156 * tests/invoke/Makefile.am:
157 * tests/offsets/Makefile.am:
158 * tests/repository/Makefile.am:
159 * tests/scanner/Makefile.am:
162 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
164 Bug 555036 – put gtk-doc in GIR
166 * giscanner/annotationparser.py:
168 * giscanner/girwriter.py:
169 * giscanner/glibast.py:
170 * tests/scanner/annotation-1.0-expected.gir:
171 * tests/scanner/annotation.h:
172 * tests/scanner/foo-1.0-expected.gir:
174 2009-01-13 Johan Dahlin <jdahlin@async.com.br>
176 * giscanner/cachestore.py (CacheStore.load): Catch AttributeError
177 which seems to be occasionally raised for Record.
179 * giscanner/annotationparser.py:
180 Fix a bug where \n was not present in a comment
182 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
184 Bug 562467 – Property annotation
186 * giscanner/annotationparser.py:
187 * tests/scanner/annotation-1.0-expected.gir:
188 * tests/scanner/annotation-1.0-expected.tgir:
189 * tests/scanner/annotation.c (annotation_object_set_property),
190 (annotation_object_get_property), (annotation_object_class_init):
192 Annotations are parsed for properties.
194 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
196 Bug 546739 – Introspection should know precise signal parameter types
198 * giscanner/annotationparser.py:
199 * tests/scanner/annotation-1.0-expected.gir:
200 * tests/scanner/annotation-1.0-expected.tgir:
201 * tests/scanner/annotation.c (annotation_object_class_init):
203 Annotations are parsed for signals, the (type) annotation is introduced.
205 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
207 Bug 563591 – Flags not recognized when there is no introspection data
210 * giscanner/girwriter.py:
211 * giscanner/giscannermodule.c (type_get_is_bitfield):
212 * giscanner/glibast.py:
213 * giscanner/glibtransformer.py:
214 * giscanner/scannerparser.y:
215 * giscanner/sourcescanner.c (gi_source_type_copy):
216 * giscanner/sourcescanner.h:
217 * giscanner/sourcescanner.py:
218 * giscanner/transformer.py:
219 * tests/scanner/foo-1.0-expected.gir:
220 * tests/scanner/foo-1.0-expected.tgir:
221 * tests/scanner/foo.h:
223 Large parts of this patch was done by Jürg Billeter.
225 2009-01-12 Havoc Pennington <hp@pobox.com>
227 Bug 563386 – scanner ignores "const" on boxed return values
229 * tests/everything/everything.c (test_simple_boxed_a_const_return):
230 * tests/everything/everything.h:
232 This adds just the tests specified in the bug above, the fix itself
233 was included in Bug 563794
235 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
237 Bug 566404 – Annotations for GLib
239 * gir/glib-2.0.c: Added allow-none annotations for g_thread_init()
240 and g_main_loop_new().
242 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
244 Bug 566419 – Element type of arrays not properly handled in all cases
246 * giscanner/annotationparser.py:
247 * tests/scanner/annotation-1.0-expected.gir:
248 * tests/scanner/annotation-1.0-expected.tgir:
249 * tests/scanner/annotation.c (annotation_object_set_data),
250 (annotation_object_set_data2), (annotation_object_set_data3):
251 * tests/scanner/annotation.h:
253 Based on patch by Andreas Rottmann
255 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
257 Bug 566560 – giscanner.transformer.SkipError
259 * giscanner/transformer.py:
261 Catch SkipError for all nodes, not just functions.
262 Makes it possible to skip unsupported parameter types in
265 2009-01-12 Johan Dahlin <jdahlin@async.com.br>
267 Bug 563794 - Redo annotation parsing & applying
269 Thanks to Colin for helping out considerably in landing this.
271 * giscanner/Makefile.am:
273 * giscanner/dumper.py:
274 * giscanner/girparser.py:
275 * giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
276 (calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
277 * giscanner/glibtransformer.py:
278 * giscanner/scannerlexer.l:
279 * giscanner/sourcescanner.c (gi_source_symbol_unref),
280 (gi_source_scanner_new), (gi_source_scanner_free),
281 (gi_source_scanner_get_comments):
282 * giscanner/sourcescanner.h:
283 * giscanner/sourcescanner.py:
284 * giscanner/transformer.py:
285 * giscanner/xmlwriter.py:
286 * tests/scanner/annotation-1.0-expected.gir:
287 * tests/scanner/annotation-1.0-expected.tgir:
288 * tests/scanner/annotation.c:
289 * tests/scanner/annotation.h:
290 * tests/scanner/foo-1.0-expected.gir:
291 * tests/scanner/foo-1.0-expected.tgir:
292 * tests/scanner/foo.h:
293 * tools/g-ir-scanner:
295 This commit merges the annotation parser rewrite branch.
296 It'll change the annotation parsing to be done completely in python
297 code which will make it easier to do further annotation parsing
300 2009-01-03 Andreas Rottmann <a.rottmann@gmx.at>
302 Bug 563469 – Arrays not treated correctly in struct offset calculation
304 * tests/scanner/foo.h (FooObject): Added field `some_int'.
305 * tests/scanner/foo-1.0-expected.gir,
306 * tests/scanner/foo-1.0-expected.tgir: Adapted.
308 * giscanner/glibtransformer.py (GLibTransformer._create_gobject):
309 carry over object fields from original (struct) node.
310 (GLibTransformer._pair_class_struct): Don't add fields of the
311 class struct to to the node for the class, they should go under a
312 nested <record> element (see also Bug 551738). This is needed as
313 otherwise offset calculation would not work, as the instance
314 fields are mingled with the class fields without a way to
317 2009-01-03 Johan Dahlin <jdahlin@async.com.br>
320 Disable blank line check, it works differently under
321 Python 2.5 from 2.6 and was rather annoying from the start.
323 2008-01-03 Andreas Rottmann <a.rottmann@gmx.at>
325 Bug 556489 – callback annotations
327 * giscanner/transformer.py
329 * tools/generate.c (write_callable_info): Write out the new scope,
330 closure and destroy attributes.
332 * giscanner/transformer.py (Transformer._type_is_callback): New
333 method, checking if a given type is a callback.
334 (Transformer._augment_callback_params): New method; adds
335 information (closure, destroy) to callback parameters.
336 (Transformer._handle_closure, Transformer._handle_destroy): New methods,
337 auxiliary to _augment_callback_params.
338 (Transformer._create_function): Call _augment_callback_params().
339 (Transformer._create_parameter): Handle scope option.
341 (Transformer._create_typedef_callback): New method, creates a
342 callback, and registers it in the typedef namespace
343 (Transformer._create_typedef): Use _create_typedef_callback()
344 instead of the plain _create_callback().
346 * giscanner/ast.py (Parameter): Added callback-related fields.
347 * giscanner/girwriter.py: Write out new Parameter fields.
349 * girepository/girnode.h (GIrNodeParam): Added fields scope,
351 * girepository/gtypelib.h (ArgBlob): Ditto.
352 * girepository/girparser.c (start_parameter): Handle new fields.
354 * girepository/girmodule.c (g_ir_module_build_typelib): Adjust
355 arg_blob_size, bump major version due to this change.
356 * girepository/girnode.c (g_ir_node_get_full_size_internal)
357 (g_ir_node_build_typelib)
358 * girepository/gtypelib.c (g_typelib_check_sanity): ArgBlob size
360 (g_ir_node_build_typelib): Fill in new ArgBlob flags from param.
362 * girepository/girepository.h (GIScope): New enumeration, listing
363 the different possible scopes for callbacks.
365 * girepository/ginfo.c (g_arg_info_get_scope)
366 (g_arg_info_get_closure, g_arg_info_get_destroy): Accessors for
367 callback-related argument indices (callback scope, closure for a
368 callback, destroy notification for a callback).
370 * tests/scanner/: Added testcases for new features.
372 2009-01-03 Jürg Billeter <j@bitron.ch>
375 * giscanner/dumper.py:
376 * giscanner/girparser.py:
377 * giscanner/glibtransformer.py:
378 * giscanner/sourcescanner.py:
379 * giscanner/transformer.py:
380 * giscanner/xmlwriter.py:
382 Fix inconsistencies with PEP8
384 2008-12-21 Johan Dahlin <jdahlin@async.com.br>
387 Annotate transfer, direction and allow none for
388 g_file_load_contents, g_file_load_contents_finish and
389 g_file_load_partial_contents_finish parameters.
391 2008-12-12 Owen Taylor <otaylor@redhat.com>
393 Disable array auto-detection for out-annotated parameters (#563934)
395 If we have a parameter annotated as (out), then having a ctype of
396 'char **' (or similar) doesn't necessarily indicate an array.
398 * giscanner/transformer.py: Skip array-detection logic for
399 (out)-annotated parameters.
400 * tests/scanner/annotation.h tests/scanner/annotation.c
401 tests/scanner/annotation-1.0-expected.gir
402 tests/scanner/annotation-1.0-expected.tgir: Add a test for
403 an (out) string parameter.
405 2008-12-12 Johan Dahlin <jdahlin@async.com.br>
407 * giscanner/dumper.py (DumpCompiler._link): Pass in
408 --tag=CC to libtool to avoid making libtool confused
409 when CC is different from gcc on some systems.
411 2008-12-10 Johan Bilien <jobi@via.ecp.fr>
413 Bug 563998 – Cache the GIBaseInfo for GTypes
415 * girepository/girepository.c (g_irepository_find_by_gtype):
416 add a cache of GType -> GIBaseInfo.
418 2008-12-09 Johan Bilien <jobi@via.ecp.fr>
420 Bug 562545 – Add function taking / returning GValue
422 * tests/everything/everything.[ch]: add a test of function taking and
423 returning "const GValue *"
425 2008-12-09 Johan Dahlin <johan@async.com.br>
427 * giscanner/cachestore.py (CacheStore.store): Use
428 shutil.move instead of os.rename, since it will
429 automatically fall back to copying+remove if the
430 src directory is on a different partition from
433 2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
435 Bug 563742 – introspection should record the introduced version of
436 symbols marked with the "Since:" tag
441 * giscanner/girwriter.py:
442 * giscanner/scannerlexer.l:
443 * giscanner/transformer.py:
444 * tests/scanner/annotation-1.0-expected.gir:
445 * tests/scanner/annotation-1.0-expected.tgir:
446 * tests/scanner/annotation.c (annotation_versioned):
447 * tests/scanner/annotation.h:
449 2008-12-08 Johan Dahlin <johan@async.com.br>
451 * giscanner/cachestore.py (_get_cachedir): Don't require
452 HOME to be set and if it set, don't require the
455 2008-12-08 Johan Dahlin <johan@async.com.br>
457 * giscanner/cachestore.py (CacheStore.store): Dump the cache
458 file to a temporary file and rename it the expected filename
459 only when it's completely written.
460 This should make the cache more roboust when run in parallel,
461 and hopefully avoid triggering bugs in Python.
463 2008-12-03 Christophe Fergeau <teuf@gnome.org>
465 Bug 562971 – g-ir-scanner failure on libgpod headers
467 * giscanner/scannerlexer.l: raise YY_BUF_SIZE to 65536 up from the
468 default 16384. Without it, the lexer was aborting with a cryptic
469 error message on source files containing really long comment
472 2008-12-01 Colin Walters <walters@verbum.org>
474 * girepository/gfield.c: Fix memory leak; unref type info we
475 created, not field info
477 2008-11-30 Johan Dahlin <jdahlin@async.com.br>
479 Bug 562289 – Race when removing invalid cache
481 * giscanner/cachestore.py:
482 ENOENT is mapped to a OSError, not IOError.
484 2008-11-27 Johan Dahlin <jdahlin@async.com.br>
486 * gir/glib-2.0.c: Add return value transfer annotation
487 for g_markup_escape_text.
489 2008-11-25 Colin Walters <walters@verbum.org>
491 * tools/g-ir-scanner: Add --libtool option which we expect Automake-using
493 * giscanner/dumper.py: Implement it.
494 * gir/Makefile.am, tests/**/Makefile.am: Use it.
496 2008-11-25 Colin Walters <walters@verbum.org>
498 * tests/scanner/Makefile.am: Remove hand-rolled generation of .tgir; easier
499 to just use a Makefile rule and dependencies. This corresponds with a change
500 made to gir-repository to fix srcdir != builddir issues.
502 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
505 Post release version bump
508 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
513 2008-11-25 Colin Walters <walters@verbum.org>
515 Bug 559705 – Missing association between static methods and classes
517 * docs/typelib-format.txt:
518 * girepository/ginfo.c (g_function_info_get_flags):
519 * girepository/girmodule.c (g_ir_module_build_typelib):
520 * girepository/girnode.c (g_ir_node_get_size),
521 (g_ir_node_build_typelib):
522 * girepository/girparser.c (start_function):
523 * girepository/gtypelib.c (g_typelib_check_sanity),
524 (validate_header), (validate_function_blob):
525 * girepository/gtypelib.h:
527 * giscanner/girwriter.py:
528 * giscanner/glibtransformer.py:
529 * tests/scanner/foo-1.0-expected.gir:
530 * tests/scanner/foo-1.0-expected.tgir:
531 * tests/scanner/foo.h:
533 2008-11-25 Johan Dahlin <jdahlin@async.com.br>
535 * giscanner/ast.py: Define socklen_t as an alias for int32.
537 2008-11-24 Johan Dahlin <jdahlin@async.com.br>
539 * girepository/gdump.c (dump_type): Remove a warning,
540 be less verbose on error on fundamental types.
542 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
544 * giscanner/dumper.py: Add license headers,
545 refactor into a class, avoid some duplication and do some
546 extra pedantic checks.
548 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
550 Make it compilable with -Werror on my system by adding
551 a couple of prototypes and including headers.
553 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
555 Bug 562022 – gobject-introspection needs python headers
557 * configure.ac: fail without python headers present.
560 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
562 Bug 561617 – Return value array annotations
564 * giscanner/transformer.py:
565 * tests/scanner/annotation.c (annotation_return_array):
566 * tests/scanner/annotation.h:
567 Add support for (array) for return value annotations as well.
569 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
571 * tests/everything/everything.[ch]: add a test function which calls a
574 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
576 * giscanner/cachestore.py:
577 Catch ValueError exceptions.
579 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
581 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
583 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
585 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
586 instead of hard-coding struct sizes.
588 2008-11-18 Owen Taylor <otaylor@redhat.com>
590 Bug 561296 - Add "storage type" to the typelib data for enums
592 In order to set and get enum and flag fields in structures, we need
593 to know the integral type that the enumeration is stored as. We are already
594 computing that at compile time in order to compute struct offsets, so the
595 easiest thing to do is to save that in the typelib.
597 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
598 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
599 and compute and save it at compile time.
601 * girepository/girepository.h girepository/ginfo.c:
602 Add g_enum_info_get_storage_type().
604 * girepository/gfield.c: Implement reading and writing enum and flags fields
605 based on the storage type.
607 2008-11-18 Owen Taylor <otaylor@redhat.com>
609 Add enums to the Everything test module
611 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
612 test module and register them as GTypes.
614 https://bugzilla.gnome.org/show_bug.cgi?id=561296
616 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
618 * giscanner/cachestore.py:
619 Catch BadPickleGet exceptions as well.
621 2008-11-17 Owen Taylor <otaylor@redhat.com>
623 * tests/everything/everything.c: Fix doc comment annotations
624 for test_struct_b_clone() to refer to the right function.
626 2008-11-17 Dan Winship <danw@gnome.org>
628 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
629 spelling of GHashTable. #561135
631 * tests/scanner/annotation.c (annotation_object_get_hash):
632 * tests/scanner/annotation-1.0-expected.gir:
633 * tests/scanner/annotation-1.0-expected.tgir: add a test of
634 GHashTable annotations
636 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
638 * giscanner/ast.py: Change string array match type to be in terms
639 of canonicalized type.
640 * giscanner/transformer.py: Add canonicalize_ctype which gives us
641 a version of a c:type without aliases, so we can deep canonicalize
642 char** to utf8*. Update parse_ctype to use it.
643 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
645 2008-11-16 Colin Walters <walters@verbum.org>
647 * girepository/girepository.c: Ensure we always call init_globals,
648 even if passed a non-default repository.
650 2008-11-16 Colin Walters <walters@verbum.org>
652 Bug 559706 - Interface prerequisites
654 * common.mk: Dep on libgirepository.la for scanner libs so that
655 we rebuild things even if just gdump.c changes.
656 * girepository/gdump.c: Dump prerequisites.
657 * giscanner/ast.py: Add prerequisite list.
658 * giscanner/girparser.py: Parse them from gdump.
659 * giscanner/girwriter.py: Write them.
660 * giscanner/glibtransformer.py: Resolve them.
663 2008-11-16 Owen Taylor <otaylor@redhat.com>
665 Bug 561087 - Respect is_pointer in serialize_type()
667 Add a '*' to the serialization for the cases where we set is_pointer
668 in the type blob we write out depending on node->is_pointer. Don't
669 add the '*' in the cases where is_pointer is set or not set in a
672 http://bugzilla.gnome.org/show_bug.cgi?id=561087
674 2008-11-16 Owen Taylor <otaylor@redhat.com>
676 Bug 560825 – Add size and alignment to typelib
678 Include the size and alignment of structures and unions in the typelib,
679 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
681 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
682 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
683 to StructBlob and UnionBlob.
685 * girepository/ginfo.c girepository/girepository.h:
686 Add g_[struct|union]_get[size|alignment]().
688 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
690 2008-11-16 Owen Taylor <otaylor@redhat.com>
692 Bug 552371 – implement struct field get/set
694 * girepository/gfield.c girepository/girepository.h: Add
695 convenience functions g_field_info_set_field() and
696 g_field_info_get_field() to set and get fields based on the
697 offsets in GIFieldInfo.
699 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
701 Bug 560241 - Out-arguments should not be marked as being pointers
704 * girepository/girparser.c: Improved logic for out arguments.
706 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
708 Bug 559601 - Pointers in structs/unions unduly treated as arrays
710 * giscanner/transformer.py: Differentiate type creation logic
711 between parameters and struct components.
713 2008-11-15 Colin Walters <walters@verbum.org>
715 * giscanner/dumper.py: Check return code from pkg-config
718 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
720 * tests/everything/everything.c (test_array_int_in),
721 (test_array_gtype_in):
722 * tests/everything/everything.h:
723 Rename the int/gtype array tests. Make the return value
724 useful, an aggregation of the array input values.
726 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
728 * tests/everything/Makefile.am:
729 * tests/everything/everything.c:
730 * tests/everything/everything.h:
731 * tests/everything/gitesttypes.c:
732 * tests/everything/gitesttypes.h:
733 Rename gitesttypes.[ch] to everything.[ch]
735 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
737 Bug 560708 – Don't treat arrays that have a length specified as
738 zero-terminated by default
740 * giscanner/transformer.py: Default to non zero terminated for
742 * tests/*: Update, add test for zero vs not.
744 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
746 Bug 557788 - Return types for constructors in generated typelib bogus
748 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
749 obviously broken in the face of duplicate names in different
751 * tests/scanner/*expected.gir: Fix up.
753 2008-11-13 Owen Taylor <otaylor@redhat.com>
755 * girepository/girffi.c: Fix "Unexpected time for time_t"
758 2008-11-13 Colin Walters <walters@verbum.org>
760 Bug 558436 - avoid having scanner load app code
762 * giscanner/cgobject.py: Delete; we no longer load shared
764 * giscanner/dumper.py: Support for linking a library to
765 a stub binary for introspection.
766 * giscanner/glibtransformer.py: Rewrite to use gdump XML
767 from invocation of child binary.
768 * giscanner/transformer.py: Fix up to use fully qualified
769 name in parse tree. Make parse_ctype public so we can use
770 it inside glibtransformer.
771 * tests/scanner/barapp.c: New test, using --program arg
773 * tests/*: Update to use common.mk for invoking scanner.
774 * tools/g-ir-scanner: Add options --program, --program-arg,
776 * docs/g-ir-scanner.1: Update.
778 2008-11-13 Colin Walters <walters@verbum.org>
780 * configure.ac: Depend on Gio, we use it in gdump.c.
781 * girepository/gdump.c: Code to dump GType data to XML.
782 * girepository/girepository.c: Add option group for dumping.
783 * girepository/girepository.h: Define API for the above.
785 2008-11-13 Colin Walters <walters@verbum.org>
787 * common.mk: Add a file to include with Makefile fragments
788 useful for scanner invocation.
790 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
792 * tests/everything/gitesttypes.c (test_filename_return): Return
793 strings in filename encoding.
795 2008-11-13 Owen Taylor <otaylor@redhat.com>
797 Bug 560253 – Add structure and boxed types to Everything test module
799 * tests/everything/gitesttypes.[ch]: Add examples of:
801 Plain old data structs
802 Plain old data structs with nested fields
804 Plain old data boxed with nested fields
805 More complicated boxed types with internal state
807 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
809 * tests/everything/gitesttypes.c (test_gtype_in):
810 * tests/everything/gitesttypes.h:
811 Add a test of GType arrays, a la gtk_list_store_set_columns.
813 2008-11-12 Owen Taylor <otaylor@redhat.com>
815 Bug 560419 – Cache includes when parsing
817 Keep track of all modules parsed within a GIrParser, and when a
818 module is referenced a second time, use the existing parsed copy
819 instead of reparsing.
821 2008-11-12 Owen Taylor <otaylor@redhat.com>
823 Fix management of ParseContext.includes_modules (#560419)
825 * girepository/girparser.c: Fix some trivial bugs in managing the
826 list of include modules. (Add to module's list twice, not
827 initialized to NULL, not freed.)
829 2008-11-12 Owen Taylor <otaylor@redhat.com>
831 Keep aliases and disguised_structures local to each module (#560419)
833 * girepository/girmodule.[ch]: When parsing, keep keep a separate
834 hash tables of aliases and 'disguised' flags for each module, and
835 store that on the module.
837 After parsing an include merge the aliases/disguised flags to the
840 * girepository/girparser.c: Remove 'prefix_aliases' flag and
841 always prefix aliases/disguised structure types when parsing; this
842 simplifies the code considerably.
844 2008-11-12 Owen Taylor <otaylor@redhat.com>
846 Fix mismatches between .gir name and 'name' attribute (#560419)
848 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
849 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
850 where the 'name' element of <namespace/> didn't match the filename of the
851 gir, an assumption that the compiler has always expected and now enforces.
853 2008-11-12 Owen Taylor <otaylor@redhat.com>
855 Only allow one <namespace/> element per <repository/> (#560419)
857 * girepository/girparser.c: The logic in girparser.c didn't work
858 very well if there were multiple <namespace/> nodes within a
859 single <repository/> (context->namespace was always the overall
860 filename and not the the name specified in the <namespace/>
861 element for one thing; this would cause aliases to be mis-prefixed
862 in include modules.) Also check that the "name" in the
863 <namespace/> node matches the filename.
865 2008-11-12 Owen Taylor <otaylor@redhat.com>
867 Add a GirParser object to hold the state of a compilation
869 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
870 GirParser object to hold state that is global across a
871 compilation. Currently just holds the include path, but will
872 eventually also keep a cached list of parsed modules.
874 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
876 * girepository/girepository.c (find_namespace_latest): Fix
879 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
881 * configure.ac: use 'introspection' component for bugs
883 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
885 * tests/everything/gitesttypes.c (test_filename_return):
886 * tests/everything/gitesttypes.h:
887 Add a filename return test.
889 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
891 * tests/offsets/Makefile.am (gitestoffsets.c): fix
892 gen-gitestoffsets invocation with builddir != srcdir
894 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
896 * girepository/girepository.c:
897 Change the element type from utf8 to filename
898 * girepository/girnode.c (g_ir_node_build_typelib):
899 Special case filename equally to utf8 here.
901 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
904 Remove unused variables, add a dependency of girepository.ch, so when
905 they change we rebuild the gir automatically.
907 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
909 * girepository/girepository.c (g_irepository_get_search_path):
910 * girepository/girepository.h:
911 Add a g_irepository_get_search_path, so we can access the search
914 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
916 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
918 * girepository/girparser.c: avoid freeing an uninitialized pointer
920 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
923 * giscanner/glibtransformer.py:
924 * tools/g-ir-scanner:
925 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
926 so we can just pass in --library=foo/bar/baz.la and the scanner
927 does the right thing.
928 Don't warn for _get_type() functions if they don't take any
931 2008-11-11 Owen Taylor <otaylor@redhat.com>
933 Bug 560404 – Prefix types when resolving aliases in included modules
935 * girepository/girparser.c: When resolving aliases in an included
936 module, prefix types before looking them up.
938 2008-11-11 Owen Taylor <otaylor@redhat.com>
940 Compute field offsets and overall size for object structures
942 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
943 field of type object in structure"
945 Do basic computation of field offsets for objects and interfaces;
946 this doesn't attempt to address all of the "mess" for virtual
947 functions described in Bug 560281.
949 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
951 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
953 Based on patch by Johan Bilien.
955 * giscanner/transformer.py (_create_member, _create_parameter):
956 Resolve types here as well.
957 (_resolve_type_name_1): Try resolving using 'ctype' first since
958 it's least ambiguous. Fixes struct member type resolution with
959 similarly named types, e.g. Gdk.PangoRendererClass and
961 * tests/scanner/foo*: Add test.
963 2008-11-11 Owen Taylor <otaylor@redhat.com>
965 * girepository/girparser.c: Search provided include dirs before
966 the default directories.
968 2008-11-11 Owen Taylor <otaylor@redhat.com>
970 * girepository/giroffsets.c: Include fully-qualified names in
973 2008-11-11 Owen Taylor <otaylor@redhat.com>
975 * girepository/giroffsets.c: Fail gracefully with an informative
976 error message when recursion is encountered when computing a
979 2008-11-11 Owen Taylor <otaylor@redhat.com>
981 * girepository/girparser.c: Remove an unused variable.
983 2008-11-10 Owen Taylor <otaylor@redhat.com>
985 Add tests for field offset computations
987 * tests/offsets/offsets.h: Header file with structure definitions to test
989 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
990 field offsets for the structures in offsets.h two ways: using
991 the information from a generated typelib, and as computed by the
994 We diff these two versions to test that everything is OK.
996 2008-11-10 Owen Taylor <otaylor@redhat.com>
998 Remove field offsets from g-ir-generate output and test inputs
1000 Field offsets are a) architecture dependent so they shouldn't be part
1001 of the architecture-independent gir format which is installed in
1002 datadir. b) Are architecture-dependent so they shouldn't be in test
1005 * girepository/girparser.c: Don't parse offset for fields
1006 * tools/generate.c: Don't parse offset for fields
1007 * tests/*.gir test/scanner/*.tgir: Remove offsets
1009 (Virtual function and discriminator offsets are not removed, as they
1010 aren't fully hooked up to the field-offset computation machinery yet.)
1012 2008-11-10 Owen Taylor <otaylor@redhat.com>
1014 Bug 560252 - Compute field offsets before writing typelib
1016 * girepository/girnode.h: Store the total size and alignment for
1017 GIrNodeStruct/Boxed/Union.
1019 * girepository/giroffset.c: New file implementing computation of
1020 structure field offsets.
1022 * girepository/girnode.c: Compute structure field offsets before
1023 writing types into the typelib.
1025 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
1026 means "unknown". Also fix description of the discriminator_offset
1029 2008-11-10 Owen Taylor <otaylor@redhat.com>
1031 Bug 560250 - Fully parse included modules
1033 For some things, like computing structure offsets to put into the typelib
1034 we need more than just the aliases from included modules. Do a completel
1035 parse of included modules and store in module->included_modules.
1037 Also add g_ir_find_node() to find node information from within the
1038 active set of modules and their includes.
1040 2008-11-10 Owen Taylor <otaylor@redhat.com>
1042 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
1044 Extract a function to convert GITypeTag to ffi_type from the internals
1045 of ginvoke.c. This will be useful in figure out structure alignment.
1047 Also fix handling of gsize and time_t to be portable. (Add a check
1048 to configure.ac to figure out the width of time_t.)
1050 2008-11-10 Owen Taylor <otaylor@redhat.com>
1052 Bug 560248 – "disguised structures"
1054 Certain types like GIConv and GdkAtom are pointers internally but don't
1055 look like pointers when referenced. They have the form.
1057 typedef struct _X *X;
1059 Parse these as structures/records but mark them in the gir with a 'disguised'
1060 attribute so that we know that they need special handling.
1062 In the typelib treat them like any other structure.
1064 2008-11-09 Jürg Billeter <j@bitron.ch>
1067 * giscanner/girwriter.py:
1069 Write throws attribute for virtual functions, fixes bug 559703
1071 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
1073 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
1074 up some confusion about the second argument to find_module, it's
1075 actually the packages __path__ attribute which we can safely ignore
1077 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
1079 2008-11-07 Owen Taylor <otaylor@redhat.com>
1081 Bug 559737 – Deal with continuations in macros
1083 * giscanner/giscannerlexer.l: Treat continuation lines the same
1084 as regular newlines. This makes the scanner not complain about
1085 #define foo(x) \ <stuff> inside a C file. There's no attempt
1086 however to handle parsing macro definitions split across lines.
1088 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
1090 * giscanner/cachestore.py:
1091 Handle broken cache entries, write only filesystems and
1092 running out of diskspace.
1094 2008-11-07 Owen Taylor <otaylor@redhat.com>
1096 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
1097 Set current_filename before lexing the file so error messages
1098 are reported in the right file.
1100 2008-11-06 Colin Walters <walters@verbum.org>
1102 * tests/everything/*: Add some tests for strv.
1104 2008-11-05 Colin Walters <walters@verbum.org>
1106 * girepository/ginvoke.c (g_function_info_invoke): Don't use
1107 nested scope local variable for error which may go away after
1108 conditional is complete.
1110 2008-11-05 Colin Walters <walters@verbum.org>
1112 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
1113 manipulate hackily; just use GString. This avoids an
1114 uninitialized memory read pointed out by Havoc.
1116 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
1118 * giscanner/__init__.py:
1120 * giscanner/cachestore.py:
1121 * giscanner/cgobject.py:
1122 * giscanner/girparser.py:
1123 * giscanner/girwriter.py:
1124 * giscanner/giscannermodule.c:
1125 * giscanner/glibast.py:
1126 * giscanner/glibtransformer.py:
1127 * giscanner/libtoolimporter.py:
1128 * giscanner/minixpath.py:
1129 * giscanner/odict.py:
1130 * giscanner/sourcescanner.c:
1131 * giscanner/sourcescanner.h:
1132 * giscanner/sourcescanner.py:
1133 * giscanner/transformer.py:
1134 * giscanner/utils.py:
1135 * giscanner/xmlwriter.py:
1137 Relicense the giscanner library under LGPLv2+.
1138 This has been approved by all contributors.
1140 2008-11-01 Owen Taylor <otaylor@redhat.com>
1142 Bug 558848 giparser.py: shared library should be optional
1144 When parsing a .gir, allow the shared-library attribute
1145 of <namespace/> to be missing: this corresponds to the handling
1146 in libgirepository and elsewhere.
1148 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
1150 Bug 557898 – Fails to build on OSX 10.4
1152 * configure.ac: Check for $shrext_cmds that should be implicitly
1153 available if you're using libtool >= 2.0. If undefined, call
1154 libtool --config explicitly to get its value.
1155 * girepository/gtypelib.c: Remove special case for (non-)Darwin
1156 systems as unneeded.
1158 2008-10-31 Colin Walters <walters@verbum.org>
1160 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
1162 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1164 * configure.ac: Post release version bump
1167 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1171 * docs/release-checklist.txt:
1174 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1176 * Makefile.am: add an upload-release target
1177 * docs/release-checklist.txt:
1178 Release process documentation
1180 2008-10-31 Colin Walters <walters@verbum.org>
1182 Bug 558109 – _g_typelib_init fails to find shared libraries
1184 * transformer/glibtransformer.py: Use ctypes' find_library
1185 on passed libraries and write that for the shared-library
1186 entry. We want to avoid depending on -devel packages.
1188 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
1190 * docs/g-ir-scanner.1:
1191 Document the renaming options.
1193 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
1195 * giscanner/Makefile.am:
1196 * tests/invoke/Makefile.am:
1197 * tests/repository/Makefile.am: List in-tree libraries first in
1198 LDADD / LIBADD. If installed library is listed first, the
1199 resulting binary will prefer installed version to one in .libs,
1200 possibly making 'make check' behave strangely.
1202 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
1204 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
1205 gir-repository from choking with gdk/quartz
1207 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1209 * giscanner/giscannermodule.c (calc_attrs_length),
1210 (pygi_collect_attributes):
1211 * giscanner/xmlwriter.py:
1212 Write a C version of the xml namespace formatter.
1213 Saves 15% of the time it takes to create a gtk gir.
1215 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1217 * giscanner/xmlwriter.py: Abstract attribute formatting
1218 to a function external to the XMLWriter class.
1220 * giscanner/scannerlexer.l:
1221 Parse and discard __typeof and __attribute.
1223 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1225 * giscanner/girparser.py:
1226 Remove arguments from the constructor, move them to
1227 separate accessors. Add a new parse_tree method
1228 which takes an element tree instance.
1229 * tools/g-ir-scanner:
1230 Update callsite for this
1232 * giscanner/Makefile.am:
1233 * giscanner/cachestore.py:
1234 * giscanner/transformer.py:
1235 Cache the include parsing. Saves ~25% time when
1236 creating vte (which includes everything up to gtk+).
1238 2008-10-30 Colin Walters <walters@verbum.org>
1240 * giscanner/transformer.py: Don't reparse includes
1241 we've already processed.
1243 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1245 * giscanner/girparser.py:
1246 * giscanner/transformer.py:
1247 Avoid parsing parameters, types etc when parsing
1248 includes. Should speed up include parsing a bit.
1250 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1252 * giscanner/girparser.py:
1253 Avoid big if/else and use a dispatch table like
1256 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1258 * giscanner/transformer.py:
1259 Clean up include parsing and registration.
1261 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1263 * giscanner/transformer.py:
1266 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
1268 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
1271 construct PYTHONPATH just once
1273 * tests/everything/Makefile.am:
1274 * tests/scanner/Makefile.am:
1275 add $(top_srcdir) to PYTHONPATH to
1276 handle builddir != srcdir
1278 * giscanner/libtoolimporter.py:
1279 * giscanner/sourcescanner.py:
1280 Make the libtoolimporter work when distchecking too.
1282 Mostly based on patch by Tommi Komulainen
1284 2008-10-29 Owen Taylor <otaylor@redhat.com>
1286 * giscanner/glibtransformer.py: If a filename of an existing
1287 file is passed to --library, hunt for it directly, rather than
1288 searching for a corresponding library.
1290 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
1292 * giscanner/libtoolimporter.py:
1293 * giscanner/sourcescanner.py:
1294 Clean up the libtool importer a bit. Add a context so we
1295 can use it through a with statement.
1296 Don't just look in the current directory, look in the whole
1299 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
1301 Bug 558065 – gitesttypes should be installed
1304 * tests/Makefile.am:
1305 * tests/types/Makefile.am -> tests/everything/Makefile.am
1306 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
1307 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
1308 move tests/types to tests/everything
1310 * tests/everything/Makefile.am: build normal shared library
1311 libgirepository-everything.so.1.0.0 and corresponding typelib
1312 Everything-1.0.typelib
1314 * tests/everything/Makefile.am: explicitly link libtool
1315 versioning with typelib versioning with variables
1317 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
1319 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
1321 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1323 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
1326 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1328 Bug 558068 – when invoking a method, offset the in arguments by one,
1331 * tests/invoke/invoke.c, tests/invoke/testfns.c,
1332 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
1333 * girepository/ginvoke.c: do not offset the index of given out
1334 arguments by one for methods, "this" is provided as in argument only.
1336 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
1338 * gir/gio-2.0.c: add annotation for g_file_delete
1340 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
1342 Bug 558062 – provide and use paths in the .pc file
1344 * gobject-introspection-1.0.pc.in: provide typelibdir variable
1345 for where .typelibs should be installed (callers shouldn't need
1346 to construct paths from bits and pieces)
1348 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1350 Bug 557791 – g_irepository_require() could return a GTypelib *
1352 * girepository/girepository.c: Return GTypelib; this is useful
1353 for low level manipulation.
1355 2008-10-25 Colin Walters <walters@verbum.org>
1357 Bug 557788 – Return types for constructors in generated typelib bogus
1359 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
1360 rely on end pass resolution.
1362 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
1364 Bug 557786 - support fixed size arrays
1366 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
1367 * giscanner/scannerparser.y: Retain fixed array size.
1368 * giscanner/ast.py: Add to note.
1369 * giscanner/girwriter.py: Write to gir.
1370 * girepository/girnode.c: Write it to typelib.
1371 * tools/generate.c: Generate.
1372 * tests/*: Add tests.
1374 2008-10-25 Colin Walters <walters@verbum.org>
1376 Bug 557076 - move typelibs to $libdir
1378 * configure.ac: Steal some configury bits from dbus to expand
1380 * gir/Makefile.am: Move to libdir.
1381 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
1382 instead just look at one hardcoded path in libdir.
1383 * acinclude.m4: Bits from dbus.
1385 2008-10-24 Johan Dahlin <johan@gnome.org>
1387 * girepository/girnode.c (g_ir_node_check_unhandled_members):
1388 Be quiet, do not warn about unhandled members.
1390 2008-10-24 Johan Dahlin <johan@gnome.org>
1392 * girepository/gtypelib.c:
1393 Only use SHLIB_SUFFIX on darwin, otherwise use
1394 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
1396 2008-10-24 Lucas Rocha <lucasr@gnome.org>
1398 Bug 557623 - Constructors shouldn't be flagged as methods.
1400 * girepository/ginfo.c (g_function_info_get_flags): ditto.
1402 2008-10-24 Johan Dahlin <johan@gnome.org>
1404 * giscanner/scannerparser.y:
1405 Check against division by zero for the modula operator.
1406 This fixes header parsing of OSX system headers included
1409 2008-10-24 Johan Dahlin <johan@gnome.org>
1413 Add a CONTRIBUTORS file and dist it.
1415 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1417 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
1419 * girepository/girparser.c (parse_param_transfer):
1420 * giscanner/transformer.py (_create_parameter, _create_return):
1421 * giscanner/girwriter.py (_write_return, _write_parameter):
1422 * tools/generate.c (write_callable_info): always write and
1423 require "transfer-ownership" for return-values and parameters
1426 * tests/invoke/testfns-1.0.gir:
1428 * tests/scanner/DrawableAdditions.xml:
1429 * tests/scanner/GtkFrob-1.0-expected.tgir:
1430 * tests/scanner/annotation-1.0-expected.tgir:
1431 * tests/scanner/drawable-1.0-expected.tgir:
1432 * tests/scanner/drawable-injected-1.0-expected.gir:
1433 * tests/scanner/drawable-injected-1.0-expected.tgir:
1434 * tests/scanner/foo-1.0-expected.tgir: Updated
1436 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1438 * giscanner/cgobject.py: build fundamental types same way as glib
1440 * giscanner/glibtransformer.py (_type_from_gtype): record GType
1441 when constructing the Type from it
1443 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
1444 the parameter is a GObject from its GType, if available.
1446 * giscanner/glibtransformer.py (_adjust_transfer):
1447 * tests/scanner/foo-1.0-expected.gir:
1448 * tests/scanner/foo-1.0-expected.tgir: deduce
1449 transfer-ownership from GTypes
1451 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
1453 * giscanner/transformer.py (_create_parameter):
1454 * tests/scanner/foo-1.0-expected.gir: make varargs
1455 transfer-ownership="none"
1457 2008-10-23 Colin Walters <walters@verbum.org>
1459 Bug 556739 - transfer ownership
1461 * giscanner/ast.py: Refactor Parameter/Return to share
1462 common attributes. Add transfer_inferred attribute
1463 which says whether or not we made a guess.
1464 * giscanner/transformer.py: Add much more extensive
1465 heuristics around parameter and return transfer.
1466 * giscanner/glibtransformer.py: Adjust to inspect
1470 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1472 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
1474 * tests/scanner/Makefile.am:
1475 * tests/scanner/annotation-1.0-expected.tgir:
1476 * tests/scanner/drawable-1.0-expected.tgir:
1477 * tests/scanner/drawable-injected-1.0-expected.tgir:
1478 * tests/scanner/foo-1.0-expected.tgir:
1479 * tests/scanner/GtkFrob-1.0-expected.tgir:
1480 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
1481 annotations survive the roundtrip via typelib
1483 The expectations are as currently produced by g-ir-generate,
1484 comparison with the .gir files shows there are differences.
1486 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
1488 Bug 557468 – Support for GI_TYPELIB_PATH
1490 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
1491 provided paths to the global search path.
1493 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1495 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
1497 * tests/scanner/drawable-1.0-expected.tgir:
1498 * tests/scanner/drawable-injected-1.0-expected.tgir:
1499 * tests/scanner/foo-1.0-expected.tgir:
1500 * tools/generate.c (write_object_info): write 'abstract'
1501 attribute for classes
1503 2008-10-22 Lucas Rocha <lucasr@gnome.org>
1505 * girepository/girmodule.c, girepository/gtypelib.c,
1506 girepository/girparser.[ch]: fix some build warnings.
1508 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1510 Bug 557405 – Use 'allow-none' consistently
1512 * docs/typelib-format.txt:
1513 * girepository/ginfo.c (g_arg_info_may_be_null):
1514 * girepository/girnode.c (g_ir_node_build_typelib):
1515 * girepository/girnode.h (struct _GIrNodeParam):
1516 * girepository/girparser.c (start_parameter):
1517 * girepository/girwriter.c (function_generate):
1518 * girepository/gtypelib.h (ArgBlob):
1520 * tests/function.gir:
1521 * tools/generate.c (write_callable_info): Use 'allow-none'
1522 consistently throughout
1524 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
1526 Bug 557092 – Callback annotations not used
1528 * giscanner/transformer.py (_create_callback): use annotations
1530 * tests/scanner/annotation.h
1531 * tests/scanner/annotation-1.0-expected.gir: add tests
1533 2008-10-21 Colin Walters <walters@verbum.org>
1535 * giscanner/scannerlexer.l: Don't require trailing whitespace after
1536 uncommented parameters.
1539 2008-10-21 Colin Walters <walters@verbum.org>
1541 * girepository/girepository.c: Ensure that when doing an unversioned
1542 require, we prefer items earlier in the search path to later ones.
1544 2008-10-21 Owen Taylor <otaylor@redhat.com>
1546 * giscanner/transformer.py: For string parameters allow transfer annotation
1547 to override the standard automatic guessing based on 'const'.
1549 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1551 Bug 557241 – "throws" flag for functions
1553 * tests/scanner/drawable-1.0-expected.gir,
1554 tests/scanner/drawable-injected-1.0-expected.gir,
1555 tests/scanner/drawable.[ch]: add simple test for throwing
1556 function (has GError ** as last argument)
1558 * giscanner/ast.py: add a 'throws' flag to Function
1559 * giscanner/glibtransformer.py: if a function's last paramerter is
1560 a GError, set the 'throws' flag and remove that parameter
1561 * giscanner/girwriter.py: write out the 'throws' attribute
1562 * giscanner/girparser.py: support parsing the 'throws' attribute
1564 * tests/repository/gitestthrows.c: add a simple test to check the
1565 throws flag in a typelib and invoke the function
1567 * girepository/ginfo.c, girepository/girnode.[ch],
1568 girepository/girnode.h, girepository/girparser.c,
1569 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1571 * girepository/ginvoke.c: if a function throws, add a GError as last
1572 arguments, and propagate the error to the invoker.
1574 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1576 * giscanner/transformer.py (_create_parameters): Warn if we see
1577 annotations for unknown parameters. If .h and .c files name
1578 parameters differently, the annotations may be lost.
1580 2008-10-21 Johan Dahlin <johan@gnome.org>
1582 Bug 556358 - don't use libtool internals
1584 * giscanner/Makefile.am:
1585 * giscanner/libtoolimporter.py:
1586 * giscanner/sourcescanner.py:
1587 * giscanner/utils.py:
1588 Add a python meta importer and remove a libtool symlink hack.
1590 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1592 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1593 and --add-include-path appropriately when invoking the scanner.
1594 * tests/types/Makefile.am (%typelib): Likewise.
1596 2008-10-20 Colin Walters <walters@verbum.org>
1598 Bug 556777 - validate properties
1600 * giscanner/transformer.py: Add option to throw on unknown types.
1601 * giscanner/glibtransformer.py: Use it on properties.
1602 * tests/*: Add a test.
1604 2008-10-20 Colin Walters <walters@verbum.org>
1606 * giscanner/glibast.py: Also register g variants of
1607 default_array_types. This is not beautiful, but
1608 good alternatives aren't easy to come by.
1609 This fixes gchar ** parsing.
1611 2008-10-20 Colin Walters <walters@verbum.org>
1613 * docs/typelib-format.txt, girepository/gtypelib.h:
1614 Take a bit from ObjectInfo to represent abstract flag.
1615 * giscanner/cgobject.py: Expose g_type_get_flags.
1616 * girepository/girepository.h: Add accessor.
1617 * girepository/ginfo.c: Implement it.
1618 * giscanner/ast.py: Add is_abstract flag to generic
1620 * giscanner/glibast.py: Use it.
1621 * giscanner/girwriter.py: Write it.
1622 * girepository/girparser.c: Parse it.
1625 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1627 * giscanner/girparser.py (_parse_function): don't lose
1628 'transfer-ownership' attributes when injecting, check for the
1631 2008-10-19 Johan Dahlin <johan@gnome.org>
1633 * giscanner/scannerlexer.l: Parse and ignore __asm.
1635 2008-10-19 Colin Walters <walters@verbum.org>
1637 * giscanner/girparser.py: Parse array length= to ensure
1638 it doesn't get lost from --inject.
1640 2008-10-17 Colin Walters <walters@verbum.org>
1642 Bug 556795 - char ** regression
1644 * giscanner/transformer.py: Fix parsing of ctypes, add some
1645 comments about what's going on.
1646 * tests/*: Add a test for char **.
1648 2008-10-17 Colin Walters <walters@verbum.org>
1650 Bug 556783 - change namespace handling to be more consistent
1652 * giscanner/transformer.py: Eliminate usage of
1653 strip_namespace_object. We now treat --namespace as the default
1654 --strip-prefix; however, if --strip-prefix is specified it
1655 overrides --namespace. This applies to everything except function
1656 names, where we do also strip the namespace.
1657 * giscanner/glibtransformer.py: Remove usage of
1658 strip_namespace_object.
1660 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1661 --namespace and --strip-prefix.
1663 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1665 Bug 556732 – generate gir files consistently
1667 * girepository/girparser.c (start_parameter):
1669 * tests/invoke/testfns-1.0.gir:
1670 * tools/generate.c (write_callable_info): write
1671 'transfer-ownership' attribute consistently with both
1672 return-value and parameter elements
1674 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1676 Bug 556732 – generate gir files consistently
1678 * tools/generate.c (write_callable_info): write 'direction'
1679 attribute only if other than 'in' to be consistent with
1682 * tests/object.gir: remove direction="in" which is the default
1684 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1686 Bug 556732 – generate gir files consistently
1688 * giscanner/ast.py (Field): add readable and writable properties
1689 * giscanner/girparser.py (_parse_field): copy 'readable' and
1690 'writable' attributes
1691 * giscanner/transformer.py (_create_member): create fields as
1693 * giscanner/glibtransformer.py (_introspect_object,
1694 _pair_class_struct): make object instance and class fields
1696 * giscanner/girwriter.py (_write_field):
1697 * tools/generate.c (write_field_info): write field 'readable'
1698 and 'writable' attributes only if non-default (read-only)
1699 * girepository/girparser.c (start_field): in the absence of
1700 attributes assume fields are read-only
1702 * tests/struct.gir: remove redundant readable="1" from fields
1703 * tests/scanner/foo-1.0-expected.gir:
1704 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1705 all record and union fields
1707 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1709 Bug 556732 – generate gir files consistently
1711 * giscanner/girwriter.py (_write_property): write properties
1712 'construct' attribute if set
1713 * tools/generate.c (write_property_info): write properties
1714 'readable' and 'writable' attributes only if non-default
1715 * tests/object.gir: add writable="0"
1716 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1718 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1720 * gir/glib-2.0.c: added annotations
1722 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1724 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1727 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1729 Bug 556610 – giscanner/girparser.py drops parameter options
1731 * tests/scanner/drawable-injected-1.0-expected.gir,
1732 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1733 * giscanner/ast.py: allow Parameter to take options in the constructor
1734 * giscanner/girparser.py: parse parameter options (transfer,
1735 direction, allow-none)
1737 2008-10-16 Colin Walters <walters@verbum.org>
1739 Bug 556185 - segfault on g_callable_info_get_return_type
1741 Initial patch from John Ehresman.
1743 * tests/repository/*: Add a test using
1744 g_callable_info_get_return_type. Instead of casting a
1745 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1746 to call g_type_info_get_interface.
1748 2008-10-16 Colin Walters <walters@verbum.org>
1750 Bug 556579 - union and struct name misresolved
1752 * giscanner/transformer.py: The calls to _resolve_type_name
1753 for struct/union names was a legacy holdover from when type
1754 resolution had multiple phases. Now it's actively harmful
1755 since we might pull in an identical name from another
1759 2008-10-16 Colin Walters <walters@verbum.org>
1761 Bug 556432 - transfer annotations and defaults
1763 * giscanner/transformer.py: Canonicalize type
1764 after removing *, not before. This ensures that
1765 guchar* is transformed to 'uint8'.
1766 Add some comments here.
1767 * giscanner/glibtransformer.py: Add _adjust_transfer
1768 phase for tweaking GObject transfers.
1771 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1773 * configure.ac: enable bunch of gcc warning CFLAGS
1775 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1777 Bug 556543 – reduce compiler warnings
1779 * girepository/ginfo.c:
1780 * girepository/girepository.c (register_internal,
1781 count_interfaces, find_interface, find_namespace_version,
1782 parse_version, g_irepository_require):
1783 * girepository/girmodule.c (g_ir_module_build_typelib):
1784 * girepository/girnode.c (init_stats, dump_stats,
1785 _g_irnode_init_stats, _g_irnode_dump_stats,
1786 g_ir_node_can_have_member):
1787 * girepository/girparser.c (firstpass_end_element_handler,
1788 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1789 start_alias, start_type, end_type_top, parse_include, cleanup,
1791 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1792 * giscanner/giscannermodule.c (directive_get_options,
1793 type_get_child_list):
1794 * giscanner/scannerlexer.l (parse_gtkdoc):
1795 * giscanner/scannerparser.y (ctype_free):
1796 * giscanner/sourcescanner.c:
1797 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1798 * tests/types/gitesttypes.c:
1799 * tools/compiler.c (main):
1800 * tools/generate.c (write_repository): Remove unused variables
1801 and code, add missing includes, declarations and case
1804 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1806 Bug 556541 – access union members through UnionBlob rather than
1809 * girepository/ginfo.c (g_union_info_find_method): access union
1810 members through UnionBlob rather than StructBlob
1812 2008-10-15 Colin Walters <walters@verbum.org>
1814 Bug 556331 - clean up includes handling
1816 * tools/g-ir-scanner: Rework command line arguments; now we take
1817 --add-include-path and --include separately.
1818 * giscanner/girwriter.py: Separate name= and version= in include
1820 * giscanner/ast.py: Add Include type.
1821 * giscanner/transformer.py: Cleanups to register_include now that
1822 we don't need to handle mixed filenames and relative arguments.
1823 * girepository/girparser.c: Parse name and version separately;
1824 this fixes a bug as a side effect where we weren't resolving
1825 through aliases for basic types.
1826 * girepository/girepository.c: Fix format string args.
1827 * gir/Makefile.am: Update.
1830 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1832 Bug 556434 – unhandled interface/object/... member types
1834 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1835 g_ir_node_build_typelib): Check all
1836 interface/object/boxed/struct/union members are processed and
1837 abort if they are not. (Mostly callbacks in structs, but also
1838 fields in interfaces.)
1840 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1842 * a/girepository/girnode.c (g_ir_node_build_members,
1843 g_ir_node_build_typelib): refactor common code for processing
1844 members to a function
1846 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1848 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1849 transformation is lossless (it's not)
1851 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1853 * tests/Makefile.am: fix tests to compare xml to xml instead of
1854 typelib to xml, and stop on error
1856 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1858 * tools/generate.c (write_type_name, write_type_info,
1859 write_type_info, write_object_info, write_object_info,
1860 write_interface_info, write_error_domain_info): reduce code
1863 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1865 Bug 556174 – parse types for lists etc.
1867 * girepository/girparser.c (end_type_recurse):
1869 * tools/generate.c (write_type_info, write_field_info,
1870 write_callable_info, write_callable_info, write_constant_info,
1871 write_property_info): use nested <type>s for lists and hashes
1873 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1876 * tests/object.gir: remove trailing whitespace from inside
1877 elements to match g-ir-generate output
1879 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1881 * tools/generate.c (xml_printf): quote printf arguments so that
1882 we don't generate invalid XML by writing unescaped double quotes
1883 and such in attributes
1885 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1887 * tools/generate.c (write_field_info, write_callable_info,
1888 write_function_info, write_callback_info, write_struct_info,
1889 write_constant_value, write_signal_info, write_vfunc_info,
1890 write_object_info, write_interface_info, write_union_info,
1891 write_repository): remove unused indent parameters, xmlwriter
1892 keeps track of necessary indentation
1894 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1896 * tools/generate.c (xml_element_new, xml_element_free,
1897 xml_start_element, xml_end_element, xml_end_element_unchecked,
1898 xml_open, xml_close): Keep track of generated XML tree and
1899 handle indentation and closing tags properly.
1900 (write_field_info, write_callable_info, write_function_info,
1901 write_callback_info, write_struct_info, write_value_info,
1902 write_constant_info, write_enum_info, write_signal_info,
1903 write_vfunc_info, write_property_info, write_object_info,
1904 write_interface_info, write_error_domain_info, write_union_info,
1905 write_repository): Use xml_start_element and xml_end_element to
1908 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1910 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1911 (write_type_name, write_type_info, write_field_info,
1912 write_callable_info, write_function_info, write_callback_info,
1913 write_struct_info, write_value_info, write_constant_value,
1914 write_constant_info, write_enum_info, write_signal_info,
1915 write_vfunc_info, write_property_info, write_object_info,
1916 write_interface_info, write_error_domain_info, write_union_info,
1917 write_repository): wrap all FILE access to go through simple xmlwriter
1919 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1921 Bug 556400 – Fails to build on OS X 10.4
1923 * configure.ac: check for functions backtrace and backtrace_symbols
1924 * girepository/girparser.c (backtrace_stderr): Comment out
1925 implementation if the functions are not available.
1926 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1927 directory for better portability
1929 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1931 Bug 556433 – assume direction = out for int * parameters
1933 * giscanner/ast.py: define a list of types for which, if passed as
1934 reference, we assume a default direction of 'out'
1935 * giscanner/transformer.py: if a type has type pointer to one of the
1936 previously defined types, and no direction is set, assume out.
1937 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1939 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1941 * tests/scanner/annotation.c: fixed a few copy-paste errors
1943 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1945 Bug 556323 – transfer-ownership is wrong for functions returning const
1948 * giscanner/transformer.py: check for a const string as return value,
1949 not just const char*. Suggested by Colin Walters
1950 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1952 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1954 * girepository/ginfo.c, girepository/girepository.h: add
1955 g_union_info_find_method
1957 2008-10-14 Colin Walters <walters@verbum.org>
1959 * tests/repository/Makefile.am: Reenable repo test.
1960 * tests/repository/gitestrepo.c: Prepend search
1961 path for $(top_builddir)/gir dir so that we don't
1962 require installation for "make check" to pass.
1964 2008-10-13 Jürg Billeter <j@bitron.ch>
1966 * giscanner/glibtransformer.py:
1967 * tests/scanner/annotation-1.0-expected.gir:
1968 * tests/scanner/drawable-1.0-expected.gir:
1969 * tests/scanner/foo-1.0-expected.gir:
1970 * tests/scanner/utility-1.0-expected.gir:
1972 Support fields in GObject structs
1974 2008-10-13 Jürg Billeter <j@bitron.ch>
1976 * giscanner/ast.py: add signed integer and off_t to type_names
1978 2008-10-12 Jürg Billeter <j@bitron.ch>
1980 * giscanner/girparser.py: Parse bits attribute of fields
1982 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1984 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1985 * tests/repository/gitestrepo.c (main): instantiate
1986 'GCancellable' to ensure the GType is registered before using
1989 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1991 * giscanner/girparser.py: actually add the parsed constant nodes
1993 2008-10-12 Colin Walters <walters@verbum.org>
1995 * girepository/girepository.c: Don't cast DirEntry to Blob,
1996 actually look it up by offset.
1998 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
2000 * giscanner/girparser.py: parse constant nodes in gir files
2002 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
2004 * giscanner/transformer.py: prefix for constants have an underscore,
2005 so remove them as if they were functions, not objects.
2007 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
2009 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
2012 2008-10-12 Colin Walters <walters@verbum.org>
2014 Initial patch from Jani Monoses.
2016 * girepository/gtypelib.c: Fix inverted test for success
2019 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2021 * tools/generate.c (write_callable_info): use "transfer-ownership"
2022 attribute for return values
2024 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2026 * tools/generate.c (write_callable_info): move "transfer" and
2027 "null-ok" attributes from <function> to <return-value> element
2029 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2031 * girepository/girparser.c (start_return_value): handle
2032 "transfer-ownership" attribute
2034 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2036 * girepository/girparser.c (parse_param_transfer):
2037 * tools/generate.c (write_callable_info): use "container" for
2038 container/shallow ownership transfer (not "shallow")
2040 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2042 * girepository/girparser.c (parse_param_transfer,
2043 start_parameter): Refactor handling of transfer=none/shallow/full
2044 to separate function
2046 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2048 Bug 556048 – Crash in g_irepository_find_by_gtype
2050 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
2051 * girepository/girepository.c (find_interface): Fix
2052 find_by_gtype case to get the type name from right offset
2054 2008-10-12 Jürg Billeter <j@bitron.ch>
2056 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
2059 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2061 * girepository/gtypelib.h (RegisteredTypeBlob): make
2062 'unregistered' one bit wide as everywhere else
2064 2008-10-12 Jürg Billeter <j@bitron.ch>
2066 * giscanner/glibtransformer.py:
2067 * tests/scanner/annotation-1.0-expected.gir:
2068 * tests/scanner/drawable-1.0-expected.gir:
2069 * tests/scanner/drawable.h:
2070 * tests/scanner/foo-1.0-expected.gir:
2071 * tests/scanner/utility-1.0-expected.gir:
2073 Readd class records as workaround to not break Gtk typelib
2075 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
2077 * tests/types/Makefile.am: fix typo in gitesttypes namespace
2079 2008-10-12 Jürg Billeter <j@bitron.ch>
2081 * giscanner/glibtransformer.py: Don't generate <record> elements
2083 * tests/scanner/*: Update test cases
2085 2008-10-11 Colin Walters <walters@verbum.org>
2087 Bug 552858: versioning
2089 This is a big patch. You should probably remove your installation
2092 * docs/typelib-format.txt: Add nsversion entry which holds
2093 version of namespace.
2094 * girepository/girepository.h: Add 'version' parameter to
2095 g_irepository_require. This may be NULL. Normally
2096 bindings should pass an explicit version though.
2097 * girepository/girepository.c: Lots of infrastructure to
2098 support versioning. Add some more documentation. Disallow
2099 some usage of NULL namespaces.
2100 * girepository/girmodule.c: Add version parameter.
2101 * girepository/gtypelib.c: Update header size.
2102 * giscanner/ast.py: Add version to Namespace.
2103 * giscanner/girparser.py: Parse version attribute from
2104 XML, pass to Namespace.
2105 * giscanner/girwriter.py: Write out version parameter.
2106 * giscanner/transformer.py: Clean up include registration.
2107 * tests/*: Add version attribute.
2108 * tests/invoke/invoke.c: Don't try looking up test before
2109 it's loaded in repository.
2110 * tools/generate.c: Output version parameter.
2111 * gir/Makefile.am: Add 2.0 version to .gir files.
2113 2008-10-11 Colin Walters <walters@verbum.org>
2115 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
2116 if we have mismatched parens.
2118 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2120 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
2121 on 'members' variable.
2123 2008-10-11 Colin Walters <walters@verbum.org>
2125 Bug 555947 - update annotations syntax
2127 * giscanner/ast.py: Default to None for transfer. Remove
2128 default transfers for container types; we require this to
2130 * giscanner/girwriter.py: Transfer is now 'none', 'container',
2131 'full' to match repository.
2132 * giscanner/scannerlexer.l: Annotations now are parenthesized.
2133 * giscanner/transformer.py: Update for new annotations syntax.
2136 2008-10-11 Johan Bilien <jobi@litl.com>
2138 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
2140 2008-10-11 Johan Bilien <jobi@litl.com>
2142 Bug 552347: Parse #defines constants
2144 * girepository/gtypelib.c: update the list of value_size
2145 with recently defined type tags
2146 * giscanner/scannerparser.y: brought back parsing of #defined, as
2147 present in older version
2148 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
2149 * giscanner/girwriter.py: write out constant tags in the gir
2150 * giscanner/sourcescanner.py: add accessor for const_string
2151 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
2154 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
2156 Bug 555946: Install a test module exercising all types, transfer
2161 * tests/types/*: Add and install a test module that has functions
2162 accepting and returning most of the basic types to enable bindings
2163 implementors to more easily test their type conversion routines.
2165 2008-10-11 Jürg Billeter <j@bitron.ch>
2167 Bug 552374: Const strings should be identified in the gir.
2169 * giscanner/transformer.py: support string memory management
2170 * tests/scanner/foo.h: use char * and const char *
2171 * tests/scanner/foo-expected.gir: test that
2173 2008-10-11 Johan Dahlin <johan@gnome.org>
2175 * giscanner/girparser.py:
2176 Also parse enums which are not glib types.
2178 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2180 Bug 552370: add one more test for unsigned as a type, not as
2183 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
2184 * test/scanner/foo.h: add function which uses unsigned as a type.
2185 * test/scanner/foo-expected.gir: test that.
2187 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
2189 Bug 555712: Struct and union issues
2191 * giscanner/scannerparser.y (struct_declarator): Use information
2192 provided about the bit width of a field.
2193 * giscanner/transformer.py (Transformer._create_member): Pass the
2194 symbol's const_int member to the created field (it represents the
2196 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
2197 field attribute, if present.
2198 * giscanner/ast.py (Field): Add 'bits' member, specifying the
2199 width in bits of the field (only relevant for bitfields).
2202 * giscanner/transformer.py (Transformer._create_typedef_struct)
2203 (Transformer._create_typedef_union): Add calls to _create_struct()
2204 and _create_union(), respectively. This causes the scanner to
2205 generate output for fields of struct and union typedefs.
2208 2008-10-11 Jürg Billeter <j@bitron.ch>
2210 Bug 552370: unsigned not scanned properly
2212 * giscanner/scannerparser.y: combine basic types such as unsigned
2213 int and long long when scanning
2214 * tests/scanner/foo-expected.gir:
2215 * tests/scanner/foo.c: (foo_test_unsigned):
2216 * tests/scanner/foo.h: test that
2218 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2220 Bug 554854: The --typelib-xml and --inject options should reuse
2221 giscanner parser/writer.
2223 * giscanner/ast.py: add constructor list to Struct and Union.
2224 Add new param in Return's contructor to define transfer.
2225 * giscanner/girparser.py: several additions to the parser in order
2226 to have parsing all nodes of the gir xml files.
2227 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
2228 and writer in --inject and --typelib-xml options.
2229 * giscanner/xmlwriter.py: ignore empty attributes instead of
2230 raising an error as this basically exposes a bug in GIRParser.
2231 This should be reverted as soon as the parser is fixed.
2233 2008-10-11 Lucas Rocha <lucasr@gnome.org>
2235 Bug 552376: scanner generates wrong names for enum members when
2236 there's no defined gtype.
2238 * giscanner/utils.py (strip_common_prefix): Always strip common
2239 prefix exactly up to the last "_", and not beyond.
2240 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
2241 here is that the first character after the last '_' should should be
2242 the same as the character in the same position on the type name.
2243 * tests/scanner/foo-expected.gir: test that
2245 2008-10-10 Lucas Rocha <lucasr@gnome.org>
2247 Bug 555293: append library_paths to LPATH env variable to work
2248 around a bug in find_library when using ldconfig.
2250 * tools/g-ir-scanner (main): ditto.
2252 2008-10-09 Lucas Rocha <lucasr@gnome.org>
2254 * girepository/girepository.c (register_internal): fix regression on
2255 invoke test case by making sure we load the global module in the
2256 typelib when dealing with inline typelibs.
2257 * girepository/gtypelib.c: a couple of coding style fixes.
2259 2008-10-06 Lucas Rocha <lucasr@gnome.org>
2261 Bug 555294: Add support for multiple shared libraries per typelib.
2263 * girepository/ginvoke.c (g_function_info_invoke),
2264 girepository/ginfo.c(g_registered_type_info_get_g_type): use
2265 g_typelib_symbol instead of g_module_symbol.
2266 * girepository/girepository.h: remove g_typelib_set_module and add
2268 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
2269 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
2270 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
2271 modules instead of just one. The symbol lookup is now abstracted
2272 behind g_typelib_symbol which tries to find the passed symbol name in
2274 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
2275 and write shared_library attribute as a comma-separated list of libs.
2277 2008-10-06 Colin Walters <walters@verbum.org>
2279 * giscanner/transformer.py: Parse length= annotation as
2280 a parameter name, not a raw int.
2283 2008-10-03 Colin Walters <walters@verbum.org>
2285 Bug 551744: Non-GObject types aren't aggregating ctors and methods
2287 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
2289 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
2293 2008-10-03 Colin Walters <walters@verbum.org>
2295 Bug 554576: scan problem with ev_selection_render_selection()
2297 * giscanner/transformer.py: Only do type resolution once we've
2298 scanned all types. What could happen before is that we'd strip
2299 the namespace from local type "EvSelection" => Selection, and
2300 then later pull a "Selection" from some other namespace because
2301 we hadn't yet seen the local EvSelection. This could come
2302 down to hash table ordering and other things so not easy
2303 to write a test for.
2305 2008-10-03 Lucas Rocha <lucasr@gnome.org>
2307 * giscanner/girwriter.py (_parser_member): fix the last parameter of
2308 GLibEnumMember constructor as it should be the enum member nick.
2310 2008-10-02 Colin Walters <walters@verbum.org>
2312 Bug 552961: remove this parameter for methods
2314 * giscanner/glibtransformer.py: Delete this parameter; it is
2316 * girepository/ginvoke.c: Insert this parameter for methods.
2317 * girepository/gtypelib.c: Remove no longer needed verification of
2318 method this parameter.
2321 2008-09-30 Dan Winship <danw@gnome.org>
2323 Bug 554490: g-ir-scanner gets confused by '\\'
2325 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
2326 backslashes so it will correctly parse '\\' and "\\"
2328 * tests/scanner/annotation.c: add a use of '\\' to make sure that
2331 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
2333 2008-10-02 Colin Walters <walters@verbum.org>
2335 bug 552393: Note variadic functions
2337 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
2338 to use parameter_list directly.
2339 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
2340 * giscanner/ast.py: Add Varargs type.
2341 * giscanner/transformer.py: Check for ellipsis symbol, transform
2343 * girepository/girnode.h: Add varargs flag to in-memory nodes.
2344 Parse varargs functions, but filter them out before we start
2345 compiling the typelib.
2347 2008-10-02 Colin Walters <walters@verbum.org>
2349 Bug 554632: type tag for GType
2351 * girepository/girepository.h, girepository/girepository.c:
2352 Add type tag for GType - it's a special type we don't want
2353 to resolve to just "long".
2354 * docs/typelib-format.txt: Update.
2355 * girepository/girparser.c: Parse it.
2356 * giscanner/glibtransformer.py: Ensure we don't put GType in
2358 * tools/generate.c: Remove hardcoded type list.
2361 2008-09-30 Dan Winship <danw@gnome.org>
2363 Bug 554521: scanner generates wrong names for enum members with
2364 full type name prefix
2366 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
2367 right amount when the entire "first" string is a prefix of
2370 * tests/scanner/foo.h (FooEnumFullname):
2371 * tests/scanner/foo-expected.gir: test that
2373 2008-09-29 Colin Walters <walters@verbum.org>
2375 Bug 552380: Array parameters should be marked in the gir
2377 * giscanner/ast.py: Default char** to utf8[], and guchar* to
2378 uint8[]. Add Array, List, and Map subclasses of Type;
2379 these types can be generic. Return transfer defaults
2380 to true if return value is string or container type.
2381 Delete Sequence type.
2382 * giscanner/scannerlexer.l: Syntax change for annotations;
2383 use <> since it's more readable.
2384 * giscanner/girwriter.py: Write out these changes.
2385 * giscanner/girparser.py: Parse them.
2386 * giscanner/transformer.py: Have a defined set of
2387 both list and map types. When creating a type,
2388 check if the ctype we've parsed is one of them,
2389 if so create a container type subclass as appropriate.
2390 * girepository/girparser.c: Parse in generic types.
2393 2008-09-27 Colin Walters <walters@verbum.org>
2395 * tools/g-ir-scanner: Add --inject option.
2397 2008-09-25 Colin Walters <walters@verbum.org>
2399 Remove non-repository types from GIR
2401 * giscanner/ast.py: The canonical name is 'utf8', not
2403 * giscanner/glibast.py: A few more glib type mappings.
2404 * girepository/girparser.c: We only parse repository types.
2405 * tests/*.gir: Update.
2407 2008-09-23 Colin Walters <walters@verbum.org>
2409 Bug 552566: Add time_t type
2411 We need a type for time_t since it's special in C, and just
2412 mapping it to long precluded bindings from handling it
2415 2008-09-19 Colin Walters <walters@verbum.org>
2417 Bug 552390: Handle capitialization like "DBus" more robustly
2419 The to_underscores function was designed for use against prefixed
2420 names; we need a separate function which will convert names like
2421 DBusFoo into dbus_foo, not d_bus_foo.
2423 2008-09-19 Colin Walters <walters@verbum.org>
2425 Add check to make sure we're not hitting out unresolved types
2427 Validate the "this" argument for methods
2429 Remove heuristic matching of methods to classes based on prefix
2431 It was a broken hack that dated from when we handled underscoring
2432 and capitalization conventions less well.
2434 2008-09-18 Colin Walters <walters@verbum.org>
2436 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
2438 On Darwin, the suffix for installed shared libraries (.dylib) is
2439 different from loadable modules (.so). We use a bit of magic shell
2440 script from Behdad Esfahbod to figure out the right suffix.
2442 2008-09-15 Johan Dahlin <johan@gnome.org>
2444 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
2445 a wrapper for type_qualifier as well.
2447 2008-09-15 Colin Walters <walters@verbum.org>
2449 http://bugzilla.gnome.org/show_bug.cgi?id=552065
2451 * giscanner/ast.py: Add deprecation attributes.
2452 * giscanner/girwriter.py: Write out deprecation data.
2453 * girepository/girparser.c: Relax parsing; deprecated
2454 attribute now includes freeform string.
2455 * giscanner/scannerlexer.l: Parse Deprecated.
2456 * giscanner/transformer.py: Look for deprecated attribute
2458 * tests/scanner/*: Add a Deprecated test.
2460 2008-09-14 Tor Lillqvist <tml@novell.com>
2462 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
2464 2008-09-14 Colin Walters <walters@verbum.org>
2466 * giscanner/glibtransformer.py: Ignore functions with
2469 2008-09-12 Colin Walters <walters@verbum.org>
2471 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
2473 2008-09-12 Colin Walters <walters@verbum.org>
2475 * giscanner/ast.py: Bind pid_t to INT for vte.
2477 2008-09-12 Colin Walters <walters@verbum.org>
2479 * giscanner/girparser.py: Parse c:type for boxed records/unions.
2480 * giscanner/glibast.py: Avoid overwriting ctype.
2481 * giscsanner/transformer.py: Try resolving types using the GType names.
2483 2008-09-12 Colin Walters <walters@verbum.org>
2485 * giscanner/minixpath.py: Code to run an "XPath"
2486 assertion against an XML tree, taken from
2487 gir-repository/gir/tests.py.
2488 * giscanner/Makefile.am: Ship it.
2489 * tools/g-ir-scanner: Add --xpath-assertions option.
2490 * gir/GLib-assertions.txt: Add a few assertions.
2491 * gir/Makefile.am: Run them.
2493 2008-09-11 Colin Walters <walters@verbum.org>
2495 http://bugzilla.gnome.org/show_bug.cgi?id=551737
2497 * giscanner/transformer.py: Fix strip_namespace_func to only strip
2498 prefix if it ends with _. Tweak callback stripping to determine
2499 based on presence of _ whether we need to use strip_namespace_func
2500 or strip_namespace_object.
2502 2008-09-09 Owen Taylor <otaylor@redhat.com>
2504 * docs/typelib-format.txt: Wether => Whether
2506 2008-09-08 Colin Walters <walters@verbum.org>
2508 * girepository/girparser.c: Default to "readable" for properties.
2509 * giscanner/ast.py: Add readable, writable etc.
2510 * giscanner/girwriter.py: Writ them.
2511 * giscanner/glibtransformer.py: Inspect them.
2514 2008-09-07 Colin Walters <walters@verbum.org>
2516 * giscanner/cgobject.py: Add comment.
2518 2008-09-07 Colin Walters <walters@verbum.org>
2520 * giscanner/cgobject.py: Also call g_thread_init.
2522 2008-09-07 Colin Walters <walters@verbum.org>
2524 * giscanner/transformer.py: Fix regression by not
2525 stripping prefix before stripping namespace for unions
2528 2008-09-06 Colin Walters <walters@verbum.org>
2530 * giscanner/transformer.py: If a namespace contains
2531 multiple caps, try stripping both gnomekeyring_ and
2534 2008-09-07 Johan Dahlin <johan@gnome.org>
2536 Bug 551162 – giscanner does not recognize asm and __asm__
2537 * giscanner/scannerlexer.l:
2538 Patch by Jani Monoses.
2540 2008-09-06 Colin Walters <walters@verbum.org>
2542 * girepository/girnode.c: Allow gtype_name
2543 and gtype_init in struct and union.
2544 * girepository/girparser.c: Parse glib:
2545 boxed bits for both structure and union.
2546 * girepository/gtypelib.c: Don't barf
2547 if structure is boxed.
2548 * giscanner/girparser.py: Parse new XML
2550 * giscanner/girwriter.py: Write out new
2552 * giscanner/glibast.py: Define new classes
2553 which are both Boxed and Struct/Union, as
2554 well as an "Other" for everything else.
2555 * giscanner/glibtransformer.py: Handle
2556 boxed types specially; we try to merge
2557 them with a struct/union if one exists,
2558 otherwise fall back to generic boxed.
2560 * tools/generate.c: Write out new format.
2562 2008-09-06 Johan Dahlin <johan@gnome.org>
2564 * giscanner/grealpath.h: Include stdlib.h
2566 * docs/g-ir-generate.1: Remove leading %
2568 2008-09-01 Colin Walters <walters@verbum.org>
2570 * girepository/girparser.c: Look at c:type to determine
2571 whether or not an item is a pointer.
2573 2008-09-01 Johan Dahlin <johan@gnome.org>
2575 * tests/scanner/Makefile.am:
2576 Set PYTHONPATH so the scanner can run
2577 even if you didn't install anything.
2579 2008-09-01 Johan Dahlin <johan@gnome.org>
2582 Post-release version bump
2585 2008-09-01 Johan Dahlin <johan@gnome.org>
2589 2008-08-31 Colin Walters <walters@verbum.org>
2591 * giscanner/glibtransformer.py: Quiet info
2594 2008-08-31 Johan Dahlin <johan@gnome.org>
2597 Bump version to 0.5.0
2599 2008-08-31 Colin Walters <walters@verbum.org>
2601 * giscanner/glibtransformer.py: Follow aliases to ensure
2602 we don't get a constructor returning a basic type.
2603 * giscanner/transformer.py: Add function to follow aliases.
2606 2008-08-31 Johan Dahlin <johan@gnome.org>
2608 * giscanner/scannerlexer.l:
2609 * giscanner/scannerparser.y:
2610 * giscanner/sourcescanner.h:
2611 * giscanner/sourcescanner.py:
2612 Parse GCC extensions in the parser instead of just undeffing them
2613 in the pre-processor.
2615 2008-08-31 Johan Dahlin <johan@gnome.org>
2617 * giscanner/glibtransformer.py:
2618 Clean up a huge if. Do not add methods or constructors
2620 * giscanner/utils.py:
2621 second might be longer than first, check that.
2623 2008-08-31 Johan Dahlin <johan@gnome.org>
2628 2008-08-31 Colin Walters <walters@verbum.org>
2630 * girepository/girparser.c: Don't lose if we
2633 2008-08-31 Colin Walters <walters@verbum.org>
2635 * giscanner/glibtransformer.py: Look for libtool
2636 library in current directory
2637 * tests/scanner - Update.
2639 2008-08-30 Colin Walters <walters@verbum.org>
2641 * docs/typelib-format.txt: Add a guint32
2643 * gir/Makefile.am: Dep on Makefile
2644 * girepository/ginfo.c:
2645 * girepository/girepository.c: Clean up
2646 default typelib handling; remove global
2647 default_typelib variable. Ensure we handle
2648 NULL repository in more places.
2649 Support dependency resolution.
2650 Support lazy loading.
2651 * girepository/girepository.h: Remove
2652 g_irepository_unregister; we don't support
2653 unloading typelibs since really they're
2654 process-global. Update for lazy loading
2656 * girepository/girmodule.c: Use g_new0.
2657 Add dependencies to GirModule.
2658 * girepository/girparser.c: Parse dependencies.
2659 * girepository/gtypelib.c: Add 4 bytes for
2661 * tests/Makefile.am: Kill off gobject.gir,
2662 it conflicts with the real one.
2663 * tests/object.gir: Dep on GObject.
2664 * tools/generate.c: Take --includedir
2665 argument to say which directories to search
2666 for typelibs. Print out dependencies.
2668 2008-08-30 Colin Walters <walters@verbum.org>
2670 * giscanner/glibtransformer.py: Reduce warning noise.
2672 2008-08-29 Colin Walters <walters@verbum.org>
2674 * girepository/ginfo.c: Add some assertions regarding
2675 refcounts, just to be sure.
2676 * giscanner/glibtransformer.py: Blacklist a few more
2679 2008-08-29 Colin Walters <walters@verbum.org>
2681 * giscanner/glibtransformer.py: Blacklist a few
2682 functions that use GError oddly
2684 2008-08-29 Colin Walters <walters@verbum.org>
2686 * girepository/gtypelib.c: Don't crash if no
2689 2008-08-29 Colin Walters <walters@verbum.org>
2691 * girepository/girparser.c: Handle chains of aliases
2692 across modules by ensuring we fully qualify aliases
2695 2008-08-29 Colin Walters <walters@verbum.org>
2697 * girepository/girparser.c: Don't search aliases
2700 2008-08-29 Colin Walters <walters@verbum.org>
2702 * girepository/girparser.c: Rewrite type parsing
2703 to handle both GLib parsing case as well as correctly
2704 handling GLib.List and friends. Don't try to treat
2705 e.g. ListStore as a List.
2707 2008-08-29 Colin Walters <walters@verbum.org>
2709 * girepository/gtypelib.c: Add more context
2712 2008-08-29 Colin Walters <walters@verbum.org>
2714 * giscanner/glibtransformer.py: Add some informative
2715 logging messages in corner cases. Be sure we use
2716 the most recent node set instead of a cache
2717 when generating result set.
2718 * tests/: Remove duplicated bits in expected girs
2719 * girepository/girparser.c: Accept both List (for
2720 compiling GLib) and GLib.List (what the scanner
2723 * tools/generate.c: Generate canonical form.
2725 2008-08-29 Johan Dahlin <johan@gnome.org>
2727 * giscanner/config.py.in:
2728 Use datarootdir instead of datadir to avoid
2729 an autoconf warning.
2731 2008-08-29 Johan Dahlin <johan@gnome.org>
2735 * examples/gdk-pixbuf.gidl:
2737 Update and remove old cruft.
2739 2008-08-29 Johan Dahlin <johan@gnome.org>
2742 * docs/g-ir-compiler.1:
2743 * docs/g-ir-generate.1:
2744 * docs/g-ir-scanner.1:
2745 Add man pages for the generator and compiler.
2747 2008-08-29 Johan Dahlin <johan@gnome.org>
2749 * docs/g-ir-scanner.1: Document
2751 * giscanner/Makefile.am:
2752 * giscanner/gidlparser.py:
2753 * giscanner/gidlwriter.py:
2754 * tools/g-ir-scanner:
2755 Remove gidl support.
2757 2008-08-28 Colin Walters <walters@verbum.org>
2759 * tests/scanner/Makefile.am: Pass the right
2760 --includedir args. Add a Makefile dep.
2761 * tools/compiler.c: Pass includedirs down.
2762 * girepository/girparser.c: Actually put
2763 includedirs in context, pass down. Fix
2766 2008-08-28 Colin Walters <walters@verbum.org>
2768 * gir/Makefile.am: Use --includedir
2769 * girepository/girparser.c: Recursively parse
2770 includes to pull in aliases and expand them.
2771 We need this to avoid putting unknown names in
2773 * tools/compiler.c: Add --includedir option.
2774 * giscanner/ast.py: Map size/ssize to types
2777 2008-08-28 Tor Lillqvist <tml@novell.com>
2779 Make check now runs successfully on Windows.
2781 * tools/compiler.c (write_out_typelib): Use binary mode for output
2784 * girepository/girnode.c: Don't print NULL strings.
2786 * tests/invoke/Makefile.am
2787 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2788 convince libtool to build shared libraries.
2790 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2791 g_assert() instead of printing out expected errors.
2793 2008-08-28 Tor Lillqvist <tml@novell.com>
2795 * girepository/gtypelib.h: Change type of bitfield fields from
2796 guint to the most suitable smaller type. This makes the struct
2797 sizes match the ones on Linux that the sanity check expects when
2798 using gcc -mms-bitfields on Windows.
2800 2008-08-28 Johan Dahlin <johan@gnome.org>
2805 * giscanner/Makefile.am:
2806 * tests/Makefile.am:
2807 * tests/scanner/Makefile.am:
2808 Make distcheck pass.
2810 2008-08-27 Johan Dahlin <johan@gnome.org>
2812 * giscanner/Makefile.am:
2813 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2815 2008-08-27 Tor Lillqvist <tml@novell.com>
2817 Make g-ir-scanner work on Windows. Still problems with the typelib
2818 code. Changes okayed by jdahlin.
2820 * configure.ac: Check for Windows, set Automake conditional
2821 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2822 avoid shell quoting issues
2824 * girepository/Makefile.am: Use -no-undefined so that libtool
2825 agrees to build a shared library on Windows.
2827 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2828 Windows. Empty implementation on Windows so far.
2830 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2831 informative error message for the assertion failures. Tell also
2832 what the expected size of the struct is. Check all sizes first and
2833 fail afterwards if at least one size was different from expected.
2835 * tools/Makefile.am: Reorder libraries into proper logical
2838 * tools/generate.c: Don't include <dlfcn.h>, not used.
2840 * giscanner/Makefile.am: On Windows, link with the Python library,
2841 and install the module DLL as _giscanner.pyd. Remove the
2842 unnecessary import library and libtool library that libtool has
2845 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2846 and just skip it. Recognize also two "l" suffixes for long long
2847 constants. Recognize also __inline__.
2849 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2850 GetFullPathName(). As such, GetFullPathName() does more than the
2851 UNIX realpath(). It also changes relative paths into absolute
2852 paths. But for our purposes that shouldn't matter.
2854 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2855 Windows the file descriptor passed to us is from Python. Python
2856 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2857 uses msvcrt.dll. On Windows, file descriptors are specific to
2858 which C library is used. So we must find out what underlying OS
2859 handle corresponds to the file descriptor Python passes us, and
2860 then make that into a file descriptor valid for the C library this
2863 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2864 __attribute__ as the lexer now handles it. The definition as empty
2865 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2866 __attribute__. Close the temp file before unlinking it.
2868 * giscanner/cgobject.py: Use correct library name for the gobject
2871 * gir/Makefile.am: Must pass the full basename of the DLLs on
2872 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2873 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2874 reality they won't change, until there is a GLib 3, and then also
2875 the Unix code here needs changing.
2877 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2880 2008-08-26 Colin Walters <walters@verbum.org>
2882 * girepository/girepository.c: Search
2883 $DATADIR/girepository instead of
2884 $DATADIR/gitypelibs; this naming makes
2885 it clearer that e.g. jgir can install
2887 * gir/Makefile.am: Install there.
2889 2008-08-26 Colin Walters <walters@verbum.org>
2891 * girepository/gtypelib.c (_g_typelib_init): Also
2892 use G_MODULE_SUFFIX instead of hardcoding .so.
2894 2008-08-26 Colin Walters <walters@verbum.org>
2896 * girepository/gtypelib.c (_g_typelib_init): Free
2897 string in the right place.
2899 2008-08-26 Colin Walters <walters@verbum.org>
2901 * girepository/gtypelib.c (_g_typelib_init): Handle
2902 both .la and .so names; this works better in the
2903 uninstalled library case.
2905 2008-08-26 Johan Dahlin <johan@gnome.org>
2908 * giscanner/Makefile.am:
2909 * giscanner/cgobject.py:
2910 * giscanner/config.py.in:
2911 * giscanner/sourcescanner.py:
2912 Avoid undeffing __GNUC__, instead define
2913 __attribute__ & friends. Remove glibconfig.h hack.
2914 This makes gobject-introspection work better on
2915 MacOS X, Thanks to Richard Hult for kind help.
2917 2008-08-25 Colin Walters <walters@verbum.org>
2919 * giscanner/glibtransformer.py: Always print
2922 2008-08-25 Colin Walters <walters@verbum.org>
2924 * giscanner/glibtransformer.py: Skip over
2925 interfaces we don't know.
2927 2008-08-25 Colin Walters <walters@verbum.org>
2929 * girepository/girparser.c: Parse new implements
2930 syntax, drop gapi one.
2931 * tests/object.gir: Update.
2932 * tools/generate.c: Generate new syntax.
2934 2008-08-25 Colin Walters <walters@verbum.org>
2936 * giscanner/ast.py: Add interfaces property
2938 * giscanner/girwriter.py: Write out implemented
2940 * giscanner/glibtransformer.py: Introspect
2941 implemented interfaces.
2942 * tests/scanner/*: Make FooObject implement
2945 2008-08-25 Colin Walters <walters@verbum.org>
2947 * giscanner/glibtransformer.py: More correctly pair
2948 methods; if we have a symbol that starts with
2949 e.g. hippo_canvas look for a matching HippoCanvas
2950 class before accepting e.g. HippoCanvasImage.
2952 2008-08-24 Colin Walters <walters@verbum.org>
2954 * tools/g-ir-scanner: Filter out unknown options from
2957 2008-08-24 Colin Walters <walters@verbum.org>
2959 * giscanner/glibtransformer.py: Fail with better
2960 error if we can't find library.
2962 2008-08-24 Colin Walters <walters@verbum.org>
2964 * tools/g-ir-scanner: Use subprocess instead of
2965 commands, works on Windows and avoids the evil
2968 2008-08-24 Colin Walters <walters@verbum.org>
2970 * giscanner/glibtransformer.py: Skip over
2971 g_object_get_type from GLib trunk.
2973 2008-08-24 Colin Walters <walters@verbum.org>
2975 * girepository/girepository.c (g_irepository_require):
2976 Don't open shared library here; we already do it
2979 2008-08-24 Colin Walters <walters@verbum.org>
2981 * girepository/gtypelib.c: Add context stack so
2982 when we get an error we can print out nicely
2985 2008-08-24 Johan Dahlin <johan@gnome.org>
2987 * girepository/girparser.c (start_glib_boxed), (start_function),
2988 (start_field), (start_alias):
2989 Refactor a couple of parsing functions to be simpler to follow.
2992 2008-08-24 Johan Dahlin <johan@gnome.org>
2994 * girepository/girparser.c (start_function):
2995 Remove left-over code, checking type of function.
2997 2008-08-23 Colin Walters <walters@verbum.org>
2999 * giscanner/config.py: Define DATADIR.
3000 * giscanner/transformer.py: Look in DATADIR.
3002 2008-08-23 Colin Walters <walters@verbum.org>
3004 * girepository/gtypelib.c: Check constructor
3006 * girepository/girnode.c: Small tweaks.
3007 * girepository/ginfo.c: Calculate signature offsets
3009 * girepository/girparser.c: Remove duplicate
3011 * giscanner/glibtransformer.py: Avoid marking
3012 functions which return a basic type as
3015 2008-08-23 Colin Walters <walters@verbum.org>
3017 * girepository/girparser.c: Ignore <include>.
3018 * giscanner/girparser.py: Parse them.
3019 * giscanner/girwriter.py: Generate them.
3020 * giscanner/transformer.py: Process <include>
3021 recursively. Don't require full path for
3022 includes, look in {$XDG_DATA_DIRS}/gir.
3023 * tools/g-ir-scanner: Pass through includes.
3024 * Makefile.am: Remove extra --include
3026 * *-expected.gir: Add expected includes.
3028 2008-08-23 Johan Dahlin <johan@gnome.org>
3030 * tests/scanner/Makefile.am:
3031 * tests/scanner/annotation-expected.gir:
3032 * tests/scanner/drawable-expected.gir:
3033 Avoid duplication in the Makefile, regenerate with new
3034 namespaces (same as the filename)
3036 2008-08-22 Colin Walters <walters@verbum.org>
3038 * girepository/girnode.c: Don't hardcode integers,
3041 2008-08-22 Johan Dahlin <johan@gnome.org>
3043 * giscanner/sourcescanner.py:
3044 Check for ../gobject-introspection-1.0.pc.in to determine
3045 if we run installed or uninstalled.
3047 2008-08-22 Johan Dahlin <johan@gnome.org>
3050 * giscanner/sourcescanner.py:
3051 Send in undefs/defines via writing it directly to stdin
3052 of cpp instead of via arguments.
3054 2008-08-22 Colin Walters <walters@verbum.org>
3056 * tools/generate.c, tools/compiler.c: Default
3058 * all Makefile.am: Update.
3060 2008-08-22 Colin Walters <walters@verbum.org>
3062 * girepository/girparser.c: Pass through
3063 recursive types. Avoid overwriting errors.
3064 * giscanner/xmlwriter.py: Always write the
3066 * tests/*.gir: Adjust.
3067 * tests/scanner/Makefile.am: Build typelibs,
3068 and generate XML from those. Once we
3069 have a good diff mechanism...
3070 * tests/scanner/*-expected.gir: Add XML
3072 * tools/g-ir-scanner: Accept --typelib-xml
3074 * tools/generate.c: Better defaults for transfer.
3076 2008-08-22 Johan Dahlin <johan@gnome.org>
3080 * giscanner/Makefile.am:
3081 * giscanner/config.py.in:
3082 * giscanner/sourcescanner.py:
3083 Use the generated glibconfig.h for all scanner invokations.
3084 Rename it to glibconfig-scanner.h and install it.
3085 Add a config.py which so far contains the include dir.
3087 2008-08-22 Johan Dahlin <johan@gnome.org>
3090 Replace glibconfig.h with our own, do some replacement
3091 for CPP/C features we do not support
3093 2008-08-22 Colin Walters <walters@verbum.org>
3095 * tools/generate.c (write_callable_info): Fix unref
3098 2008-08-22 Colin Walters <walters@verbum.org>
3100 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
3101 * tests/Makefile.am: Support $(DEBUG)
3102 * tools/generate.c: Do immediate close tags if no
3105 2008-08-21 Colin Walters <walters@verbum.org>
3107 * tests/scanner/drawable-expected.gir,
3108 * tests/scanner/drawable.c,
3109 * tests/scanner/drawable.h:
3112 2008-08-21 Colin Walters <walters@verbum.org>
3114 * giscanner/glibtransformer.py: Compute prefix
3115 by searching through the symbol for bits
3116 rather than going directly from ctype; this fixes
3119 2008-08-21 Colin Walters <walters@verbum.org>
3121 * giscanner/glibtransformer.py: Also try squashing
3122 underscores from namespace, fixes webkit_web_view_new.
3124 2008-08-21 Colin Walters <walters@verbum.org>
3126 * giscanner/glibtransformer.py: More ctor work,
3127 avoid having gtk_window_group_new end up under
3130 2008-08-21 Colin Walters <walters@verbum.org>
3132 * giscanner/glibtransformer.py: Much simpler approach
3133 of mapping uscored names to classes.
3134 * giscanner/utils.py: Remove unnecessary function.
3136 2008-08-21 Johan Dahlin <johan@gnome.org>
3138 * girepository/girepository.c (g_irepository_require):
3139 Plug memory leak and avoid using freed memory.
3140 Resolve the whole module path, here as well.
3142 2008-08-21 Colin Walters <walters@verbum.org>
3144 * giscanner/glibtransformer.py: Look up all permutations
3145 of class names when scanning methods/ctors based on
3146 the prefix instead of using the return value. This
3147 associates gtk_window_new with the right class.
3149 2008-08-21 Colin Walters <walters@verbum.org>
3151 * girepository/girmodule.c (g_ir_module_build_typelib):
3152 Revert change to increment header_size; we do that in
3155 2008-08-21 Colin Walters <walters@verbum.org>
3157 * girepository/girnode.c (write_string): Tweak to
3158 use UINT instead of INT. Not likely to matter.
3159 * girepository/girmodule.c (g_ir_module_build_typelib):
3160 Add to header_offset as well for header strings
3161 to match what write_string does.
3162 * girepository/gtypelib.c: Replace is_name with
3163 validate_name, which more strongly validates and
3164 handles errors in a better way. Update all callers.
3165 * giscanner/glibtransformer.py: Handle constructors
3168 2008-08-21 Johan Dahlin <johan@gnome.org>
3170 * gir/Makefile.am (typelibs_DATA): Build and
3171 install the Gio.typelib too
3173 * girepository/gtypelib.c (_g_typelib_init):
3174 Use g_module_build_path to resolve the shlib name
3176 2008-08-21 Colin Walters <walters@verbum.org>
3178 * gir/Makefile.am: CLEANFILES typelibs too.
3180 2008-08-21 Johan Dahlin <johan@gnome.org>
3182 * giscanner/glibtransformer.py:
3183 Do not send .la files through find_library.
3185 2008-08-21 Colin Walters <walters@verbum.org>
3187 * girepository/girparser.c (g_irepository_require):
3188 Fix one small leak in error case.
3190 2008-08-21 Johan Dahlin <johan@gnome.org>
3193 Parse glibconfig.h as well and install the compiled
3196 2008-08-21 Johan Dahlin <johan@gnome.org>
3199 * giscanner/glibtransformer.py:
3200 * tools/g-ir-scanner:
3201 Do not hard-core library names in the Makefile, reuse
3202 ctypes find_library instead.
3204 2008-08-21 Johan Dahlin <johan@gnome.org>
3206 * girepository/girparser.c (resolve_aliases):
3207 Remove compilation warnings
3209 2008-08-21 Johan Dahlin <johan@gnome.org>
3211 * girepository/girepository.c (g_irepository_require):
3212 Rewrap and fix double free bug by leaking a bit.
3214 2008-08-20 Colin Walters <walters@verbum.org>
3216 * girepository/girepository.c: Add new function
3217 g_irepository_get_typelib_path which tells
3218 us from where we loaded a namespace.
3220 2008-08-20 Colin Walters <walters@verbum.org>
3222 * tests/scanner/*-expected.gir: Adjust for
3223 added shared-library.
3224 * giscanner/giwriter.py: Make pylint happy.
3226 2008-08-20 Colin Walters <walters@verbum.org>
3228 * girepository/girmodule.c (g_ir_module_build_typelib):
3229 Calculate size correctly, avoid use-after-free.
3231 2008-08-20 Colin Walters <walters@verbum.org>
3233 * girepository/girepository.c: Remove
3234 g_irepository_register_file in favor of
3235 g_irepository_require. There are two
3236 possible deployment scenarios for typelibs:
3237 First, separate in $DATADIR/gitypelibs/. Second,
3238 they may be embedded in shlibs. However since
3239 the first is now the normal case, the API is
3240 optimized around it.
3242 Refactor internals to look up typelibs for
3243 namespaces just-in-time, but we expect
3244 consumers to call g_irepository_require.
3246 Also, add some docs. No one has died from that
3248 * gir/Makefile.am: Need --library for glib.
3249 * giscanner/girwriter.py: Write out shared-library.
3250 * tools/g-ir-writer: Take the first --library
3251 argument as the target of shared-library. In
3252 the future we should make this nicer with pkg-config
3255 2008-08-20 Colin Walters <walters@verbum.org>
3257 * girepository/girparser.py: And parse them.
3259 2008-08-20 Johan Dahlin <johan@gnome.org>
3261 * giscanner/glibast.py: Add gshort/gushort types
3263 2008-08-20 Colin Walters <walters@verbum.org>
3265 * gir/Makefile.am: Rename .gir files using GI namespace.
3266 * girepository/girepository.c: Use XDG_DATA_DIRS for
3267 looking up typelibs. Also typelibs are now suffixed
3269 * tests/invoke/Makefile.am: Only use metadata.
3270 * girepository/Makefile.am: Remove unnecessary include.
3271 * tests/scanner/Makefile.am: Update using GI namespaces
3272 for scanner includes.
3274 2008-08-20 Colin Walters <walters@verbum.org>
3276 * girepository/transformer.py: Suppress aliases whose
3278 * girepository/ast.py: Define some more aliases.
3280 2008-08-20 Colin Walters <walters@verbum.org>
3282 * girepository/girparser.c: Avoid alias infloops.
3284 2008-08-20 Colin Walters <walters@verbum.org>
3286 * tests/scanner/foo-expected.gir: Fix expected list type.
3288 2008-08-20 Johan Dahlin <johan@gnome.org>
3290 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
3291 Add a workaround for #548689.
3292 We can now compile gtk!
3294 2008-08-20 Colin Walters <walters@verbum.org>
3296 * giscanner/glibtransformer.py: Try to look up
3297 aliases using the c:type too.
3299 2008-08-20 Colin Walters <walters@verbum.org>
3301 * girepository/girparser.c: Parse union fields.
3303 2008-08-20 Johan Dahlin <johan@gnome.org>
3305 * giscanner/ast.py: Make time_t an alias for long
3307 * gir/gio-2.0-good.gir:
3308 * gir/glib-2.0-good.gir:
3309 * gir/gobject-2.0-good.gir:
3311 * giscanner/glibtransformer.py:
3312 Do not delete Class structures, we need them in gdk/gtk.
3313 * tests/scanner/drawable-expected.gir:
3314 * tests/scanner/foo-expected.gir:
3315 * tests/scanner/utility-expected.gir:
3318 2008-08-20 Johan Dahlin <johan@gnome.org>
3320 * tests/scanner/Makefile.am:
3321 * tests/scanner/annotation-expected.gir:
3322 * tests/scanner/annotation.c (annotation_object_class_init),
3323 (annotation_object_init), (annotation_object_method),
3324 (annotation_object_in), (annotation_object_out),
3325 (annotation_object_inout), (annotation_object_inout2),
3326 (annotation_object_inout3), (annotation_object_calleeowns),
3327 (annotation_object_calleesowns), (annotation_object_get_strings),
3328 (annotation_object_with_voidp), (annotation_object_get_objects),
3329 (annotation_object_create_object), (annotation_object_allow_none):
3330 * tests/scanner/annotation.h:
3331 * tests/scanner/foo-expected.gir:
3332 * tests/scanner/foo.c:
3333 * tests/scanner/foo.h:
3334 Split out annotation tests out of foo
3336 2008-08-20 Johan Dahlin <johan@gnome.org>
3338 * tests/scanner/Foo-expected.gir:
3339 * tests/scanner/Makefile.am:
3340 * tests/scanner/foo-expected.gir:
3341 * tests/scanner/foo-object.h:
3342 * tests/scanner/foo.c:
3343 Foo->foo, foo-object.h -> foo.h
3345 2008-08-20 Johan Dahlin <johan@gnome.org>
3347 * tests/scanner/Foo-expected.gir:
3348 * tests/scanner/Makefile.am:
3349 * tests/scanner/drawable-expected.gir:
3350 * tests/scanner/drawable.c (test_drawable_class_init),
3351 (test_drawable_init):
3352 * tests/scanner/drawable.h:
3353 * tests/scanner/foo-object.h:
3354 * tests/scanner/foo.c (foo_boxed_method):
3355 Move the drawable parts out of Foo to its own test.
3357 2008-08-20 Johan Dahlin <johan@gnome.org>
3359 * tests/scanner/Foo-expected.gir:
3360 * tests/scanner/foo-object.h:
3361 * tests/scanner/foo.c (foo_drawable_class_init),
3362 (foo_drawable_init):
3363 Add a based on GdkDrawable which generates
3366 2008-08-19 Colin Walters <walters@verbum.org>
3368 * giscanner/transformer.py: Don't try
3369 to strip prefix before namespace.
3371 2008-08-19 Johan Dahlin <johan@gnome.org>
3373 * giscanner/transformer.py:
3374 * tests/scanner/Foo-expected.gir:
3375 * tests/scanner/foo-object.h:
3376 Add support for typedef void foo type of
3379 2008-08-19 Johan Dahlin <johan@gnome.org>
3382 * giscanner/girwriter.py:
3383 * giscanner/glibtransformer.py:
3384 * giscanner/transformer.py:
3385 * tests/scanner/Foo-expected.gir:
3386 Add basic support for union, base the code much
3387 on Struct. Add a testcase.
3389 2008-08-19 Johan Dahlin <johan@gnome.org>
3391 * tests/scanner/Foo-expected.gir:
3392 * tests/scanner/foo-object.h:
3393 Add a union testcase which the compiler currently
3396 2008-08-19 Johan Dahlin <johan@gnome.org>
3398 * gobject-introspection-1.0.pc.in:
3399 Add a g_ir_compiler variable
3401 2008-08-19 Colin Walters <walters@verbum.org>
3403 * giscanner/ast.py: Rework types to be more closely
3405 * giscanner/girparser.py: Parse more bits.
3406 * giscanner/girwriter.py: Write sequences in a new
3407 way that specifies container type.
3408 * giscanner/glibast.py: Adjust for ast.py changes,
3409 add 'ctype' property to GLibObject and GLibInterface
3410 so we can look things up by it later.
3411 * gicanner/transformer.py: Names is new class holding
3412 the various namespaces we manage. Do not confuse
3413 with Namespace which is toplevel XML node effectively.
3414 Rework all type resolution to go through
3415 _resolve_type_name_1.
3416 * giscanner/glibtransformer.py: Raise UnknownTypeError
3417 instead of ValueError for cleanliness. Add Unresolved
3418 class to mark types whose parent we haven't seen yet.
3419 Use new Names object from transformer.py.
3420 Correctly look up parent=.
3421 Fix type validation to handle sequences.
3422 * tests/scanner/Foo-expected.gir: Update for sequence
3423 work, int instead of int32.
3424 * tools/g-ir-scanner: Add --noclosure option
3425 * gir/Makefile.am: Use --noclosure by default for
3428 2008-08-18 Johan Dahlin <johan@gnome.org>
3430 * gir/gio-2.0-good.gir:
3431 * gir/glib-2.0-good.gir:
3432 * gir/gobject-2.0-good.gir:
3435 2008-08-18 Johan Dahlin <johan@gnome.org>
3438 * giscanner/girparser.py:
3439 * giscanner/girwriter.py:
3440 * giscanner/glibast.py:
3441 * giscanner/glibtransformer.py:
3442 * giscanner/transformer.py:
3443 * tests/scanner/Foo-expected.gir:
3444 * tests/scanner/foo-object.h:
3445 * tests/scanner/utility-expected.gir:
3446 * tests/scanner/utility.h:
3447 Redo type resolving and validation.
3448 Add a couple of new tests.
3449 Patch mostly written by Colin.
3451 2008-08-18 Johan Dahlin <johan@gnome.org>
3454 * giscanner/girparser.py:
3456 * giscanner/transformer.py:
3457 Improve enum parsing for enums without a GType.
3458 Make flags/enum references to other girs work
3459 * giscanner/utils.py:
3461 * tests/scanner/Makefile.am:
3462 * tests/scanner/foo-object.h:
3463 * tests/scanner/utility-expected.gir:
3464 * tests/scanner/utility.h:
3465 Add a new test for external enum references
3467 2008-08-18 Johan Dahlin <johan@gnome.org>
3469 * docs/global-module-registry.txt: Update
3471 * tests/array.gir: Update with new type proposal
3473 * girepository/girepository.c (g_type_tag_to_string):
3474 * girepository/girepository.h:
3475 * girepository/girnode.c (g_ir_node_get_full_size_internal),
3477 * girepository/girnode.h:
3478 Make enum serializing functions public. Clean up some whitespace.
3480 2008-08-17 Johan Dahlin <johan@gnome.org>
3482 * docs/global-module-registry.txt:
3483 Add a document for an on disk module registry format
3485 2008-08-17 Johan Dahlin <johan@gnome.org>
3488 * gir/gio-2.0-good.gir:
3491 2008-08-17 Johan Dahlin <johan@gnome.org>
3494 * gir/glib-2.0-good.gir:
3495 * gir/gobject-2.0-good.gir:
3496 * giscanner/cgobject.py:
3497 * giscanner/glibtransformer.py:
3498 Regenerate GObject & GType.
3499 Avoid warnings when generating gobject-2.0.gir.
3500 Introspect a little more, and skip *_get_type functions.
3502 2008-08-17 Colin Walters <walters@verbum.org>
3504 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
3505 Rename to -good, always generate during build.
3506 * gir/Makefile.am: Ensure .gir files dep on
3507 all scanner sources.
3508 * Makefile.am: Switch build order to ensure
3509 the scanner is ready before we do gir/.
3510 * tools/g-ir-scanner: Look for .git too.
3512 2008-08-17 Johan Dahlin <johan@gnome.org>
3514 * girepository/gtypelib.c (validate_enum_blob):
3515 * giscanner/glibtransformer.py:
3516 * giscanner/transformer.py:
3517 Remove resolve_possible_typedefs, it was unused.
3518 Allow multiple enum values of the sample value in an enum,
3519 since it's actually pretty common.
3520 Register enums so they can be resolved too.
3522 2008-08-16 Johan Dahlin <johan@gnome.org>
3524 * giscanner/girparser.py:
3525 Parse enumeration/bitfield.
3527 2008-08-16 Johan Dahlin <johan@gnome.org>
3529 * giscanner/girparser.py:
3532 2008-08-16 Johan Dahlin <johan@gnome.org>
3534 * giscanner/glibtransformer.py:
3535 Resolve type names for alias targets
3536 * giscanner/transformer.py:
3537 Skip FILE* parameters fow now
3539 2008-08-16 Johan Dahlin <johan@gnome.org>
3542 * gir/gobject-2.0.gir:
3545 * tests/scanner/Makefile.am:
3548 2008-08-15 Colin Walters <walters@verbum.org>
3550 * giscanner/glibtransformer.py: Explicitly construct
3551 new list, since we're deleting as we iterate.
3552 Don't delete all structures which end in Class; just
3553 ones which have a paired GObject.
3554 Fix printing of type warning.
3555 * giscanner/transformer.py: Make strip_namespace_object
3556 be the identity function if it doesn't match the
3559 2008-08-15 Colin Walters <walters@verbum.org>
3561 * giscanner/cgobject.py: Define yet more argument
3562 prototypes; fix prototype for g_type_fundamental.
3564 2008-08-14 Johan Dahlin <johan@gnome.org>
3566 * tests/Makefile.am:
3567 * tests/constant.gir:
3568 * tests/gobject.gir:
3570 * tools/generate.c (write_struct_info):
3571 Fix generator for constant/gobject/struct
3573 2008-08-14 Johan Dahlin <johan@gnome.org>
3575 * tests/Makefile.am:
3577 * tools/generate.c (write_enum_info):
3578 Fix generation of enum/bitfields
3580 2008-08-14 Johan Dahlin <johan@gnome.org>
3582 * girepository/girparser.c (start_field), (start_constant),
3583 (start_type), (end_element_handler):
3584 Clear up constant parsing
3589 * tools/generate.c (write_callable_info), (write_function_info),
3590 (write_callback_info), (write_constant_info), (write_signal_info),
3591 (write_vfunc_info), (write_property_info), (write_object_info),
3592 (write_interface_info):
3593 Constants/Signals are handled now.
3595 2008-08-14 Johan Dahlin <johan@gnome.org>
3597 * girepository/girparser.c (start_type):
3598 Don't require c:type.
3599 * tests/Makefile.am:
3602 Update, remove parts we don't support yet
3603 * tests/roundtrips.sh:
3605 * tools/generate.c (write_type_info), (write_field_info),
3606 (write_callable_info), (write_struct_info):
3607 Make it emit proper gir.
3609 2008-08-14 Johan Dahlin <johan@gnome.org>
3611 * giscanner/transformer.py:
3612 New internal function for adding a new node.
3614 2008-08-14 Johan Dahlin <johan@gnome.org>
3617 Define an internal _H_ variable so we skip parsing both
3618 i18n headers, only one is needed.
3620 Add the glib-2.0.gir too.
3621 * giscanner/glibast.py:
3622 Add gconstpointer as an alias for ANY
3623 * giscanner/transformer.py:
3624 Do not lower case enumeration names per se.
3625 Skip functions which has parameters called 'va_list'
3627 2008-08-14 Colin Walters <walters@verbum.org>
3629 * giscanner/transformer.py: Comment data structures.
3630 Also squash pointers in resolve_type_name to correspond
3631 with what we do for params.
3632 * giscanner/glibtransformer.py: Print warnings in more
3633 situations. Rework checks for method/constructor to
3634 look up in our GType database instead of just checking
3635 for *. Avoid generating <record> for GObject which
3636 duplicate the <class>.
3637 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3640 2008-08-14 Johan Dahlin <johan@gnome.org>
3642 * giscanner/girwriter.py:
3643 * giscanner/glibast.py:
3644 * giscanner/glibtransformer.py:
3645 * giscanner/transformer.py:
3647 * tests/Makefile.am:
3648 Add pyflakes.py and run it in make check.
3649 Update the source code to fix the errors reported by
3652 2008-08-14 Johan Dahlin <johan@gnome.org>
3655 * giscanner/girparser.py:
3656 * giscanner/glibast.py:
3657 * giscanner/glibtransformer.py:
3658 Refactor the parser a bit.
3659 Add parent type to interfaces and update callsites.
3661 2008-08-14 Johan Dahlin <johan@gnome.org>
3663 * giscanner/glibtransformer.py:
3664 * giscanner/utils.py:
3665 Refactor a bit, avoid isinstance and add a method
3666 for each type we parse.
3668 2008-08-14 Johan Dahlin <johan@gnome.org>
3671 * giscanner/girparser.py:
3672 * giscanner/glibtransformer.py:
3673 * tests/Makefile.am:
3674 Run pep8.py in make check, fix old errors.
3676 2008-08-13 Colin Walters <walters@verbum.org>
3678 * giscanner/girparser.py: Parse records.
3680 2008-08-13 Colin Walters <walters@verbum.org>
3682 * gir/Makefile.am: Install again.
3683 * gir/gobject-2.0.gir: Add some more bits.
3685 2008-08-13 Colin Walters <walters@verbum.org>
3687 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3688 * giscanner/girparser.py: Handle aliases.
3689 * giscanner/transformer.py: Record aliases. Make resolver
3690 functions public; we now call into these explicitly from
3691 glibtransformer. Handle resolving aliases.
3692 * giscanner/glibtransformer.py: Separate our internal namespace
3693 from included ones. Call up into transformer's resolver functions.
3695 2008-08-13 Johan Dahlin <johan@gnome.org>
3697 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3698 * girepository/girparser.c (start_class):
3699 * giscanner/glibtransformer.py:
3700 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3702 2008-08-13 Johan Dahlin <johan@gnome.org>
3704 * giscanner/cgobject.py:
3705 Register GInitiallyUnowned
3706 * giscanner/girwriter.py:
3707 * giscanner/glibtransformer.py:
3708 Special case GObject/GInitially owned as they are a bit special to use.
3710 2008-08-13 Colin Walters <walters@verbum.org>
3712 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3713 Object is in GObject namespace.
3715 2008-08-13 Colin Walters <walters@verbum.org>
3717 * giscanner/girparser.py: Fix processing of functions
3720 2008-08-13 Colin Walters <walters@verbum.org>
3722 * giscanner/girparser.py: Parse more than just <class.
3723 * giscanner/glibtransformer.py: Put aliases in a separate
3724 data structure since their name is not canonicall.
3725 * giscanner/transformer.py: Handle resolving type names
3728 2008-08-13 Johan Dahlin <johan@gnome.org>
3730 * tools/g-ir-scanner:
3731 Allow multiple libraries
3732 * giscanner/glibtransformer.py:
3733 Rename load_library to add_library, traverse over all libraries
3734 when trying to resolve a function
3736 2008-08-12 Colin Walters <walters@verbum.org>
3738 * giscanner/transformer.py: Record typedefs as <alias> elements.
3739 Also attempt to look up types in external namespaces.
3740 * giscanner/girwriter.py: Write them.
3741 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3742 checks. Resolve interface methods and properties.
3743 * tests/scanner/foo-object.h: Add a method with typedef.
3744 * tests/scanner/Foo-expected.gir: Update.
3745 * girepository/girnode.c: Debug tweaks.
3746 * girepository/girparser.c: Make a first pass through the XML where we
3747 record all the aliases. This lets us resolve them as we go through the
3749 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3750 from gir-repository.
3752 2008-08-12 Colin Walters <walters@verbum.org>
3754 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3755 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3757 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3759 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3761 2008-08-12 Colin Walters <walters@verbum.org>
3763 * giscanner/glibtransformer.py: Also transform object properties.
3765 2008-08-12 Colin Walters <walters@verbum.org>
3767 * giscanner/glibtransformer.py: Also transform callbacks
3768 and structure field types.
3769 * tests/scanner/Fooe-expected.gir: Update to expect correct
3770 names for callbacks and structs.
3772 2008-08-12 Colin Walters <walters@verbum.org>
3774 * girepository/girparser.c: Handle 'any'.
3775 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3776 Add test for void *.
3778 2008-08-12 Colin Walters <walters@verbum.org>
3780 * giscanner/glibtransformer.py: We need to do type
3781 resolution in a second pass after we've seen all the
3782 enums, records, etc.
3784 2008-08-12 Colin Walters <walters@verbum.org>
3786 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3787 Add enum return value.
3788 * giscanner/glibtransformer.py: Transform function return types
3791 2008-08-12 Colin Walters <walters@verbum.org>
3793 * tests/scanner/Makefile.am: Dep .gir files on scanner
3794 sources too. Also remove @ so we see scanner invocations.
3796 2008-08-12 Colin Walters <walters@verbum.org>
3798 * girepository/girparser.c, girepository/gtypelib.c,
3799 girepository/gtypelib.h, girepository/girnode.c:
3800 Remove usage of (GAPI-oriented) TypeTag in favor of
3801 GITypeTag from girepository.h.
3803 2008-08-10 Colin Walters <walters@verbum.org>
3805 * tests/roundtrips.sh: Use the correct tests.
3807 2008-08-10 Colin Walters <walters@verbum.org>
3809 * giscanner/cgobject.py: Declare/wrap a few more functions.
3810 Fix parameter types for g_object_new and g_type_fundamental.
3812 2008-08-10 Colin Walters <walters@verbum.org>
3814 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3815 us to declare types for both return value and parameters. The
3816 ctypes default of 'int' is bad because it hides 32/64 bit
3817 problems. Convert all existing functions to use it.
3819 2008-08-09 Johan Dahlin <johan@gnome.org>
3821 * giscanner/__init__.py:
3823 * giscanner/cgobject.py:
3824 * giscanner/gidlparser.py:
3825 * giscanner/gidlwriter.py:
3826 * giscanner/girparser.py:
3827 * giscanner/girwriter.py:
3828 * giscanner/glibast.py:
3829 * giscanner/glibtransformer.py:
3830 * giscanner/odict.py:
3831 * giscanner/sourcescanner.py:
3832 * giscanner/transformer.py:
3833 * giscanner/utils.py:
3834 * giscanner/xmlwriter.py:
3835 * tools/g-ir-scanner:
3839 2008-08-09 Johan Dahlin <johan@gnome.org>
3842 * relaxng/c-types.xml:
3843 * relaxng/g-types.xml:
3844 * relaxng/relaxng.rng:
3846 Remove outdated relaxng schemas.
3848 2008-08-09 Johan Dahlin <johan@gnome.org>
3851 Rename metadata to typelib in variable names,
3854 2008-08-09 Johan Dahlin <johan@gnome.org>
3858 Remove old C scanner, which got rewritten in python.
3860 2008-08-09 Johan Dahlin <johan@gnome.org>
3862 * girepository/Makefile.am:
3863 * tools/Makefile.am:
3864 * tools/girmodule.c:
3865 * tools/girmodule.h:
3868 * tools/girparser.c:
3869 * tools/girparser.h:
3870 * tools/girwriter.c:
3871 * tools/girwriter.h:
3872 Move shared *.[ch] files to girepository from tools
3874 2008-08-09 Johan Dahlin <johan@gnome.org>
3876 * tests/Makefile.am:
3879 * tests/constant.test:
3881 * tests/errors.test:
3882 * tests/function.test:
3883 * tests/gobject.test:
3884 * tests/interface.test:
3885 * tests/object.test:
3886 * tests/struct.test:
3891 Rename *.test to *.gir
3893 2008-08-09 Johan Dahlin <johan@gnome.org>
3896 * tests/Makefile.am:
3897 * tests/parser/Foo-expected.gir:
3898 * tests/parser/Makefile.am:
3899 * tests/parser/foo-object.h:
3900 * tests/parser/foo.c:
3901 * tests/parser/utility-expected.gir:
3902 * tests/parser/utility.c:
3903 * tests/parser/utility.h:
3904 * tests/scanner/Makefile.am:
3905 Rename tests/parser to test/scanner
3907 2008-08-08 Colin Walters <walters@verbum.org>
3909 * tests/roundtrips.sh: Use local .gir files again.
3911 2008-08-08 Colin Walters <walters@verbum.org>
3913 * tests/invoke/Makefile.am: .gir file depends on libtool
3916 2008-08-08 Colin Walters <walters@verbum.org>
3918 * tools/girnode.c: Pass through parent node so we can
3919 print the node whose child is NULL, if that occurs.
3921 2008-08-08 Johan Dahlin <johan@gnome.org>
3923 * tests/Makefile.am:
3924 Disable roundtrip tests which are not yet working
3925 * tests/invoke/testfns.gir:
3928 2008-08-08 Johan Dahlin <johan@gnome.org>
3930 * giscanner/girwriter.py:
3932 * giscanner/glibast.py:
3933 * giscanner/glibtransformer.py:
3934 Swap order of members, to keep it consistent with
3937 2008-08-08 Johan Dahlin <johan@gnome.org>
3939 * girepository/gtypelib.c (validate_header):
3940 * girepository/gtypelib.h:
3942 * giscanner/girwriter.py:
3943 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3944 (gi_source_symbol_unref):
3947 * tests/constant.test:
3949 * tests/errors.test:
3950 * tests/function.test:
3951 * tests/gobject.test:
3952 * tests/interface.test:
3953 * tests/invoke/Makefile.am:
3954 * tests/invoke/testfns.xml:
3955 * tests/object.test:
3956 * tests/parser/Makefile.am:
3957 * tests/roundtrips.sh:
3958 * tests/struct.test:
3963 * tools/Makefile.am:
3964 * tools/compiler.c (main):
3965 * tools/generate.c (write_callable_info), (write_function_info),
3967 * tools/gidlmodule.c:
3968 * tools/gidlmodule.h:
3971 * tools/gidlparser.c:
3972 * tools/gidlparser.h:
3973 * tools/gidlwriter.c:
3974 * tools/gidlwriter.h:
3975 * tools/scanner.c (create_node_from_gtype),
3976 (create_node_from_ctype), (g_igenerator_process_properties),
3977 (g_igenerator_process_signals), (g_igenerator_create_object),
3978 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3979 (g_igenerator_create_enum), (g_igenerator_create_flags),
3980 (g_igenerator_process_function_symbol),
3981 (g_igenerator_process_unregistered_struct_typedef),
3982 (g_igenerator_process_struct_typedef),
3983 (g_igenerator_process_union_typedef),
3984 (g_igenerator_process_enum_typedef),
3985 (g_igenerator_process_function_typedef),
3986 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3987 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3988 Merge in the gir-compiler branch.
3989 Thanks to Philip and Colin for their help.
3991 2008-07-26 Colin Walters <walters@verbum.org>
3993 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3994 and g-idl-generate to go along with how we're changing this
3995 module to be installed.
3996 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3998 2008-07-24 Colin Walters <walters@verbum.org>
4000 * girepository/girepository.c (g_irepository_register): Add
4001 environment variable G_IREPOSITORY_VERBOSE so we can print
4002 out what we're doing.
4003 * girepository/girepository.c (g_irepository_register_file):
4004 Add GError error message to g_debug call.
4006 2008-07-08 Jürg Billeter <j@bitron.ch>
4008 * giscanner/glibast.py:
4012 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
4014 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
4017 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
4020 * giscanner/girwriter.py:
4021 * giscanner/transformer.py:
4022 * tests/parser/Foo-expected.gir:
4023 * tests/parser/foo-object.h:
4024 * tests/parser/foo.c (foo_object_allow_none):
4025 Add support for gtk-doc annotations for allow-none.
4028 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
4031 * giscanner/girwriter.py:
4032 * giscanner/glibast.py:
4033 * giscanner/glibtransformer.py:
4034 * giscanner/transformer.py:
4035 * tests/parser/Foo-expected.gir:
4036 Start using abstract type instead of the raw C types.
4037 Register a bunch of glib types we care about.
4039 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
4044 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
4046 * girepository/girepository.c:
4047 * girepository/gtypelib.c:
4048 * girepository/ginfo.c:
4049 * girepository/ginvoke.c:
4050 * girepository/girepository.h:
4051 * girepository/gtypelib.h:
4052 * girepository/gmetadata.c:
4053 * girepository/Makefile.am:
4054 * girepository/gmetadata.h:
4056 * tools/gidlmodule.c:
4059 * tools/gidlmodule.h:
4060 * tools/gidlparser.c:
4062 Renamed GMetadata to GTypelib
4064 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
4066 * giscanner/xmlwriter.py:
4067 Improve line wrapping when > 79 charaters
4069 2008-06-05 Jürg Billeter <j@bitron.ch>
4072 * giscanner/girwriter.py:
4073 * giscanner/transformer.py:
4074 Use <type> element for field types
4075 * tests/parser/Foo-expected.gir:
4078 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
4080 * giscanner/glibtransformer.py:
4081 Fix a bug which prevented GdkEvent from being generated
4083 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
4085 * giscanner/Makefile.am:
4087 * giscanner/girwriter.py:
4088 * giscanner/glibast.py:
4089 * giscanner/glibtransformer.py:
4090 * giscanner/transformer.py:
4091 * giscanner/utils.py:
4092 * tests/parser/Foo-expected.gir:
4093 Improve enum member parsing and introspection
4095 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4097 * giscanner/scannerparser.y:
4098 * giscanner/sourcescanner.h:
4099 * giscanner/sourcescanner.py:
4100 Add a new source type enum for member.
4101 Use __repr__ for improved debugging
4102 * giscanner/girparser.py:
4104 * giscanner/transformer.py:
4105 Improve parsing of struct members.
4106 * tests/parser/foo-object.h:
4109 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4111 * giscanner/xmlwriter.py:
4112 Improve error reporting when trying to quote None.
4113 * giscanner/girparser.py:
4114 Do not print warnings when including more complete .gir files
4115 * giscanner/girwriter.py:
4116 Do not require a name for parameters, add a todo for singletons
4117 * giscanner/glibtransformer.py:
4118 Refactor the way structs are done, add a couple of hacks to allow
4120 * giscanner/transformer.py:
4121 Add enough hacks so cairo, atk and pango.gir can be parsed properly
4122 * gobject-introspection-1.0.pc.in:
4123 Export girdir, so we can access gobject-2.0.gir from outside
4125 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4127 * tools/g-ir-scanner:
4128 * tests/parser/Makefile.am:
4129 Update sys.path before running the parser so we don't have
4130 to setup PYTHONPATH ourselves.
4134 * girepository/Makefile.am:
4135 * giscanner/transformer.py:
4136 * gobject-introspection-1.0.pc.in:
4137 * gobject-introspection.pc.in:
4138 * tools/Makefile.am:
4140 Rename pkg-config name to gobject-introspection-1.0,
4141 Do not installed anything which is not using the gir format.
4142 Disable compililation the old C scanner, but still keep the source
4143 until all the remaning functionallity has been ported.
4145 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
4147 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
4148 a crash when symbol->indent is NULL.
4150 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
4151 a function to convert a CTYPE symbol to a string
4153 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
4156 * giscanner/girwriter.py:
4157 * giscanner/giscannermodule.c
4158 (pygi_source_scanner_append_filename),
4159 (pygi_source_scanner_parse_file):
4160 * giscanner/glibtransformer.py:
4161 * giscanner/sourcescanner.py:
4162 Revert back to using temporary files to send in headers.
4163 Allow Functions to be passed in as callbacks, add a couple
4164 of try/excepts missing features.
4165 We can now scan pango
4167 2008-05-08 Johan Dahlin <johan@gnome.org>
4169 * giscanner/glibtransformer.py:
4170 * giscanner/transformer.py:
4171 Move namespace stripping glibtransformer->transformer
4173 2008-05-08 Johan Dahlin <johan@gnome.org>
4176 * giscanner/girwriter.py:
4177 * giscanner/glibtransformer.py:
4178 * giscanner/transformer.py:
4179 * tools/g-ir-scanner:
4180 Introduce a namespace ast node
4182 2008-05-05 Johan Dahlin <johan@gnome.org>
4184 * giscanner/__init__.py:
4185 * giscanner/sourcescanner.py:
4186 * giscanner/transformer.py:
4187 Move sourcescanner symbols to the sourcescanner module, instead
4188 of in the global __init__ namespace.
4190 2008-05-03 Johan Dahlin <johan@gnome.org>
4192 * giscanner/glibtransformer.py:
4193 * tools/g-ir-scanner:
4194 Handle missing parameters better, allow - and + in .la dlname
4197 2008-05-03 Johan Dahlin <johan@gnome.org>
4199 * giscanner/__init__.py:
4201 * giscanner/girwriter.py:
4202 * giscanner/glibtransformer.py:
4203 * giscanner/transformer.py:
4204 Parse struct fields properly, improve debugging.
4206 2008-04-29 Johan Dahlin <johan@gnome.org>
4209 * giscanner/girwriter.py:
4210 * giscanner/transformer.py:
4211 * tests/parser/Foo-expected.gir:
4213 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
4215 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4218 * docs/g-ir-scanner.1:
4219 * metadata-annotations-proposal.txt:
4220 * metadata-format.txt:
4221 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
4223 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
4225 * giscanner/girwriter.py:
4226 * giscanner/glibtransformer.py:
4227 * giscanner/transformer.py:
4228 * giscanner/xmlwriter.py:
4229 * tests/parser/Foo-expected.gir:
4230 * tests/parser/foo-object.h:
4231 Write record/structs to gir file too. Add a couple of tests,
4232 fix an off by one error in xmlwriter.py.
4234 2008-04-28 Johan Dahlin <johan@gnome.org>
4236 * giscanner/xmlwriter.py: Calculate the line length properly,
4237 include the provided extra indentation in the calculation, really.
4239 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4242 * giscanner/glibast.py:
4243 * giscanner/glibtransformer.py:
4244 * giscanner/transformer.py:
4245 * tools/g-ir-scanner:
4246 Add a --strip-prefix and sort out confusion between names and symbols
4247 for functions and struct + derivaties.
4248 Refactor bootstrap of g-ir-scanner, so we can set options on
4249 Transformer() before parsing everything.
4251 2008-04-28 Johan Dahlin <johan@gnome.org>
4253 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
4254 when scanning girepository.h
4256 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
4257 a __GI_SCANNER__ when we run.
4259 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4262 * giscanner/girwriter.py:
4263 * giscanner/glibast.py:
4264 * giscanner/glibtransformer.py:
4265 * tests/parser/Foo-expected.gir:
4266 * tests/parser/utility-expected.gir:
4267 Rename most c:identifier to c:type. Add new ones to
4268 class/interface/enum/boxed.
4270 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
4273 * giscanner/girwriter.py:
4274 * giscanner/glibtransformer.py:
4275 * tests/parser/Foo-expected.gidl:
4276 * tests/parser/Makefile.am:
4277 Move c:identifier from return-value to subchild type,
4278 as per Jürgs suggestion
4280 2008-04-28 Johan Dahlin <johan@gnome.org>
4282 * giscanner/girwriter.py:
4283 * tests/parser/Foo-expected.gir:
4284 Write property.type as a child node.
4286 2008-04-27 Johan Dahlin <johan@gnome.org>
4291 * gidl/gobject-2.0.gidl:
4293 * gir/gobject-2.0.gir:
4294 * tests/parser/Makefile.am:
4295 Replace the GObject gidl with a GObject gir.
4297 2008-04-27 Johan Dahlin <johan@gnome.org>
4299 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
4302 * giscanner/xmlwriter.py:
4303 * tests/parser/Foo-expected.gir:
4304 Include indentation in line length calculation
4306 2008-04-27 Johan Dahlin <johan@gnome.org>
4308 * giscanner/girparser.py:
4309 Prettify NS parsing using elementtree.
4311 2008-04-27 Johan Dahlin <johan@gnome.org>
4314 * giscanner/Makefile.am:
4315 * giscanner/girparser.py:
4316 * giscanner/glibtransformer.py:
4317 * tests/parser/Foo-expected.gidl:
4318 * tests/parser/Foo-expected.gir:
4319 * tests/parser/Makefile.am:
4320 * tests/parser/utility-expected.gidl:
4321 * tests/parser/utility-expected.gir:
4322 * tools/g-ir-scanner:
4323 Switch over to GIR as the default format. Add a simple GIDL
4325 Update tests and fix simplify makefiles by depending
4326 on GNU make extensions.
4328 2008-04-27 Johan Dahlin <johan@gnome.org>
4330 * giscanner/xmlwriter.py:
4331 Wrap attributes for lines which are wider than 79 characters
4333 * giscanner/scannerlexer.l:
4334 Allow parenthesis in annotations
4337 * giscanner/gidlwriter.py:
4338 * giscanner/girwriter.py:
4339 * giscanner/glibtransformer.py:
4340 * giscanner/transformer.py:
4341 Add initial sequence support, including annotation.
4342 Refactor type handling a bit.
4344 2008-04-27 Johan Dahlin <johan@gnome.org>
4346 * tests/parser/Foo-expected.gidl:
4347 * tests/parser/foo-object.h:
4348 * tests/parser/foo.c (foo_object_class_init),
4349 (foo_object_get_strings), (foo_object_get_objects):
4350 Add two new functions to check sequence return values.
4351 Also fixes a compilation warning.
4353 2008-04-27 Johan Dahlin <johan@gnome.org>
4355 * giscanner/giscannermodule.c (]): Cast the getter, avoids
4356 a compilation warning.
4358 * tools/Makefile.am (g_ir_scanner_SOURCES):
4359 g-ir-scanner has no sources.
4361 2008-04-25 Johan Dahlin <johan@gnome.org>
4363 * giscanner/Makefile.am:
4365 * giscanner/gidlparser.py:
4366 * giscanner/gidlwriter.py:
4367 * giscanner/girwriter.py:
4368 * giscanner/glibast.py:
4369 * giscanner/glibtransformer.py:
4370 * giscanner/transformer.py:
4371 Split out nodes to ast.py and glibast.py
4373 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4375 * giscanner/Makefile.am:
4376 * giscanner/gidlparser.py:
4377 * giscanner/gidlwriter.py:
4378 * giscanner/girwriter.py:
4379 * giscanner/glibtransformer.py:
4380 * giscanner/gobjecttreebuilder.py:
4381 * giscanner/transformer.py:
4382 * giscanner/treebuilder.py:
4383 * tools/g-ir-scanner:
4384 Rename treebuilder to transformer and
4385 gobjectreebuilder to glibtransformer.
4387 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4389 * giscanner/Makefile.am:
4390 * giscanner/__init__.py:
4391 * giscanner/cgobject.py:
4392 * giscanner/gidlparser.py:
4393 * giscanner/gidlwriter.py:
4394 * giscanner/girwriter.py:
4395 * giscanner/gobjecttreebuilder.py:
4396 * giscanner/odict.py:
4397 * giscanner/sourcescanner.py:
4398 * giscanner/treebuilder.py:
4399 * giscanner/xmlwriter.py:
4400 * tools/Makefile.am:
4401 * tools/g-ir-scanner:
4402 Add LGPLv2 license header and install all python files
4404 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4407 * giscanner/gidlwriter.py:
4408 * giscanner/giscannermodule.c (pygi_source_directive_new),
4409 (directive_get_options), (pygi_source_symbol_new),
4410 (symbol_get_base_type), (pygi_source_type_new),
4411 (type_get_base_type), (type_get_child_list),
4412 (pygi_source_scanner_get_symbols),
4413 (pygi_source_scanner_get_directives):
4414 * giscanner/gobjecttreebuilder.py:
4415 * giscanner/sourcescanner.py:
4416 * giscanner/treebuilder.py:
4417 * tests/parser/foo-object.h:
4418 Add support for virtual methods.
4419 Pair struct FooClass with struct Foo.
4420 Clean up the SourceScanner bindings a bit.
4421 Add a testcase for virtual methods.
4423 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
4425 * giscanner/cgobject.py:
4426 * giscanner/gidlwriter.py:
4427 * giscanner/gobjecttreebuilder.py:
4428 Add support for signals
4430 * tests/parser/foo.c (foo_object_class_init):
4431 * Foo-expected.gidl:
4432 Add a signal and update the expected output.
4434 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
4436 * giscanner/gidlwriter.py:
4437 * giscanner/girwriter.py:
4438 * giscanner/giscannermodule.c (directive_get_name),
4439 (directive_get_value), (directive_get_options),
4440 (symbol_get_directives), (symbol_set_directives),
4441 (pygi_source_scanner_parse_file),
4442 (pygi_source_scanner_lex_filename),
4443 (pygi_source_scanner_get_directives), (init_giscanner):
4444 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
4445 * giscanner/sourcescanner.h:
4446 * giscanner/sourcescanner.py:
4447 * giscanner/treebuilder.py:
4448 * tools/g-ir-scanner:
4449 Add support for source/header annotations.
4451 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4453 * giscanner/gidlwriter.py:
4454 * giscanner/girwriter.py:
4455 * giscanner/gobjecttreebuilder.py:
4456 * giscanner/treebuilder.py:
4457 Add support for Callbacks
4459 2008-04-22 Havoc Pennington <hp@pobox.com>
4461 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
4462 not in metadata->module, look for it in the global module, in case
4463 some other object or the app itself provides the symbol.
4465 2008-04-22 Havoc Pennington <hp@pobox.com>
4467 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
4468 dlopening a library that is already in the main app, by checking
4469 whether one of the lib's symbols is already loaded.
4471 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4473 * tests/parser/Foo-expected.gidl:
4474 * tests/parser/foo-object.h:
4477 2008-04-22 Havoc Pennington <hp@pobox.com>
4479 * girepository/ginfo.c (g_interface_info_find_method):
4480 Use interface_blob_size not object_blob_size to compute offset.
4482 2008-04-22 Havoc Pennington <hp@pobox.com>
4484 * girepository/gmetadata.c (_g_metadata_init): remove
4485 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
4486 (Glade and Clutter for example) rely on being loaded globally.
4488 2008-04-22 Havoc Pennington <hp@pobox.com>
4490 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
4491 function to get the GType given a RegisteredTypeInfo
4493 2008-04-22 Johan Dahlin <johan@gnome.org>
4495 * COPYING: Add a LGPL license, to prevent automake to
4496 put in a copy of GPL here. Pointed out by Havoc.
4498 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
4499 (g_type_info_is_pointer), (g_type_info_get_tag),
4500 (g_type_info_get_param_type), (g_type_info_get_interface),
4501 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
4502 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4503 (g_error_domain_info_get_codes), (g_enum_info_get_value),
4504 (g_object_info_get_interface), (g_object_info_get_field),
4505 (g_interface_info_get_prerequisite),
4506 (g_signal_info_get_class_closure), (g_constant_info_get_value):
4507 * girepository/ginvoke.c (get_ffi_type):
4508 * girepository/girepository.h:
4509 * girepository/gmetadata.c (g_metadata_get_dir_entry),
4510 (g_metadata_check_sanity), (validate_header),
4511 (validate_array_type_blob), (validate_iface_type_blob),
4512 (validate_param_type_blob), (validate_error_type_blob),
4513 (validate_type_blob), (validate_constant_blob),
4514 (validate_struct_blob), (validate_enum_blob):
4515 * girepository/gmetadata.h:
4516 * tests/Makefile.am:
4517 * tests/invoke/Makefile.am:
4518 * tests/invoke/invoke.c (main):
4519 * tests/roundtrips.sh:
4520 * tools/Makefile.am:
4521 * tools/compiler.c (format_output), (write_out_metadata), (main):
4522 * tools/generate.c (write_type_name), (write_type_info),
4523 (write_constant_value), (write_enum_info), (load_metadata), (main):
4524 * tools/gidlcompilercontext.c:
4525 * tools/gidlcompilercontext.h:
4526 * tools/gidlcompilerentrynode.c:
4527 * tools/gidlcompilerentrynode.h:
4528 * tools/gidlcompilertypenode.c:
4529 * tools/gidlcompilertypenode.h:
4530 * tools/gidlmodule.c (g_idl_module_build_metadata):
4531 * tools/gidlmodule.h:
4532 * tools/gidlnode.c (init_stats), (dump_stats),
4533 (g_idl_node_get_size), (g_idl_node_get_full_size),
4534 (g_idl_node_cmp), (g_idl_node_can_have_member),
4535 (g_idl_node_add_member), (g_idl_node_param_direction_string),
4536 (parse_int_value), (parse_uint_value), (parse_float_value),
4537 (parse_boolean_value), (find_entry_node), (find_entry),
4538 (serialize_type), (g_idl_node_build_metadata), (write_string):
4540 * tools/gidlparser.c (parse_type_internal):
4541 * tools/quote-file.sh:
4542 Revert revisions 157,149-148,136-129 and 120.
4543 Move back to using g-idl-generate to generate the metadata and
4544 avoids dependency on a c compiler.
4546 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4548 * giscanner/girwriter.py:
4549 * tools/g-ir-scanner:
4550 Add an initial GIR writer and a --format option to g-ir-scanner
4552 2008-04-21 Johan Dahlin <johan@gnome.org>
4554 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4555 gobject-2.0 and raise ImportError if not found.
4557 * giscanner/gidlparser.py:
4558 * giscanner/gidlwriter.py:
4559 * giscanner/gobjecttreebuilder.py:
4560 * tools/g-ir-scanner:
4561 Add a --include argument to include types from other idls.
4562 Add a minimalistic GIDL parser (just objects for now)
4563 Implement resolving of external type references and use it to
4564 resolve parent types, argument types and return types.
4566 2008-04-21 Johan Dahlin <johan@gnome.org>
4568 * giscanner/gidlwriter.py:
4569 * giscanner/gobjecttreebuilder.py:
4570 * giscanner/treebuilder.py:
4571 Add support for properties.
4572 Refactor Class/Interface support a bit, to share more code and
4573 always initialize their method attribute to an empty list.
4575 2008-04-21 Johan Dahlin <johan@gnome.org>
4577 * giscanner/cgobject.py:
4578 Add a workaround for a glib bug interface introspection bug
4579 (object_interface_list_properties, object_class_list_properties):
4580 Cast the return value to GParamSpec.
4582 * tests/parser/Foo-expected.gidl: Update
4583 * tests/parser/foo.c: Add a string property
4585 * giscanner/gobjecttreebuilder.py:
4586 After stripping namespaces, remove the original
4587 item to avoid duplication (GtkButton struct and Button object)
4589 2008-04-21 Johan Dahlin <johan@gnome.org>
4591 * giscanner/gobjecttreebuilder.py:
4592 * giscanner/treebuilder.py:
4593 Strip namespaces before objects, so we'll export
4594 GtkButton as Button in the gtk namespace
4596 2008-04-21 Johan Dahlin <johan@gnome.org>
4598 * giscanner/gidlwriter.py:
4599 * giscanner/gobjecttreebuilder.py:
4600 * giscanner/treebuilder.py:
4601 Add constructors for object/boxed types.
4603 2008-04-21 Johan Dahlin <johan@gnome.org>
4605 * giscanner/gidlwriter.py:
4606 * giscanner/gobjecttreebuilder.py:
4607 Add support for boxed types
4609 2008-04-21 Johan Dahlin <johan@gnome.org>
4611 * giscanner/giscannermodule.c: Mark structures as const,
4612 wrap SourceType.const_string.
4614 * tests/parser/foo-object.h: Add a couple of constants.
4616 * giscanner/gidlwriter.py:
4617 * giscanner/gobjecttreebuilder.py:
4618 * giscanner/treebuilder.py:
4619 Add basic support for interfaces
4621 * tools/g-ir-scanner:
4622 Add -o/--output for writing to a file
4624 2008-04-21 Havoc Pennington <hp@redhat.com>
4626 * TODO: add some C API wishlist items I could think of quickly
4628 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4630 * giscanner/gidlwriter.py:
4631 * giscanner/xmlwriter.py:
4632 Add a simple api for writing tags which can be used
4633 with the new 'with statement' in python 2.5
4635 2008-04-21 Johan Dahlin <johan@gnome.org>
4637 * giscanner/gobjecttreebuilder.py:
4638 Strip namespace and object prefix from method names.
4640 2008-04-21 Johan Dahlin <johan@gnome.org>
4642 * tools/g-ir-scanner (main): Add --pkg option to pass in
4643 pkg-config modules to get cflags from.
4645 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4646 Avoid duplication, reuse function writer for methods.
4648 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4650 * giscanner/gidlwriter.py:
4651 * giscanner/gobjecttreebuilder.py:
4652 * giscanner/treebuilder.py:
4653 * tools/g-ir-scanner:
4654 Resolve libtool .la files.
4655 Strip name spaces for methods.
4656 Add function symbols
4658 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4660 * giscanner/cgobject.py:
4661 * giscanner/gidlwriter.py:
4662 * giscanner/gobjecttreebuilder.py:
4663 * giscanner/treebuilder.py:
4664 Add support for classes and methods
4666 2008-04-20 Johan Dahlin <johan@gnome.org>
4668 * giscanner/gidlwriter.py:
4669 * giscanner/gobjecttreebuilder.py:
4670 * giscanner/odict.py:
4671 Avoid conflicts, keep the output ordered similar to
4672 the order of the input.
4673 Add a simple ordered dictionary implemenation
4675 2008-04-19 Johan Dahlin <johan@gnome.org>
4677 * giscanner/cgobject.py:
4678 * giscanner/gidlwriter.py:
4679 * giscanner/gobjecttreebuilder.py:
4680 * tools/g-ir-scanner:
4681 Start introspecting get-type functions.
4682 Implement support for GLib/GFlags GTypes.
4683 Add a ctype based GObject binding.
4685 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4687 * giscanner/gidlwriter.py:
4688 * giscanner/xmlwriter.py:
4689 * tools/g-ir-scanner:
4690 Add a simplistic gidl writer, which can't do too much.
4692 2008-04-18 Johan Dahlin <johan@gnome.org>
4694 * giscanner/sourcescanner.py:
4695 * giscanner/treebuilder.py:
4696 * tools/g-ir-scanner:
4697 split tree building and source scanning interface to separate files.
4699 2008-04-18 Johan Dahlin <johan@gnome.org>
4701 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4703 - Add support for struct/parameter/return, start parsing of ctypes
4705 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4708 2008-03-31 Johan Dahlin <johan@gnome.org>
4710 * tools/g-ir-scanner:
4711 Start to build abstract syntax node of scanned sources.
4712 Add support for cpp options.
4714 2008-03-27 Johan Dahlin <johan@gnome.org>
4716 * giscanner/giscannermodule.c:
4717 * giscanner/scannerlexer.l:
4718 * giscanner/sourcescanner.c:
4719 * tools/g-ir-scanner:
4721 Add simple pre-processor using subprocess and a PIPE.
4722 Change the parse_file apis to accept a file descriptor.
4724 2008-03-25 Johan Dahlin <johan@gnome.org>
4726 * giscanner/__init__.py:
4727 * tools/g-ir-scanner:
4728 Fix a typo and add an example python test program.
4730 2008-03-25 Johan Dahlin <johan@gnome.org>
4732 * giscanner/__init__.py:
4733 * giscanner/giscannermodule.c:
4734 * giscanner/sourcescanner.c:
4735 * giscanner/sourcescanner.h:
4736 Add constants and wrap a few more SymbolType fields
4738 2008-03-25 Johan Dahlin <johan@gnome.org>
4742 * giscanner/__init__.py:
4743 * giscanner/giscannermodule.c:
4744 * giscanner/Makefile.am:
4746 Add initial python bindings for the scanner and
4747 depend on python 2.5.
4749 2008-03-25 Johan Dahlin <johan@gnome.org>
4753 * giscanner/Makefile.am:
4754 * giscanner/sourcescanner.c:
4755 * giscanner/sourcescanner.h:
4756 * tools/Makefile.am:
4757 * tools/grealpath.h:
4758 * tools/sourcescanner.c:
4759 * tools/sourcescanner.h:
4761 Move the scanner to a separate library.
4763 2008-03-23 Johan Dahlin <johan@gnome.org>
4765 * tools/Makefile.am:
4768 * tools/scannerlexer.l:
4769 * tools/scannerparser.y:
4770 * tools/sourcescanner.c:
4771 * tools/sourcescanner.h:
4772 Split out the source scanner from the generator.
4773 Rename the symbols used in the scanner to use the gi_ prefix.
4774 This should make it possible to use the raw C parser from
4777 2008-03-23 Johan Dahlin <johan@gnome.org>
4779 * tests/parser/Makefile.am (utility.gidl):
4780 * tests/parser/utility-expected.gidl:
4781 Pass in the gobject.gidl since we're defining a GObject.
4783 2008-03-12 Johan Dahlin <johan@gnome.org>
4785 * relaxng/relaxng.rng:
4786 Add a releaxng in relaxng we can use to validate the relaxngs
4789 2008-03-12 Jürg Billeter <j@bitron.ch>
4791 * tools/scanner.c: (g_igenerator_new):
4792 * tools/scannerparser.y:
4793 Fix compiler warnings.
4795 2008-03-12 Jürg Billeter <j@bitron.ch>
4799 * tools/scannerparser.y:
4800 Start fixing memory management in g-idl-scanner.
4802 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4804 * tools/gidlcompilercontext.c: (write_compiled):
4805 Fix critical warning when no shlib passed to g-idl-compiler.
4807 2008-03-12 Johan Dahlin <johan@gnome.org>
4809 * tests/parser/utility-expected.gidl:
4810 * tests/parser/utility.h:
4811 Add a get_type-function, so the scanner actually
4812 parses it as an object.
4814 2008-03-12 Johan Dahlin <johan@gnome.org>
4816 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4819 * tests/parser/Foo-expected.gidl:
4820 * tests/parser/Makefile.am:
4821 * tests/parser/foo-object.h:
4822 * tests/parser/foo.c:
4823 * tests/parser/utility-expected.gidl:
4824 * tests/parser/utility.c:
4825 * tests/parser/utility.h:
4827 Add a new gidl test. 'utility.gidl', which is used to be able
4828 to test external type references. Add a reference to UtilityObject*
4831 2008-03-11 Johan Dahlin <johan@gnome.org>
4835 Remove most global variables
4837 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4839 * tools/scannerlexer.l:
4841 * tests/parser/Foo-expected.gidl:
4842 * tests/parser/foo.c:
4843 * tests/parser/Makefile.am:
4844 * tests/parser/foo-object.h:
4846 Added a few extra tests. Which resulted in finding a few
4847 bugs. Which resulted in me fixing those bugs
4849 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4851 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4852 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4853 Add some comments for strings into generated output for
4856 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4858 * tools/gidlcompilercontext.c: (write_compiled):
4859 Write out the shlibs variable before writing out the strings
4860 length. Fixes compiler warning when using '-l' flag with
4863 2008-03-11 Johan Dahlin <johan@gnome.org>
4865 * tests/parser/Foo-expected.gidl:
4866 * tests/parser/foo-object.h:
4869 * tools/scannerlexer.l:
4870 Add support for parsing return arguments. Add support for
4871 caller-owns return types.
4872 Patch by Philip Van Hoof.
4874 * tools/scannerparser.y:
4875 Remove parsing of the @deprecated syntax used in headers.
4876 We will support gtk-doc deprecation in the future instead.
4878 2008-03-11 Johan Dahlin <johan@gnome.org>
4880 * tools/compiler.c (main): Coding style fixes
4882 2008-03-10 Johan Dahlin <johan@gnome.org>
4885 Add GCOV_LIBS to GILIBS
4887 2008-03-10 Johan Dahlin <johan@gnome.org>
4889 * tests/parser/Foo-expected.gidl:
4890 * tests/parser/foo.c:
4891 Rename null-ok to direction=out
4893 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4895 reviewed and extensively tested by Johan
4897 * tests/parser/Foo-expected.gidl:
4898 * tests/parser/foo-object.h:
4899 * tests/parser/foo.c:
4902 * tools/gidlwriter.c:
4905 * tools/scannerlexer.l:
4906 * tools/scannerparser.y:
4908 Add support for scanning for gtk-doc comments inside
4909 C source files. Add tests
4911 2008-03-10 Johan Dahlin <johan@gnome.org>
4913 * tests/parser/Makefile.am:
4914 * tests/parser/foo.c:
4917 * tools/scannerparser.y:
4918 Add an api to lex filenames.
4919 Lex all source .c files passed in on the command line.
4920 Scan sources in a test and a couple of private structures
4921 which should not be included in the generated gidl
4923 2008-03-10 Johan Dahlin <johan@gnome.org>
4925 * tests/invoke/Makefile.am: Make the generated metadata
4926 depend on the g-idl-compiler
4928 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4930 * tools/gidlmodule.c
4931 * tools/gidlmodule.h
4934 Remove the old g-idl-compiler code.
4937 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4939 * tools/quote-file.sh
4942 Move to using the 'C' struct compiler code.
4944 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4946 * girepository/ginfo.c
4948 Change the way that external references with no namespace
4949 are dealt with. External references with no namespace
4950 are placed into the XML as-if they are a local reference.
4951 This is temporary, but helps with roundtrip tests.
4953 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4955 * girepository/ginfo.c
4956 Add the ability to get the value of a constant of
4957 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4958 is provided as a string.
4960 This would deal properly with:
4961 typedef char* random;
4962 const random = "A string";
4964 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4966 * girepository/ginfo.c
4967 * girepository/girepository.h
4969 Add a function to check if an enum is registered or not.
4970 Previously anything testing this relied on the g-type
4971 string offset having a value of 0.
4973 * girepository/gmetadata.c
4974 * girepository/gmetadata.h
4976 Remove unneccesary or erroneous checks. There were two
4977 metadata validation checks which made sure that the blob
4978 sizes were the same as some magic numbers compiled into the code.
4979 This is wrong as it breaks any forwards compatibility that may
4982 Checks were also present that made sure that unregistered type
4983 blobs had a value of 0 in the g-type offset field. This is
4984 unneccessary. If a type blob is unregistered then any value
4985 in its g-type field is simply invalid.
4987 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4989 * girepository/ginfo.c
4990 * girepository/gmetadata.c
4991 * girepository/gmetadata.h
4993 Change the metadata format to have a standard header
4994 for all the type blobs. Merge the SimpleTypeBlob
4995 and InterfaceTypeBlob into a union. A union of these
4996 two blobs existed previously but was not explicit
4997 in the metadata format.
4999 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
5001 * tools/gidlcompilercontext.c
5002 * tools/gidlcompilercontext.h
5003 * tools/gidlcompilerentrynode.c
5004 * tools/gidlcompilerentrynode.h
5005 * tools/gidlcompilertypenode.c
5006 * tools/gidlcompilertypenode.h
5008 Add code to compile a tree of GIdlNodes to
5009 a 'C' struct representing the metadata.
5010 This is to aid cross-compiling. Previously
5011 the g-idl-compiler created a binary blob with
5012 data written in the byte order and alignment
5013 of the tool rather than the intended target.
5015 Cleaned up and improved by Johan and Robert :-)
5017 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
5019 * girepository/ginvoke.c
5020 * girepository/girepository.h
5021 * girepository/gmetadata.c
5022 * girepository/gmetadata.h
5024 * tools/gidlparser.c
5025 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
5026 to avoid confusion with the interface blob.
5029 * tools/gidlparser.c
5030 Remove magic numbers and replace with type-tag
5031 enumeration symbols.
5033 * girepository/gmetadata.c
5034 Add validate declaration.
5036 2008-03-10 Jürg Billeter <j@bitron.ch>
5038 * tools/gidlparser.c: (parse_type_internal):
5039 * tools/scannerlexer.l:
5040 * tools/scannerparser.y:
5041 Support C99 _Bool type in scanner.
5043 2008-03-10 Jürg Billeter <j@bitron.ch>
5045 * tests/parser/Foo-expected.gidl:
5046 * tests/parser/foo-object.h:
5047 * tests/parser/foo.c: (foo_enum_method):
5048 * tools/scanner.c: (g_igenerator_process_function_symbol):
5049 Don't skip functions that are defined in the namespace of a type
5050 that doesn't support methods, as for example enums.
5052 2008-03-10 Johan Dahlin <johan@gnome.org>
5054 * gidl.dtd: Remove, we're using relaxng for now
5056 * tests/parser/Foo-expected.gidl:
5057 * tests/parser/foo-object.h:
5058 * tests/parser/foo.c:
5059 Rename the enum/flags get_type functions to include the whole type.
5061 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
5063 * tools/gidlwriter.c (enum_generate): added "type-name",
5064 "get-type" and "deprecated" missing arguments.
5065 * tests/parser/Foo-expected.gidl:
5066 * tests/parser/foo-object.h: test enum type, and no type.
5068 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
5071 Consistent checks, add missing 'test'
5073 2008-03-05 Havoc Pennington <hp@redhat.com>
5075 * configure.ac: Take advantage of a libffi.pc if one exists, as it
5076 does on Fedora 8. Make libffi a hard requirement, since it was in
5077 practice anyway (was not really conditional in the code or
5078 makefile, only in configure).
5080 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
5082 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
5083 reviewed by: Johan Dahlin <johan@gnome.org>
5085 * tests/Makefile.am:
5086 * tests/roundtrips.sh:
5087 Modify the roundtrips test so that they do not use the
5088 --raw option of the gidl compiler but instead compile a
5089 shared library to use with g_module.
5091 * tests/invoke/Makefile.am:
5092 * tests/invoke/invoke.c:
5093 Modify the invoke tests to build a shared library rather
5094 than use the --raw option.
5096 * tests/invoke/invoke-namespace-find.sh: Removed:
5097 Noone knows why this was here, so removed.
5099 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
5101 * tools/scanner.c: (g_igenerator_process_function_symbol):
5102 Move g_idl_node_can_have_member test later, as it broke spotting
5103 get_type's for nodes that can't have members.
5105 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5108 * tools/gidlnode.c: (g_idl_node_can_have_member):
5109 Add g_idl_node_can_have_member.
5111 * tools/scanner.c: (g_igenerator_process_function_symbol):
5112 Use g_idl_node_can_have_member to test if we should add a function
5113 as a member of the type node.
5115 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5117 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
5119 * tests/parser/Makefile.am:
5120 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
5122 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5124 * tools/scanner.c: (main):
5125 Ignore -pthread when passed to g-idl-scanner.
5127 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5129 * tools/grealpath.h: Added:
5130 * tools/scanner.c: (main):
5131 * tools/scannerlexer.l:
5132 * tools/Makefile.am:
5133 Always use absolute paths with symbolic links resolved when
5134 comparing filenames.
5136 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
5138 * gobject-introspection.pc.in:
5139 Provide variables for g-idl-parser, scanner and compiler in the
5142 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
5145 * girepository/Makefile.am:
5146 * tools/Makefile.am:
5147 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
5149 2008-02-10 Johan Dahlin <johan@gnome.org>
5151 * tests/parser/Foo-expected.gidl:
5152 * tests/parser/foo-object.h:
5153 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
5154 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
5157 2008-02-10 Johan Dahlin <johan@gnome.org>
5159 * tests/parser/Foo-expected.gidl:
5160 * tests/parser/foo-object.h:
5161 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
5162 Add enum and flags test.
5164 2008-02-10 Johan Dahlin <johan@gnome.org>
5168 * girepository/Makefile.am:
5169 Make 'make distcheck' work again.
5171 2008-02-10 Johan Dahlin <johan@gnome.org>
5173 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
5176 * tests/parser/Makefile.am: Only create Foo.gidl when running make
5177 check, eg exclude it from BUILT_SOURCES.
5179 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5184 * girepository/Makefile.am:
5185 * m4/Makefile.am: Added:
5186 * m4/as-compiler-flag.m4: Added:
5187 * m4/gcov.m4: Added:
5188 * tools/Makefile.am:
5189 Add ability to generate a coverage report.
5190 Adds configure option --enable-gcov and make rule 'check-coverage'.
5192 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
5196 * gidl/Makefile.am: Added:
5197 * girepository/Makefile.am: Added:
5198 * src/Makefile.am: Renamed to tools/Makefile.am:
5199 * src/compiler.c: Renamed to tools/compiler.c:
5200 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
5201 * src/generate.c: Renamed to tools/generate.c:
5202 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
5203 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
5204 * src/gidlnode.c: Renamed to tools/gidlnode.c:
5205 * src/gidlnode.h: Renamed to tools/gidlnode.h:
5206 * src/gidlparser.c: Renamed to tools/gidlparser.c:
5207 * src/gidlparser.h: Renamed to tools/gidlparser.h:
5208 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
5209 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
5210 * src/ginfo.c: Renamed to girepository/ginfo.c:
5211 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
5212 * src/girepository.c: Renamed to girepository/girepository.c:
5213 * src/girepository.h: Renamed to girepository/girepository.h:
5214 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
5215 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
5216 * src/scanner.c: Renamed to tools/scanner.c:
5217 * src/scanner.h: Renamed to tools/scanner.h:
5218 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
5219 * src/scannerparser.y: Renamed to tools/scannerparser.y:
5220 * tests/invoke/Makefile.am:
5221 Split src/ into girepository/ and tools/
5225 * girepository/Makefile.am:
5226 * tests/Makefile.am:
5227 * tests/invoke/Makefile.am:
5228 * tests/parser/Makefile.am:
5229 * tests/roundtrips.sh:
5230 * tools/Makefile.am:
5231 Make distcheck work.
5233 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
5235 * tests/invoke/invoke.c: (main):
5236 * tests/invoke/testfns.c: (test6), (test7):
5237 * tests/invoke/testfns.xml:
5238 Add tests for invokation with a GList argument.
5239 Also tests caller-owns return values.
5241 2008-02-04 Rob Taylor <robtaylor@floopily.org>
5244 Add some documentation for GICallableInfo
5246 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
5249 Correct syntax errors in the DTD file.
5251 * relaxng/c-types.xml:
5252 * relaxng/g-types.xml:
5254 Add a RelaxNG specification for the GObject Introspection XML data.
5255 The Specification has validated all of the test files.
5257 2008-01-25 Rob Taylor <robtaylor@floopily.org>
5259 * tests/roundtrips.sh:
5260 * tests/struct.test:
5261 Add roundtrip tests for structs.
5263 2008-01-11 Johan Dahlin <johan@gnome.org>
5265 * src/scanner.c (g_igenerator_process_function_symbol):
5266 Refactor out g_idle_node_add_member.
5267 (create_node_from_gtype, create_node_from_ctype):
5268 Use case instead of if...else
5269 (get_type_from_type_id):
5270 Rename to create_node_from_gtype
5271 (get_type_from_ctype):
5272 Rename to create_node_from_ctype
5274 Rename ginode -> node, gitype -> type, gifunc -> func.
5276 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
5277 Two new functions, refactor out of scanner.c
5279 * src/scanner.c: (g_igenerator_process_function_symbol):
5280 * src/scannerlexer.l:
5281 Do not save the content of the deprecated variable, only
5284 2008-01-11 Johan Dahlin <johan@gnome.org>
5286 * tests/parser/foo-object.h: Add a couple of comment parser tests.
5288 2008-01-11 Jürg Billeter <j@bitron.ch>
5290 * src/scannerlexer.l:
5291 Fix GTK-Doc parsing.
5293 2008-01-11 Jürg Billeter <j@bitron.ch>
5295 * src/scannerlexer.l:
5296 Fix GTK-Doc parsing.
5298 2008-01-11 Jürg Billeter <j@bitron.ch>
5300 * src/scanner.c: (lookup_symbol):
5301 Return unresolved name if we find unknown symbol.
5303 2008-01-11 Jürg Billeter <j@bitron.ch>
5305 * src/scanner.c: (g_igenerator_generate):
5306 Initialize GObject to fix scanning interface properties.
5308 * tests/parser/Foo-expected.gidl:
5309 * tests/parser/foo-object.h:
5310 * tests/parser/foo.c: (foo_interface_get_type):
5311 Test interfaces with GObject prerequisite.
5313 * tests/parser/Makefile.am:
5314 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
5316 2007-12-27 Johan Dahlin <johan@gnome.org>
5318 * src/scannerlexer.l:
5319 Parse gtk-doc comments.
5321 * src/gidlwriter.c: (function_generate):
5322 Reorganize, avoid duplication and add support for
5323 writing deprecated functions.
5325 * src/scannerparser.y:
5327 Add new structure CDirective and functions to create/free them.
5329 * src/scanner.c: (g_igenerator_process_function_symbol),
5330 (g_igenerator_process_unregistered_struct_typedef),
5331 (g_igenerator_process_struct_typedef),
5332 (g_igenerator_process_union_typedef),
5333 (g_igenerator_process_enum_typedef),
5334 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
5335 (g_igenerator_start_preprocessor):
5336 Parse @deprecated directive for functions.
5337 Remove some more C99isms.
5338 Send in -C to cpp to avoid stripping comments.
5340 * tests/parser/foo-object.h:
5341 * tests/parser/Foo-expected.gidl:
5342 Add deprecated directive
5344 2007-12-27 Johan Dahlin <johan@gnome.org>
5346 * src/scannerlexer.l (intsuffix): Add emacs mode line and
5347 escape ' and " so it looks more like C.
5350 Unlink temporary file used.
5352 2007-12-27 Johan Dahlin <johan@gnome.org>
5354 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
5355 (g_igenerator_start_preprocessor), (main):
5357 * src/scannerparser.y:
5358 Plug a couple of simple memory leaks.
5360 2007-12-27 Johan Dahlin <johan@gnome.org>
5362 * src/scanner.c: (g_igenerator_parse_macros),
5363 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
5366 * src/scannerparser.y:
5367 * tests/parser/Makefile.am:
5369 Improve error reporting, return when the preprocessor fails.
5370 Add a verbose parameter, to aid debugging.
5371 Revert to using a temporary file to communicate between the
5372 preprocessor and the parser, because we need to wait for
5373 the exit code from the pre-processor before starting to parse.
5375 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
5377 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
5378 cparser.y to scannerparser.y
5380 2007-12-11 Johan Dahlin <johan@gnome.org>
5384 * src/scanner.c: (g_igenerator_new):
5386 Get rid of the global the_generator variable.
5388 2007-12-10 Johan Dahlin <johan@gnome.org>
5390 * src/scanner.c (main): Add an output option,
5391 add checks for required parameters
5394 set BUILD_SOURCES and CLEANFILES properly
5396 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
5397 (g_writer_write_indent), (g_writer_write_unindent),
5398 (field_generate), (value_generate), (constant_generate),
5399 (property_generate), (function_generate), (vfunc_generate),
5400 (signal_generate), (interface_generate), (struct_generate),
5401 (union_generate), (boxed_generate), (enum_generate),
5402 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
5404 * src/scanner.c: (g_igenerator_generate):
5406 * src/scannerwriter.c:
5408 Refactor scannerwriter to only be tied to a GIdlModule and move
5409 it (again!) to gidlwriter.c. Change the writer function to take
5412 2007-12-10 Johan Dahlin <johan@gnome.org>
5415 * src/scanner.c: (g_igenerator_generate):
5417 * src/scannerwriter.c: (g_igenerator_write_inline),
5418 (g_igenerator_write), (g_igenerator_write_indent),
5419 (g_igenerator_write_unindent), (field_generate), (value_generate),
5420 (constant_generate), (property_generate), (function_generate),
5421 (vfunc_generate), (signal_generate), (interface_generate),
5422 (struct_generate), (union_generate), (boxed_generate),
5423 (enum_generate), (node_generate), (module_generate),
5424 (g_scanner_write_file):
5426 Move the scanner gidl writing to a separate source file.
5428 2007-12-10 Johan Dahlin <johan@gnome.org>
5433 Move over all CType construction functions.
5435 * tests/parser/Makefile.am:
5436 Be verbose when printing parsing tests results.
5438 2007-12-10 Johan Dahlin <johan@gnome.org>
5440 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
5441 preprocessor handling to here. Start cpp insteado of cc -E,
5442 always include -U__GNUC__, since it's specific to the preprocessor
5445 * tests/parser/Makefile.am (check-local): Silent diff and skip
5446 -U__GNUC__ which is always defined now
5448 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
5450 reviewed by: <delete if not using a buddy>
5452 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
5453 * tests/parser/Makefile.am:
5455 2007-12-09 Johan Dahlin <johan@gnome.org>
5458 Use GOption for command line options.
5459 (g_igenerator_new, main): Simplify constructor and they way
5460 parameters are passed into it.
5466 * src/gen-introspect.c:
5467 * src/gen-introspect.h:
5469 Rename gen-introspect.[ch] to scanner.[ch]
5471 2007-12-09 Johan Dahlin <johan@gnome.org>
5475 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
5476 don't make the repository library and the other utilites link against
5479 * src/gen-introspect.c: (g_igenerator_create_object),
5480 (g_igenerator_create_interface), (g_igenerator_create_boxed),
5481 (g_igenerator_create_enum), (g_igenerator_create_flags),
5482 (g_igenerator_process_module_symbol),
5483 (g_igenerator_process_module), (g_igenerator_generate), (main):
5484 * src/gen-introspect.h:
5485 Refactor g_igenerator_process_types into smaller pieces.
5487 * tests/parser/Makefile.am:
5488 Depend on the gen-introspect binary
5490 2007-12-09 Johan Dahlin <johan@gnome.org>
5492 * src/gen-introspect.c (g_igenerator_process_types):
5493 Break into smaller pieces, one for each generated node type.
5495 2007-12-08 Johan Dahlin <johan@gnome.org>
5497 * src/gen-introspect.c: (g_igenerator_process_types),
5498 (g_igenerator_add_module):
5499 * tests/parser/Foo-expected.gidl:
5500 * tests/parser/foo-object.h:
5501 * tests/parser/foo.c: (foo_subobject_class_init),
5502 (foo_subobject_init):
5504 Add a subobject test and make sure to register defined classes
5505 in the lookup symbol hash table.
5507 2007-12-08 Johan Dahlin <johan@gnome.org>
5511 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
5512 (g_igenerator_process_types), (g_igenerator_add_module),
5513 (g_igenerator_add_include_idl), (main):
5514 * src/gen-introspect.h:
5515 * tests/parser/Makefile.am:
5516 * tests/parser/Foo-expected.gidl:
5518 Change the gen-introspect to generate namespaced module names,
5519 such as GLib.Object instead of GObject.
5520 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
5521 add a --include-idl parameter to gen-introspect,
5522 and update the parser test.
5524 2007-12-08 Johan Dahlin <johan@gnome.org>
5526 * src/gen-introspect.c:
5527 Move main to the end of the file and attempt to make it valid
5530 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
5531 we're not quite ready to generate metadata yet.
5536 Add a simple gen-introspect parser test
5538 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
5540 reviewed by: Johan Dahlin <johan@gnome.org>
5543 * gobject-introspection.pc.in:
5545 * src/compiler.c: (format_output), (write_out_metadata), (main):
5546 * src/gen-introspect.c: (main):
5547 * src/gen-introspect.h:
5548 * src/generate.c: (write_callable_info), (write_repository),
5549 (load_metadata), (main):
5550 * src/gidlmodule.c: (g_idl_module_new),
5551 (g_idl_module_build_metadata):
5553 * src/gidlparser.c: (start_element_handler):
5554 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5555 (g_base_info_get_name), (g_base_info_get_namespace),
5556 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5557 (g_base_info_get_metadata), (g_function_info_get_symbol),
5558 (g_function_info_get_flags), (g_function_info_get_property),
5559 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5560 (g_callable_info_may_return_null),
5561 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5562 (g_callable_info_get_arg), (g_arg_info_get_direction),
5563 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5564 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5565 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5566 (g_type_info_get_tag), (g_type_info_get_param_type),
5567 (g_type_info_get_interface), (g_type_info_get_array_length),
5568 (g_type_info_is_zero_terminated),
5569 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5570 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5571 (g_value_info_get_value), (g_field_info_get_flags),
5572 (g_field_info_get_size), (g_field_info_get_offset),
5573 (g_registered_type_info_get_type_name),
5574 (g_registered_type_info_get_type_init),
5575 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5576 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5577 (find_method), (g_struct_info_find_method),
5578 (g_enum_info_get_n_values), (g_enum_info_get_value),
5579 (g_object_info_get_parent), (g_object_info_get_type_name),
5580 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5581 (g_object_info_get_interface), (g_object_info_get_n_fields),
5582 (g_object_info_get_field), (g_object_info_get_n_properties),
5583 (g_object_info_get_property), (g_object_info_get_n_methods),
5584 (g_object_info_get_method), (g_object_info_find_method),
5585 (g_object_info_get_n_signals), (g_object_info_get_signal),
5586 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5587 (g_object_info_get_n_constants), (g_object_info_get_constant),
5588 (g_interface_info_get_n_prerequisites),
5589 (g_interface_info_get_prerequisite),
5590 (g_interface_info_get_n_properties),
5591 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5592 (g_interface_info_get_method), (g_interface_info_find_method),
5593 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5594 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5595 (g_interface_info_get_n_constants),
5596 (g_interface_info_get_constant), (g_property_info_get_flags),
5597 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5598 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5599 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5600 (g_constant_info_get_value), (g_union_info_get_n_fields),
5601 (g_union_info_get_field), (g_union_info_get_n_methods),
5602 (g_union_info_get_method), (g_union_info_is_discriminated),
5603 (g_union_info_get_discriminator_offset),
5604 (g_union_info_get_discriminator):
5605 * src/ginvoke.c: (g_function_info_invoke):
5606 * src/girepository.c: (g_irepository_register),
5607 (g_irepository_unregister), (g_irepository_get_default),
5608 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5609 (g_irepository_get_info), (g_irepository_find_by_name),
5610 (g_irepository_get_shared_library),
5611 (g_irepository_build_search_path), (g_irepository_register_file),
5612 (g_irepository_error_quark):
5613 * src/girepository.h:
5614 * src/gmetadata.c: (g_metadata_get_dir_entry),
5615 (g_metadata_check_sanity), (validate_header),
5616 (validate_array_type_blob), (validate_iface_type_blob),
5617 (validate_param_type_blob), (validate_error_type_blob),
5618 (validate_type_blob), (validate_arg_blob),
5619 (validate_signature_blob), (validate_function_blob),
5620 (validate_callback_blob), (validate_constant_blob),
5621 (validate_value_blob), (validate_field_blob),
5622 (validate_property_blob), (validate_signal_blob),
5623 (validate_vfunc_blob), (validate_struct_blob),
5624 (validate_enum_blob), (validate_object_blob),
5625 (validate_interface_blob), (validate_errordomain_blob),
5626 (validate_union_blob), (validate_blob), (validate_directory),
5627 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5628 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5629 (g_metadata_new_from_mapped_file), (g_metadata_free),
5630 (g_metadata_set_module), (g_metadata_get_namespace):
5632 * tests/Makefile.am:
5633 * tests/invoke/Makefile.am:
5634 * tests/invoke/invoke-namespace-find.sh:
5635 * tests/invoke/invoke.c: (main):
5637 Add a namespace/shared library mapping. fixes #313268.
5639 2007-12-03 Johan Dahlin <johan@gnome.org>
5641 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5644 2007-11-30 Jürg Billeter <j@bitron.ch>
5650 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5651 (g_igenerator_write_inline), (g_igenerator_write),
5652 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5653 (field_generate), (value_generate), (constant_generate),
5654 (property_generate), (function_generate), (vfunc_generate),
5655 (signal_generate), (interface_generate), (struct_generate),
5656 (union_generate), (boxed_generate), (enum_generate),
5657 (node_generate), (module_generate), (get_type_from_type_id),
5658 (str_replace), (g_igenerator_process_properties),
5659 (g_igenerator_process_signals), (g_igenerator_process_types),
5660 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5661 (g_igenerator_process_unregistered_struct_typedef),
5662 (g_igenerator_process_struct_typedef),
5663 (g_igenerator_process_union_typedef),
5664 (g_igenerator_process_enum_typedef),
5665 (g_igenerator_process_function_typedef),
5666 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5667 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5668 (g_igenerator_generate), (main), (csymbol_new),
5669 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5670 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5671 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5672 (eat_hspace), (eat_line), (read_identifier),
5673 (g_igenerator_parse_macros):
5674 * src/gen-introspect.h:
5676 Import gen-introspect to generate introspection information by
5679 2007-11-30 Jürg Billeter <j@bitron.ch>
5681 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5683 2007-11-30 Jürg Billeter <j@bitron.ch>
5685 * src/gidlparser.c: (end_element_handler): Don't leave requires
5688 2007-11-29 Johan Dahlin <johan@gnome.org>
5690 * src/gidlparser.c (parse_type_internal): Add char,
5691 gchar and guchar to the builtin types.
5693 2007-11-26 Johan Dahlin <johan@gnome.org>
5695 * src/ginfo.c: (g_object_info_get_type_name),
5696 (g_object_info_get_type_init):
5697 * src/girepository.c: (g_irepository_is_registered):
5698 * src/girepository.h:
5700 Add g_object_info_get_type_name, g_object_info_get_type_init and
5701 g_irepository_is_registered.
5703 2006-08-14 Jürg Billeter <j@bitron.ch>
5705 * src/gidlparser.c: (end_element_handler): Don't leave
5706 namespace and implements states too early.
5709 2007-11-26 Johan Dahlin <johan@gnome.org>
5711 * src/gmetadata.c (validate_struct_blob):
5712 pass blob_type to validate_function_blob instead of
5713 hard-coding BLOB_TYPE_STRUCT.
5715 Patch by Torsten Schoenfeld, fixes #314190
5717 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5719 * src/compiler.c, src/generate.c, src/gidlnode.c,
5720 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5721 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5722 warnings about return values, signedness mismatches, unused
5723 variables, and unhandles enum values in switch statements.
5725 * tests/invoke/Makefile.am: Don't install the invoke test program.
5726 Add -I ../../src to the cflags used for the test functions files.
5728 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5730 * src/girepository.h: Export g_invoke_error_quark.
5732 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5734 * src/ginvoke.c: Remove the fallback implementation of
5735 g_function_info_invoke since we now formally depend on libffi.
5737 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5739 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5740 Remove these files from cvs, as they are now generated.
5742 * src/gmetadata.c (validate_iface_type_blob): Don't
5743 complain if blob->pointer is not set, since that
5744 happens for enum and flag types. (#308935, Gustavo
5747 * Commit an autoconf-conversion patch by
5748 Gustavo Carneiro (#308708)
5750 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5752 * src/compiler.c (main): Use it here to validate
5753 the generated metadata.
5755 * src/gmetadata.[hc]: Add code to validate a
5758 * metadata-format.txt: Updates
5760 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5762 * tests/*: Add struct offsets to field and vfunc
5765 * src/generate.c (write_vfunc_info): Write offset
5766 information for vfuncs.
5768 * src/gidlnode.c (g_idl_node_build_metadata): Write
5769 the struct offsets into the metadata.
5771 * src/gidlparser.c: Parse the offset attributes of
5772 field and vfunc elements.
5774 * src/gidlnode.h: Add offset members to field and
5777 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5781 * gidl.dtd: Updates.
5783 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5784 file, creates, compiles and runs a C file, and folds the
5785 resulting struct offsets back into the .gidl file.
5787 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5789 * src/gidlparser.c (start_field): Make fields in objects
5792 * src/gidlmodule.c: Include string.h
5797 * metadata-format.txt: Cleanup basic types.
5798 * src/*: Adapt to the changes.
5799 * tests/*: Adapt to the changes.
5800 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5802 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5803 size for enum blobs.
5804 (g_idl_node_get_full_size): Report the correct size for
5807 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5808 error checking for blob sizes.
5810 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5812 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5813 interface types for which is_pointer is FALSE, e.g. enums.
5815 * src/gidlnode.c (g_idl_node_get_full_size)
5816 * src/gidlparser.c (parse_type_internal):
5817 * src/generate.c (write_type_info): Support unspecialized
5818 lists, hashtables and errors. Also emit a '*' after these.
5822 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5826 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5828 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5830 * src/*.c: Change the directory to be addressed by
5831 1-based indexes, and use an index of zero to mean
5834 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5836 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5838 * tests/union.test: Add a union test.
5840 * src/generate.c: Handle unions.
5842 * src/girepository.h:
5843 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5845 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5847 * src/gidlparser.c (start_union): Parse <union> elements.
5849 * src/gidlnode.h: Add a GIdlNodeUnion.
5851 * gidl.dtd: Add a <union> element.
5853 * src/gmetadata.c (g_metadata_check_sanity): Check
5856 * src/gmetadata.h: Add union_blob_size to Header,
5859 * metadata-format.txt: Add a UnionBlob.
5861 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5863 * tests/*: Update testcases.
5865 * src/generate.c (write_callable_info): Don't forget to
5866 write transfer and null-ok attributes for return types
5869 * src/girepository.h:
5870 * src/ginfo.c (g_callable_info_may_return_null):
5871 New function to find out if a function may return NULL.
5873 * src/compiler.c (format_output): Make the generated
5876 * README: Point to a recent libffi snapshot.
5878 * tests/invoke/*: Some invoke tests.
5880 * src/Makefile: Add ginvoke.c and the necessary
5883 * src/girepository.h (g_function_info_invoke): Add
5886 * src/ginvoke.c (g_function_info_invoke): Initial
5887 implementation of invoke functionality based on libffi.
5889 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5890 strings and types hash tables in the right order when
5892 (find_entry_node): Free the name parts.
5894 2005-05-12 Johan Dahlin <johan@gnome.org>
5896 * src/generate.c: Generate consistent end tags.
5900 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5904 * src/gidlparser.c (start_function): Actually add
5905 methods to objects. (Steven Walter)
5907 * src/girepository.h:
5908 * src/ginfo.c: Rename Transfer and Direction to
5909 GITransfer and GIDirection. (Torsten Schoenfeld)
5911 * tests/*: Make tests work with the changes in name
5914 * src/gidlnode.c (find_entry_node): Parse qualified
5915 names and generate xref nodes for them if needed. Don't
5916 require all modules to be loaded any more.
5918 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5921 * src/ginfo.c (g_object_info_get_parent): Return NULL
5922 if blob->parent is 0. Still need to make sure index
5925 * src/generate.c: Generate qualified names when
5926 referring to non-local types. Emit transfer attribute
5929 * src/compiler.c (format_output): Put the function
5930 attributes where gcc accepts them.
5932 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5934 * src/compiler.c (main): Add a --verbose cmdline option
5935 and only log messages if it is specified.
5938 * src/gidlnode.c (init_stats, dump_stats): Collect some
5939 statistics on string and type sharing.
5941 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5942 g_message() instead of fprintf().
5944 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5945 (g_idl_node_get_size): Implement for structs.
5946 (g_idl_node_get_full_size): Handle parent being NULL.
5947 (serialize_type): Handle lookup failures more gracefully.
5949 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5951 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5952 size calculation for 2-parameter types and for objects.
5954 * src/compiler.c: Add a cmdline option for debug output
5955 and install a log handler to implement it.
5956 * src/gidlnode.c: Add some debug spew.
5960 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5961 forget to count the module name when calculating the
5962 required size for the metadata.
5965 * src/gidlparser.c: Fix compiler warnings.
5967 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5969 * src/compiler.c (main): Free the option context.
5971 * gidl.dtd: Clean up handling of names. All elements
5972 have a "name", only the elements corresponding to
5973 actual callable functions (function, method, constructor),
5974 have an additional "symbol" attribute holding the
5975 dlsym()-able function name.
5977 * src/generate.c: Adapt to generate xml matching the
5981 * src/gidlnode.c: Adapt to parse the new dtd.
5983 * tests/*.test: Adjust to the new dtd.
5985 * metadata-format.txt:
5986 * src/gmetadata.h: Remove the short_name field
5988 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5989 * src/girepository.h:
5990 * src/ginfo.c (g_value_info_get_short_name): Removed
5992 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5994 * gidl.dtd: Allow constructors for boxed types,
5995 patch by Jonathan Blandford.
5998 2005-05-09 Matthias Clasen <mclasen@redhat.com>
6000 * --- Initial import ---