1 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
3 Make it compilable with -Werror on my system by adding
4 a couple of prototypes and including headers.
6 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
8 Bug 562022 – gobject-introspection needs python headers
10 * configure.ac: fail without python headers present.
13 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
15 Bug 561617 – Return value array annotations
17 * giscanner/transformer.py:
18 * tests/scanner/annotation.c (annotation_return_array):
19 * tests/scanner/annotation.h:
20 Add support for (array) for return value annotations as well.
22 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
24 * tests/everything/everything.[ch]: add a test function which calls a
27 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
29 * giscanner/cachestore.py:
30 Catch ValueError exceptions.
32 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
34 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
36 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
38 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
39 instead of hard-coding struct sizes.
41 2008-11-18 Owen Taylor <otaylor@redhat.com>
43 Bug 561296 - Add "storage type" to the typelib data for enums
45 In order to set and get enum and flag fields in structures, we need
46 to know the integral type that the enumeration is stored as. We are already
47 computing that at compile time in order to compute struct offsets, so the
48 easiest thing to do is to save that in the typelib.
50 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
51 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
52 and compute and save it at compile time.
54 * girepository/girepository.h girepository/ginfo.c:
55 Add g_enum_info_get_storage_type().
57 * girepository/gfield.c: Implement reading and writing enum and flags fields
58 based on the storage type.
60 2008-11-18 Owen Taylor <otaylor@redhat.com>
62 Add enums to the Everything test module
64 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
65 test module and register them as GTypes.
67 https://bugzilla.gnome.org/show_bug.cgi?id=561296
69 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
71 * giscanner/cachestore.py:
72 Catch BadPickleGet exceptions as well.
74 2008-11-17 Owen Taylor <otaylor@redhat.com>
76 * tests/everything/everything.c: Fix doc comment annotations
77 for test_struct_b_clone() to refer to the right function.
79 2008-11-17 Dan Winship <danw@gnome.org>
81 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
82 spelling of GHashTable. #561135
84 * tests/scanner/annotation.c (annotation_object_get_hash):
85 * tests/scanner/annotation-1.0-expected.gir:
86 * tests/scanner/annotation-1.0-expected.tgir: add a test of
87 GHashTable annotations
89 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
91 * giscanner/ast.py: Change string array match type to be in terms
92 of canonicalized type.
93 * giscanner/transformer.py: Add canonicalize_ctype which gives us
94 a version of a c:type without aliases, so we can deep canonicalize
95 char** to utf8*. Update parse_ctype to use it.
96 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
98 2008-11-16 Colin Walters <walters@verbum.org>
100 * girepository/girepository.c: Ensure we always call init_globals,
101 even if passed a non-default repository.
103 2008-11-16 Colin Walters <walters@verbum.org>
105 Bug 559706 - Interface prerequisites
107 * common.mk: Dep on libgirepository.la for scanner libs so that
108 we rebuild things even if just gdump.c changes.
109 * girepository/gdump.c: Dump prerequisites.
110 * giscanner/ast.py: Add prerequisite list.
111 * giscanner/girparser.py: Parse them from gdump.
112 * giscanner/girwriter.py: Write them.
113 * giscanner/glibtransformer.py: Resolve them.
116 2008-11-16 Owen Taylor <otaylor@redhat.com>
118 Bug 561087 - Respect is_pointer in serialize_type()
120 Add a '*' to the serialization for the cases where we set is_pointer
121 in the type blob we write out depending on node->is_pointer. Don't
122 add the '*' in the cases where is_pointer is set or not set in a
125 http://bugzilla.gnome.org/show_bug.cgi?id=561087
127 2008-11-16 Owen Taylor <otaylor@redhat.com>
129 Bug 560825 – Add size and alignment to typelib
131 Include the size and alignment of structures and unions in the typelib,
132 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
134 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
135 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
136 to StructBlob and UnionBlob.
138 * girepository/ginfo.c girepository/girepository.h:
139 Add g_[struct|union]_get[size|alignment]().
141 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
143 2008-11-16 Owen Taylor <otaylor@redhat.com>
145 Bug 552371 – implement struct field get/set
147 * girepository/gfield.c girepository/girepository.h: Add
148 convenience functions g_field_info_set_field() and
149 g_field_info_get_field() to set and get fields based on the
150 offsets in GIFieldInfo.
152 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
154 Bug 560241 - Out-arguments should not be marked as being pointers
157 * girepository/girparser.c: Improved logic for out arguments.
159 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
161 Bug 559601 - Pointers in structs/unions unduly treated as arrays
163 * giscanner/transformer.py: Differentiate type creation logic
164 between parameters and struct components.
166 2008-11-15 Colin Walters <walters@verbum.org>
168 * giscanner/dumper.py: Check return code from pkg-config
171 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
173 * tests/everything/everything.c (test_array_int_in),
174 (test_array_gtype_in):
175 * tests/everything/everything.h:
176 Rename the int/gtype array tests. Make the return value
177 useful, an aggregation of the array input values.
179 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
181 * tests/everything/Makefile.am:
182 * tests/everything/everything.c:
183 * tests/everything/everything.h:
184 * tests/everything/gitesttypes.c:
185 * tests/everything/gitesttypes.h:
186 Rename gitesttypes.[ch] to everything.[ch]
188 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
190 Bug 560708 – Don't treat arrays that have a length specified as
191 zero-terminated by default
193 * giscanner/transformer.py: Default to non zero terminated for
195 * tests/*: Update, add test for zero vs not.
197 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
199 Bug 557788 - Return types for constructors in generated typelib bogus
201 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
202 obviously broken in the face of duplicate names in different
204 * tests/scanner/*expected.gir: Fix up.
206 2008-11-13 Owen Taylor <otaylor@redhat.com>
208 * girepository/girffi.c: Fix "Unexpected time for time_t"
211 2008-11-13 Colin Walters <walters@verbum.org>
213 Bug 558436 - avoid having scanner load app code
215 * giscanner/cgobject.py: Delete; we no longer load shared
217 * giscanner/dumper.py: Support for linking a library to
218 a stub binary for introspection.
219 * giscanner/glibtransformer.py: Rewrite to use gdump XML
220 from invocation of child binary.
221 * giscanner/transformer.py: Fix up to use fully qualified
222 name in parse tree. Make parse_ctype public so we can use
223 it inside glibtransformer.
224 * tests/scanner/barapp.c: New test, using --program arg
226 * tests/*: Update to use common.mk for invoking scanner.
227 * tools/g-ir-scanner: Add options --program, --program-arg,
229 * docs/g-ir-scanner.1: Update.
231 2008-11-13 Colin Walters <walters@verbum.org>
233 * configure.ac: Depend on Gio, we use it in gdump.c.
234 * girepository/gdump.c: Code to dump GType data to XML.
235 * girepository/girepository.c: Add option group for dumping.
236 * girepository/girepository.h: Define API for the above.
238 2008-11-13 Colin Walters <walters@verbum.org>
240 * common.mk: Add a file to include with Makefile fragments
241 useful for scanner invocation.
243 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
245 * tests/everything/gitesttypes.c (test_filename_return): Return
246 strings in filename encoding.
248 2008-11-13 Owen Taylor <otaylor@redhat.com>
250 Bug 560253 – Add structure and boxed types to Everything test module
252 * tests/everything/gitesttypes.[ch]: Add examples of:
254 Plain old data structs
255 Plain old data structs with nested fields
257 Plain old data boxed with nested fields
258 More complicated boxed types with internal state
260 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
262 * tests/everything/gitesttypes.c (test_gtype_in):
263 * tests/everything/gitesttypes.h:
264 Add a test of GType arrays, a la gtk_list_store_set_columns.
266 2008-11-12 Owen Taylor <otaylor@redhat.com>
268 Bug 560419 – Cache includes when parsing
270 Keep track of all modules parsed within a GIrParser, and when a
271 module is referenced a second time, use the existing parsed copy
272 instead of reparsing.
274 2008-11-12 Owen Taylor <otaylor@redhat.com>
276 Fix management of ParseContext.includes_modules (#560419)
278 * girepository/girparser.c: Fix some trivial bugs in managing the
279 list of include modules. (Add to module's list twice, not
280 initialized to NULL, not freed.)
282 2008-11-12 Owen Taylor <otaylor@redhat.com>
284 Keep aliases and disguised_structures local to each module (#560419)
286 * girepository/girmodule.[ch]: When parsing, keep keep a separate
287 hash tables of aliases and 'disguised' flags for each module, and
288 store that on the module.
290 After parsing an include merge the aliases/disguised flags to the
293 * girepository/girparser.c: Remove 'prefix_aliases' flag and
294 always prefix aliases/disguised structure types when parsing; this
295 simplifies the code considerably.
297 2008-11-12 Owen Taylor <otaylor@redhat.com>
299 Fix mismatches between .gir name and 'name' attribute (#560419)
301 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
302 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
303 where the 'name' element of <namespace/> didn't match the filename of the
304 gir, an assumption that the compiler has always expected and now enforces.
306 2008-11-12 Owen Taylor <otaylor@redhat.com>
308 Only allow one <namespace/> element per <repository/> (#560419)
310 * girepository/girparser.c: The logic in girparser.c didn't work
311 very well if there were multiple <namespace/> nodes within a
312 single <repository/> (context->namespace was always the overall
313 filename and not the the name specified in the <namespace/>
314 element for one thing; this would cause aliases to be mis-prefixed
315 in include modules.) Also check that the "name" in the
316 <namespace/> node matches the filename.
318 2008-11-12 Owen Taylor <otaylor@redhat.com>
320 Add a GirParser object to hold the state of a compilation
322 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
323 GirParser object to hold state that is global across a
324 compilation. Currently just holds the include path, but will
325 eventually also keep a cached list of parsed modules.
327 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
329 * girepository/girepository.c (find_namespace_latest): Fix
332 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
334 * configure.ac: use 'introspection' component for bugs
336 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
338 * tests/everything/gitesttypes.c (test_filename_return):
339 * tests/everything/gitesttypes.h:
340 Add a filename return test.
342 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
344 * tests/offsets/Makefile.am (gitestoffsets.c): fix
345 gen-gitestoffsets invocation with builddir != srcdir
347 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
349 * girepository/girepository.c:
350 Change the element type from utf8 to filename
351 * girepository/girnode.c (g_ir_node_build_typelib):
352 Special case filename equally to utf8 here.
354 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
357 Remove unused variables, add a dependency of girepository.ch, so when
358 they change we rebuild the gir automatically.
360 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
362 * girepository/girepository.c (g_irepository_get_search_path):
363 * girepository/girepository.h:
364 Add a g_irepository_get_search_path, so we can access the search
367 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
369 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
371 * girepository/girparser.c: avoid freeing an uninitialized pointer
373 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
376 * giscanner/glibtransformer.py:
377 * tools/g-ir-scanner:
378 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
379 so we can just pass in --library=foo/bar/baz.la and the scanner
380 does the right thing.
381 Don't warn for _get_type() functions if they don't take any
384 2008-11-11 Owen Taylor <otaylor@redhat.com>
386 Bug 560404 – Prefix types when resolving aliases in included modules
388 * girepository/girparser.c: When resolving aliases in an included
389 module, prefix types before looking them up.
391 2008-11-11 Owen Taylor <otaylor@redhat.com>
393 Compute field offsets and overall size for object structures
395 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
396 field of type object in structure"
398 Do basic computation of field offsets for objects and interfaces;
399 this doesn't attempt to address all of the "mess" for virtual
400 functions described in Bug 560281.
402 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
404 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
406 Based on patch by Johan Bilien.
408 * giscanner/transformer.py (_create_member, _create_parameter):
409 Resolve types here as well.
410 (_resolve_type_name_1): Try resolving using 'ctype' first since
411 it's least ambiguous. Fixes struct member type resolution with
412 similarly named types, e.g. Gdk.PangoRendererClass and
414 * tests/scanner/foo*: Add test.
416 2008-11-11 Owen Taylor <otaylor@redhat.com>
418 * girepository/girparser.c: Search provided include dirs before
419 the default directories.
421 2008-11-11 Owen Taylor <otaylor@redhat.com>
423 * girepository/giroffsets.c: Include fully-qualified names in
426 2008-11-11 Owen Taylor <otaylor@redhat.com>
428 * girepository/giroffsets.c: Fail gracefully with an informative
429 error message when recursion is encountered when computing a
432 2008-11-11 Owen Taylor <otaylor@redhat.com>
434 * girepository/girparser.c: Remove an unused variable.
436 2008-11-10 Owen Taylor <otaylor@redhat.com>
438 Add tests for field offset computations
440 * tests/offsets/offsets.h: Header file with structure definitions to test
442 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
443 field offsets for the structures in offsets.h two ways: using
444 the information from a generated typelib, and as computed by the
447 We diff these two versions to test that everything is OK.
449 2008-11-10 Owen Taylor <otaylor@redhat.com>
451 Remove field offsets from g-ir-generate output and test inputs
453 Field offsets are a) architecture dependent so they shouldn't be part
454 of the architecture-independent gir format which is installed in
455 datadir. b) Are architecture-dependent so they shouldn't be in test
458 * girepository/girparser.c: Don't parse offset for fields
459 * tools/generate.c: Don't parse offset for fields
460 * tests/*.gir test/scanner/*.tgir: Remove offsets
462 (Virtual function and discriminator offsets are not removed, as they
463 aren't fully hooked up to the field-offset computation machinery yet.)
465 2008-11-10 Owen Taylor <otaylor@redhat.com>
467 Bug 560252 - Compute field offsets before writing typelib
469 * girepository/girnode.h: Store the total size and alignment for
470 GIrNodeStruct/Boxed/Union.
472 * girepository/giroffset.c: New file implementing computation of
473 structure field offsets.
475 * girepository/girnode.c: Compute structure field offsets before
476 writing types into the typelib.
478 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
479 means "unknown". Also fix description of the discriminator_offset
482 2008-11-10 Owen Taylor <otaylor@redhat.com>
484 Bug 560250 - Fully parse included modules
486 For some things, like computing structure offsets to put into the typelib
487 we need more than just the aliases from included modules. Do a completel
488 parse of included modules and store in module->included_modules.
490 Also add g_ir_find_node() to find node information from within the
491 active set of modules and their includes.
493 2008-11-10 Owen Taylor <otaylor@redhat.com>
495 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
497 Extract a function to convert GITypeTag to ffi_type from the internals
498 of ginvoke.c. This will be useful in figure out structure alignment.
500 Also fix handling of gsize and time_t to be portable. (Add a check
501 to configure.ac to figure out the width of time_t.)
503 2008-11-10 Owen Taylor <otaylor@redhat.com>
505 Bug 560248 – "disguised structures"
507 Certain types like GIConv and GdkAtom are pointers internally but don't
508 look like pointers when referenced. They have the form.
510 typedef struct _X *X;
512 Parse these as structures/records but mark them in the gir with a 'disguised'
513 attribute so that we know that they need special handling.
515 In the typelib treat them like any other structure.
517 2008-11-09 Jürg Billeter <j@bitron.ch>
520 * giscanner/girwriter.py:
522 Write throws attribute for virtual functions, fixes bug 559703
524 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
526 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
527 up some confusion about the second argument to find_module, it's
528 actually the packages __path__ attribute which we can safely ignore
530 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
532 2008-11-07 Owen Taylor <otaylor@redhat.com>
534 Bug 559737 – Deal with continuations in macros
536 * giscanner/giscannerlexer.l: Treat continuation lines the same
537 as regular newlines. This makes the scanner not complain about
538 #define foo(x) \ <stuff> inside a C file. There's no attempt
539 however to handle parsing macro definitions split across lines.
541 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
543 * giscanner/cachestore.py:
544 Handle broken cache entries, write only filesystems and
545 running out of diskspace.
547 2008-11-07 Owen Taylor <otaylor@redhat.com>
549 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
550 Set current_filename before lexing the file so error messages
551 are reported in the right file.
553 2008-11-06 Colin Walters <walters@verbum.org>
555 * tests/everything/*: Add some tests for strv.
557 2008-11-05 Colin Walters <walters@verbum.org>
559 * girepository/ginvoke.c (g_function_info_invoke): Don't use
560 nested scope local variable for error which may go away after
561 conditional is complete.
563 2008-11-05 Colin Walters <walters@verbum.org>
565 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
566 manipulate hackily; just use GString. This avoids an
567 uninitialized memory read pointed out by Havoc.
569 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
571 * giscanner/__init__.py:
573 * giscanner/cachestore.py:
574 * giscanner/cgobject.py:
575 * giscanner/girparser.py:
576 * giscanner/girwriter.py:
577 * giscanner/giscannermodule.c:
578 * giscanner/glibast.py:
579 * giscanner/glibtransformer.py:
580 * giscanner/libtoolimporter.py:
581 * giscanner/minixpath.py:
582 * giscanner/odict.py:
583 * giscanner/sourcescanner.c:
584 * giscanner/sourcescanner.h:
585 * giscanner/sourcescanner.py:
586 * giscanner/transformer.py:
587 * giscanner/utils.py:
588 * giscanner/xmlwriter.py:
590 Relicense the giscanner library under LGPLv2+.
591 This has been approved by all contributors.
593 2008-11-01 Owen Taylor <otaylor@redhat.com>
595 Bug 558848 giparser.py: shared library should be optional
597 When parsing a .gir, allow the shared-library attribute
598 of <namespace/> to be missing: this corresponds to the handling
599 in libgirepository and elsewhere.
601 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
603 Bug 557898 – Fails to build on OSX 10.4
605 * configure.ac: Check for $shrext_cmds that should be implicitly
606 available if you're using libtool >= 2.0. If undefined, call
607 libtool --config explicitly to get its value.
608 * girepository/gtypelib.c: Remove special case for (non-)Darwin
611 2008-10-31 Colin Walters <walters@verbum.org>
613 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
615 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
617 * configure.ac: Post release version bump
620 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
624 * docs/release-checklist.txt:
627 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
629 * Makefile.am: add an upload-release target
630 * docs/release-checklist.txt:
631 Release process documentation
633 2008-10-31 Colin Walters <walters@verbum.org>
635 Bug 558109 – _g_typelib_init fails to find shared libraries
637 * transformer/glibtransformer.py: Use ctypes' find_library
638 on passed libraries and write that for the shared-library
639 entry. We want to avoid depending on -devel packages.
641 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
643 * docs/g-ir-scanner.1:
644 Document the renaming options.
646 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
648 * giscanner/Makefile.am:
649 * tests/invoke/Makefile.am:
650 * tests/repository/Makefile.am: List in-tree libraries first in
651 LDADD / LIBADD. If installed library is listed first, the
652 resulting binary will prefer installed version to one in .libs,
653 possibly making 'make check' behave strangely.
655 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
657 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
658 gir-repository from choking with gdk/quartz
660 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
662 * giscanner/giscannermodule.c (calc_attrs_length),
663 (pygi_collect_attributes):
664 * giscanner/xmlwriter.py:
665 Write a C version of the xml namespace formatter.
666 Saves 15% of the time it takes to create a gtk gir.
668 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
670 * giscanner/xmlwriter.py: Abstract attribute formatting
671 to a function external to the XMLWriter class.
673 * giscanner/scannerlexer.l:
674 Parse and discard __typeof and __attribute.
676 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
678 * giscanner/girparser.py:
679 Remove arguments from the constructor, move them to
680 separate accessors. Add a new parse_tree method
681 which takes an element tree instance.
682 * tools/g-ir-scanner:
683 Update callsite for this
685 * giscanner/Makefile.am:
686 * giscanner/cachestore.py:
687 * giscanner/transformer.py:
688 Cache the include parsing. Saves ~25% time when
689 creating vte (which includes everything up to gtk+).
691 2008-10-30 Colin Walters <walters@verbum.org>
693 * giscanner/transformer.py: Don't reparse includes
694 we've already processed.
696 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
698 * giscanner/girparser.py:
699 * giscanner/transformer.py:
700 Avoid parsing parameters, types etc when parsing
701 includes. Should speed up include parsing a bit.
703 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
705 * giscanner/girparser.py:
706 Avoid big if/else and use a dispatch table like
709 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
711 * giscanner/transformer.py:
712 Clean up include parsing and registration.
714 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
716 * giscanner/transformer.py:
719 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
721 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
724 construct PYTHONPATH just once
726 * tests/everything/Makefile.am:
727 * tests/scanner/Makefile.am:
728 add $(top_srcdir) to PYTHONPATH to
729 handle builddir != srcdir
731 * giscanner/libtoolimporter.py:
732 * giscanner/sourcescanner.py:
733 Make the libtoolimporter work when distchecking too.
735 Mostly based on patch by Tommi Komulainen
737 2008-10-29 Owen Taylor <otaylor@redhat.com>
739 * giscanner/glibtransformer.py: If a filename of an existing
740 file is passed to --library, hunt for it directly, rather than
741 searching for a corresponding library.
743 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
745 * giscanner/libtoolimporter.py:
746 * giscanner/sourcescanner.py:
747 Clean up the libtool importer a bit. Add a context so we
748 can use it through a with statement.
749 Don't just look in the current directory, look in the whole
752 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
754 Bug 558065 – gitesttypes should be installed
758 * tests/types/Makefile.am -> tests/everything/Makefile.am
759 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
760 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
761 move tests/types to tests/everything
763 * tests/everything/Makefile.am: build normal shared library
764 libgirepository-everything.so.1.0.0 and corresponding typelib
765 Everything-1.0.typelib
767 * tests/everything/Makefile.am: explicitly link libtool
768 versioning with typelib versioning with variables
770 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
772 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
774 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
776 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
779 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
781 Bug 558068 – when invoking a method, offset the in arguments by one,
784 * tests/invoke/invoke.c, tests/invoke/testfns.c,
785 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
786 * girepository/ginvoke.c: do not offset the index of given out
787 arguments by one for methods, "this" is provided as in argument only.
789 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
791 * gir/gio-2.0.c: add annotation for g_file_delete
793 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
795 Bug 558062 – provide and use paths in the .pc file
797 * gobject-introspection-1.0.pc.in: provide typelibdir variable
798 for where .typelibs should be installed (callers shouldn't need
799 to construct paths from bits and pieces)
801 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
803 Bug 557791 – g_irepository_require() could return a GTypelib *
805 * girepository/girepository.c: Return GTypelib; this is useful
806 for low level manipulation.
808 2008-10-25 Colin Walters <walters@verbum.org>
810 Bug 557788 – Return types for constructors in generated typelib bogus
812 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
813 rely on end pass resolution.
815 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
817 Bug 557786 - support fixed size arrays
819 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
820 * giscanner/scannerparser.y: Retain fixed array size.
821 * giscanner/ast.py: Add to note.
822 * giscanner/girwriter.py: Write to gir.
823 * girepository/girnode.c: Write it to typelib.
824 * tools/generate.c: Generate.
825 * tests/*: Add tests.
827 2008-10-25 Colin Walters <walters@verbum.org>
829 Bug 557076 - move typelibs to $libdir
831 * configure.ac: Steal some configury bits from dbus to expand
833 * gir/Makefile.am: Move to libdir.
834 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
835 instead just look at one hardcoded path in libdir.
836 * acinclude.m4: Bits from dbus.
838 2008-10-24 Johan Dahlin <johan@gnome.org>
840 * girepository/girnode.c (g_ir_node_check_unhandled_members):
841 Be quiet, do not warn about unhandled members.
843 2008-10-24 Johan Dahlin <johan@gnome.org>
845 * girepository/gtypelib.c:
846 Only use SHLIB_SUFFIX on darwin, otherwise use
847 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
849 2008-10-24 Lucas Rocha <lucasr@gnome.org>
851 Bug 557623 - Constructors shouldn't be flagged as methods.
853 * girepository/ginfo.c (g_function_info_get_flags): ditto.
855 2008-10-24 Johan Dahlin <johan@gnome.org>
857 * giscanner/scannerparser.y:
858 Check against division by zero for the modula operator.
859 This fixes header parsing of OSX system headers included
862 2008-10-24 Johan Dahlin <johan@gnome.org>
866 Add a CONTRIBUTORS file and dist it.
868 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
870 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
872 * girepository/girparser.c (parse_param_transfer):
873 * giscanner/transformer.py (_create_parameter, _create_return):
874 * giscanner/girwriter.py (_write_return, _write_parameter):
875 * tools/generate.c (write_callable_info): always write and
876 require "transfer-ownership" for return-values and parameters
879 * tests/invoke/testfns-1.0.gir:
881 * tests/scanner/DrawableAdditions.xml:
882 * tests/scanner/GtkFrob-1.0-expected.tgir:
883 * tests/scanner/annotation-1.0-expected.tgir:
884 * tests/scanner/drawable-1.0-expected.tgir:
885 * tests/scanner/drawable-injected-1.0-expected.gir:
886 * tests/scanner/drawable-injected-1.0-expected.tgir:
887 * tests/scanner/foo-1.0-expected.tgir: Updated
889 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
891 * giscanner/cgobject.py: build fundamental types same way as glib
893 * giscanner/glibtransformer.py (_type_from_gtype): record GType
894 when constructing the Type from it
896 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
897 the parameter is a GObject from its GType, if available.
899 * giscanner/glibtransformer.py (_adjust_transfer):
900 * tests/scanner/foo-1.0-expected.gir:
901 * tests/scanner/foo-1.0-expected.tgir: deduce
902 transfer-ownership from GTypes
904 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
906 * giscanner/transformer.py (_create_parameter):
907 * tests/scanner/foo-1.0-expected.gir: make varargs
908 transfer-ownership="none"
910 2008-10-23 Colin Walters <walters@verbum.org>
912 Bug 556739 - transfer ownership
914 * giscanner/ast.py: Refactor Parameter/Return to share
915 common attributes. Add transfer_inferred attribute
916 which says whether or not we made a guess.
917 * giscanner/transformer.py: Add much more extensive
918 heuristics around parameter and return transfer.
919 * giscanner/glibtransformer.py: Adjust to inspect
923 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
925 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
927 * tests/scanner/Makefile.am:
928 * tests/scanner/annotation-1.0-expected.tgir:
929 * tests/scanner/drawable-1.0-expected.tgir:
930 * tests/scanner/drawable-injected-1.0-expected.tgir:
931 * tests/scanner/foo-1.0-expected.tgir:
932 * tests/scanner/GtkFrob-1.0-expected.tgir:
933 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
934 annotations survive the roundtrip via typelib
936 The expectations are as currently produced by g-ir-generate,
937 comparison with the .gir files shows there are differences.
939 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
941 Bug 557468 – Support for GI_TYPELIB_PATH
943 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
944 provided paths to the global search path.
946 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
948 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
950 * tests/scanner/drawable-1.0-expected.tgir:
951 * tests/scanner/drawable-injected-1.0-expected.tgir:
952 * tests/scanner/foo-1.0-expected.tgir:
953 * tools/generate.c (write_object_info): write 'abstract'
954 attribute for classes
956 2008-10-22 Lucas Rocha <lucasr@gnome.org>
958 * girepository/girmodule.c, girepository/gtypelib.c,
959 girepository/girparser.[ch]: fix some build warnings.
961 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
963 Bug 557405 – Use 'allow-none' consistently
965 * docs/typelib-format.txt:
966 * girepository/ginfo.c (g_arg_info_may_be_null):
967 * girepository/girnode.c (g_ir_node_build_typelib):
968 * girepository/girnode.h (struct _GIrNodeParam):
969 * girepository/girparser.c (start_parameter):
970 * girepository/girwriter.c (function_generate):
971 * girepository/gtypelib.h (ArgBlob):
973 * tests/function.gir:
974 * tools/generate.c (write_callable_info): Use 'allow-none'
975 consistently throughout
977 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
979 Bug 557092 – Callback annotations not used
981 * giscanner/transformer.py (_create_callback): use annotations
983 * tests/scanner/annotation.h
984 * tests/scanner/annotation-1.0-expected.gir: add tests
986 2008-10-21 Colin Walters <walters@verbum.org>
988 * giscanner/scannerlexer.l: Don't require trailing whitespace after
989 uncommented parameters.
992 2008-10-21 Colin Walters <walters@verbum.org>
994 * girepository/girepository.c: Ensure that when doing an unversioned
995 require, we prefer items earlier in the search path to later ones.
997 2008-10-21 Owen Taylor <otaylor@redhat.com>
999 * giscanner/transformer.py: For string parameters allow transfer annotation
1000 to override the standard automatic guessing based on 'const'.
1002 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1004 Bug 557241 – "throws" flag for functions
1006 * tests/scanner/drawable-1.0-expected.gir,
1007 tests/scanner/drawable-injected-1.0-expected.gir,
1008 tests/scanner/drawable.[ch]: add simple test for throwing
1009 function (has GError ** as last argument)
1011 * giscanner/ast.py: add a 'throws' flag to Function
1012 * giscanner/glibtransformer.py: if a function's last paramerter is
1013 a GError, set the 'throws' flag and remove that parameter
1014 * giscanner/girwriter.py: write out the 'throws' attribute
1015 * giscanner/girparser.py: support parsing the 'throws' attribute
1017 * tests/repository/gitestthrows.c: add a simple test to check the
1018 throws flag in a typelib and invoke the function
1020 * girepository/ginfo.c, girepository/girnode.[ch],
1021 girepository/girnode.h, girepository/girparser.c,
1022 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1024 * girepository/ginvoke.c: if a function throws, add a GError as last
1025 arguments, and propagate the error to the invoker.
1027 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1029 * giscanner/transformer.py (_create_parameters): Warn if we see
1030 annotations for unknown parameters. If .h and .c files name
1031 parameters differently, the annotations may be lost.
1033 2008-10-21 Johan Dahlin <johan@gnome.org>
1035 Bug 556358 - don't use libtool internals
1037 * giscanner/Makefile.am:
1038 * giscanner/libtoolimporter.py:
1039 * giscanner/sourcescanner.py:
1040 * giscanner/utils.py:
1041 Add a python meta importer and remove a libtool symlink hack.
1043 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1045 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1046 and --add-include-path appropriately when invoking the scanner.
1047 * tests/types/Makefile.am (%typelib): Likewise.
1049 2008-10-20 Colin Walters <walters@verbum.org>
1051 Bug 556777 - validate properties
1053 * giscanner/transformer.py: Add option to throw on unknown types.
1054 * giscanner/glibtransformer.py: Use it on properties.
1055 * tests/*: Add a test.
1057 2008-10-20 Colin Walters <walters@verbum.org>
1059 * giscanner/glibast.py: Also register g variants of
1060 default_array_types. This is not beautiful, but
1061 good alternatives aren't easy to come by.
1062 This fixes gchar ** parsing.
1064 2008-10-20 Colin Walters <walters@verbum.org>
1066 * docs/typelib-format.txt, girepository/gtypelib.h:
1067 Take a bit from ObjectInfo to represent abstract flag.
1068 * giscanner/cgobject.py: Expose g_type_get_flags.
1069 * girepository/girepository.h: Add accessor.
1070 * girepository/ginfo.c: Implement it.
1071 * giscanner/ast.py: Add is_abstract flag to generic
1073 * giscanner/glibast.py: Use it.
1074 * giscanner/girwriter.py: Write it.
1075 * girepository/girparser.c: Parse it.
1078 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1080 * giscanner/girparser.py (_parse_function): don't lose
1081 'transfer-ownership' attributes when injecting, check for the
1084 2008-10-19 Johan Dahlin <johan@gnome.org>
1086 * giscanner/scannerlexer.l: Parse and ignore __asm.
1088 2008-10-19 Colin Walters <walters@verbum.org>
1090 * giscanner/girparser.py: Parse array length= to ensure
1091 it doesn't get lost from --inject.
1093 2008-10-17 Colin Walters <walters@verbum.org>
1095 Bug 556795 - char ** regression
1097 * giscanner/transformer.py: Fix parsing of ctypes, add some
1098 comments about what's going on.
1099 * tests/*: Add a test for char **.
1101 2008-10-17 Colin Walters <walters@verbum.org>
1103 Bug 556783 - change namespace handling to be more consistent
1105 * giscanner/transformer.py: Eliminate usage of
1106 strip_namespace_object. We now treat --namespace as the default
1107 --strip-prefix; however, if --strip-prefix is specified it
1108 overrides --namespace. This applies to everything except function
1109 names, where we do also strip the namespace.
1110 * giscanner/glibtransformer.py: Remove usage of
1111 strip_namespace_object.
1113 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1114 --namespace and --strip-prefix.
1116 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1118 Bug 556732 – generate gir files consistently
1120 * girepository/girparser.c (start_parameter):
1122 * tests/invoke/testfns-1.0.gir:
1123 * tools/generate.c (write_callable_info): write
1124 'transfer-ownership' attribute consistently with both
1125 return-value and parameter elements
1127 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1129 Bug 556732 – generate gir files consistently
1131 * tools/generate.c (write_callable_info): write 'direction'
1132 attribute only if other than 'in' to be consistent with
1135 * tests/object.gir: remove direction="in" which is the default
1137 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1139 Bug 556732 – generate gir files consistently
1141 * giscanner/ast.py (Field): add readable and writable properties
1142 * giscanner/girparser.py (_parse_field): copy 'readable' and
1143 'writable' attributes
1144 * giscanner/transformer.py (_create_member): create fields as
1146 * giscanner/glibtransformer.py (_introspect_object,
1147 _pair_class_struct): make object instance and class fields
1149 * giscanner/girwriter.py (_write_field):
1150 * tools/generate.c (write_field_info): write field 'readable'
1151 and 'writable' attributes only if non-default (read-only)
1152 * girepository/girparser.c (start_field): in the absence of
1153 attributes assume fields are read-only
1155 * tests/struct.gir: remove redundant readable="1" from fields
1156 * tests/scanner/foo-1.0-expected.gir:
1157 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1158 all record and union fields
1160 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1162 Bug 556732 – generate gir files consistently
1164 * giscanner/girwriter.py (_write_property): write properties
1165 'construct' attribute if set
1166 * tools/generate.c (write_property_info): write properties
1167 'readable' and 'writable' attributes only if non-default
1168 * tests/object.gir: add writable="0"
1169 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1171 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1173 * gir/glib-2.0.c: added annotations
1175 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1177 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1180 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1182 Bug 556610 – giscanner/girparser.py drops parameter options
1184 * tests/scanner/drawable-injected-1.0-expected.gir,
1185 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1186 * giscanner/ast.py: allow Parameter to take options in the constructor
1187 * giscanner/girparser.py: parse parameter options (transfer,
1188 direction, allow-none)
1190 2008-10-16 Colin Walters <walters@verbum.org>
1192 Bug 556185 - segfault on g_callable_info_get_return_type
1194 Initial patch from John Ehresman.
1196 * tests/repository/*: Add a test using
1197 g_callable_info_get_return_type. Instead of casting a
1198 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1199 to call g_type_info_get_interface.
1201 2008-10-16 Colin Walters <walters@verbum.org>
1203 Bug 556579 - union and struct name misresolved
1205 * giscanner/transformer.py: The calls to _resolve_type_name
1206 for struct/union names was a legacy holdover from when type
1207 resolution had multiple phases. Now it's actively harmful
1208 since we might pull in an identical name from another
1212 2008-10-16 Colin Walters <walters@verbum.org>
1214 Bug 556432 - transfer annotations and defaults
1216 * giscanner/transformer.py: Canonicalize type
1217 after removing *, not before. This ensures that
1218 guchar* is transformed to 'uint8'.
1219 Add some comments here.
1220 * giscanner/glibtransformer.py: Add _adjust_transfer
1221 phase for tweaking GObject transfers.
1224 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1226 * configure.ac: enable bunch of gcc warning CFLAGS
1228 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1230 Bug 556543 – reduce compiler warnings
1232 * girepository/ginfo.c:
1233 * girepository/girepository.c (register_internal,
1234 count_interfaces, find_interface, find_namespace_version,
1235 parse_version, g_irepository_require):
1236 * girepository/girmodule.c (g_ir_module_build_typelib):
1237 * girepository/girnode.c (init_stats, dump_stats,
1238 _g_irnode_init_stats, _g_irnode_dump_stats,
1239 g_ir_node_can_have_member):
1240 * girepository/girparser.c (firstpass_end_element_handler,
1241 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1242 start_alias, start_type, end_type_top, parse_include, cleanup,
1244 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1245 * giscanner/giscannermodule.c (directive_get_options,
1246 type_get_child_list):
1247 * giscanner/scannerlexer.l (parse_gtkdoc):
1248 * giscanner/scannerparser.y (ctype_free):
1249 * giscanner/sourcescanner.c:
1250 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1251 * tests/types/gitesttypes.c:
1252 * tools/compiler.c (main):
1253 * tools/generate.c (write_repository): Remove unused variables
1254 and code, add missing includes, declarations and case
1257 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1259 Bug 556541 – access union members through UnionBlob rather than
1262 * girepository/ginfo.c (g_union_info_find_method): access union
1263 members through UnionBlob rather than StructBlob
1265 2008-10-15 Colin Walters <walters@verbum.org>
1267 Bug 556331 - clean up includes handling
1269 * tools/g-ir-scanner: Rework command line arguments; now we take
1270 --add-include-path and --include separately.
1271 * giscanner/girwriter.py: Separate name= and version= in include
1273 * giscanner/ast.py: Add Include type.
1274 * giscanner/transformer.py: Cleanups to register_include now that
1275 we don't need to handle mixed filenames and relative arguments.
1276 * girepository/girparser.c: Parse name and version separately;
1277 this fixes a bug as a side effect where we weren't resolving
1278 through aliases for basic types.
1279 * girepository/girepository.c: Fix format string args.
1280 * gir/Makefile.am: Update.
1283 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1285 Bug 556434 – unhandled interface/object/... member types
1287 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1288 g_ir_node_build_typelib): Check all
1289 interface/object/boxed/struct/union members are processed and
1290 abort if they are not. (Mostly callbacks in structs, but also
1291 fields in interfaces.)
1293 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1295 * a/girepository/girnode.c (g_ir_node_build_members,
1296 g_ir_node_build_typelib): refactor common code for processing
1297 members to a function
1299 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1301 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1302 transformation is lossless (it's not)
1304 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1306 * tests/Makefile.am: fix tests to compare xml to xml instead of
1307 typelib to xml, and stop on error
1309 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1311 * tools/generate.c (write_type_name, write_type_info,
1312 write_type_info, write_object_info, write_object_info,
1313 write_interface_info, write_error_domain_info): reduce code
1316 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1318 Bug 556174 – parse types for lists etc.
1320 * girepository/girparser.c (end_type_recurse):
1322 * tools/generate.c (write_type_info, write_field_info,
1323 write_callable_info, write_callable_info, write_constant_info,
1324 write_property_info): use nested <type>s for lists and hashes
1326 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1329 * tests/object.gir: remove trailing whitespace from inside
1330 elements to match g-ir-generate output
1332 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1334 * tools/generate.c (xml_printf): quote printf arguments so that
1335 we don't generate invalid XML by writing unescaped double quotes
1336 and such in attributes
1338 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1340 * tools/generate.c (write_field_info, write_callable_info,
1341 write_function_info, write_callback_info, write_struct_info,
1342 write_constant_value, write_signal_info, write_vfunc_info,
1343 write_object_info, write_interface_info, write_union_info,
1344 write_repository): remove unused indent parameters, xmlwriter
1345 keeps track of necessary indentation
1347 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1349 * tools/generate.c (xml_element_new, xml_element_free,
1350 xml_start_element, xml_end_element, xml_end_element_unchecked,
1351 xml_open, xml_close): Keep track of generated XML tree and
1352 handle indentation and closing tags properly.
1353 (write_field_info, write_callable_info, write_function_info,
1354 write_callback_info, write_struct_info, write_value_info,
1355 write_constant_info, write_enum_info, write_signal_info,
1356 write_vfunc_info, write_property_info, write_object_info,
1357 write_interface_info, write_error_domain_info, write_union_info,
1358 write_repository): Use xml_start_element and xml_end_element to
1361 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1363 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1364 (write_type_name, write_type_info, write_field_info,
1365 write_callable_info, write_function_info, write_callback_info,
1366 write_struct_info, write_value_info, write_constant_value,
1367 write_constant_info, write_enum_info, write_signal_info,
1368 write_vfunc_info, write_property_info, write_object_info,
1369 write_interface_info, write_error_domain_info, write_union_info,
1370 write_repository): wrap all FILE access to go through simple xmlwriter
1372 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1374 Bug 556400 – Fails to build on OS X 10.4
1376 * configure.ac: check for functions backtrace and backtrace_symbols
1377 * girepository/girparser.c (backtrace_stderr): Comment out
1378 implementation if the functions are not available.
1379 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1380 directory for better portability
1382 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1384 Bug 556433 – assume direction = out for int * parameters
1386 * giscanner/ast.py: define a list of types for which, if passed as
1387 reference, we assume a default direction of 'out'
1388 * giscanner/transformer.py: if a type has type pointer to one of the
1389 previously defined types, and no direction is set, assume out.
1390 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1392 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1394 * tests/scanner/annotation.c: fixed a few copy-paste errors
1396 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1398 Bug 556323 – transfer-ownership is wrong for functions returning const
1401 * giscanner/transformer.py: check for a const string as return value,
1402 not just const char*. Suggested by Colin Walters
1403 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1405 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1407 * girepository/ginfo.c, girepository/girepository.h: add
1408 g_union_info_find_method
1410 2008-10-14 Colin Walters <walters@verbum.org>
1412 * tests/repository/Makefile.am: Reenable repo test.
1413 * tests/repository/gitestrepo.c: Prepend search
1414 path for $(top_builddir)/gir dir so that we don't
1415 require installation for "make check" to pass.
1417 2008-10-13 Jürg Billeter <j@bitron.ch>
1419 * giscanner/glibtransformer.py:
1420 * tests/scanner/annotation-1.0-expected.gir:
1421 * tests/scanner/drawable-1.0-expected.gir:
1422 * tests/scanner/foo-1.0-expected.gir:
1423 * tests/scanner/utility-1.0-expected.gir:
1425 Support fields in GObject structs
1427 2008-10-13 Jürg Billeter <j@bitron.ch>
1429 * giscanner/ast.py: add signed integer and off_t to type_names
1431 2008-10-12 Jürg Billeter <j@bitron.ch>
1433 * giscanner/girparser.py: Parse bits attribute of fields
1435 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1437 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1438 * tests/repository/gitestrepo.c (main): instantiate
1439 'GCancellable' to ensure the GType is registered before using
1442 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1444 * giscanner/girparser.py: actually add the parsed constant nodes
1446 2008-10-12 Colin Walters <walters@verbum.org>
1448 * girepository/girepository.c: Don't cast DirEntry to Blob,
1449 actually look it up by offset.
1451 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1453 * giscanner/girparser.py: parse constant nodes in gir files
1455 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1457 * giscanner/transformer.py: prefix for constants have an underscore,
1458 so remove them as if they were functions, not objects.
1460 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1462 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1465 2008-10-12 Colin Walters <walters@verbum.org>
1467 Initial patch from Jani Monoses.
1469 * girepository/gtypelib.c: Fix inverted test for success
1472 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1474 * tools/generate.c (write_callable_info): use "transfer-ownership"
1475 attribute for return values
1477 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1479 * tools/generate.c (write_callable_info): move "transfer" and
1480 "null-ok" attributes from <function> to <return-value> element
1482 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1484 * girepository/girparser.c (start_return_value): handle
1485 "transfer-ownership" attribute
1487 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1489 * girepository/girparser.c (parse_param_transfer):
1490 * tools/generate.c (write_callable_info): use "container" for
1491 container/shallow ownership transfer (not "shallow")
1493 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1495 * girepository/girparser.c (parse_param_transfer,
1496 start_parameter): Refactor handling of transfer=none/shallow/full
1497 to separate function
1499 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1501 Bug 556048 – Crash in g_irepository_find_by_gtype
1503 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1504 * girepository/girepository.c (find_interface): Fix
1505 find_by_gtype case to get the type name from right offset
1507 2008-10-12 Jürg Billeter <j@bitron.ch>
1509 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1512 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1514 * girepository/gtypelib.h (RegisteredTypeBlob): make
1515 'unregistered' one bit wide as everywhere else
1517 2008-10-12 Jürg Billeter <j@bitron.ch>
1519 * giscanner/glibtransformer.py:
1520 * tests/scanner/annotation-1.0-expected.gir:
1521 * tests/scanner/drawable-1.0-expected.gir:
1522 * tests/scanner/drawable.h:
1523 * tests/scanner/foo-1.0-expected.gir:
1524 * tests/scanner/utility-1.0-expected.gir:
1526 Readd class records as workaround to not break Gtk typelib
1528 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1530 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1532 2008-10-12 Jürg Billeter <j@bitron.ch>
1534 * giscanner/glibtransformer.py: Don't generate <record> elements
1536 * tests/scanner/*: Update test cases
1538 2008-10-11 Colin Walters <walters@verbum.org>
1540 Bug 552858: versioning
1542 This is a big patch. You should probably remove your installation
1545 * docs/typelib-format.txt: Add nsversion entry which holds
1546 version of namespace.
1547 * girepository/girepository.h: Add 'version' parameter to
1548 g_irepository_require. This may be NULL. Normally
1549 bindings should pass an explicit version though.
1550 * girepository/girepository.c: Lots of infrastructure to
1551 support versioning. Add some more documentation. Disallow
1552 some usage of NULL namespaces.
1553 * girepository/girmodule.c: Add version parameter.
1554 * girepository/gtypelib.c: Update header size.
1555 * giscanner/ast.py: Add version to Namespace.
1556 * giscanner/girparser.py: Parse version attribute from
1557 XML, pass to Namespace.
1558 * giscanner/girwriter.py: Write out version parameter.
1559 * giscanner/transformer.py: Clean up include registration.
1560 * tests/*: Add version attribute.
1561 * tests/invoke/invoke.c: Don't try looking up test before
1562 it's loaded in repository.
1563 * tools/generate.c: Output version parameter.
1564 * gir/Makefile.am: Add 2.0 version to .gir files.
1566 2008-10-11 Colin Walters <walters@verbum.org>
1568 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1569 if we have mismatched parens.
1571 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1573 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1574 on 'members' variable.
1576 2008-10-11 Colin Walters <walters@verbum.org>
1578 Bug 555947 - update annotations syntax
1580 * giscanner/ast.py: Default to None for transfer. Remove
1581 default transfers for container types; we require this to
1583 * giscanner/girwriter.py: Transfer is now 'none', 'container',
1584 'full' to match repository.
1585 * giscanner/scannerlexer.l: Annotations now are parenthesized.
1586 * giscanner/transformer.py: Update for new annotations syntax.
1589 2008-10-11 Johan Bilien <jobi@litl.com>
1591 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1593 2008-10-11 Johan Bilien <jobi@litl.com>
1595 Bug 552347: Parse #defines constants
1597 * girepository/gtypelib.c: update the list of value_size
1598 with recently defined type tags
1599 * giscanner/scannerparser.y: brought back parsing of #defined, as
1600 present in older version
1601 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1602 * giscanner/girwriter.py: write out constant tags in the gir
1603 * giscanner/sourcescanner.py: add accessor for const_string
1604 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1607 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
1609 Bug 555946: Install a test module exercising all types, transfer
1614 * tests/types/*: Add and install a test module that has functions
1615 accepting and returning most of the basic types to enable bindings
1616 implementors to more easily test their type conversion routines.
1618 2008-10-11 Jürg Billeter <j@bitron.ch>
1620 Bug 552374: Const strings should be identified in the gir.
1622 * giscanner/transformer.py: support string memory management
1623 * tests/scanner/foo.h: use char * and const char *
1624 * tests/scanner/foo-expected.gir: test that
1626 2008-10-11 Johan Dahlin <johan@gnome.org>
1628 * giscanner/girparser.py:
1629 Also parse enums which are not glib types.
1631 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1633 Bug 552370: add one more test for unsigned as a type, not as
1636 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
1637 * test/scanner/foo.h: add function which uses unsigned as a type.
1638 * test/scanner/foo-expected.gir: test that.
1640 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
1642 Bug 555712: Struct and union issues
1644 * giscanner/scannerparser.y (struct_declarator): Use information
1645 provided about the bit width of a field.
1646 * giscanner/transformer.py (Transformer._create_member): Pass the
1647 symbol's const_int member to the created field (it represents the
1649 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
1650 field attribute, if present.
1651 * giscanner/ast.py (Field): Add 'bits' member, specifying the
1652 width in bits of the field (only relevant for bitfields).
1655 * giscanner/transformer.py (Transformer._create_typedef_struct)
1656 (Transformer._create_typedef_union): Add calls to _create_struct()
1657 and _create_union(), respectively. This causes the scanner to
1658 generate output for fields of struct and union typedefs.
1661 2008-10-11 Jürg Billeter <j@bitron.ch>
1663 Bug 552370: unsigned not scanned properly
1665 * giscanner/scannerparser.y: combine basic types such as unsigned
1666 int and long long when scanning
1667 * tests/scanner/foo-expected.gir:
1668 * tests/scanner/foo.c: (foo_test_unsigned):
1669 * tests/scanner/foo.h: test that
1671 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1673 Bug 554854: The --typelib-xml and --inject options should reuse
1674 giscanner parser/writer.
1676 * giscanner/ast.py: add constructor list to Struct and Union.
1677 Add new param in Return's contructor to define transfer.
1678 * giscanner/girparser.py: several additions to the parser in order
1679 to have parsing all nodes of the gir xml files.
1680 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
1681 and writer in --inject and --typelib-xml options.
1682 * giscanner/xmlwriter.py: ignore empty attributes instead of
1683 raising an error as this basically exposes a bug in GIRParser.
1684 This should be reverted as soon as the parser is fixed.
1686 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1688 Bug 552376: scanner generates wrong names for enum members when
1689 there's no defined gtype.
1691 * giscanner/utils.py (strip_common_prefix): Always strip common
1692 prefix exactly up to the last "_", and not beyond.
1693 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
1694 here is that the first character after the last '_' should should be
1695 the same as the character in the same position on the type name.
1696 * tests/scanner/foo-expected.gir: test that
1698 2008-10-10 Lucas Rocha <lucasr@gnome.org>
1700 Bug 555293: append library_paths to LPATH env variable to work
1701 around a bug in find_library when using ldconfig.
1703 * tools/g-ir-scanner (main): ditto.
1705 2008-10-09 Lucas Rocha <lucasr@gnome.org>
1707 * girepository/girepository.c (register_internal): fix regression on
1708 invoke test case by making sure we load the global module in the
1709 typelib when dealing with inline typelibs.
1710 * girepository/gtypelib.c: a couple of coding style fixes.
1712 2008-10-06 Lucas Rocha <lucasr@gnome.org>
1714 Bug 555294: Add support for multiple shared libraries per typelib.
1716 * girepository/ginvoke.c (g_function_info_invoke),
1717 girepository/ginfo.c(g_registered_type_info_get_g_type): use
1718 g_typelib_symbol instead of g_module_symbol.
1719 * girepository/girepository.h: remove g_typelib_set_module and add
1721 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
1722 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
1723 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
1724 modules instead of just one. The symbol lookup is now abstracted
1725 behind g_typelib_symbol which tries to find the passed symbol name in
1727 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
1728 and write shared_library attribute as a comma-separated list of libs.
1730 2008-10-06 Colin Walters <walters@verbum.org>
1732 * giscanner/transformer.py: Parse length= annotation as
1733 a parameter name, not a raw int.
1736 2008-10-03 Colin Walters <walters@verbum.org>
1738 Bug 551744: Non-GObject types aren't aggregating ctors and methods
1740 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
1742 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
1746 2008-10-03 Colin Walters <walters@verbum.org>
1748 Bug 554576: scan problem with ev_selection_render_selection()
1750 * giscanner/transformer.py: Only do type resolution once we've
1751 scanned all types. What could happen before is that we'd strip
1752 the namespace from local type "EvSelection" => Selection, and
1753 then later pull a "Selection" from some other namespace because
1754 we hadn't yet seen the local EvSelection. This could come
1755 down to hash table ordering and other things so not easy
1756 to write a test for.
1758 2008-10-03 Lucas Rocha <lucasr@gnome.org>
1760 * giscanner/girwriter.py (_parser_member): fix the last parameter of
1761 GLibEnumMember constructor as it should be the enum member nick.
1763 2008-10-02 Colin Walters <walters@verbum.org>
1765 Bug 552961: remove this parameter for methods
1767 * giscanner/glibtransformer.py: Delete this parameter; it is
1769 * girepository/ginvoke.c: Insert this parameter for methods.
1770 * girepository/gtypelib.c: Remove no longer needed verification of
1771 method this parameter.
1774 2008-09-30 Dan Winship <danw@gnome.org>
1776 Bug 554490: g-ir-scanner gets confused by '\\'
1778 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
1779 backslashes so it will correctly parse '\\' and "\\"
1781 * tests/scanner/annotation.c: add a use of '\\' to make sure that
1784 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
1786 2008-10-02 Colin Walters <walters@verbum.org>
1788 bug 552393: Note variadic functions
1790 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
1791 to use parameter_list directly.
1792 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
1793 * giscanner/ast.py: Add Varargs type.
1794 * giscanner/transformer.py: Check for ellipsis symbol, transform
1796 * girepository/girnode.h: Add varargs flag to in-memory nodes.
1797 Parse varargs functions, but filter them out before we start
1798 compiling the typelib.
1800 2008-10-02 Colin Walters <walters@verbum.org>
1802 Bug 554632: type tag for GType
1804 * girepository/girepository.h, girepository/girepository.c:
1805 Add type tag for GType - it's a special type we don't want
1806 to resolve to just "long".
1807 * docs/typelib-format.txt: Update.
1808 * girepository/girparser.c: Parse it.
1809 * giscanner/glibtransformer.py: Ensure we don't put GType in
1811 * tools/generate.c: Remove hardcoded type list.
1814 2008-09-30 Dan Winship <danw@gnome.org>
1816 Bug 554521: scanner generates wrong names for enum members with
1817 full type name prefix
1819 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
1820 right amount when the entire "first" string is a prefix of
1823 * tests/scanner/foo.h (FooEnumFullname):
1824 * tests/scanner/foo-expected.gir: test that
1826 2008-09-29 Colin Walters <walters@verbum.org>
1828 Bug 552380: Array parameters should be marked in the gir
1830 * giscanner/ast.py: Default char** to utf8[], and guchar* to
1831 uint8[]. Add Array, List, and Map subclasses of Type;
1832 these types can be generic. Return transfer defaults
1833 to true if return value is string or container type.
1834 Delete Sequence type.
1835 * giscanner/scannerlexer.l: Syntax change for annotations;
1836 use <> since it's more readable.
1837 * giscanner/girwriter.py: Write out these changes.
1838 * giscanner/girparser.py: Parse them.
1839 * giscanner/transformer.py: Have a defined set of
1840 both list and map types. When creating a type,
1841 check if the ctype we've parsed is one of them,
1842 if so create a container type subclass as appropriate.
1843 * girepository/girparser.c: Parse in generic types.
1846 2008-09-27 Colin Walters <walters@verbum.org>
1848 * tools/g-ir-scanner: Add --inject option.
1850 2008-09-25 Colin Walters <walters@verbum.org>
1852 Remove non-repository types from GIR
1854 * giscanner/ast.py: The canonical name is 'utf8', not
1856 * giscanner/glibast.py: A few more glib type mappings.
1857 * girepository/girparser.c: We only parse repository types.
1858 * tests/*.gir: Update.
1860 2008-09-23 Colin Walters <walters@verbum.org>
1862 Bug 552566: Add time_t type
1864 We need a type for time_t since it's special in C, and just
1865 mapping it to long precluded bindings from handling it
1868 2008-09-19 Colin Walters <walters@verbum.org>
1870 Bug 552390: Handle capitialization like "DBus" more robustly
1872 The to_underscores function was designed for use against prefixed
1873 names; we need a separate function which will convert names like
1874 DBusFoo into dbus_foo, not d_bus_foo.
1876 2008-09-19 Colin Walters <walters@verbum.org>
1878 Add check to make sure we're not hitting out unresolved types
1880 Validate the "this" argument for methods
1882 Remove heuristic matching of methods to classes based on prefix
1884 It was a broken hack that dated from when we handled underscoring
1885 and capitalization conventions less well.
1887 2008-09-18 Colin Walters <walters@verbum.org>
1889 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
1891 On Darwin, the suffix for installed shared libraries (.dylib) is
1892 different from loadable modules (.so). We use a bit of magic shell
1893 script from Behdad Esfahbod to figure out the right suffix.
1895 2008-09-15 Johan Dahlin <johan@gnome.org>
1897 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
1898 a wrapper for type_qualifier as well.
1900 2008-09-15 Colin Walters <walters@verbum.org>
1902 http://bugzilla.gnome.org/show_bug.cgi?id=552065
1904 * giscanner/ast.py: Add deprecation attributes.
1905 * giscanner/girwriter.py: Write out deprecation data.
1906 * girepository/girparser.c: Relax parsing; deprecated
1907 attribute now includes freeform string.
1908 * giscanner/scannerlexer.l: Parse Deprecated.
1909 * giscanner/transformer.py: Look for deprecated attribute
1911 * tests/scanner/*: Add a Deprecated test.
1913 2008-09-14 Tor Lillqvist <tml@novell.com>
1915 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
1917 2008-09-14 Colin Walters <walters@verbum.org>
1919 * giscanner/glibtransformer.py: Ignore functions with
1922 2008-09-12 Colin Walters <walters@verbum.org>
1924 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
1926 2008-09-12 Colin Walters <walters@verbum.org>
1928 * giscanner/ast.py: Bind pid_t to INT for vte.
1930 2008-09-12 Colin Walters <walters@verbum.org>
1932 * giscanner/girparser.py: Parse c:type for boxed records/unions.
1933 * giscanner/glibast.py: Avoid overwriting ctype.
1934 * giscsanner/transformer.py: Try resolving types using the GType names.
1936 2008-09-12 Colin Walters <walters@verbum.org>
1938 * giscanner/minixpath.py: Code to run an "XPath"
1939 assertion against an XML tree, taken from
1940 gir-repository/gir/tests.py.
1941 * giscanner/Makefile.am: Ship it.
1942 * tools/g-ir-scanner: Add --xpath-assertions option.
1943 * gir/GLib-assertions.txt: Add a few assertions.
1944 * gir/Makefile.am: Run them.
1946 2008-09-11 Colin Walters <walters@verbum.org>
1948 http://bugzilla.gnome.org/show_bug.cgi?id=551737
1950 * giscanner/transformer.py: Fix strip_namespace_func to only strip
1951 prefix if it ends with _. Tweak callback stripping to determine
1952 based on presence of _ whether we need to use strip_namespace_func
1953 or strip_namespace_object.
1955 2008-09-09 Owen Taylor <otaylor@redhat.com>
1957 * docs/typelib-format.txt: Wether => Whether
1959 2008-09-08 Colin Walters <walters@verbum.org>
1961 * girepository/girparser.c: Default to "readable" for properties.
1962 * giscanner/ast.py: Add readable, writable etc.
1963 * giscanner/girwriter.py: Writ them.
1964 * giscanner/glibtransformer.py: Inspect them.
1967 2008-09-07 Colin Walters <walters@verbum.org>
1969 * giscanner/cgobject.py: Add comment.
1971 2008-09-07 Colin Walters <walters@verbum.org>
1973 * giscanner/cgobject.py: Also call g_thread_init.
1975 2008-09-07 Colin Walters <walters@verbum.org>
1977 * giscanner/transformer.py: Fix regression by not
1978 stripping prefix before stripping namespace for unions
1981 2008-09-06 Colin Walters <walters@verbum.org>
1983 * giscanner/transformer.py: If a namespace contains
1984 multiple caps, try stripping both gnomekeyring_ and
1987 2008-09-07 Johan Dahlin <johan@gnome.org>
1989 Bug 551162 – giscanner does not recognize asm and __asm__
1990 * giscanner/scannerlexer.l:
1991 Patch by Jani Monoses.
1993 2008-09-06 Colin Walters <walters@verbum.org>
1995 * girepository/girnode.c: Allow gtype_name
1996 and gtype_init in struct and union.
1997 * girepository/girparser.c: Parse glib:
1998 boxed bits for both structure and union.
1999 * girepository/gtypelib.c: Don't barf
2000 if structure is boxed.
2001 * giscanner/girparser.py: Parse new XML
2003 * giscanner/girwriter.py: Write out new
2005 * giscanner/glibast.py: Define new classes
2006 which are both Boxed and Struct/Union, as
2007 well as an "Other" for everything else.
2008 * giscanner/glibtransformer.py: Handle
2009 boxed types specially; we try to merge
2010 them with a struct/union if one exists,
2011 otherwise fall back to generic boxed.
2013 * tools/generate.c: Write out new format.
2015 2008-09-06 Johan Dahlin <johan@gnome.org>
2017 * giscanner/grealpath.h: Include stdlib.h
2019 * docs/g-ir-generate.1: Remove leading %
2021 2008-09-01 Colin Walters <walters@verbum.org>
2023 * girepository/girparser.c: Look at c:type to determine
2024 whether or not an item is a pointer.
2026 2008-09-01 Johan Dahlin <johan@gnome.org>
2028 * tests/scanner/Makefile.am:
2029 Set PYTHONPATH so the scanner can run
2030 even if you didn't install anything.
2032 2008-09-01 Johan Dahlin <johan@gnome.org>
2035 Post-release version bump
2038 2008-09-01 Johan Dahlin <johan@gnome.org>
2042 2008-08-31 Colin Walters <walters@verbum.org>
2044 * giscanner/glibtransformer.py: Quiet info
2047 2008-08-31 Johan Dahlin <johan@gnome.org>
2050 Bump version to 0.5.0
2052 2008-08-31 Colin Walters <walters@verbum.org>
2054 * giscanner/glibtransformer.py: Follow aliases to ensure
2055 we don't get a constructor returning a basic type.
2056 * giscanner/transformer.py: Add function to follow aliases.
2059 2008-08-31 Johan Dahlin <johan@gnome.org>
2061 * giscanner/scannerlexer.l:
2062 * giscanner/scannerparser.y:
2063 * giscanner/sourcescanner.h:
2064 * giscanner/sourcescanner.py:
2065 Parse GCC extensions in the parser instead of just undeffing them
2066 in the pre-processor.
2068 2008-08-31 Johan Dahlin <johan@gnome.org>
2070 * giscanner/glibtransformer.py:
2071 Clean up a huge if. Do not add methods or constructors
2073 * giscanner/utils.py:
2074 second might be longer than first, check that.
2076 2008-08-31 Johan Dahlin <johan@gnome.org>
2081 2008-08-31 Colin Walters <walters@verbum.org>
2083 * girepository/girparser.c: Don't lose if we
2086 2008-08-31 Colin Walters <walters@verbum.org>
2088 * giscanner/glibtransformer.py: Look for libtool
2089 library in current directory
2090 * tests/scanner - Update.
2092 2008-08-30 Colin Walters <walters@verbum.org>
2094 * docs/typelib-format.txt: Add a guint32
2096 * gir/Makefile.am: Dep on Makefile
2097 * girepository/ginfo.c:
2098 * girepository/girepository.c: Clean up
2099 default typelib handling; remove global
2100 default_typelib variable. Ensure we handle
2101 NULL repository in more places.
2102 Support dependency resolution.
2103 Support lazy loading.
2104 * girepository/girepository.h: Remove
2105 g_irepository_unregister; we don't support
2106 unloading typelibs since really they're
2107 process-global. Update for lazy loading
2109 * girepository/girmodule.c: Use g_new0.
2110 Add dependencies to GirModule.
2111 * girepository/girparser.c: Parse dependencies.
2112 * girepository/gtypelib.c: Add 4 bytes for
2114 * tests/Makefile.am: Kill off gobject.gir,
2115 it conflicts with the real one.
2116 * tests/object.gir: Dep on GObject.
2117 * tools/generate.c: Take --includedir
2118 argument to say which directories to search
2119 for typelibs. Print out dependencies.
2121 2008-08-30 Colin Walters <walters@verbum.org>
2123 * giscanner/glibtransformer.py: Reduce warning noise.
2125 2008-08-29 Colin Walters <walters@verbum.org>
2127 * girepository/ginfo.c: Add some assertions regarding
2128 refcounts, just to be sure.
2129 * giscanner/glibtransformer.py: Blacklist a few more
2132 2008-08-29 Colin Walters <walters@verbum.org>
2134 * giscanner/glibtransformer.py: Blacklist a few
2135 functions that use GError oddly
2137 2008-08-29 Colin Walters <walters@verbum.org>
2139 * girepository/gtypelib.c: Don't crash if no
2142 2008-08-29 Colin Walters <walters@verbum.org>
2144 * girepository/girparser.c: Handle chains of aliases
2145 across modules by ensuring we fully qualify aliases
2148 2008-08-29 Colin Walters <walters@verbum.org>
2150 * girepository/girparser.c: Don't search aliases
2153 2008-08-29 Colin Walters <walters@verbum.org>
2155 * girepository/girparser.c: Rewrite type parsing
2156 to handle both GLib parsing case as well as correctly
2157 handling GLib.List and friends. Don't try to treat
2158 e.g. ListStore as a List.
2160 2008-08-29 Colin Walters <walters@verbum.org>
2162 * girepository/gtypelib.c: Add more context
2165 2008-08-29 Colin Walters <walters@verbum.org>
2167 * giscanner/glibtransformer.py: Add some informative
2168 logging messages in corner cases. Be sure we use
2169 the most recent node set instead of a cache
2170 when generating result set.
2171 * tests/: Remove duplicated bits in expected girs
2172 * girepository/girparser.c: Accept both List (for
2173 compiling GLib) and GLib.List (what the scanner
2176 * tools/generate.c: Generate canonical form.
2178 2008-08-29 Johan Dahlin <johan@gnome.org>
2180 * giscanner/config.py.in:
2181 Use datarootdir instead of datadir to avoid
2182 an autoconf warning.
2184 2008-08-29 Johan Dahlin <johan@gnome.org>
2188 * examples/gdk-pixbuf.gidl:
2190 Update and remove old cruft.
2192 2008-08-29 Johan Dahlin <johan@gnome.org>
2195 * docs/g-ir-compiler.1:
2196 * docs/g-ir-generate.1:
2197 * docs/g-ir-scanner.1:
2198 Add man pages for the generator and compiler.
2200 2008-08-29 Johan Dahlin <johan@gnome.org>
2202 * docs/g-ir-scanner.1: Document
2204 * giscanner/Makefile.am:
2205 * giscanner/gidlparser.py:
2206 * giscanner/gidlwriter.py:
2207 * tools/g-ir-scanner:
2208 Remove gidl support.
2210 2008-08-28 Colin Walters <walters@verbum.org>
2212 * tests/scanner/Makefile.am: Pass the right
2213 --includedir args. Add a Makefile dep.
2214 * tools/compiler.c: Pass includedirs down.
2215 * girepository/girparser.c: Actually put
2216 includedirs in context, pass down. Fix
2219 2008-08-28 Colin Walters <walters@verbum.org>
2221 * gir/Makefile.am: Use --includedir
2222 * girepository/girparser.c: Recursively parse
2223 includes to pull in aliases and expand them.
2224 We need this to avoid putting unknown names in
2226 * tools/compiler.c: Add --includedir option.
2227 * giscanner/ast.py: Map size/ssize to types
2230 2008-08-28 Tor Lillqvist <tml@novell.com>
2232 Make check now runs successfully on Windows.
2234 * tools/compiler.c (write_out_typelib): Use binary mode for output
2237 * girepository/girnode.c: Don't print NULL strings.
2239 * tests/invoke/Makefile.am
2240 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2241 convince libtool to build shared libraries.
2243 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2244 g_assert() instead of printing out expected errors.
2246 2008-08-28 Tor Lillqvist <tml@novell.com>
2248 * girepository/gtypelib.h: Change type of bitfield fields from
2249 guint to the most suitable smaller type. This makes the struct
2250 sizes match the ones on Linux that the sanity check expects when
2251 using gcc -mms-bitfields on Windows.
2253 2008-08-28 Johan Dahlin <johan@gnome.org>
2258 * giscanner/Makefile.am:
2259 * tests/Makefile.am:
2260 * tests/scanner/Makefile.am:
2261 Make distcheck pass.
2263 2008-08-27 Johan Dahlin <johan@gnome.org>
2265 * giscanner/Makefile.am:
2266 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2268 2008-08-27 Tor Lillqvist <tml@novell.com>
2270 Make g-ir-scanner work on Windows. Still problems with the typelib
2271 code. Changes okayed by jdahlin.
2273 * configure.ac: Check for Windows, set Automake conditional
2274 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2275 avoid shell quoting issues
2277 * girepository/Makefile.am: Use -no-undefined so that libtool
2278 agrees to build a shared library on Windows.
2280 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2281 Windows. Empty implementation on Windows so far.
2283 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2284 informative error message for the assertion failures. Tell also
2285 what the expected size of the struct is. Check all sizes first and
2286 fail afterwards if at least one size was different from expected.
2288 * tools/Makefile.am: Reorder libraries into proper logical
2291 * tools/generate.c: Don't include <dlfcn.h>, not used.
2293 * giscanner/Makefile.am: On Windows, link with the Python library,
2294 and install the module DLL as _giscanner.pyd. Remove the
2295 unnecessary import library and libtool library that libtool has
2298 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2299 and just skip it. Recognize also two "l" suffixes for long long
2300 constants. Recognize also __inline__.
2302 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2303 GetFullPathName(). As such, GetFullPathName() does more than the
2304 UNIX realpath(). It also changes relative paths into absolute
2305 paths. But for our purposes that shouldn't matter.
2307 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2308 Windows the file descriptor passed to us is from Python. Python
2309 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2310 uses msvcrt.dll. On Windows, file descriptors are specific to
2311 which C library is used. So we must find out what underlying OS
2312 handle corresponds to the file descriptor Python passes us, and
2313 then make that into a file descriptor valid for the C library this
2316 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2317 __attribute__ as the lexer now handles it. The definition as empty
2318 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2319 __attribute__. Close the temp file before unlinking it.
2321 * giscanner/cgobject.py: Use correct library name for the gobject
2324 * gir/Makefile.am: Must pass the full basename of the DLLs on
2325 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2326 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2327 reality they won't change, until there is a GLib 3, and then also
2328 the Unix code here needs changing.
2330 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2333 2008-08-26 Colin Walters <walters@verbum.org>
2335 * girepository/girepository.c: Search
2336 $DATADIR/girepository instead of
2337 $DATADIR/gitypelibs; this naming makes
2338 it clearer that e.g. jgir can install
2340 * gir/Makefile.am: Install there.
2342 2008-08-26 Colin Walters <walters@verbum.org>
2344 * girepository/gtypelib.c (_g_typelib_init): Also
2345 use G_MODULE_SUFFIX instead of hardcoding .so.
2347 2008-08-26 Colin Walters <walters@verbum.org>
2349 * girepository/gtypelib.c (_g_typelib_init): Free
2350 string in the right place.
2352 2008-08-26 Colin Walters <walters@verbum.org>
2354 * girepository/gtypelib.c (_g_typelib_init): Handle
2355 both .la and .so names; this works better in the
2356 uninstalled library case.
2358 2008-08-26 Johan Dahlin <johan@gnome.org>
2361 * giscanner/Makefile.am:
2362 * giscanner/cgobject.py:
2363 * giscanner/config.py.in:
2364 * giscanner/sourcescanner.py:
2365 Avoid undeffing __GNUC__, instead define
2366 __attribute__ & friends. Remove glibconfig.h hack.
2367 This makes gobject-introspection work better on
2368 MacOS X, Thanks to Richard Hult for kind help.
2370 2008-08-25 Colin Walters <walters@verbum.org>
2372 * giscanner/glibtransformer.py: Always print
2375 2008-08-25 Colin Walters <walters@verbum.org>
2377 * giscanner/glibtransformer.py: Skip over
2378 interfaces we don't know.
2380 2008-08-25 Colin Walters <walters@verbum.org>
2382 * girepository/girparser.c: Parse new implements
2383 syntax, drop gapi one.
2384 * tests/object.gir: Update.
2385 * tools/generate.c: Generate new syntax.
2387 2008-08-25 Colin Walters <walters@verbum.org>
2389 * giscanner/ast.py: Add interfaces property
2391 * giscanner/girwriter.py: Write out implemented
2393 * giscanner/glibtransformer.py: Introspect
2394 implemented interfaces.
2395 * tests/scanner/*: Make FooObject implement
2398 2008-08-25 Colin Walters <walters@verbum.org>
2400 * giscanner/glibtransformer.py: More correctly pair
2401 methods; if we have a symbol that starts with
2402 e.g. hippo_canvas look for a matching HippoCanvas
2403 class before accepting e.g. HippoCanvasImage.
2405 2008-08-24 Colin Walters <walters@verbum.org>
2407 * tools/g-ir-scanner: Filter out unknown options from
2410 2008-08-24 Colin Walters <walters@verbum.org>
2412 * giscanner/glibtransformer.py: Fail with better
2413 error if we can't find library.
2415 2008-08-24 Colin Walters <walters@verbum.org>
2417 * tools/g-ir-scanner: Use subprocess instead of
2418 commands, works on Windows and avoids the evil
2421 2008-08-24 Colin Walters <walters@verbum.org>
2423 * giscanner/glibtransformer.py: Skip over
2424 g_object_get_type from GLib trunk.
2426 2008-08-24 Colin Walters <walters@verbum.org>
2428 * girepository/girepository.c (g_irepository_require):
2429 Don't open shared library here; we already do it
2432 2008-08-24 Colin Walters <walters@verbum.org>
2434 * girepository/gtypelib.c: Add context stack so
2435 when we get an error we can print out nicely
2438 2008-08-24 Johan Dahlin <johan@gnome.org>
2440 * girepository/girparser.c (start_glib_boxed), (start_function),
2441 (start_field), (start_alias):
2442 Refactor a couple of parsing functions to be simpler to follow.
2445 2008-08-24 Johan Dahlin <johan@gnome.org>
2447 * girepository/girparser.c (start_function):
2448 Remove left-over code, checking type of function.
2450 2008-08-23 Colin Walters <walters@verbum.org>
2452 * giscanner/config.py: Define DATADIR.
2453 * giscanner/transformer.py: Look in DATADIR.
2455 2008-08-23 Colin Walters <walters@verbum.org>
2457 * girepository/gtypelib.c: Check constructor
2459 * girepository/girnode.c: Small tweaks.
2460 * girepository/ginfo.c: Calculate signature offsets
2462 * girepository/girparser.c: Remove duplicate
2464 * giscanner/glibtransformer.py: Avoid marking
2465 functions which return a basic type as
2468 2008-08-23 Colin Walters <walters@verbum.org>
2470 * girepository/girparser.c: Ignore <include>.
2471 * giscanner/girparser.py: Parse them.
2472 * giscanner/girwriter.py: Generate them.
2473 * giscanner/transformer.py: Process <include>
2474 recursively. Don't require full path for
2475 includes, look in {$XDG_DATA_DIRS}/gir.
2476 * tools/g-ir-scanner: Pass through includes.
2477 * Makefile.am: Remove extra --include
2479 * *-expected.gir: Add expected includes.
2481 2008-08-23 Johan Dahlin <johan@gnome.org>
2483 * tests/scanner/Makefile.am:
2484 * tests/scanner/annotation-expected.gir:
2485 * tests/scanner/drawable-expected.gir:
2486 Avoid duplication in the Makefile, regenerate with new
2487 namespaces (same as the filename)
2489 2008-08-22 Colin Walters <walters@verbum.org>
2491 * girepository/girnode.c: Don't hardcode integers,
2494 2008-08-22 Johan Dahlin <johan@gnome.org>
2496 * giscanner/sourcescanner.py:
2497 Check for ../gobject-introspection-1.0.pc.in to determine
2498 if we run installed or uninstalled.
2500 2008-08-22 Johan Dahlin <johan@gnome.org>
2503 * giscanner/sourcescanner.py:
2504 Send in undefs/defines via writing it directly to stdin
2505 of cpp instead of via arguments.
2507 2008-08-22 Colin Walters <walters@verbum.org>
2509 * tools/generate.c, tools/compiler.c: Default
2511 * all Makefile.am: Update.
2513 2008-08-22 Colin Walters <walters@verbum.org>
2515 * girepository/girparser.c: Pass through
2516 recursive types. Avoid overwriting errors.
2517 * giscanner/xmlwriter.py: Always write the
2519 * tests/*.gir: Adjust.
2520 * tests/scanner/Makefile.am: Build typelibs,
2521 and generate XML from those. Once we
2522 have a good diff mechanism...
2523 * tests/scanner/*-expected.gir: Add XML
2525 * tools/g-ir-scanner: Accept --typelib-xml
2527 * tools/generate.c: Better defaults for transfer.
2529 2008-08-22 Johan Dahlin <johan@gnome.org>
2533 * giscanner/Makefile.am:
2534 * giscanner/config.py.in:
2535 * giscanner/sourcescanner.py:
2536 Use the generated glibconfig.h for all scanner invokations.
2537 Rename it to glibconfig-scanner.h and install it.
2538 Add a config.py which so far contains the include dir.
2540 2008-08-22 Johan Dahlin <johan@gnome.org>
2543 Replace glibconfig.h with our own, do some replacement
2544 for CPP/C features we do not support
2546 2008-08-22 Colin Walters <walters@verbum.org>
2548 * tools/generate.c (write_callable_info): Fix unref
2551 2008-08-22 Colin Walters <walters@verbum.org>
2553 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2554 * tests/Makefile.am: Support $(DEBUG)
2555 * tools/generate.c: Do immediate close tags if no
2558 2008-08-21 Colin Walters <walters@verbum.org>
2560 * tests/scanner/drawable-expected.gir,
2561 * tests/scanner/drawable.c,
2562 * tests/scanner/drawable.h:
2565 2008-08-21 Colin Walters <walters@verbum.org>
2567 * giscanner/glibtransformer.py: Compute prefix
2568 by searching through the symbol for bits
2569 rather than going directly from ctype; this fixes
2572 2008-08-21 Colin Walters <walters@verbum.org>
2574 * giscanner/glibtransformer.py: Also try squashing
2575 underscores from namespace, fixes webkit_web_view_new.
2577 2008-08-21 Colin Walters <walters@verbum.org>
2579 * giscanner/glibtransformer.py: More ctor work,
2580 avoid having gtk_window_group_new end up under
2583 2008-08-21 Colin Walters <walters@verbum.org>
2585 * giscanner/glibtransformer.py: Much simpler approach
2586 of mapping uscored names to classes.
2587 * giscanner/utils.py: Remove unnecessary function.
2589 2008-08-21 Johan Dahlin <johan@gnome.org>
2591 * girepository/girepository.c (g_irepository_require):
2592 Plug memory leak and avoid using freed memory.
2593 Resolve the whole module path, here as well.
2595 2008-08-21 Colin Walters <walters@verbum.org>
2597 * giscanner/glibtransformer.py: Look up all permutations
2598 of class names when scanning methods/ctors based on
2599 the prefix instead of using the return value. This
2600 associates gtk_window_new with the right class.
2602 2008-08-21 Colin Walters <walters@verbum.org>
2604 * girepository/girmodule.c (g_ir_module_build_typelib):
2605 Revert change to increment header_size; we do that in
2608 2008-08-21 Colin Walters <walters@verbum.org>
2610 * girepository/girnode.c (write_string): Tweak to
2611 use UINT instead of INT. Not likely to matter.
2612 * girepository/girmodule.c (g_ir_module_build_typelib):
2613 Add to header_offset as well for header strings
2614 to match what write_string does.
2615 * girepository/gtypelib.c: Replace is_name with
2616 validate_name, which more strongly validates and
2617 handles errors in a better way. Update all callers.
2618 * giscanner/glibtransformer.py: Handle constructors
2621 2008-08-21 Johan Dahlin <johan@gnome.org>
2623 * gir/Makefile.am (typelibs_DATA): Build and
2624 install the Gio.typelib too
2626 * girepository/gtypelib.c (_g_typelib_init):
2627 Use g_module_build_path to resolve the shlib name
2629 2008-08-21 Colin Walters <walters@verbum.org>
2631 * gir/Makefile.am: CLEANFILES typelibs too.
2633 2008-08-21 Johan Dahlin <johan@gnome.org>
2635 * giscanner/glibtransformer.py:
2636 Do not send .la files through find_library.
2638 2008-08-21 Colin Walters <walters@verbum.org>
2640 * girepository/girparser.c (g_irepository_require):
2641 Fix one small leak in error case.
2643 2008-08-21 Johan Dahlin <johan@gnome.org>
2646 Parse glibconfig.h as well and install the compiled
2649 2008-08-21 Johan Dahlin <johan@gnome.org>
2652 * giscanner/glibtransformer.py:
2653 * tools/g-ir-scanner:
2654 Do not hard-core library names in the Makefile, reuse
2655 ctypes find_library instead.
2657 2008-08-21 Johan Dahlin <johan@gnome.org>
2659 * girepository/girparser.c (resolve_aliases):
2660 Remove compilation warnings
2662 2008-08-21 Johan Dahlin <johan@gnome.org>
2664 * girepository/girepository.c (g_irepository_require):
2665 Rewrap and fix double free bug by leaking a bit.
2667 2008-08-20 Colin Walters <walters@verbum.org>
2669 * girepository/girepository.c: Add new function
2670 g_irepository_get_typelib_path which tells
2671 us from where we loaded a namespace.
2673 2008-08-20 Colin Walters <walters@verbum.org>
2675 * tests/scanner/*-expected.gir: Adjust for
2676 added shared-library.
2677 * giscanner/giwriter.py: Make pylint happy.
2679 2008-08-20 Colin Walters <walters@verbum.org>
2681 * girepository/girmodule.c (g_ir_module_build_typelib):
2682 Calculate size correctly, avoid use-after-free.
2684 2008-08-20 Colin Walters <walters@verbum.org>
2686 * girepository/girepository.c: Remove
2687 g_irepository_register_file in favor of
2688 g_irepository_require. There are two
2689 possible deployment scenarios for typelibs:
2690 First, separate in $DATADIR/gitypelibs/. Second,
2691 they may be embedded in shlibs. However since
2692 the first is now the normal case, the API is
2693 optimized around it.
2695 Refactor internals to look up typelibs for
2696 namespaces just-in-time, but we expect
2697 consumers to call g_irepository_require.
2699 Also, add some docs. No one has died from that
2701 * gir/Makefile.am: Need --library for glib.
2702 * giscanner/girwriter.py: Write out shared-library.
2703 * tools/g-ir-writer: Take the first --library
2704 argument as the target of shared-library. In
2705 the future we should make this nicer with pkg-config
2708 2008-08-20 Colin Walters <walters@verbum.org>
2710 * girepository/girparser.py: And parse them.
2712 2008-08-20 Johan Dahlin <johan@gnome.org>
2714 * giscanner/glibast.py: Add gshort/gushort types
2716 2008-08-20 Colin Walters <walters@verbum.org>
2718 * gir/Makefile.am: Rename .gir files using GI namespace.
2719 * girepository/girepository.c: Use XDG_DATA_DIRS for
2720 looking up typelibs. Also typelibs are now suffixed
2722 * tests/invoke/Makefile.am: Only use metadata.
2723 * girepository/Makefile.am: Remove unnecessary include.
2724 * tests/scanner/Makefile.am: Update using GI namespaces
2725 for scanner includes.
2727 2008-08-20 Colin Walters <walters@verbum.org>
2729 * girepository/transformer.py: Suppress aliases whose
2731 * girepository/ast.py: Define some more aliases.
2733 2008-08-20 Colin Walters <walters@verbum.org>
2735 * girepository/girparser.c: Avoid alias infloops.
2737 2008-08-20 Colin Walters <walters@verbum.org>
2739 * tests/scanner/foo-expected.gir: Fix expected list type.
2741 2008-08-20 Johan Dahlin <johan@gnome.org>
2743 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
2744 Add a workaround for #548689.
2745 We can now compile gtk!
2747 2008-08-20 Colin Walters <walters@verbum.org>
2749 * giscanner/glibtransformer.py: Try to look up
2750 aliases using the c:type too.
2752 2008-08-20 Colin Walters <walters@verbum.org>
2754 * girepository/girparser.c: Parse union fields.
2756 2008-08-20 Johan Dahlin <johan@gnome.org>
2758 * giscanner/ast.py: Make time_t an alias for long
2760 * gir/gio-2.0-good.gir:
2761 * gir/glib-2.0-good.gir:
2762 * gir/gobject-2.0-good.gir:
2764 * giscanner/glibtransformer.py:
2765 Do not delete Class structures, we need them in gdk/gtk.
2766 * tests/scanner/drawable-expected.gir:
2767 * tests/scanner/foo-expected.gir:
2768 * tests/scanner/utility-expected.gir:
2771 2008-08-20 Johan Dahlin <johan@gnome.org>
2773 * tests/scanner/Makefile.am:
2774 * tests/scanner/annotation-expected.gir:
2775 * tests/scanner/annotation.c (annotation_object_class_init),
2776 (annotation_object_init), (annotation_object_method),
2777 (annotation_object_in), (annotation_object_out),
2778 (annotation_object_inout), (annotation_object_inout2),
2779 (annotation_object_inout3), (annotation_object_calleeowns),
2780 (annotation_object_calleesowns), (annotation_object_get_strings),
2781 (annotation_object_with_voidp), (annotation_object_get_objects),
2782 (annotation_object_create_object), (annotation_object_allow_none):
2783 * tests/scanner/annotation.h:
2784 * tests/scanner/foo-expected.gir:
2785 * tests/scanner/foo.c:
2786 * tests/scanner/foo.h:
2787 Split out annotation tests out of foo
2789 2008-08-20 Johan Dahlin <johan@gnome.org>
2791 * tests/scanner/Foo-expected.gir:
2792 * tests/scanner/Makefile.am:
2793 * tests/scanner/foo-expected.gir:
2794 * tests/scanner/foo-object.h:
2795 * tests/scanner/foo.c:
2796 Foo->foo, foo-object.h -> foo.h
2798 2008-08-20 Johan Dahlin <johan@gnome.org>
2800 * tests/scanner/Foo-expected.gir:
2801 * tests/scanner/Makefile.am:
2802 * tests/scanner/drawable-expected.gir:
2803 * tests/scanner/drawable.c (test_drawable_class_init),
2804 (test_drawable_init):
2805 * tests/scanner/drawable.h:
2806 * tests/scanner/foo-object.h:
2807 * tests/scanner/foo.c (foo_boxed_method):
2808 Move the drawable parts out of Foo to its own test.
2810 2008-08-20 Johan Dahlin <johan@gnome.org>
2812 * tests/scanner/Foo-expected.gir:
2813 * tests/scanner/foo-object.h:
2814 * tests/scanner/foo.c (foo_drawable_class_init),
2815 (foo_drawable_init):
2816 Add a based on GdkDrawable which generates
2819 2008-08-19 Colin Walters <walters@verbum.org>
2821 * giscanner/transformer.py: Don't try
2822 to strip prefix before namespace.
2824 2008-08-19 Johan Dahlin <johan@gnome.org>
2826 * giscanner/transformer.py:
2827 * tests/scanner/Foo-expected.gir:
2828 * tests/scanner/foo-object.h:
2829 Add support for typedef void foo type of
2832 2008-08-19 Johan Dahlin <johan@gnome.org>
2835 * giscanner/girwriter.py:
2836 * giscanner/glibtransformer.py:
2837 * giscanner/transformer.py:
2838 * tests/scanner/Foo-expected.gir:
2839 Add basic support for union, base the code much
2840 on Struct. Add a testcase.
2842 2008-08-19 Johan Dahlin <johan@gnome.org>
2844 * tests/scanner/Foo-expected.gir:
2845 * tests/scanner/foo-object.h:
2846 Add a union testcase which the compiler currently
2849 2008-08-19 Johan Dahlin <johan@gnome.org>
2851 * gobject-introspection-1.0.pc.in:
2852 Add a g_ir_compiler variable
2854 2008-08-19 Colin Walters <walters@verbum.org>
2856 * giscanner/ast.py: Rework types to be more closely
2858 * giscanner/girparser.py: Parse more bits.
2859 * giscanner/girwriter.py: Write sequences in a new
2860 way that specifies container type.
2861 * giscanner/glibast.py: Adjust for ast.py changes,
2862 add 'ctype' property to GLibObject and GLibInterface
2863 so we can look things up by it later.
2864 * gicanner/transformer.py: Names is new class holding
2865 the various namespaces we manage. Do not confuse
2866 with Namespace which is toplevel XML node effectively.
2867 Rework all type resolution to go through
2868 _resolve_type_name_1.
2869 * giscanner/glibtransformer.py: Raise UnknownTypeError
2870 instead of ValueError for cleanliness. Add Unresolved
2871 class to mark types whose parent we haven't seen yet.
2872 Use new Names object from transformer.py.
2873 Correctly look up parent=.
2874 Fix type validation to handle sequences.
2875 * tests/scanner/Foo-expected.gir: Update for sequence
2876 work, int instead of int32.
2877 * tools/g-ir-scanner: Add --noclosure option
2878 * gir/Makefile.am: Use --noclosure by default for
2881 2008-08-18 Johan Dahlin <johan@gnome.org>
2883 * gir/gio-2.0-good.gir:
2884 * gir/glib-2.0-good.gir:
2885 * gir/gobject-2.0-good.gir:
2888 2008-08-18 Johan Dahlin <johan@gnome.org>
2891 * giscanner/girparser.py:
2892 * giscanner/girwriter.py:
2893 * giscanner/glibast.py:
2894 * giscanner/glibtransformer.py:
2895 * giscanner/transformer.py:
2896 * tests/scanner/Foo-expected.gir:
2897 * tests/scanner/foo-object.h:
2898 * tests/scanner/utility-expected.gir:
2899 * tests/scanner/utility.h:
2900 Redo type resolving and validation.
2901 Add a couple of new tests.
2902 Patch mostly written by Colin.
2904 2008-08-18 Johan Dahlin <johan@gnome.org>
2907 * giscanner/girparser.py:
2909 * giscanner/transformer.py:
2910 Improve enum parsing for enums without a GType.
2911 Make flags/enum references to other girs work
2912 * giscanner/utils.py:
2914 * tests/scanner/Makefile.am:
2915 * tests/scanner/foo-object.h:
2916 * tests/scanner/utility-expected.gir:
2917 * tests/scanner/utility.h:
2918 Add a new test for external enum references
2920 2008-08-18 Johan Dahlin <johan@gnome.org>
2922 * docs/global-module-registry.txt: Update
2924 * tests/array.gir: Update with new type proposal
2926 * girepository/girepository.c (g_type_tag_to_string):
2927 * girepository/girepository.h:
2928 * girepository/girnode.c (g_ir_node_get_full_size_internal),
2930 * girepository/girnode.h:
2931 Make enum serializing functions public. Clean up some whitespace.
2933 2008-08-17 Johan Dahlin <johan@gnome.org>
2935 * docs/global-module-registry.txt:
2936 Add a document for an on disk module registry format
2938 2008-08-17 Johan Dahlin <johan@gnome.org>
2941 * gir/gio-2.0-good.gir:
2944 2008-08-17 Johan Dahlin <johan@gnome.org>
2947 * gir/glib-2.0-good.gir:
2948 * gir/gobject-2.0-good.gir:
2949 * giscanner/cgobject.py:
2950 * giscanner/glibtransformer.py:
2951 Regenerate GObject & GType.
2952 Avoid warnings when generating gobject-2.0.gir.
2953 Introspect a little more, and skip *_get_type functions.
2955 2008-08-17 Colin Walters <walters@verbum.org>
2957 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
2958 Rename to -good, always generate during build.
2959 * gir/Makefile.am: Ensure .gir files dep on
2960 all scanner sources.
2961 * Makefile.am: Switch build order to ensure
2962 the scanner is ready before we do gir/.
2963 * tools/g-ir-scanner: Look for .git too.
2965 2008-08-17 Johan Dahlin <johan@gnome.org>
2967 * girepository/gtypelib.c (validate_enum_blob):
2968 * giscanner/glibtransformer.py:
2969 * giscanner/transformer.py:
2970 Remove resolve_possible_typedefs, it was unused.
2971 Allow multiple enum values of the sample value in an enum,
2972 since it's actually pretty common.
2973 Register enums so they can be resolved too.
2975 2008-08-16 Johan Dahlin <johan@gnome.org>
2977 * giscanner/girparser.py:
2978 Parse enumeration/bitfield.
2980 2008-08-16 Johan Dahlin <johan@gnome.org>
2982 * giscanner/girparser.py:
2985 2008-08-16 Johan Dahlin <johan@gnome.org>
2987 * giscanner/glibtransformer.py:
2988 Resolve type names for alias targets
2989 * giscanner/transformer.py:
2990 Skip FILE* parameters fow now
2992 2008-08-16 Johan Dahlin <johan@gnome.org>
2995 * gir/gobject-2.0.gir:
2998 * tests/scanner/Makefile.am:
3001 2008-08-15 Colin Walters <walters@verbum.org>
3003 * giscanner/glibtransformer.py: Explicitly construct
3004 new list, since we're deleting as we iterate.
3005 Don't delete all structures which end in Class; just
3006 ones which have a paired GObject.
3007 Fix printing of type warning.
3008 * giscanner/transformer.py: Make strip_namespace_object
3009 be the identity function if it doesn't match the
3012 2008-08-15 Colin Walters <walters@verbum.org>
3014 * giscanner/cgobject.py: Define yet more argument
3015 prototypes; fix prototype for g_type_fundamental.
3017 2008-08-14 Johan Dahlin <johan@gnome.org>
3019 * tests/Makefile.am:
3020 * tests/constant.gir:
3021 * tests/gobject.gir:
3023 * tools/generate.c (write_struct_info):
3024 Fix generator for constant/gobject/struct
3026 2008-08-14 Johan Dahlin <johan@gnome.org>
3028 * tests/Makefile.am:
3030 * tools/generate.c (write_enum_info):
3031 Fix generation of enum/bitfields
3033 2008-08-14 Johan Dahlin <johan@gnome.org>
3035 * girepository/girparser.c (start_field), (start_constant),
3036 (start_type), (end_element_handler):
3037 Clear up constant parsing
3042 * tools/generate.c (write_callable_info), (write_function_info),
3043 (write_callback_info), (write_constant_info), (write_signal_info),
3044 (write_vfunc_info), (write_property_info), (write_object_info),
3045 (write_interface_info):
3046 Constants/Signals are handled now.
3048 2008-08-14 Johan Dahlin <johan@gnome.org>
3050 * girepository/girparser.c (start_type):
3051 Don't require c:type.
3052 * tests/Makefile.am:
3055 Update, remove parts we don't support yet
3056 * tests/roundtrips.sh:
3058 * tools/generate.c (write_type_info), (write_field_info),
3059 (write_callable_info), (write_struct_info):
3060 Make it emit proper gir.
3062 2008-08-14 Johan Dahlin <johan@gnome.org>
3064 * giscanner/transformer.py:
3065 New internal function for adding a new node.
3067 2008-08-14 Johan Dahlin <johan@gnome.org>
3070 Define an internal _H_ variable so we skip parsing both
3071 i18n headers, only one is needed.
3073 Add the glib-2.0.gir too.
3074 * giscanner/glibast.py:
3075 Add gconstpointer as an alias for ANY
3076 * giscanner/transformer.py:
3077 Do not lower case enumeration names per se.
3078 Skip functions which has parameters called 'va_list'
3080 2008-08-14 Colin Walters <walters@verbum.org>
3082 * giscanner/transformer.py: Comment data structures.
3083 Also squash pointers in resolve_type_name to correspond
3084 with what we do for params.
3085 * giscanner/glibtransformer.py: Print warnings in more
3086 situations. Rework checks for method/constructor to
3087 look up in our GType database instead of just checking
3088 for *. Avoid generating <record> for GObject which
3089 duplicate the <class>.
3090 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3093 2008-08-14 Johan Dahlin <johan@gnome.org>
3095 * giscanner/girwriter.py:
3096 * giscanner/glibast.py:
3097 * giscanner/glibtransformer.py:
3098 * giscanner/transformer.py:
3100 * tests/Makefile.am:
3101 Add pyflakes.py and run it in make check.
3102 Update the source code to fix the errors reported by
3105 2008-08-14 Johan Dahlin <johan@gnome.org>
3108 * giscanner/girparser.py:
3109 * giscanner/glibast.py:
3110 * giscanner/glibtransformer.py:
3111 Refactor the parser a bit.
3112 Add parent type to interfaces and update callsites.
3114 2008-08-14 Johan Dahlin <johan@gnome.org>
3116 * giscanner/glibtransformer.py:
3117 * giscanner/utils.py:
3118 Refactor a bit, avoid isinstance and add a method
3119 for each type we parse.
3121 2008-08-14 Johan Dahlin <johan@gnome.org>
3124 * giscanner/girparser.py:
3125 * giscanner/glibtransformer.py:
3126 * tests/Makefile.am:
3127 Run pep8.py in make check, fix old errors.
3129 2008-08-13 Colin Walters <walters@verbum.org>
3131 * giscanner/girparser.py: Parse records.
3133 2008-08-13 Colin Walters <walters@verbum.org>
3135 * gir/Makefile.am: Install again.
3136 * gir/gobject-2.0.gir: Add some more bits.
3138 2008-08-13 Colin Walters <walters@verbum.org>
3140 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3141 * giscanner/girparser.py: Handle aliases.
3142 * giscanner/transformer.py: Record aliases. Make resolver
3143 functions public; we now call into these explicitly from
3144 glibtransformer. Handle resolving aliases.
3145 * giscanner/glibtransformer.py: Separate our internal namespace
3146 from included ones. Call up into transformer's resolver functions.
3148 2008-08-13 Johan Dahlin <johan@gnome.org>
3150 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3151 * girepository/girparser.c (start_class):
3152 * giscanner/glibtransformer.py:
3153 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3155 2008-08-13 Johan Dahlin <johan@gnome.org>
3157 * giscanner/cgobject.py:
3158 Register GInitiallyUnowned
3159 * giscanner/girwriter.py:
3160 * giscanner/glibtransformer.py:
3161 Special case GObject/GInitially owned as they are a bit special to use.
3163 2008-08-13 Colin Walters <walters@verbum.org>
3165 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3166 Object is in GObject namespace.
3168 2008-08-13 Colin Walters <walters@verbum.org>
3170 * giscanner/girparser.py: Fix processing of functions
3173 2008-08-13 Colin Walters <walters@verbum.org>
3175 * giscanner/girparser.py: Parse more than just <class.
3176 * giscanner/glibtransformer.py: Put aliases in a separate
3177 data structure since their name is not canonicall.
3178 * giscanner/transformer.py: Handle resolving type names
3181 2008-08-13 Johan Dahlin <johan@gnome.org>
3183 * tools/g-ir-scanner:
3184 Allow multiple libraries
3185 * giscanner/glibtransformer.py:
3186 Rename load_library to add_library, traverse over all libraries
3187 when trying to resolve a function
3189 2008-08-12 Colin Walters <walters@verbum.org>
3191 * giscanner/transformer.py: Record typedefs as <alias> elements.
3192 Also attempt to look up types in external namespaces.
3193 * giscanner/girwriter.py: Write them.
3194 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3195 checks. Resolve interface methods and properties.
3196 * tests/scanner/foo-object.h: Add a method with typedef.
3197 * tests/scanner/Foo-expected.gir: Update.
3198 * girepository/girnode.c: Debug tweaks.
3199 * girepository/girparser.c: Make a first pass through the XML where we
3200 record all the aliases. This lets us resolve them as we go through the
3202 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3203 from gir-repository.
3205 2008-08-12 Colin Walters <walters@verbum.org>
3207 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3208 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3210 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3212 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3214 2008-08-12 Colin Walters <walters@verbum.org>
3216 * giscanner/glibtransformer.py: Also transform object properties.
3218 2008-08-12 Colin Walters <walters@verbum.org>
3220 * giscanner/glibtransformer.py: Also transform callbacks
3221 and structure field types.
3222 * tests/scanner/Fooe-expected.gir: Update to expect correct
3223 names for callbacks and structs.
3225 2008-08-12 Colin Walters <walters@verbum.org>
3227 * girepository/girparser.c: Handle 'any'.
3228 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3229 Add test for void *.
3231 2008-08-12 Colin Walters <walters@verbum.org>
3233 * giscanner/glibtransformer.py: We need to do type
3234 resolution in a second pass after we've seen all the
3235 enums, records, etc.
3237 2008-08-12 Colin Walters <walters@verbum.org>
3239 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3240 Add enum return value.
3241 * giscanner/glibtransformer.py: Transform function return types
3244 2008-08-12 Colin Walters <walters@verbum.org>
3246 * tests/scanner/Makefile.am: Dep .gir files on scanner
3247 sources too. Also remove @ so we see scanner invocations.
3249 2008-08-12 Colin Walters <walters@verbum.org>
3251 * girepository/girparser.c, girepository/gtypelib.c,
3252 girepository/gtypelib.h, girepository/girnode.c:
3253 Remove usage of (GAPI-oriented) TypeTag in favor of
3254 GITypeTag from girepository.h.
3256 2008-08-10 Colin Walters <walters@verbum.org>
3258 * tests/roundtrips.sh: Use the correct tests.
3260 2008-08-10 Colin Walters <walters@verbum.org>
3262 * giscanner/cgobject.py: Declare/wrap a few more functions.
3263 Fix parameter types for g_object_new and g_type_fundamental.
3265 2008-08-10 Colin Walters <walters@verbum.org>
3267 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3268 us to declare types for both return value and parameters. The
3269 ctypes default of 'int' is bad because it hides 32/64 bit
3270 problems. Convert all existing functions to use it.
3272 2008-08-09 Johan Dahlin <johan@gnome.org>
3274 * giscanner/__init__.py:
3276 * giscanner/cgobject.py:
3277 * giscanner/gidlparser.py:
3278 * giscanner/gidlwriter.py:
3279 * giscanner/girparser.py:
3280 * giscanner/girwriter.py:
3281 * giscanner/glibast.py:
3282 * giscanner/glibtransformer.py:
3283 * giscanner/odict.py:
3284 * giscanner/sourcescanner.py:
3285 * giscanner/transformer.py:
3286 * giscanner/utils.py:
3287 * giscanner/xmlwriter.py:
3288 * tools/g-ir-scanner:
3292 2008-08-09 Johan Dahlin <johan@gnome.org>
3295 * relaxng/c-types.xml:
3296 * relaxng/g-types.xml:
3297 * relaxng/relaxng.rng:
3299 Remove outdated relaxng schemas.
3301 2008-08-09 Johan Dahlin <johan@gnome.org>
3304 Rename metadata to typelib in variable names,
3307 2008-08-09 Johan Dahlin <johan@gnome.org>
3311 Remove old C scanner, which got rewritten in python.
3313 2008-08-09 Johan Dahlin <johan@gnome.org>
3315 * girepository/Makefile.am:
3316 * tools/Makefile.am:
3317 * tools/girmodule.c:
3318 * tools/girmodule.h:
3321 * tools/girparser.c:
3322 * tools/girparser.h:
3323 * tools/girwriter.c:
3324 * tools/girwriter.h:
3325 Move shared *.[ch] files to girepository from tools
3327 2008-08-09 Johan Dahlin <johan@gnome.org>
3329 * tests/Makefile.am:
3332 * tests/constant.test:
3334 * tests/errors.test:
3335 * tests/function.test:
3336 * tests/gobject.test:
3337 * tests/interface.test:
3338 * tests/object.test:
3339 * tests/struct.test:
3344 Rename *.test to *.gir
3346 2008-08-09 Johan Dahlin <johan@gnome.org>
3349 * tests/Makefile.am:
3350 * tests/parser/Foo-expected.gir:
3351 * tests/parser/Makefile.am:
3352 * tests/parser/foo-object.h:
3353 * tests/parser/foo.c:
3354 * tests/parser/utility-expected.gir:
3355 * tests/parser/utility.c:
3356 * tests/parser/utility.h:
3357 * tests/scanner/Makefile.am:
3358 Rename tests/parser to test/scanner
3360 2008-08-08 Colin Walters <walters@verbum.org>
3362 * tests/roundtrips.sh: Use local .gir files again.
3364 2008-08-08 Colin Walters <walters@verbum.org>
3366 * tests/invoke/Makefile.am: .gir file depends on libtool
3369 2008-08-08 Colin Walters <walters@verbum.org>
3371 * tools/girnode.c: Pass through parent node so we can
3372 print the node whose child is NULL, if that occurs.
3374 2008-08-08 Johan Dahlin <johan@gnome.org>
3376 * tests/Makefile.am:
3377 Disable roundtrip tests which are not yet working
3378 * tests/invoke/testfns.gir:
3381 2008-08-08 Johan Dahlin <johan@gnome.org>
3383 * giscanner/girwriter.py:
3385 * giscanner/glibast.py:
3386 * giscanner/glibtransformer.py:
3387 Swap order of members, to keep it consistent with
3390 2008-08-08 Johan Dahlin <johan@gnome.org>
3392 * girepository/gtypelib.c (validate_header):
3393 * girepository/gtypelib.h:
3395 * giscanner/girwriter.py:
3396 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3397 (gi_source_symbol_unref):
3400 * tests/constant.test:
3402 * tests/errors.test:
3403 * tests/function.test:
3404 * tests/gobject.test:
3405 * tests/interface.test:
3406 * tests/invoke/Makefile.am:
3407 * tests/invoke/testfns.xml:
3408 * tests/object.test:
3409 * tests/parser/Makefile.am:
3410 * tests/roundtrips.sh:
3411 * tests/struct.test:
3416 * tools/Makefile.am:
3417 * tools/compiler.c (main):
3418 * tools/generate.c (write_callable_info), (write_function_info),
3420 * tools/gidlmodule.c:
3421 * tools/gidlmodule.h:
3424 * tools/gidlparser.c:
3425 * tools/gidlparser.h:
3426 * tools/gidlwriter.c:
3427 * tools/gidlwriter.h:
3428 * tools/scanner.c (create_node_from_gtype),
3429 (create_node_from_ctype), (g_igenerator_process_properties),
3430 (g_igenerator_process_signals), (g_igenerator_create_object),
3431 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3432 (g_igenerator_create_enum), (g_igenerator_create_flags),
3433 (g_igenerator_process_function_symbol),
3434 (g_igenerator_process_unregistered_struct_typedef),
3435 (g_igenerator_process_struct_typedef),
3436 (g_igenerator_process_union_typedef),
3437 (g_igenerator_process_enum_typedef),
3438 (g_igenerator_process_function_typedef),
3439 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3440 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3441 Merge in the gir-compiler branch.
3442 Thanks to Philip and Colin for their help.
3444 2008-07-26 Colin Walters <walters@verbum.org>
3446 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3447 and g-idl-generate to go along with how we're changing this
3448 module to be installed.
3449 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3451 2008-07-24 Colin Walters <walters@verbum.org>
3453 * girepository/girepository.c (g_irepository_register): Add
3454 environment variable G_IREPOSITORY_VERBOSE so we can print
3455 out what we're doing.
3456 * girepository/girepository.c (g_irepository_register_file):
3457 Add GError error message to g_debug call.
3459 2008-07-08 Jürg Billeter <j@bitron.ch>
3461 * giscanner/glibast.py:
3465 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3467 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3470 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3473 * giscanner/girwriter.py:
3474 * giscanner/transformer.py:
3475 * tests/parser/Foo-expected.gir:
3476 * tests/parser/foo-object.h:
3477 * tests/parser/foo.c (foo_object_allow_none):
3478 Add support for gtk-doc annotations for allow-none.
3481 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3484 * giscanner/girwriter.py:
3485 * giscanner/glibast.py:
3486 * giscanner/glibtransformer.py:
3487 * giscanner/transformer.py:
3488 * tests/parser/Foo-expected.gir:
3489 Start using abstract type instead of the raw C types.
3490 Register a bunch of glib types we care about.
3492 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3497 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3499 * girepository/girepository.c:
3500 * girepository/gtypelib.c:
3501 * girepository/ginfo.c:
3502 * girepository/ginvoke.c:
3503 * girepository/girepository.h:
3504 * girepository/gtypelib.h:
3505 * girepository/gmetadata.c:
3506 * girepository/Makefile.am:
3507 * girepository/gmetadata.h:
3509 * tools/gidlmodule.c:
3512 * tools/gidlmodule.h:
3513 * tools/gidlparser.c:
3515 Renamed GMetadata to GTypelib
3517 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3519 * giscanner/xmlwriter.py:
3520 Improve line wrapping when > 79 charaters
3522 2008-06-05 Jürg Billeter <j@bitron.ch>
3525 * giscanner/girwriter.py:
3526 * giscanner/transformer.py:
3527 Use <type> element for field types
3528 * tests/parser/Foo-expected.gir:
3531 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3533 * giscanner/glibtransformer.py:
3534 Fix a bug which prevented GdkEvent from being generated
3536 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3538 * giscanner/Makefile.am:
3540 * giscanner/girwriter.py:
3541 * giscanner/glibast.py:
3542 * giscanner/glibtransformer.py:
3543 * giscanner/transformer.py:
3544 * giscanner/utils.py:
3545 * tests/parser/Foo-expected.gir:
3546 Improve enum member parsing and introspection
3548 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3550 * giscanner/scannerparser.y:
3551 * giscanner/sourcescanner.h:
3552 * giscanner/sourcescanner.py:
3553 Add a new source type enum for member.
3554 Use __repr__ for improved debugging
3555 * giscanner/girparser.py:
3557 * giscanner/transformer.py:
3558 Improve parsing of struct members.
3559 * tests/parser/foo-object.h:
3562 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3564 * giscanner/xmlwriter.py:
3565 Improve error reporting when trying to quote None.
3566 * giscanner/girparser.py:
3567 Do not print warnings when including more complete .gir files
3568 * giscanner/girwriter.py:
3569 Do not require a name for parameters, add a todo for singletons
3570 * giscanner/glibtransformer.py:
3571 Refactor the way structs are done, add a couple of hacks to allow
3573 * giscanner/transformer.py:
3574 Add enough hacks so cairo, atk and pango.gir can be parsed properly
3575 * gobject-introspection-1.0.pc.in:
3576 Export girdir, so we can access gobject-2.0.gir from outside
3578 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3580 * tools/g-ir-scanner:
3581 * tests/parser/Makefile.am:
3582 Update sys.path before running the parser so we don't have
3583 to setup PYTHONPATH ourselves.
3587 * girepository/Makefile.am:
3588 * giscanner/transformer.py:
3589 * gobject-introspection-1.0.pc.in:
3590 * gobject-introspection.pc.in:
3591 * tools/Makefile.am:
3593 Rename pkg-config name to gobject-introspection-1.0,
3594 Do not installed anything which is not using the gir format.
3595 Disable compililation the old C scanner, but still keep the source
3596 until all the remaning functionallity has been ported.
3598 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3600 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3601 a crash when symbol->indent is NULL.
3603 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3604 a function to convert a CTYPE symbol to a string
3606 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
3609 * giscanner/girwriter.py:
3610 * giscanner/giscannermodule.c
3611 (pygi_source_scanner_append_filename),
3612 (pygi_source_scanner_parse_file):
3613 * giscanner/glibtransformer.py:
3614 * giscanner/sourcescanner.py:
3615 Revert back to using temporary files to send in headers.
3616 Allow Functions to be passed in as callbacks, add a couple
3617 of try/excepts missing features.
3618 We can now scan pango
3620 2008-05-08 Johan Dahlin <johan@gnome.org>
3622 * giscanner/glibtransformer.py:
3623 * giscanner/transformer.py:
3624 Move namespace stripping glibtransformer->transformer
3626 2008-05-08 Johan Dahlin <johan@gnome.org>
3629 * giscanner/girwriter.py:
3630 * giscanner/glibtransformer.py:
3631 * giscanner/transformer.py:
3632 * tools/g-ir-scanner:
3633 Introduce a namespace ast node
3635 2008-05-05 Johan Dahlin <johan@gnome.org>
3637 * giscanner/__init__.py:
3638 * giscanner/sourcescanner.py:
3639 * giscanner/transformer.py:
3640 Move sourcescanner symbols to the sourcescanner module, instead
3641 of in the global __init__ namespace.
3643 2008-05-03 Johan Dahlin <johan@gnome.org>
3645 * giscanner/glibtransformer.py:
3646 * tools/g-ir-scanner:
3647 Handle missing parameters better, allow - and + in .la dlname
3650 2008-05-03 Johan Dahlin <johan@gnome.org>
3652 * giscanner/__init__.py:
3654 * giscanner/girwriter.py:
3655 * giscanner/glibtransformer.py:
3656 * giscanner/transformer.py:
3657 Parse struct fields properly, improve debugging.
3659 2008-04-29 Johan Dahlin <johan@gnome.org>
3662 * giscanner/girwriter.py:
3663 * giscanner/transformer.py:
3664 * tests/parser/Foo-expected.gir:
3666 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
3668 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3671 * docs/g-ir-scanner.1:
3672 * metadata-annotations-proposal.txt:
3673 * metadata-format.txt:
3674 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
3676 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3678 * giscanner/girwriter.py:
3679 * giscanner/glibtransformer.py:
3680 * giscanner/transformer.py:
3681 * giscanner/xmlwriter.py:
3682 * tests/parser/Foo-expected.gir:
3683 * tests/parser/foo-object.h:
3684 Write record/structs to gir file too. Add a couple of tests,
3685 fix an off by one error in xmlwriter.py.
3687 2008-04-28 Johan Dahlin <johan@gnome.org>
3689 * giscanner/xmlwriter.py: Calculate the line length properly,
3690 include the provided extra indentation in the calculation, really.
3692 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3695 * giscanner/glibast.py:
3696 * giscanner/glibtransformer.py:
3697 * giscanner/transformer.py:
3698 * tools/g-ir-scanner:
3699 Add a --strip-prefix and sort out confusion between names and symbols
3700 for functions and struct + derivaties.
3701 Refactor bootstrap of g-ir-scanner, so we can set options on
3702 Transformer() before parsing everything.
3704 2008-04-28 Johan Dahlin <johan@gnome.org>
3706 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
3707 when scanning girepository.h
3709 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
3710 a __GI_SCANNER__ when we run.
3712 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3715 * giscanner/girwriter.py:
3716 * giscanner/glibast.py:
3717 * giscanner/glibtransformer.py:
3718 * tests/parser/Foo-expected.gir:
3719 * tests/parser/utility-expected.gir:
3720 Rename most c:identifier to c:type. Add new ones to
3721 class/interface/enum/boxed.
3723 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3726 * giscanner/girwriter.py:
3727 * giscanner/glibtransformer.py:
3728 * tests/parser/Foo-expected.gidl:
3729 * tests/parser/Makefile.am:
3730 Move c:identifier from return-value to subchild type,
3731 as per Jürgs suggestion
3733 2008-04-28 Johan Dahlin <johan@gnome.org>
3735 * giscanner/girwriter.py:
3736 * tests/parser/Foo-expected.gir:
3737 Write property.type as a child node.
3739 2008-04-27 Johan Dahlin <johan@gnome.org>
3744 * gidl/gobject-2.0.gidl:
3746 * gir/gobject-2.0.gir:
3747 * tests/parser/Makefile.am:
3748 Replace the GObject gidl with a GObject gir.
3750 2008-04-27 Johan Dahlin <johan@gnome.org>
3752 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
3755 * giscanner/xmlwriter.py:
3756 * tests/parser/Foo-expected.gir:
3757 Include indentation in line length calculation
3759 2008-04-27 Johan Dahlin <johan@gnome.org>
3761 * giscanner/girparser.py:
3762 Prettify NS parsing using elementtree.
3764 2008-04-27 Johan Dahlin <johan@gnome.org>
3767 * giscanner/Makefile.am:
3768 * giscanner/girparser.py:
3769 * giscanner/glibtransformer.py:
3770 * tests/parser/Foo-expected.gidl:
3771 * tests/parser/Foo-expected.gir:
3772 * tests/parser/Makefile.am:
3773 * tests/parser/utility-expected.gidl:
3774 * tests/parser/utility-expected.gir:
3775 * tools/g-ir-scanner:
3776 Switch over to GIR as the default format. Add a simple GIDL
3778 Update tests and fix simplify makefiles by depending
3779 on GNU make extensions.
3781 2008-04-27 Johan Dahlin <johan@gnome.org>
3783 * giscanner/xmlwriter.py:
3784 Wrap attributes for lines which are wider than 79 characters
3786 * giscanner/scannerlexer.l:
3787 Allow parenthesis in annotations
3790 * giscanner/gidlwriter.py:
3791 * giscanner/girwriter.py:
3792 * giscanner/glibtransformer.py:
3793 * giscanner/transformer.py:
3794 Add initial sequence support, including annotation.
3795 Refactor type handling a bit.
3797 2008-04-27 Johan Dahlin <johan@gnome.org>
3799 * tests/parser/Foo-expected.gidl:
3800 * tests/parser/foo-object.h:
3801 * tests/parser/foo.c (foo_object_class_init),
3802 (foo_object_get_strings), (foo_object_get_objects):
3803 Add two new functions to check sequence return values.
3804 Also fixes a compilation warning.
3806 2008-04-27 Johan Dahlin <johan@gnome.org>
3808 * giscanner/giscannermodule.c (]): Cast the getter, avoids
3809 a compilation warning.
3811 * tools/Makefile.am (g_ir_scanner_SOURCES):
3812 g-ir-scanner has no sources.
3814 2008-04-25 Johan Dahlin <johan@gnome.org>
3816 * giscanner/Makefile.am:
3818 * giscanner/gidlparser.py:
3819 * giscanner/gidlwriter.py:
3820 * giscanner/girwriter.py:
3821 * giscanner/glibast.py:
3822 * giscanner/glibtransformer.py:
3823 * giscanner/transformer.py:
3824 Split out nodes to ast.py and glibast.py
3826 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3828 * giscanner/Makefile.am:
3829 * giscanner/gidlparser.py:
3830 * giscanner/gidlwriter.py:
3831 * giscanner/girwriter.py:
3832 * giscanner/glibtransformer.py:
3833 * giscanner/gobjecttreebuilder.py:
3834 * giscanner/transformer.py:
3835 * giscanner/treebuilder.py:
3836 * tools/g-ir-scanner:
3837 Rename treebuilder to transformer and
3838 gobjectreebuilder to glibtransformer.
3840 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3842 * giscanner/Makefile.am:
3843 * giscanner/__init__.py:
3844 * giscanner/cgobject.py:
3845 * giscanner/gidlparser.py:
3846 * giscanner/gidlwriter.py:
3847 * giscanner/girwriter.py:
3848 * giscanner/gobjecttreebuilder.py:
3849 * giscanner/odict.py:
3850 * giscanner/sourcescanner.py:
3851 * giscanner/treebuilder.py:
3852 * giscanner/xmlwriter.py:
3853 * tools/Makefile.am:
3854 * tools/g-ir-scanner:
3855 Add LGPLv2 license header and install all python files
3857 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3860 * giscanner/gidlwriter.py:
3861 * giscanner/giscannermodule.c (pygi_source_directive_new),
3862 (directive_get_options), (pygi_source_symbol_new),
3863 (symbol_get_base_type), (pygi_source_type_new),
3864 (type_get_base_type), (type_get_child_list),
3865 (pygi_source_scanner_get_symbols),
3866 (pygi_source_scanner_get_directives):
3867 * giscanner/gobjecttreebuilder.py:
3868 * giscanner/sourcescanner.py:
3869 * giscanner/treebuilder.py:
3870 * tests/parser/foo-object.h:
3871 Add support for virtual methods.
3872 Pair struct FooClass with struct Foo.
3873 Clean up the SourceScanner bindings a bit.
3874 Add a testcase for virtual methods.
3876 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3878 * giscanner/cgobject.py:
3879 * giscanner/gidlwriter.py:
3880 * giscanner/gobjecttreebuilder.py:
3881 Add support for signals
3883 * tests/parser/foo.c (foo_object_class_init):
3884 * Foo-expected.gidl:
3885 Add a signal and update the expected output.
3887 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
3889 * giscanner/gidlwriter.py:
3890 * giscanner/girwriter.py:
3891 * giscanner/giscannermodule.c (directive_get_name),
3892 (directive_get_value), (directive_get_options),
3893 (symbol_get_directives), (symbol_set_directives),
3894 (pygi_source_scanner_parse_file),
3895 (pygi_source_scanner_lex_filename),
3896 (pygi_source_scanner_get_directives), (init_giscanner):
3897 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
3898 * giscanner/sourcescanner.h:
3899 * giscanner/sourcescanner.py:
3900 * giscanner/treebuilder.py:
3901 * tools/g-ir-scanner:
3902 Add support for source/header annotations.
3904 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3906 * giscanner/gidlwriter.py:
3907 * giscanner/girwriter.py:
3908 * giscanner/gobjecttreebuilder.py:
3909 * giscanner/treebuilder.py:
3910 Add support for Callbacks
3912 2008-04-22 Havoc Pennington <hp@pobox.com>
3914 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
3915 not in metadata->module, look for it in the global module, in case
3916 some other object or the app itself provides the symbol.
3918 2008-04-22 Havoc Pennington <hp@pobox.com>
3920 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
3921 dlopening a library that is already in the main app, by checking
3922 whether one of the lib's symbols is already loaded.
3924 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3926 * tests/parser/Foo-expected.gidl:
3927 * tests/parser/foo-object.h:
3930 2008-04-22 Havoc Pennington <hp@pobox.com>
3932 * girepository/ginfo.c (g_interface_info_find_method):
3933 Use interface_blob_size not object_blob_size to compute offset.
3935 2008-04-22 Havoc Pennington <hp@pobox.com>
3937 * girepository/gmetadata.c (_g_metadata_init): remove
3938 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
3939 (Glade and Clutter for example) rely on being loaded globally.
3941 2008-04-22 Havoc Pennington <hp@pobox.com>
3943 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
3944 function to get the GType given a RegisteredTypeInfo
3946 2008-04-22 Johan Dahlin <johan@gnome.org>
3948 * COPYING: Add a LGPL license, to prevent automake to
3949 put in a copy of GPL here. Pointed out by Havoc.
3951 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
3952 (g_type_info_is_pointer), (g_type_info_get_tag),
3953 (g_type_info_get_param_type), (g_type_info_get_interface),
3954 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
3955 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
3956 (g_error_domain_info_get_codes), (g_enum_info_get_value),
3957 (g_object_info_get_interface), (g_object_info_get_field),
3958 (g_interface_info_get_prerequisite),
3959 (g_signal_info_get_class_closure), (g_constant_info_get_value):
3960 * girepository/ginvoke.c (get_ffi_type):
3961 * girepository/girepository.h:
3962 * girepository/gmetadata.c (g_metadata_get_dir_entry),
3963 (g_metadata_check_sanity), (validate_header),
3964 (validate_array_type_blob), (validate_iface_type_blob),
3965 (validate_param_type_blob), (validate_error_type_blob),
3966 (validate_type_blob), (validate_constant_blob),
3967 (validate_struct_blob), (validate_enum_blob):
3968 * girepository/gmetadata.h:
3969 * tests/Makefile.am:
3970 * tests/invoke/Makefile.am:
3971 * tests/invoke/invoke.c (main):
3972 * tests/roundtrips.sh:
3973 * tools/Makefile.am:
3974 * tools/compiler.c (format_output), (write_out_metadata), (main):
3975 * tools/generate.c (write_type_name), (write_type_info),
3976 (write_constant_value), (write_enum_info), (load_metadata), (main):
3977 * tools/gidlcompilercontext.c:
3978 * tools/gidlcompilercontext.h:
3979 * tools/gidlcompilerentrynode.c:
3980 * tools/gidlcompilerentrynode.h:
3981 * tools/gidlcompilertypenode.c:
3982 * tools/gidlcompilertypenode.h:
3983 * tools/gidlmodule.c (g_idl_module_build_metadata):
3984 * tools/gidlmodule.h:
3985 * tools/gidlnode.c (init_stats), (dump_stats),
3986 (g_idl_node_get_size), (g_idl_node_get_full_size),
3987 (g_idl_node_cmp), (g_idl_node_can_have_member),
3988 (g_idl_node_add_member), (g_idl_node_param_direction_string),
3989 (parse_int_value), (parse_uint_value), (parse_float_value),
3990 (parse_boolean_value), (find_entry_node), (find_entry),
3991 (serialize_type), (g_idl_node_build_metadata), (write_string):
3993 * tools/gidlparser.c (parse_type_internal):
3994 * tools/quote-file.sh:
3995 Revert revisions 157,149-148,136-129 and 120.
3996 Move back to using g-idl-generate to generate the metadata and
3997 avoids dependency on a c compiler.
3999 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4001 * giscanner/girwriter.py:
4002 * tools/g-ir-scanner:
4003 Add an initial GIR writer and a --format option to g-ir-scanner
4005 2008-04-21 Johan Dahlin <johan@gnome.org>
4007 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4008 gobject-2.0 and raise ImportError if not found.
4010 * giscanner/gidlparser.py:
4011 * giscanner/gidlwriter.py:
4012 * giscanner/gobjecttreebuilder.py:
4013 * tools/g-ir-scanner:
4014 Add a --include argument to include types from other idls.
4015 Add a minimalistic GIDL parser (just objects for now)
4016 Implement resolving of external type references and use it to
4017 resolve parent types, argument types and return types.
4019 2008-04-21 Johan Dahlin <johan@gnome.org>
4021 * giscanner/gidlwriter.py:
4022 * giscanner/gobjecttreebuilder.py:
4023 * giscanner/treebuilder.py:
4024 Add support for properties.
4025 Refactor Class/Interface support a bit, to share more code and
4026 always initialize their method attribute to an empty list.
4028 2008-04-21 Johan Dahlin <johan@gnome.org>
4030 * giscanner/cgobject.py:
4031 Add a workaround for a glib bug interface introspection bug
4032 (object_interface_list_properties, object_class_list_properties):
4033 Cast the return value to GParamSpec.
4035 * tests/parser/Foo-expected.gidl: Update
4036 * tests/parser/foo.c: Add a string property
4038 * giscanner/gobjecttreebuilder.py:
4039 After stripping namespaces, remove the original
4040 item to avoid duplication (GtkButton struct and Button object)
4042 2008-04-21 Johan Dahlin <johan@gnome.org>
4044 * giscanner/gobjecttreebuilder.py:
4045 * giscanner/treebuilder.py:
4046 Strip namespaces before objects, so we'll export
4047 GtkButton as Button in the gtk namespace
4049 2008-04-21 Johan Dahlin <johan@gnome.org>
4051 * giscanner/gidlwriter.py:
4052 * giscanner/gobjecttreebuilder.py:
4053 * giscanner/treebuilder.py:
4054 Add constructors for object/boxed types.
4056 2008-04-21 Johan Dahlin <johan@gnome.org>
4058 * giscanner/gidlwriter.py:
4059 * giscanner/gobjecttreebuilder.py:
4060 Add support for boxed types
4062 2008-04-21 Johan Dahlin <johan@gnome.org>
4064 * giscanner/giscannermodule.c: Mark structures as const,
4065 wrap SourceType.const_string.
4067 * tests/parser/foo-object.h: Add a couple of constants.
4069 * giscanner/gidlwriter.py:
4070 * giscanner/gobjecttreebuilder.py:
4071 * giscanner/treebuilder.py:
4072 Add basic support for interfaces
4074 * tools/g-ir-scanner:
4075 Add -o/--output for writing to a file
4077 2008-04-21 Havoc Pennington <hp@redhat.com>
4079 * TODO: add some C API wishlist items I could think of quickly
4081 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4083 * giscanner/gidlwriter.py:
4084 * giscanner/xmlwriter.py:
4085 Add a simple api for writing tags which can be used
4086 with the new 'with statement' in python 2.5
4088 2008-04-21 Johan Dahlin <johan@gnome.org>
4090 * giscanner/gobjecttreebuilder.py:
4091 Strip namespace and object prefix from method names.
4093 2008-04-21 Johan Dahlin <johan@gnome.org>
4095 * tools/g-ir-scanner (main): Add --pkg option to pass in
4096 pkg-config modules to get cflags from.
4098 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4099 Avoid duplication, reuse function writer for methods.
4101 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4103 * giscanner/gidlwriter.py:
4104 * giscanner/gobjecttreebuilder.py:
4105 * giscanner/treebuilder.py:
4106 * tools/g-ir-scanner:
4107 Resolve libtool .la files.
4108 Strip name spaces for methods.
4109 Add function symbols
4111 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4113 * giscanner/cgobject.py:
4114 * giscanner/gidlwriter.py:
4115 * giscanner/gobjecttreebuilder.py:
4116 * giscanner/treebuilder.py:
4117 Add support for classes and methods
4119 2008-04-20 Johan Dahlin <johan@gnome.org>
4121 * giscanner/gidlwriter.py:
4122 * giscanner/gobjecttreebuilder.py:
4123 * giscanner/odict.py:
4124 Avoid conflicts, keep the output ordered similar to
4125 the order of the input.
4126 Add a simple ordered dictionary implemenation
4128 2008-04-19 Johan Dahlin <johan@gnome.org>
4130 * giscanner/cgobject.py:
4131 * giscanner/gidlwriter.py:
4132 * giscanner/gobjecttreebuilder.py:
4133 * tools/g-ir-scanner:
4134 Start introspecting get-type functions.
4135 Implement support for GLib/GFlags GTypes.
4136 Add a ctype based GObject binding.
4138 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4140 * giscanner/gidlwriter.py:
4141 * giscanner/xmlwriter.py:
4142 * tools/g-ir-scanner:
4143 Add a simplistic gidl writer, which can't do too much.
4145 2008-04-18 Johan Dahlin <johan@gnome.org>
4147 * giscanner/sourcescanner.py:
4148 * giscanner/treebuilder.py:
4149 * tools/g-ir-scanner:
4150 split tree building and source scanning interface to separate files.
4152 2008-04-18 Johan Dahlin <johan@gnome.org>
4154 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4156 - Add support for struct/parameter/return, start parsing of ctypes
4158 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4161 2008-03-31 Johan Dahlin <johan@gnome.org>
4163 * tools/g-ir-scanner:
4164 Start to build abstract syntax node of scanned sources.
4165 Add support for cpp options.
4167 2008-03-27 Johan Dahlin <johan@gnome.org>
4169 * giscanner/giscannermodule.c:
4170 * giscanner/scannerlexer.l:
4171 * giscanner/sourcescanner.c:
4172 * tools/g-ir-scanner:
4174 Add simple pre-processor using subprocess and a PIPE.
4175 Change the parse_file apis to accept a file descriptor.
4177 2008-03-25 Johan Dahlin <johan@gnome.org>
4179 * giscanner/__init__.py:
4180 * tools/g-ir-scanner:
4181 Fix a typo and add an example python test program.
4183 2008-03-25 Johan Dahlin <johan@gnome.org>
4185 * giscanner/__init__.py:
4186 * giscanner/giscannermodule.c:
4187 * giscanner/sourcescanner.c:
4188 * giscanner/sourcescanner.h:
4189 Add constants and wrap a few more SymbolType fields
4191 2008-03-25 Johan Dahlin <johan@gnome.org>
4195 * giscanner/__init__.py:
4196 * giscanner/giscannermodule.c:
4197 * giscanner/Makefile.am:
4199 Add initial python bindings for the scanner and
4200 depend on python 2.5.
4202 2008-03-25 Johan Dahlin <johan@gnome.org>
4206 * giscanner/Makefile.am:
4207 * giscanner/sourcescanner.c:
4208 * giscanner/sourcescanner.h:
4209 * tools/Makefile.am:
4210 * tools/grealpath.h:
4211 * tools/sourcescanner.c:
4212 * tools/sourcescanner.h:
4214 Move the scanner to a separate library.
4216 2008-03-23 Johan Dahlin <johan@gnome.org>
4218 * tools/Makefile.am:
4221 * tools/scannerlexer.l:
4222 * tools/scannerparser.y:
4223 * tools/sourcescanner.c:
4224 * tools/sourcescanner.h:
4225 Split out the source scanner from the generator.
4226 Rename the symbols used in the scanner to use the gi_ prefix.
4227 This should make it possible to use the raw C parser from
4230 2008-03-23 Johan Dahlin <johan@gnome.org>
4232 * tests/parser/Makefile.am (utility.gidl):
4233 * tests/parser/utility-expected.gidl:
4234 Pass in the gobject.gidl since we're defining a GObject.
4236 2008-03-12 Johan Dahlin <johan@gnome.org>
4238 * relaxng/relaxng.rng:
4239 Add a releaxng in relaxng we can use to validate the relaxngs
4242 2008-03-12 Jürg Billeter <j@bitron.ch>
4244 * tools/scanner.c: (g_igenerator_new):
4245 * tools/scannerparser.y:
4246 Fix compiler warnings.
4248 2008-03-12 Jürg Billeter <j@bitron.ch>
4252 * tools/scannerparser.y:
4253 Start fixing memory management in g-idl-scanner.
4255 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4257 * tools/gidlcompilercontext.c: (write_compiled):
4258 Fix critical warning when no shlib passed to g-idl-compiler.
4260 2008-03-12 Johan Dahlin <johan@gnome.org>
4262 * tests/parser/utility-expected.gidl:
4263 * tests/parser/utility.h:
4264 Add a get_type-function, so the scanner actually
4265 parses it as an object.
4267 2008-03-12 Johan Dahlin <johan@gnome.org>
4269 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4272 * tests/parser/Foo-expected.gidl:
4273 * tests/parser/Makefile.am:
4274 * tests/parser/foo-object.h:
4275 * tests/parser/foo.c:
4276 * tests/parser/utility-expected.gidl:
4277 * tests/parser/utility.c:
4278 * tests/parser/utility.h:
4280 Add a new gidl test. 'utility.gidl', which is used to be able
4281 to test external type references. Add a reference to UtilityObject*
4284 2008-03-11 Johan Dahlin <johan@gnome.org>
4288 Remove most global variables
4290 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4292 * tools/scannerlexer.l:
4294 * tests/parser/Foo-expected.gidl:
4295 * tests/parser/foo.c:
4296 * tests/parser/Makefile.am:
4297 * tests/parser/foo-object.h:
4299 Added a few extra tests. Which resulted in finding a few
4300 bugs. Which resulted in me fixing those bugs
4302 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4304 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4305 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4306 Add some comments for strings into generated output for
4309 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4311 * tools/gidlcompilercontext.c: (write_compiled):
4312 Write out the shlibs variable before writing out the strings
4313 length. Fixes compiler warning when using '-l' flag with
4316 2008-03-11 Johan Dahlin <johan@gnome.org>
4318 * tests/parser/Foo-expected.gidl:
4319 * tests/parser/foo-object.h:
4322 * tools/scannerlexer.l:
4323 Add support for parsing return arguments. Add support for
4324 caller-owns return types.
4325 Patch by Philip Van Hoof.
4327 * tools/scannerparser.y:
4328 Remove parsing of the @deprecated syntax used in headers.
4329 We will support gtk-doc deprecation in the future instead.
4331 2008-03-11 Johan Dahlin <johan@gnome.org>
4333 * tools/compiler.c (main): Coding style fixes
4335 2008-03-10 Johan Dahlin <johan@gnome.org>
4338 Add GCOV_LIBS to GILIBS
4340 2008-03-10 Johan Dahlin <johan@gnome.org>
4342 * tests/parser/Foo-expected.gidl:
4343 * tests/parser/foo.c:
4344 Rename null-ok to direction=out
4346 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4348 reviewed and extensively tested by Johan
4350 * tests/parser/Foo-expected.gidl:
4351 * tests/parser/foo-object.h:
4352 * tests/parser/foo.c:
4355 * tools/gidlwriter.c:
4358 * tools/scannerlexer.l:
4359 * tools/scannerparser.y:
4361 Add support for scanning for gtk-doc comments inside
4362 C source files. Add tests
4364 2008-03-10 Johan Dahlin <johan@gnome.org>
4366 * tests/parser/Makefile.am:
4367 * tests/parser/foo.c:
4370 * tools/scannerparser.y:
4371 Add an api to lex filenames.
4372 Lex all source .c files passed in on the command line.
4373 Scan sources in a test and a couple of private structures
4374 which should not be included in the generated gidl
4376 2008-03-10 Johan Dahlin <johan@gnome.org>
4378 * tests/invoke/Makefile.am: Make the generated metadata
4379 depend on the g-idl-compiler
4381 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4383 * tools/gidlmodule.c
4384 * tools/gidlmodule.h
4387 Remove the old g-idl-compiler code.
4390 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4392 * tools/quote-file.sh
4395 Move to using the 'C' struct compiler code.
4397 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4399 * girepository/ginfo.c
4401 Change the way that external references with no namespace
4402 are dealt with. External references with no namespace
4403 are placed into the XML as-if they are a local reference.
4404 This is temporary, but helps with roundtrip tests.
4406 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4408 * girepository/ginfo.c
4409 Add the ability to get the value of a constant of
4410 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4411 is provided as a string.
4413 This would deal properly with:
4414 typedef char* random;
4415 const random = "A string";
4417 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4419 * girepository/ginfo.c
4420 * girepository/girepository.h
4422 Add a function to check if an enum is registered or not.
4423 Previously anything testing this relied on the g-type
4424 string offset having a value of 0.
4426 * girepository/gmetadata.c
4427 * girepository/gmetadata.h
4429 Remove unneccesary or erroneous checks. There were two
4430 metadata validation checks which made sure that the blob
4431 sizes were the same as some magic numbers compiled into the code.
4432 This is wrong as it breaks any forwards compatibility that may
4435 Checks were also present that made sure that unregistered type
4436 blobs had a value of 0 in the g-type offset field. This is
4437 unneccessary. If a type blob is unregistered then any value
4438 in its g-type field is simply invalid.
4440 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4442 * girepository/ginfo.c
4443 * girepository/gmetadata.c
4444 * girepository/gmetadata.h
4446 Change the metadata format to have a standard header
4447 for all the type blobs. Merge the SimpleTypeBlob
4448 and InterfaceTypeBlob into a union. A union of these
4449 two blobs existed previously but was not explicit
4450 in the metadata format.
4452 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4454 * tools/gidlcompilercontext.c
4455 * tools/gidlcompilercontext.h
4456 * tools/gidlcompilerentrynode.c
4457 * tools/gidlcompilerentrynode.h
4458 * tools/gidlcompilertypenode.c
4459 * tools/gidlcompilertypenode.h
4461 Add code to compile a tree of GIdlNodes to
4462 a 'C' struct representing the metadata.
4463 This is to aid cross-compiling. Previously
4464 the g-idl-compiler created a binary blob with
4465 data written in the byte order and alignment
4466 of the tool rather than the intended target.
4468 Cleaned up and improved by Johan and Robert :-)
4470 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4472 * girepository/ginvoke.c
4473 * girepository/girepository.h
4474 * girepository/gmetadata.c
4475 * girepository/gmetadata.h
4477 * tools/gidlparser.c
4478 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4479 to avoid confusion with the interface blob.
4482 * tools/gidlparser.c
4483 Remove magic numbers and replace with type-tag
4484 enumeration symbols.
4486 * girepository/gmetadata.c
4487 Add validate declaration.
4489 2008-03-10 Jürg Billeter <j@bitron.ch>
4491 * tools/gidlparser.c: (parse_type_internal):
4492 * tools/scannerlexer.l:
4493 * tools/scannerparser.y:
4494 Support C99 _Bool type in scanner.
4496 2008-03-10 Jürg Billeter <j@bitron.ch>
4498 * tests/parser/Foo-expected.gidl:
4499 * tests/parser/foo-object.h:
4500 * tests/parser/foo.c: (foo_enum_method):
4501 * tools/scanner.c: (g_igenerator_process_function_symbol):
4502 Don't skip functions that are defined in the namespace of a type
4503 that doesn't support methods, as for example enums.
4505 2008-03-10 Johan Dahlin <johan@gnome.org>
4507 * gidl.dtd: Remove, we're using relaxng for now
4509 * tests/parser/Foo-expected.gidl:
4510 * tests/parser/foo-object.h:
4511 * tests/parser/foo.c:
4512 Rename the enum/flags get_type functions to include the whole type.
4514 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4516 * tools/gidlwriter.c (enum_generate): added "type-name",
4517 "get-type" and "deprecated" missing arguments.
4518 * tests/parser/Foo-expected.gidl:
4519 * tests/parser/foo-object.h: test enum type, and no type.
4521 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4524 Consistent checks, add missing 'test'
4526 2008-03-05 Havoc Pennington <hp@redhat.com>
4528 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4529 does on Fedora 8. Make libffi a hard requirement, since it was in
4530 practice anyway (was not really conditional in the code or
4531 makefile, only in configure).
4533 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4535 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4536 reviewed by: Johan Dahlin <johan@gnome.org>
4538 * tests/Makefile.am:
4539 * tests/roundtrips.sh:
4540 Modify the roundtrips test so that they do not use the
4541 --raw option of the gidl compiler but instead compile a
4542 shared library to use with g_module.
4544 * tests/invoke/Makefile.am:
4545 * tests/invoke/invoke.c:
4546 Modify the invoke tests to build a shared library rather
4547 than use the --raw option.
4549 * tests/invoke/invoke-namespace-find.sh: Removed:
4550 Noone knows why this was here, so removed.
4552 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4554 * tools/scanner.c: (g_igenerator_process_function_symbol):
4555 Move g_idl_node_can_have_member test later, as it broke spotting
4556 get_type's for nodes that can't have members.
4558 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4561 * tools/gidlnode.c: (g_idl_node_can_have_member):
4562 Add g_idl_node_can_have_member.
4564 * tools/scanner.c: (g_igenerator_process_function_symbol):
4565 Use g_idl_node_can_have_member to test if we should add a function
4566 as a member of the type node.
4568 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4570 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4572 * tests/parser/Makefile.am:
4573 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4575 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4577 * tools/scanner.c: (main):
4578 Ignore -pthread when passed to g-idl-scanner.
4580 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4582 * tools/grealpath.h: Added:
4583 * tools/scanner.c: (main):
4584 * tools/scannerlexer.l:
4585 * tools/Makefile.am:
4586 Always use absolute paths with symbolic links resolved when
4587 comparing filenames.
4589 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4591 * gobject-introspection.pc.in:
4592 Provide variables for g-idl-parser, scanner and compiler in the
4595 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
4598 * girepository/Makefile.am:
4599 * tools/Makefile.am:
4600 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4602 2008-02-10 Johan Dahlin <johan@gnome.org>
4604 * tests/parser/Foo-expected.gidl:
4605 * tests/parser/foo-object.h:
4606 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4607 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4610 2008-02-10 Johan Dahlin <johan@gnome.org>
4612 * tests/parser/Foo-expected.gidl:
4613 * tests/parser/foo-object.h:
4614 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4615 Add enum and flags test.
4617 2008-02-10 Johan Dahlin <johan@gnome.org>
4621 * girepository/Makefile.am:
4622 Make 'make distcheck' work again.
4624 2008-02-10 Johan Dahlin <johan@gnome.org>
4626 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
4629 * tests/parser/Makefile.am: Only create Foo.gidl when running make
4630 check, eg exclude it from BUILT_SOURCES.
4632 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4637 * girepository/Makefile.am:
4638 * m4/Makefile.am: Added:
4639 * m4/as-compiler-flag.m4: Added:
4640 * m4/gcov.m4: Added:
4641 * tools/Makefile.am:
4642 Add ability to generate a coverage report.
4643 Adds configure option --enable-gcov and make rule 'check-coverage'.
4645 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4649 * gidl/Makefile.am: Added:
4650 * girepository/Makefile.am: Added:
4651 * src/Makefile.am: Renamed to tools/Makefile.am:
4652 * src/compiler.c: Renamed to tools/compiler.c:
4653 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
4654 * src/generate.c: Renamed to tools/generate.c:
4655 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
4656 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
4657 * src/gidlnode.c: Renamed to tools/gidlnode.c:
4658 * src/gidlnode.h: Renamed to tools/gidlnode.h:
4659 * src/gidlparser.c: Renamed to tools/gidlparser.c:
4660 * src/gidlparser.h: Renamed to tools/gidlparser.h:
4661 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
4662 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
4663 * src/ginfo.c: Renamed to girepository/ginfo.c:
4664 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
4665 * src/girepository.c: Renamed to girepository/girepository.c:
4666 * src/girepository.h: Renamed to girepository/girepository.h:
4667 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
4668 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
4669 * src/scanner.c: Renamed to tools/scanner.c:
4670 * src/scanner.h: Renamed to tools/scanner.h:
4671 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
4672 * src/scannerparser.y: Renamed to tools/scannerparser.y:
4673 * tests/invoke/Makefile.am:
4674 Split src/ into girepository/ and tools/
4678 * girepository/Makefile.am:
4679 * tests/Makefile.am:
4680 * tests/invoke/Makefile.am:
4681 * tests/parser/Makefile.am:
4682 * tests/roundtrips.sh:
4683 * tools/Makefile.am:
4684 Make distcheck work.
4686 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
4688 * tests/invoke/invoke.c: (main):
4689 * tests/invoke/testfns.c: (test6), (test7):
4690 * tests/invoke/testfns.xml:
4691 Add tests for invokation with a GList argument.
4692 Also tests caller-owns return values.
4694 2008-02-04 Rob Taylor <robtaylor@floopily.org>
4697 Add some documentation for GICallableInfo
4699 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
4702 Correct syntax errors in the DTD file.
4704 * relaxng/c-types.xml:
4705 * relaxng/g-types.xml:
4707 Add a RelaxNG specification for the GObject Introspection XML data.
4708 The Specification has validated all of the test files.
4710 2008-01-25 Rob Taylor <robtaylor@floopily.org>
4712 * tests/roundtrips.sh:
4713 * tests/struct.test:
4714 Add roundtrip tests for structs.
4716 2008-01-11 Johan Dahlin <johan@gnome.org>
4718 * src/scanner.c (g_igenerator_process_function_symbol):
4719 Refactor out g_idle_node_add_member.
4720 (create_node_from_gtype, create_node_from_ctype):
4721 Use case instead of if...else
4722 (get_type_from_type_id):
4723 Rename to create_node_from_gtype
4724 (get_type_from_ctype):
4725 Rename to create_node_from_ctype
4727 Rename ginode -> node, gitype -> type, gifunc -> func.
4729 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
4730 Two new functions, refactor out of scanner.c
4732 * src/scanner.c: (g_igenerator_process_function_symbol):
4733 * src/scannerlexer.l:
4734 Do not save the content of the deprecated variable, only
4737 2008-01-11 Johan Dahlin <johan@gnome.org>
4739 * tests/parser/foo-object.h: Add a couple of comment parser tests.
4741 2008-01-11 Jürg Billeter <j@bitron.ch>
4743 * src/scannerlexer.l:
4744 Fix GTK-Doc parsing.
4746 2008-01-11 Jürg Billeter <j@bitron.ch>
4748 * src/scannerlexer.l:
4749 Fix GTK-Doc parsing.
4751 2008-01-11 Jürg Billeter <j@bitron.ch>
4753 * src/scanner.c: (lookup_symbol):
4754 Return unresolved name if we find unknown symbol.
4756 2008-01-11 Jürg Billeter <j@bitron.ch>
4758 * src/scanner.c: (g_igenerator_generate):
4759 Initialize GObject to fix scanning interface properties.
4761 * tests/parser/Foo-expected.gidl:
4762 * tests/parser/foo-object.h:
4763 * tests/parser/foo.c: (foo_interface_get_type):
4764 Test interfaces with GObject prerequisite.
4766 * tests/parser/Makefile.am:
4767 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
4769 2007-12-27 Johan Dahlin <johan@gnome.org>
4771 * src/scannerlexer.l:
4772 Parse gtk-doc comments.
4774 * src/gidlwriter.c: (function_generate):
4775 Reorganize, avoid duplication and add support for
4776 writing deprecated functions.
4778 * src/scannerparser.y:
4780 Add new structure CDirective and functions to create/free them.
4782 * src/scanner.c: (g_igenerator_process_function_symbol),
4783 (g_igenerator_process_unregistered_struct_typedef),
4784 (g_igenerator_process_struct_typedef),
4785 (g_igenerator_process_union_typedef),
4786 (g_igenerator_process_enum_typedef),
4787 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
4788 (g_igenerator_start_preprocessor):
4789 Parse @deprecated directive for functions.
4790 Remove some more C99isms.
4791 Send in -C to cpp to avoid stripping comments.
4793 * tests/parser/foo-object.h:
4794 * tests/parser/Foo-expected.gidl:
4795 Add deprecated directive
4797 2007-12-27 Johan Dahlin <johan@gnome.org>
4799 * src/scannerlexer.l (intsuffix): Add emacs mode line and
4800 escape ' and " so it looks more like C.
4803 Unlink temporary file used.
4805 2007-12-27 Johan Dahlin <johan@gnome.org>
4807 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
4808 (g_igenerator_start_preprocessor), (main):
4810 * src/scannerparser.y:
4811 Plug a couple of simple memory leaks.
4813 2007-12-27 Johan Dahlin <johan@gnome.org>
4815 * src/scanner.c: (g_igenerator_parse_macros),
4816 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
4819 * src/scannerparser.y:
4820 * tests/parser/Makefile.am:
4822 Improve error reporting, return when the preprocessor fails.
4823 Add a verbose parameter, to aid debugging.
4824 Revert to using a temporary file to communicate between the
4825 preprocessor and the parser, because we need to wait for
4826 the exit code from the pre-processor before starting to parse.
4828 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
4830 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
4831 cparser.y to scannerparser.y
4833 2007-12-11 Johan Dahlin <johan@gnome.org>
4837 * src/scanner.c: (g_igenerator_new):
4839 Get rid of the global the_generator variable.
4841 2007-12-10 Johan Dahlin <johan@gnome.org>
4843 * src/scanner.c (main): Add an output option,
4844 add checks for required parameters
4847 set BUILD_SOURCES and CLEANFILES properly
4849 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
4850 (g_writer_write_indent), (g_writer_write_unindent),
4851 (field_generate), (value_generate), (constant_generate),
4852 (property_generate), (function_generate), (vfunc_generate),
4853 (signal_generate), (interface_generate), (struct_generate),
4854 (union_generate), (boxed_generate), (enum_generate),
4855 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
4857 * src/scanner.c: (g_igenerator_generate):
4859 * src/scannerwriter.c:
4861 Refactor scannerwriter to only be tied to a GIdlModule and move
4862 it (again!) to gidlwriter.c. Change the writer function to take
4865 2007-12-10 Johan Dahlin <johan@gnome.org>
4868 * src/scanner.c: (g_igenerator_generate):
4870 * src/scannerwriter.c: (g_igenerator_write_inline),
4871 (g_igenerator_write), (g_igenerator_write_indent),
4872 (g_igenerator_write_unindent), (field_generate), (value_generate),
4873 (constant_generate), (property_generate), (function_generate),
4874 (vfunc_generate), (signal_generate), (interface_generate),
4875 (struct_generate), (union_generate), (boxed_generate),
4876 (enum_generate), (node_generate), (module_generate),
4877 (g_scanner_write_file):
4879 Move the scanner gidl writing to a separate source file.
4881 2007-12-10 Johan Dahlin <johan@gnome.org>
4886 Move over all CType construction functions.
4888 * tests/parser/Makefile.am:
4889 Be verbose when printing parsing tests results.
4891 2007-12-10 Johan Dahlin <johan@gnome.org>
4893 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
4894 preprocessor handling to here. Start cpp insteado of cc -E,
4895 always include -U__GNUC__, since it's specific to the preprocessor
4898 * tests/parser/Makefile.am (check-local): Silent diff and skip
4899 -U__GNUC__ which is always defined now
4901 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
4903 reviewed by: <delete if not using a buddy>
4905 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
4906 * tests/parser/Makefile.am:
4908 2007-12-09 Johan Dahlin <johan@gnome.org>
4911 Use GOption for command line options.
4912 (g_igenerator_new, main): Simplify constructor and they way
4913 parameters are passed into it.
4919 * src/gen-introspect.c:
4920 * src/gen-introspect.h:
4922 Rename gen-introspect.[ch] to scanner.[ch]
4924 2007-12-09 Johan Dahlin <johan@gnome.org>
4928 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
4929 don't make the repository library and the other utilites link against
4932 * src/gen-introspect.c: (g_igenerator_create_object),
4933 (g_igenerator_create_interface), (g_igenerator_create_boxed),
4934 (g_igenerator_create_enum), (g_igenerator_create_flags),
4935 (g_igenerator_process_module_symbol),
4936 (g_igenerator_process_module), (g_igenerator_generate), (main):
4937 * src/gen-introspect.h:
4938 Refactor g_igenerator_process_types into smaller pieces.
4940 * tests/parser/Makefile.am:
4941 Depend on the gen-introspect binary
4943 2007-12-09 Johan Dahlin <johan@gnome.org>
4945 * src/gen-introspect.c (g_igenerator_process_types):
4946 Break into smaller pieces, one for each generated node type.
4948 2007-12-08 Johan Dahlin <johan@gnome.org>
4950 * src/gen-introspect.c: (g_igenerator_process_types),
4951 (g_igenerator_add_module):
4952 * tests/parser/Foo-expected.gidl:
4953 * tests/parser/foo-object.h:
4954 * tests/parser/foo.c: (foo_subobject_class_init),
4955 (foo_subobject_init):
4957 Add a subobject test and make sure to register defined classes
4958 in the lookup symbol hash table.
4960 2007-12-08 Johan Dahlin <johan@gnome.org>
4964 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
4965 (g_igenerator_process_types), (g_igenerator_add_module),
4966 (g_igenerator_add_include_idl), (main):
4967 * src/gen-introspect.h:
4968 * tests/parser/Makefile.am:
4969 * tests/parser/Foo-expected.gidl:
4971 Change the gen-introspect to generate namespaced module names,
4972 such as GLib.Object instead of GObject.
4973 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
4974 add a --include-idl parameter to gen-introspect,
4975 and update the parser test.
4977 2007-12-08 Johan Dahlin <johan@gnome.org>
4979 * src/gen-introspect.c:
4980 Move main to the end of the file and attempt to make it valid
4983 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
4984 we're not quite ready to generate metadata yet.
4989 Add a simple gen-introspect parser test
4991 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
4993 reviewed by: Johan Dahlin <johan@gnome.org>
4996 * gobject-introspection.pc.in:
4998 * src/compiler.c: (format_output), (write_out_metadata), (main):
4999 * src/gen-introspect.c: (main):
5000 * src/gen-introspect.h:
5001 * src/generate.c: (write_callable_info), (write_repository),
5002 (load_metadata), (main):
5003 * src/gidlmodule.c: (g_idl_module_new),
5004 (g_idl_module_build_metadata):
5006 * src/gidlparser.c: (start_element_handler):
5007 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5008 (g_base_info_get_name), (g_base_info_get_namespace),
5009 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5010 (g_base_info_get_metadata), (g_function_info_get_symbol),
5011 (g_function_info_get_flags), (g_function_info_get_property),
5012 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5013 (g_callable_info_may_return_null),
5014 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5015 (g_callable_info_get_arg), (g_arg_info_get_direction),
5016 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5017 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5018 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5019 (g_type_info_get_tag), (g_type_info_get_param_type),
5020 (g_type_info_get_interface), (g_type_info_get_array_length),
5021 (g_type_info_is_zero_terminated),
5022 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5023 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5024 (g_value_info_get_value), (g_field_info_get_flags),
5025 (g_field_info_get_size), (g_field_info_get_offset),
5026 (g_registered_type_info_get_type_name),
5027 (g_registered_type_info_get_type_init),
5028 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5029 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5030 (find_method), (g_struct_info_find_method),
5031 (g_enum_info_get_n_values), (g_enum_info_get_value),
5032 (g_object_info_get_parent), (g_object_info_get_type_name),
5033 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5034 (g_object_info_get_interface), (g_object_info_get_n_fields),
5035 (g_object_info_get_field), (g_object_info_get_n_properties),
5036 (g_object_info_get_property), (g_object_info_get_n_methods),
5037 (g_object_info_get_method), (g_object_info_find_method),
5038 (g_object_info_get_n_signals), (g_object_info_get_signal),
5039 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5040 (g_object_info_get_n_constants), (g_object_info_get_constant),
5041 (g_interface_info_get_n_prerequisites),
5042 (g_interface_info_get_prerequisite),
5043 (g_interface_info_get_n_properties),
5044 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5045 (g_interface_info_get_method), (g_interface_info_find_method),
5046 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5047 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5048 (g_interface_info_get_n_constants),
5049 (g_interface_info_get_constant), (g_property_info_get_flags),
5050 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5051 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5052 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5053 (g_constant_info_get_value), (g_union_info_get_n_fields),
5054 (g_union_info_get_field), (g_union_info_get_n_methods),
5055 (g_union_info_get_method), (g_union_info_is_discriminated),
5056 (g_union_info_get_discriminator_offset),
5057 (g_union_info_get_discriminator):
5058 * src/ginvoke.c: (g_function_info_invoke):
5059 * src/girepository.c: (g_irepository_register),
5060 (g_irepository_unregister), (g_irepository_get_default),
5061 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5062 (g_irepository_get_info), (g_irepository_find_by_name),
5063 (g_irepository_get_shared_library),
5064 (g_irepository_build_search_path), (g_irepository_register_file),
5065 (g_irepository_error_quark):
5066 * src/girepository.h:
5067 * src/gmetadata.c: (g_metadata_get_dir_entry),
5068 (g_metadata_check_sanity), (validate_header),
5069 (validate_array_type_blob), (validate_iface_type_blob),
5070 (validate_param_type_blob), (validate_error_type_blob),
5071 (validate_type_blob), (validate_arg_blob),
5072 (validate_signature_blob), (validate_function_blob),
5073 (validate_callback_blob), (validate_constant_blob),
5074 (validate_value_blob), (validate_field_blob),
5075 (validate_property_blob), (validate_signal_blob),
5076 (validate_vfunc_blob), (validate_struct_blob),
5077 (validate_enum_blob), (validate_object_blob),
5078 (validate_interface_blob), (validate_errordomain_blob),
5079 (validate_union_blob), (validate_blob), (validate_directory),
5080 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5081 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5082 (g_metadata_new_from_mapped_file), (g_metadata_free),
5083 (g_metadata_set_module), (g_metadata_get_namespace):
5085 * tests/Makefile.am:
5086 * tests/invoke/Makefile.am:
5087 * tests/invoke/invoke-namespace-find.sh:
5088 * tests/invoke/invoke.c: (main):
5090 Add a namespace/shared library mapping. fixes #313268.
5092 2007-12-03 Johan Dahlin <johan@gnome.org>
5094 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5097 2007-11-30 Jürg Billeter <j@bitron.ch>
5103 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5104 (g_igenerator_write_inline), (g_igenerator_write),
5105 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5106 (field_generate), (value_generate), (constant_generate),
5107 (property_generate), (function_generate), (vfunc_generate),
5108 (signal_generate), (interface_generate), (struct_generate),
5109 (union_generate), (boxed_generate), (enum_generate),
5110 (node_generate), (module_generate), (get_type_from_type_id),
5111 (str_replace), (g_igenerator_process_properties),
5112 (g_igenerator_process_signals), (g_igenerator_process_types),
5113 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5114 (g_igenerator_process_unregistered_struct_typedef),
5115 (g_igenerator_process_struct_typedef),
5116 (g_igenerator_process_union_typedef),
5117 (g_igenerator_process_enum_typedef),
5118 (g_igenerator_process_function_typedef),
5119 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5120 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5121 (g_igenerator_generate), (main), (csymbol_new),
5122 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5123 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5124 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5125 (eat_hspace), (eat_line), (read_identifier),
5126 (g_igenerator_parse_macros):
5127 * src/gen-introspect.h:
5129 Import gen-introspect to generate introspection information by
5132 2007-11-30 Jürg Billeter <j@bitron.ch>
5134 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5136 2007-11-30 Jürg Billeter <j@bitron.ch>
5138 * src/gidlparser.c: (end_element_handler): Don't leave requires
5141 2007-11-29 Johan Dahlin <johan@gnome.org>
5143 * src/gidlparser.c (parse_type_internal): Add char,
5144 gchar and guchar to the builtin types.
5146 2007-11-26 Johan Dahlin <johan@gnome.org>
5148 * src/ginfo.c: (g_object_info_get_type_name),
5149 (g_object_info_get_type_init):
5150 * src/girepository.c: (g_irepository_is_registered):
5151 * src/girepository.h:
5153 Add g_object_info_get_type_name, g_object_info_get_type_init and
5154 g_irepository_is_registered.
5156 2006-08-14 Jürg Billeter <j@bitron.ch>
5158 * src/gidlparser.c: (end_element_handler): Don't leave
5159 namespace and implements states too early.
5162 2007-11-26 Johan Dahlin <johan@gnome.org>
5164 * src/gmetadata.c (validate_struct_blob):
5165 pass blob_type to validate_function_blob instead of
5166 hard-coding BLOB_TYPE_STRUCT.
5168 Patch by Torsten Schoenfeld, fixes #314190
5170 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5172 * src/compiler.c, src/generate.c, src/gidlnode.c,
5173 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5174 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5175 warnings about return values, signedness mismatches, unused
5176 variables, and unhandles enum values in switch statements.
5178 * tests/invoke/Makefile.am: Don't install the invoke test program.
5179 Add -I ../../src to the cflags used for the test functions files.
5181 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5183 * src/girepository.h: Export g_invoke_error_quark.
5185 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5187 * src/ginvoke.c: Remove the fallback implementation of
5188 g_function_info_invoke since we now formally depend on libffi.
5190 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5192 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5193 Remove these files from cvs, as they are now generated.
5195 * src/gmetadata.c (validate_iface_type_blob): Don't
5196 complain if blob->pointer is not set, since that
5197 happens for enum and flag types. (#308935, Gustavo
5200 * Commit an autoconf-conversion patch by
5201 Gustavo Carneiro (#308708)
5203 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5205 * src/compiler.c (main): Use it here to validate
5206 the generated metadata.
5208 * src/gmetadata.[hc]: Add code to validate a
5211 * metadata-format.txt: Updates
5213 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5215 * tests/*: Add struct offsets to field and vfunc
5218 * src/generate.c (write_vfunc_info): Write offset
5219 information for vfuncs.
5221 * src/gidlnode.c (g_idl_node_build_metadata): Write
5222 the struct offsets into the metadata.
5224 * src/gidlparser.c: Parse the offset attributes of
5225 field and vfunc elements.
5227 * src/gidlnode.h: Add offset members to field and
5230 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5234 * gidl.dtd: Updates.
5236 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5237 file, creates, compiles and runs a C file, and folds the
5238 resulting struct offsets back into the .gidl file.
5240 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5242 * src/gidlparser.c (start_field): Make fields in objects
5245 * src/gidlmodule.c: Include string.h
5250 * metadata-format.txt: Cleanup basic types.
5251 * src/*: Adapt to the changes.
5252 * tests/*: Adapt to the changes.
5253 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5255 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5256 size for enum blobs.
5257 (g_idl_node_get_full_size): Report the correct size for
5260 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5261 error checking for blob sizes.
5263 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5265 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5266 interface types for which is_pointer is FALSE, e.g. enums.
5268 * src/gidlnode.c (g_idl_node_get_full_size)
5269 * src/gidlparser.c (parse_type_internal):
5270 * src/generate.c (write_type_info): Support unspecialized
5271 lists, hashtables and errors. Also emit a '*' after these.
5275 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5279 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5281 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5283 * src/*.c: Change the directory to be addressed by
5284 1-based indexes, and use an index of zero to mean
5287 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5289 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5291 * tests/union.test: Add a union test.
5293 * src/generate.c: Handle unions.
5295 * src/girepository.h:
5296 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5298 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5300 * src/gidlparser.c (start_union): Parse <union> elements.
5302 * src/gidlnode.h: Add a GIdlNodeUnion.
5304 * gidl.dtd: Add a <union> element.
5306 * src/gmetadata.c (g_metadata_check_sanity): Check
5309 * src/gmetadata.h: Add union_blob_size to Header,
5312 * metadata-format.txt: Add a UnionBlob.
5314 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5316 * tests/*: Update testcases.
5318 * src/generate.c (write_callable_info): Don't forget to
5319 write transfer and null-ok attributes for return types
5322 * src/girepository.h:
5323 * src/ginfo.c (g_callable_info_may_return_null):
5324 New function to find out if a function may return NULL.
5326 * src/compiler.c (format_output): Make the generated
5329 * README: Point to a recent libffi snapshot.
5331 * tests/invoke/*: Some invoke tests.
5333 * src/Makefile: Add ginvoke.c and the necessary
5336 * src/girepository.h (g_function_info_invoke): Add
5339 * src/ginvoke.c (g_function_info_invoke): Initial
5340 implementation of invoke functionality based on libffi.
5342 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5343 strings and types hash tables in the right order when
5345 (find_entry_node): Free the name parts.
5347 2005-05-12 Johan Dahlin <johan@gnome.org>
5349 * src/generate.c: Generate consistent end tags.
5353 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5357 * src/gidlparser.c (start_function): Actually add
5358 methods to objects. (Steven Walter)
5360 * src/girepository.h:
5361 * src/ginfo.c: Rename Transfer and Direction to
5362 GITransfer and GIDirection. (Torsten Schoenfeld)
5364 * tests/*: Make tests work with the changes in name
5367 * src/gidlnode.c (find_entry_node): Parse qualified
5368 names and generate xref nodes for them if needed. Don't
5369 require all modules to be loaded any more.
5371 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5374 * src/ginfo.c (g_object_info_get_parent): Return NULL
5375 if blob->parent is 0. Still need to make sure index
5378 * src/generate.c: Generate qualified names when
5379 referring to non-local types. Emit transfer attribute
5382 * src/compiler.c (format_output): Put the function
5383 attributes where gcc accepts them.
5385 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5387 * src/compiler.c (main): Add a --verbose cmdline option
5388 and only log messages if it is specified.
5391 * src/gidlnode.c (init_stats, dump_stats): Collect some
5392 statistics on string and type sharing.
5394 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5395 g_message() instead of fprintf().
5397 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5398 (g_idl_node_get_size): Implement for structs.
5399 (g_idl_node_get_full_size): Handle parent being NULL.
5400 (serialize_type): Handle lookup failures more gracefully.
5402 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5404 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5405 size calculation for 2-parameter types and for objects.
5407 * src/compiler.c: Add a cmdline option for debug output
5408 and install a log handler to implement it.
5409 * src/gidlnode.c: Add some debug spew.
5413 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5414 forget to count the module name when calculating the
5415 required size for the metadata.
5418 * src/gidlparser.c: Fix compiler warnings.
5420 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5422 * src/compiler.c (main): Free the option context.
5424 * gidl.dtd: Clean up handling of names. All elements
5425 have a "name", only the elements corresponding to
5426 actual callable functions (function, method, constructor),
5427 have an additional "symbol" attribute holding the
5428 dlsym()-able function name.
5430 * src/generate.c: Adapt to generate xml matching the
5434 * src/gidlnode.c: Adapt to parse the new dtd.
5436 * tests/*.test: Adjust to the new dtd.
5438 * metadata-format.txt:
5439 * src/gmetadata.h: Remove the short_name field
5441 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5442 * src/girepository.h:
5443 * src/ginfo.c (g_value_info_get_short_name): Removed
5445 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5447 * gidl.dtd: Allow constructors for boxed types,
5448 patch by Jonathan Blandford.
5451 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5453 * --- Initial import ---