1 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
3 Bug 562022 – gobject-introspection needs python headers
5 * configure.ac: fail without python headers present.
8 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
10 Bug 561617 – Return value array annotations
12 * giscanner/transformer.py:
13 * tests/scanner/annotation.c (annotation_return_array):
14 * tests/scanner/annotation.h:
15 Add support for (array) for return value annotations as well.
17 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
19 * tests/everything/everything.[ch]: add a test function which calls a
22 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
24 * giscanner/cachestore.py:
25 Catch ValueError exceptions.
27 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
29 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
31 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
33 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
34 instead of hard-coding struct sizes.
36 2008-11-18 Owen Taylor <otaylor@redhat.com>
38 Bug 561296 - Add "storage type" to the typelib data for enums
40 In order to set and get enum and flag fields in structures, we need
41 to know the integral type that the enumeration is stored as. We are already
42 computing that at compile time in order to compute struct offsets, so the
43 easiest thing to do is to save that in the typelib.
45 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
46 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
47 and compute and save it at compile time.
49 * girepository/girepository.h girepository/ginfo.c:
50 Add g_enum_info_get_storage_type().
52 * girepository/gfield.c: Implement reading and writing enum and flags fields
53 based on the storage type.
55 2008-11-18 Owen Taylor <otaylor@redhat.com>
57 Add enums to the Everything test module
59 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
60 test module and register them as GTypes.
62 https://bugzilla.gnome.org/show_bug.cgi?id=561296
64 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
66 * giscanner/cachestore.py:
67 Catch BadPickleGet exceptions as well.
69 2008-11-17 Owen Taylor <otaylor@redhat.com>
71 * tests/everything/everything.c: Fix doc comment annotations
72 for test_struct_b_clone() to refer to the right function.
74 2008-11-17 Dan Winship <danw@gnome.org>
76 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
77 spelling of GHashTable. #561135
79 * tests/scanner/annotation.c (annotation_object_get_hash):
80 * tests/scanner/annotation-1.0-expected.gir:
81 * tests/scanner/annotation-1.0-expected.tgir: add a test of
82 GHashTable annotations
84 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
86 * giscanner/ast.py: Change string array match type to be in terms
87 of canonicalized type.
88 * giscanner/transformer.py: Add canonicalize_ctype which gives us
89 a version of a c:type without aliases, so we can deep canonicalize
90 char** to utf8*. Update parse_ctype to use it.
91 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
93 2008-11-16 Colin Walters <walters@verbum.org>
95 * girepository/girepository.c: Ensure we always call init_globals,
96 even if passed a non-default repository.
98 2008-11-16 Colin Walters <walters@verbum.org>
100 Bug 559706 - Interface prerequisites
102 * common.mk: Dep on libgirepository.la for scanner libs so that
103 we rebuild things even if just gdump.c changes.
104 * girepository/gdump.c: Dump prerequisites.
105 * giscanner/ast.py: Add prerequisite list.
106 * giscanner/girparser.py: Parse them from gdump.
107 * giscanner/girwriter.py: Write them.
108 * giscanner/glibtransformer.py: Resolve them.
111 2008-11-16 Owen Taylor <otaylor@redhat.com>
113 Bug 561087 - Respect is_pointer in serialize_type()
115 Add a '*' to the serialization for the cases where we set is_pointer
116 in the type blob we write out depending on node->is_pointer. Don't
117 add the '*' in the cases where is_pointer is set or not set in a
120 http://bugzilla.gnome.org/show_bug.cgi?id=561087
122 2008-11-16 Owen Taylor <otaylor@redhat.com>
124 Bug 560825 – Add size and alignment to typelib
126 Include the size and alignment of structures and unions in the typelib,
127 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
129 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
130 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
131 to StructBlob and UnionBlob.
133 * girepository/ginfo.c girepository/girepository.h:
134 Add g_[struct|union]_get[size|alignment]().
136 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
138 2008-11-16 Owen Taylor <otaylor@redhat.com>
140 Bug 552371 – implement struct field get/set
142 * girepository/gfield.c girepository/girepository.h: Add
143 convenience functions g_field_info_set_field() and
144 g_field_info_get_field() to set and get fields based on the
145 offsets in GIFieldInfo.
147 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
149 Bug 560241 - Out-arguments should not be marked as being pointers
152 * girepository/girparser.c: Improved logic for out arguments.
154 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
156 Bug 559601 - Pointers in structs/unions unduly treated as arrays
158 * giscanner/transformer.py: Differentiate type creation logic
159 between parameters and struct components.
161 2008-11-15 Colin Walters <walters@verbum.org>
163 * giscanner/dumper.py: Check return code from pkg-config
166 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
168 * tests/everything/everything.c (test_array_int_in),
169 (test_array_gtype_in):
170 * tests/everything/everything.h:
171 Rename the int/gtype array tests. Make the return value
172 useful, an aggregation of the array input values.
174 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
176 * tests/everything/Makefile.am:
177 * tests/everything/everything.c:
178 * tests/everything/everything.h:
179 * tests/everything/gitesttypes.c:
180 * tests/everything/gitesttypes.h:
181 Rename gitesttypes.[ch] to everything.[ch]
183 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
185 Bug 560708 – Don't treat arrays that have a length specified as
186 zero-terminated by default
188 * giscanner/transformer.py: Default to non zero terminated for
190 * tests/*: Update, add test for zero vs not.
192 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
194 Bug 557788 - Return types for constructors in generated typelib bogus
196 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
197 obviously broken in the face of duplicate names in different
199 * tests/scanner/*expected.gir: Fix up.
201 2008-11-13 Owen Taylor <otaylor@redhat.com>
203 * girepository/girffi.c: Fix "Unexpected time for time_t"
206 2008-11-13 Colin Walters <walters@verbum.org>
208 Bug 558436 - avoid having scanner load app code
210 * giscanner/cgobject.py: Delete; we no longer load shared
212 * giscanner/dumper.py: Support for linking a library to
213 a stub binary for introspection.
214 * giscanner/glibtransformer.py: Rewrite to use gdump XML
215 from invocation of child binary.
216 * giscanner/transformer.py: Fix up to use fully qualified
217 name in parse tree. Make parse_ctype public so we can use
218 it inside glibtransformer.
219 * tests/scanner/barapp.c: New test, using --program arg
221 * tests/*: Update to use common.mk for invoking scanner.
222 * tools/g-ir-scanner: Add options --program, --program-arg,
224 * docs/g-ir-scanner.1: Update.
226 2008-11-13 Colin Walters <walters@verbum.org>
228 * configure.ac: Depend on Gio, we use it in gdump.c.
229 * girepository/gdump.c: Code to dump GType data to XML.
230 * girepository/girepository.c: Add option group for dumping.
231 * girepository/girepository.h: Define API for the above.
233 2008-11-13 Colin Walters <walters@verbum.org>
235 * common.mk: Add a file to include with Makefile fragments
236 useful for scanner invocation.
238 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
240 * tests/everything/gitesttypes.c (test_filename_return): Return
241 strings in filename encoding.
243 2008-11-13 Owen Taylor <otaylor@redhat.com>
245 Bug 560253 – Add structure and boxed types to Everything test module
247 * tests/everything/gitesttypes.[ch]: Add examples of:
249 Plain old data structs
250 Plain old data structs with nested fields
252 Plain old data boxed with nested fields
253 More complicated boxed types with internal state
255 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
257 * tests/everything/gitesttypes.c (test_gtype_in):
258 * tests/everything/gitesttypes.h:
259 Add a test of GType arrays, a la gtk_list_store_set_columns.
261 2008-11-12 Owen Taylor <otaylor@redhat.com>
263 Bug 560419 – Cache includes when parsing
265 Keep track of all modules parsed within a GIrParser, and when a
266 module is referenced a second time, use the existing parsed copy
267 instead of reparsing.
269 2008-11-12 Owen Taylor <otaylor@redhat.com>
271 Fix management of ParseContext.includes_modules (#560419)
273 * girepository/girparser.c: Fix some trivial bugs in managing the
274 list of include modules. (Add to module's list twice, not
275 initialized to NULL, not freed.)
277 2008-11-12 Owen Taylor <otaylor@redhat.com>
279 Keep aliases and disguised_structures local to each module (#560419)
281 * girepository/girmodule.[ch]: When parsing, keep keep a separate
282 hash tables of aliases and 'disguised' flags for each module, and
283 store that on the module.
285 After parsing an include merge the aliases/disguised flags to the
288 * girepository/girparser.c: Remove 'prefix_aliases' flag and
289 always prefix aliases/disguised structure types when parsing; this
290 simplifies the code considerably.
292 2008-11-12 Owen Taylor <otaylor@redhat.com>
294 Fix mismatches between .gir name and 'name' attribute (#560419)
296 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
297 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
298 where the 'name' element of <namespace/> didn't match the filename of the
299 gir, an assumption that the compiler has always expected and now enforces.
301 2008-11-12 Owen Taylor <otaylor@redhat.com>
303 Only allow one <namespace/> element per <repository/> (#560419)
305 * girepository/girparser.c: The logic in girparser.c didn't work
306 very well if there were multiple <namespace/> nodes within a
307 single <repository/> (context->namespace was always the overall
308 filename and not the the name specified in the <namespace/>
309 element for one thing; this would cause aliases to be mis-prefixed
310 in include modules.) Also check that the "name" in the
311 <namespace/> node matches the filename.
313 2008-11-12 Owen Taylor <otaylor@redhat.com>
315 Add a GirParser object to hold the state of a compilation
317 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
318 GirParser object to hold state that is global across a
319 compilation. Currently just holds the include path, but will
320 eventually also keep a cached list of parsed modules.
322 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
324 * girepository/girepository.c (find_namespace_latest): Fix
327 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
329 * configure.ac: use 'introspection' component for bugs
331 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
333 * tests/everything/gitesttypes.c (test_filename_return):
334 * tests/everything/gitesttypes.h:
335 Add a filename return test.
337 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
339 * tests/offsets/Makefile.am (gitestoffsets.c): fix
340 gen-gitestoffsets invocation with builddir != srcdir
342 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
344 * girepository/girepository.c:
345 Change the element type from utf8 to filename
346 * girepository/girnode.c (g_ir_node_build_typelib):
347 Special case filename equally to utf8 here.
349 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
352 Remove unused variables, add a dependency of girepository.ch, so when
353 they change we rebuild the gir automatically.
355 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
357 * girepository/girepository.c (g_irepository_get_search_path):
358 * girepository/girepository.h:
359 Add a g_irepository_get_search_path, so we can access the search
362 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
364 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
366 * girepository/girparser.c: avoid freeing an uninitialized pointer
368 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
371 * giscanner/glibtransformer.py:
372 * tools/g-ir-scanner:
373 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
374 so we can just pass in --library=foo/bar/baz.la and the scanner
375 does the right thing.
376 Don't warn for _get_type() functions if they don't take any
379 2008-11-11 Owen Taylor <otaylor@redhat.com>
381 Bug 560404 – Prefix types when resolving aliases in included modules
383 * girepository/girparser.c: When resolving aliases in an included
384 module, prefix types before looking them up.
386 2008-11-11 Owen Taylor <otaylor@redhat.com>
388 Compute field offsets and overall size for object structures
390 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
391 field of type object in structure"
393 Do basic computation of field offsets for objects and interfaces;
394 this doesn't attempt to address all of the "mess" for virtual
395 functions described in Bug 560281.
397 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
399 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
401 Based on patch by Johan Bilien.
403 * giscanner/transformer.py (_create_member, _create_parameter):
404 Resolve types here as well.
405 (_resolve_type_name_1): Try resolving using 'ctype' first since
406 it's least ambiguous. Fixes struct member type resolution with
407 similarly named types, e.g. Gdk.PangoRendererClass and
409 * tests/scanner/foo*: Add test.
411 2008-11-11 Owen Taylor <otaylor@redhat.com>
413 * girepository/girparser.c: Search provided include dirs before
414 the default directories.
416 2008-11-11 Owen Taylor <otaylor@redhat.com>
418 * girepository/giroffsets.c: Include fully-qualified names in
421 2008-11-11 Owen Taylor <otaylor@redhat.com>
423 * girepository/giroffsets.c: Fail gracefully with an informative
424 error message when recursion is encountered when computing a
427 2008-11-11 Owen Taylor <otaylor@redhat.com>
429 * girepository/girparser.c: Remove an unused variable.
431 2008-11-10 Owen Taylor <otaylor@redhat.com>
433 Add tests for field offset computations
435 * tests/offsets/offsets.h: Header file with structure definitions to test
437 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
438 field offsets for the structures in offsets.h two ways: using
439 the information from a generated typelib, and as computed by the
442 We diff these two versions to test that everything is OK.
444 2008-11-10 Owen Taylor <otaylor@redhat.com>
446 Remove field offsets from g-ir-generate output and test inputs
448 Field offsets are a) architecture dependent so they shouldn't be part
449 of the architecture-independent gir format which is installed in
450 datadir. b) Are architecture-dependent so they shouldn't be in test
453 * girepository/girparser.c: Don't parse offset for fields
454 * tools/generate.c: Don't parse offset for fields
455 * tests/*.gir test/scanner/*.tgir: Remove offsets
457 (Virtual function and discriminator offsets are not removed, as they
458 aren't fully hooked up to the field-offset computation machinery yet.)
460 2008-11-10 Owen Taylor <otaylor@redhat.com>
462 Bug 560252 - Compute field offsets before writing typelib
464 * girepository/girnode.h: Store the total size and alignment for
465 GIrNodeStruct/Boxed/Union.
467 * girepository/giroffset.c: New file implementing computation of
468 structure field offsets.
470 * girepository/girnode.c: Compute structure field offsets before
471 writing types into the typelib.
473 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
474 means "unknown". Also fix description of the discriminator_offset
477 2008-11-10 Owen Taylor <otaylor@redhat.com>
479 Bug 560250 - Fully parse included modules
481 For some things, like computing structure offsets to put into the typelib
482 we need more than just the aliases from included modules. Do a completel
483 parse of included modules and store in module->included_modules.
485 Also add g_ir_find_node() to find node information from within the
486 active set of modules and their includes.
488 2008-11-10 Owen Taylor <otaylor@redhat.com>
490 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
492 Extract a function to convert GITypeTag to ffi_type from the internals
493 of ginvoke.c. This will be useful in figure out structure alignment.
495 Also fix handling of gsize and time_t to be portable. (Add a check
496 to configure.ac to figure out the width of time_t.)
498 2008-11-10 Owen Taylor <otaylor@redhat.com>
500 Bug 560248 – "disguised structures"
502 Certain types like GIConv and GdkAtom are pointers internally but don't
503 look like pointers when referenced. They have the form.
505 typedef struct _X *X;
507 Parse these as structures/records but mark them in the gir with a 'disguised'
508 attribute so that we know that they need special handling.
510 In the typelib treat them like any other structure.
512 2008-11-09 Jürg Billeter <j@bitron.ch>
515 * giscanner/girwriter.py:
517 Write throws attribute for virtual functions, fixes bug 559703
519 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
521 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
522 up some confusion about the second argument to find_module, it's
523 actually the packages __path__ attribute which we can safely ignore
525 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
527 2008-11-07 Owen Taylor <otaylor@redhat.com>
529 Bug 559737 – Deal with continuations in macros
531 * giscanner/giscannerlexer.l: Treat continuation lines the same
532 as regular newlines. This makes the scanner not complain about
533 #define foo(x) \ <stuff> inside a C file. There's no attempt
534 however to handle parsing macro definitions split across lines.
536 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
538 * giscanner/cachestore.py:
539 Handle broken cache entries, write only filesystems and
540 running out of diskspace.
542 2008-11-07 Owen Taylor <otaylor@redhat.com>
544 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
545 Set current_filename before lexing the file so error messages
546 are reported in the right file.
548 2008-11-06 Colin Walters <walters@verbum.org>
550 * tests/everything/*: Add some tests for strv.
552 2008-11-05 Colin Walters <walters@verbum.org>
554 * girepository/ginvoke.c (g_function_info_invoke): Don't use
555 nested scope local variable for error which may go away after
556 conditional is complete.
558 2008-11-05 Colin Walters <walters@verbum.org>
560 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
561 manipulate hackily; just use GString. This avoids an
562 uninitialized memory read pointed out by Havoc.
564 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
566 * giscanner/__init__.py:
568 * giscanner/cachestore.py:
569 * giscanner/cgobject.py:
570 * giscanner/girparser.py:
571 * giscanner/girwriter.py:
572 * giscanner/giscannermodule.c:
573 * giscanner/glibast.py:
574 * giscanner/glibtransformer.py:
575 * giscanner/libtoolimporter.py:
576 * giscanner/minixpath.py:
577 * giscanner/odict.py:
578 * giscanner/sourcescanner.c:
579 * giscanner/sourcescanner.h:
580 * giscanner/sourcescanner.py:
581 * giscanner/transformer.py:
582 * giscanner/utils.py:
583 * giscanner/xmlwriter.py:
585 Relicense the giscanner library under LGPLv2+.
586 This has been approved by all contributors.
588 2008-11-01 Owen Taylor <otaylor@redhat.com>
590 Bug 558848 giparser.py: shared library should be optional
592 When parsing a .gir, allow the shared-library attribute
593 of <namespace/> to be missing: this corresponds to the handling
594 in libgirepository and elsewhere.
596 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
598 Bug 557898 – Fails to build on OSX 10.4
600 * configure.ac: Check for $shrext_cmds that should be implicitly
601 available if you're using libtool >= 2.0. If undefined, call
602 libtool --config explicitly to get its value.
603 * girepository/gtypelib.c: Remove special case for (non-)Darwin
606 2008-10-31 Colin Walters <walters@verbum.org>
608 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
610 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
612 * configure.ac: Post release version bump
615 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
619 * docs/release-checklist.txt:
622 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
624 * Makefile.am: add an upload-release target
625 * docs/release-checklist.txt:
626 Release process documentation
628 2008-10-31 Colin Walters <walters@verbum.org>
630 Bug 558109 – _g_typelib_init fails to find shared libraries
632 * transformer/glibtransformer.py: Use ctypes' find_library
633 on passed libraries and write that for the shared-library
634 entry. We want to avoid depending on -devel packages.
636 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
638 * docs/g-ir-scanner.1:
639 Document the renaming options.
641 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
643 * giscanner/Makefile.am:
644 * tests/invoke/Makefile.am:
645 * tests/repository/Makefile.am: List in-tree libraries first in
646 LDADD / LIBADD. If installed library is listed first, the
647 resulting binary will prefer installed version to one in .libs,
648 possibly making 'make check' behave strangely.
650 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
652 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
653 gir-repository from choking with gdk/quartz
655 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
657 * giscanner/giscannermodule.c (calc_attrs_length),
658 (pygi_collect_attributes):
659 * giscanner/xmlwriter.py:
660 Write a C version of the xml namespace formatter.
661 Saves 15% of the time it takes to create a gtk gir.
663 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
665 * giscanner/xmlwriter.py: Abstract attribute formatting
666 to a function external to the XMLWriter class.
668 * giscanner/scannerlexer.l:
669 Parse and discard __typeof and __attribute.
671 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
673 * giscanner/girparser.py:
674 Remove arguments from the constructor, move them to
675 separate accessors. Add a new parse_tree method
676 which takes an element tree instance.
677 * tools/g-ir-scanner:
678 Update callsite for this
680 * giscanner/Makefile.am:
681 * giscanner/cachestore.py:
682 * giscanner/transformer.py:
683 Cache the include parsing. Saves ~25% time when
684 creating vte (which includes everything up to gtk+).
686 2008-10-30 Colin Walters <walters@verbum.org>
688 * giscanner/transformer.py: Don't reparse includes
689 we've already processed.
691 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
693 * giscanner/girparser.py:
694 * giscanner/transformer.py:
695 Avoid parsing parameters, types etc when parsing
696 includes. Should speed up include parsing a bit.
698 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
700 * giscanner/girparser.py:
701 Avoid big if/else and use a dispatch table like
704 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
706 * giscanner/transformer.py:
707 Clean up include parsing and registration.
709 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
711 * giscanner/transformer.py:
714 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
716 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
719 construct PYTHONPATH just once
721 * tests/everything/Makefile.am:
722 * tests/scanner/Makefile.am:
723 add $(top_srcdir) to PYTHONPATH to
724 handle builddir != srcdir
726 * giscanner/libtoolimporter.py:
727 * giscanner/sourcescanner.py:
728 Make the libtoolimporter work when distchecking too.
730 Mostly based on patch by Tommi Komulainen
732 2008-10-29 Owen Taylor <otaylor@redhat.com>
734 * giscanner/glibtransformer.py: If a filename of an existing
735 file is passed to --library, hunt for it directly, rather than
736 searching for a corresponding library.
738 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
740 * giscanner/libtoolimporter.py:
741 * giscanner/sourcescanner.py:
742 Clean up the libtool importer a bit. Add a context so we
743 can use it through a with statement.
744 Don't just look in the current directory, look in the whole
747 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
749 Bug 558065 – gitesttypes should be installed
753 * tests/types/Makefile.am -> tests/everything/Makefile.am
754 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
755 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
756 move tests/types to tests/everything
758 * tests/everything/Makefile.am: build normal shared library
759 libgirepository-everything.so.1.0.0 and corresponding typelib
760 Everything-1.0.typelib
762 * tests/everything/Makefile.am: explicitly link libtool
763 versioning with typelib versioning with variables
765 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
767 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
769 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
771 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
774 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
776 Bug 558068 – when invoking a method, offset the in arguments by one,
779 * tests/invoke/invoke.c, tests/invoke/testfns.c,
780 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
781 * girepository/ginvoke.c: do not offset the index of given out
782 arguments by one for methods, "this" is provided as in argument only.
784 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
786 * gir/gio-2.0.c: add annotation for g_file_delete
788 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
790 Bug 558062 – provide and use paths in the .pc file
792 * gobject-introspection-1.0.pc.in: provide typelibdir variable
793 for where .typelibs should be installed (callers shouldn't need
794 to construct paths from bits and pieces)
796 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
798 Bug 557791 – g_irepository_require() could return a GTypelib *
800 * girepository/girepository.c: Return GTypelib; this is useful
801 for low level manipulation.
803 2008-10-25 Colin Walters <walters@verbum.org>
805 Bug 557788 – Return types for constructors in generated typelib bogus
807 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
808 rely on end pass resolution.
810 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
812 Bug 557786 - support fixed size arrays
814 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
815 * giscanner/scannerparser.y: Retain fixed array size.
816 * giscanner/ast.py: Add to note.
817 * giscanner/girwriter.py: Write to gir.
818 * girepository/girnode.c: Write it to typelib.
819 * tools/generate.c: Generate.
820 * tests/*: Add tests.
822 2008-10-25 Colin Walters <walters@verbum.org>
824 Bug 557076 - move typelibs to $libdir
826 * configure.ac: Steal some configury bits from dbus to expand
828 * gir/Makefile.am: Move to libdir.
829 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
830 instead just look at one hardcoded path in libdir.
831 * acinclude.m4: Bits from dbus.
833 2008-10-24 Johan Dahlin <johan@gnome.org>
835 * girepository/girnode.c (g_ir_node_check_unhandled_members):
836 Be quiet, do not warn about unhandled members.
838 2008-10-24 Johan Dahlin <johan@gnome.org>
840 * girepository/gtypelib.c:
841 Only use SHLIB_SUFFIX on darwin, otherwise use
842 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
844 2008-10-24 Lucas Rocha <lucasr@gnome.org>
846 Bug 557623 - Constructors shouldn't be flagged as methods.
848 * girepository/ginfo.c (g_function_info_get_flags): ditto.
850 2008-10-24 Johan Dahlin <johan@gnome.org>
852 * giscanner/scannerparser.y:
853 Check against division by zero for the modula operator.
854 This fixes header parsing of OSX system headers included
857 2008-10-24 Johan Dahlin <johan@gnome.org>
861 Add a CONTRIBUTORS file and dist it.
863 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
865 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
867 * girepository/girparser.c (parse_param_transfer):
868 * giscanner/transformer.py (_create_parameter, _create_return):
869 * giscanner/girwriter.py (_write_return, _write_parameter):
870 * tools/generate.c (write_callable_info): always write and
871 require "transfer-ownership" for return-values and parameters
874 * tests/invoke/testfns-1.0.gir:
876 * tests/scanner/DrawableAdditions.xml:
877 * tests/scanner/GtkFrob-1.0-expected.tgir:
878 * tests/scanner/annotation-1.0-expected.tgir:
879 * tests/scanner/drawable-1.0-expected.tgir:
880 * tests/scanner/drawable-injected-1.0-expected.gir:
881 * tests/scanner/drawable-injected-1.0-expected.tgir:
882 * tests/scanner/foo-1.0-expected.tgir: Updated
884 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
886 * giscanner/cgobject.py: build fundamental types same way as glib
888 * giscanner/glibtransformer.py (_type_from_gtype): record GType
889 when constructing the Type from it
891 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
892 the parameter is a GObject from its GType, if available.
894 * giscanner/glibtransformer.py (_adjust_transfer):
895 * tests/scanner/foo-1.0-expected.gir:
896 * tests/scanner/foo-1.0-expected.tgir: deduce
897 transfer-ownership from GTypes
899 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
901 * giscanner/transformer.py (_create_parameter):
902 * tests/scanner/foo-1.0-expected.gir: make varargs
903 transfer-ownership="none"
905 2008-10-23 Colin Walters <walters@verbum.org>
907 Bug 556739 - transfer ownership
909 * giscanner/ast.py: Refactor Parameter/Return to share
910 common attributes. Add transfer_inferred attribute
911 which says whether or not we made a guess.
912 * giscanner/transformer.py: Add much more extensive
913 heuristics around parameter and return transfer.
914 * giscanner/glibtransformer.py: Adjust to inspect
918 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
920 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
922 * tests/scanner/Makefile.am:
923 * tests/scanner/annotation-1.0-expected.tgir:
924 * tests/scanner/drawable-1.0-expected.tgir:
925 * tests/scanner/drawable-injected-1.0-expected.tgir:
926 * tests/scanner/foo-1.0-expected.tgir:
927 * tests/scanner/GtkFrob-1.0-expected.tgir:
928 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
929 annotations survive the roundtrip via typelib
931 The expectations are as currently produced by g-ir-generate,
932 comparison with the .gir files shows there are differences.
934 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
936 Bug 557468 – Support for GI_TYPELIB_PATH
938 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
939 provided paths to the global search path.
941 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
943 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
945 * tests/scanner/drawable-1.0-expected.tgir:
946 * tests/scanner/drawable-injected-1.0-expected.tgir:
947 * tests/scanner/foo-1.0-expected.tgir:
948 * tools/generate.c (write_object_info): write 'abstract'
949 attribute for classes
951 2008-10-22 Lucas Rocha <lucasr@gnome.org>
953 * girepository/girmodule.c, girepository/gtypelib.c,
954 girepository/girparser.[ch]: fix some build warnings.
956 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
958 Bug 557405 – Use 'allow-none' consistently
960 * docs/typelib-format.txt:
961 * girepository/ginfo.c (g_arg_info_may_be_null):
962 * girepository/girnode.c (g_ir_node_build_typelib):
963 * girepository/girnode.h (struct _GIrNodeParam):
964 * girepository/girparser.c (start_parameter):
965 * girepository/girwriter.c (function_generate):
966 * girepository/gtypelib.h (ArgBlob):
968 * tests/function.gir:
969 * tools/generate.c (write_callable_info): Use 'allow-none'
970 consistently throughout
972 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
974 Bug 557092 – Callback annotations not used
976 * giscanner/transformer.py (_create_callback): use annotations
978 * tests/scanner/annotation.h
979 * tests/scanner/annotation-1.0-expected.gir: add tests
981 2008-10-21 Colin Walters <walters@verbum.org>
983 * giscanner/scannerlexer.l: Don't require trailing whitespace after
984 uncommented parameters.
987 2008-10-21 Colin Walters <walters@verbum.org>
989 * girepository/girepository.c: Ensure that when doing an unversioned
990 require, we prefer items earlier in the search path to later ones.
992 2008-10-21 Owen Taylor <otaylor@redhat.com>
994 * giscanner/transformer.py: For string parameters allow transfer annotation
995 to override the standard automatic guessing based on 'const'.
997 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
999 Bug 557241 – "throws" flag for functions
1001 * tests/scanner/drawable-1.0-expected.gir,
1002 tests/scanner/drawable-injected-1.0-expected.gir,
1003 tests/scanner/drawable.[ch]: add simple test for throwing
1004 function (has GError ** as last argument)
1006 * giscanner/ast.py: add a 'throws' flag to Function
1007 * giscanner/glibtransformer.py: if a function's last paramerter is
1008 a GError, set the 'throws' flag and remove that parameter
1009 * giscanner/girwriter.py: write out the 'throws' attribute
1010 * giscanner/girparser.py: support parsing the 'throws' attribute
1012 * tests/repository/gitestthrows.c: add a simple test to check the
1013 throws flag in a typelib and invoke the function
1015 * girepository/ginfo.c, girepository/girnode.[ch],
1016 girepository/girnode.h, girepository/girparser.c,
1017 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1019 * girepository/ginvoke.c: if a function throws, add a GError as last
1020 arguments, and propagate the error to the invoker.
1022 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1024 * giscanner/transformer.py (_create_parameters): Warn if we see
1025 annotations for unknown parameters. If .h and .c files name
1026 parameters differently, the annotations may be lost.
1028 2008-10-21 Johan Dahlin <johan@gnome.org>
1030 Bug 556358 - don't use libtool internals
1032 * giscanner/Makefile.am:
1033 * giscanner/libtoolimporter.py:
1034 * giscanner/sourcescanner.py:
1035 * giscanner/utils.py:
1036 Add a python meta importer and remove a libtool symlink hack.
1038 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1040 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1041 and --add-include-path appropriately when invoking the scanner.
1042 * tests/types/Makefile.am (%typelib): Likewise.
1044 2008-10-20 Colin Walters <walters@verbum.org>
1046 Bug 556777 - validate properties
1048 * giscanner/transformer.py: Add option to throw on unknown types.
1049 * giscanner/glibtransformer.py: Use it on properties.
1050 * tests/*: Add a test.
1052 2008-10-20 Colin Walters <walters@verbum.org>
1054 * giscanner/glibast.py: Also register g variants of
1055 default_array_types. This is not beautiful, but
1056 good alternatives aren't easy to come by.
1057 This fixes gchar ** parsing.
1059 2008-10-20 Colin Walters <walters@verbum.org>
1061 * docs/typelib-format.txt, girepository/gtypelib.h:
1062 Take a bit from ObjectInfo to represent abstract flag.
1063 * giscanner/cgobject.py: Expose g_type_get_flags.
1064 * girepository/girepository.h: Add accessor.
1065 * girepository/ginfo.c: Implement it.
1066 * giscanner/ast.py: Add is_abstract flag to generic
1068 * giscanner/glibast.py: Use it.
1069 * giscanner/girwriter.py: Write it.
1070 * girepository/girparser.c: Parse it.
1073 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1075 * giscanner/girparser.py (_parse_function): don't lose
1076 'transfer-ownership' attributes when injecting, check for the
1079 2008-10-19 Johan Dahlin <johan@gnome.org>
1081 * giscanner/scannerlexer.l: Parse and ignore __asm.
1083 2008-10-19 Colin Walters <walters@verbum.org>
1085 * giscanner/girparser.py: Parse array length= to ensure
1086 it doesn't get lost from --inject.
1088 2008-10-17 Colin Walters <walters@verbum.org>
1090 Bug 556795 - char ** regression
1092 * giscanner/transformer.py: Fix parsing of ctypes, add some
1093 comments about what's going on.
1094 * tests/*: Add a test for char **.
1096 2008-10-17 Colin Walters <walters@verbum.org>
1098 Bug 556783 - change namespace handling to be more consistent
1100 * giscanner/transformer.py: Eliminate usage of
1101 strip_namespace_object. We now treat --namespace as the default
1102 --strip-prefix; however, if --strip-prefix is specified it
1103 overrides --namespace. This applies to everything except function
1104 names, where we do also strip the namespace.
1105 * giscanner/glibtransformer.py: Remove usage of
1106 strip_namespace_object.
1108 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1109 --namespace and --strip-prefix.
1111 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1113 Bug 556732 – generate gir files consistently
1115 * girepository/girparser.c (start_parameter):
1117 * tests/invoke/testfns-1.0.gir:
1118 * tools/generate.c (write_callable_info): write
1119 'transfer-ownership' attribute consistently with both
1120 return-value and parameter elements
1122 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1124 Bug 556732 – generate gir files consistently
1126 * tools/generate.c (write_callable_info): write 'direction'
1127 attribute only if other than 'in' to be consistent with
1130 * tests/object.gir: remove direction="in" which is the default
1132 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1134 Bug 556732 – generate gir files consistently
1136 * giscanner/ast.py (Field): add readable and writable properties
1137 * giscanner/girparser.py (_parse_field): copy 'readable' and
1138 'writable' attributes
1139 * giscanner/transformer.py (_create_member): create fields as
1141 * giscanner/glibtransformer.py (_introspect_object,
1142 _pair_class_struct): make object instance and class fields
1144 * giscanner/girwriter.py (_write_field):
1145 * tools/generate.c (write_field_info): write field 'readable'
1146 and 'writable' attributes only if non-default (read-only)
1147 * girepository/girparser.c (start_field): in the absence of
1148 attributes assume fields are read-only
1150 * tests/struct.gir: remove redundant readable="1" from fields
1151 * tests/scanner/foo-1.0-expected.gir:
1152 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1153 all record and union fields
1155 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1157 Bug 556732 – generate gir files consistently
1159 * giscanner/girwriter.py (_write_property): write properties
1160 'construct' attribute if set
1161 * tools/generate.c (write_property_info): write properties
1162 'readable' and 'writable' attributes only if non-default
1163 * tests/object.gir: add writable="0"
1164 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1166 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1168 * gir/glib-2.0.c: added annotations
1170 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1172 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1175 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1177 Bug 556610 – giscanner/girparser.py drops parameter options
1179 * tests/scanner/drawable-injected-1.0-expected.gir,
1180 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1181 * giscanner/ast.py: allow Parameter to take options in the constructor
1182 * giscanner/girparser.py: parse parameter options (transfer,
1183 direction, allow-none)
1185 2008-10-16 Colin Walters <walters@verbum.org>
1187 Bug 556185 - segfault on g_callable_info_get_return_type
1189 Initial patch from John Ehresman.
1191 * tests/repository/*: Add a test using
1192 g_callable_info_get_return_type. Instead of casting a
1193 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1194 to call g_type_info_get_interface.
1196 2008-10-16 Colin Walters <walters@verbum.org>
1198 Bug 556579 - union and struct name misresolved
1200 * giscanner/transformer.py: The calls to _resolve_type_name
1201 for struct/union names was a legacy holdover from when type
1202 resolution had multiple phases. Now it's actively harmful
1203 since we might pull in an identical name from another
1207 2008-10-16 Colin Walters <walters@verbum.org>
1209 Bug 556432 - transfer annotations and defaults
1211 * giscanner/transformer.py: Canonicalize type
1212 after removing *, not before. This ensures that
1213 guchar* is transformed to 'uint8'.
1214 Add some comments here.
1215 * giscanner/glibtransformer.py: Add _adjust_transfer
1216 phase for tweaking GObject transfers.
1219 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1221 * configure.ac: enable bunch of gcc warning CFLAGS
1223 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1225 Bug 556543 – reduce compiler warnings
1227 * girepository/ginfo.c:
1228 * girepository/girepository.c (register_internal,
1229 count_interfaces, find_interface, find_namespace_version,
1230 parse_version, g_irepository_require):
1231 * girepository/girmodule.c (g_ir_module_build_typelib):
1232 * girepository/girnode.c (init_stats, dump_stats,
1233 _g_irnode_init_stats, _g_irnode_dump_stats,
1234 g_ir_node_can_have_member):
1235 * girepository/girparser.c (firstpass_end_element_handler,
1236 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1237 start_alias, start_type, end_type_top, parse_include, cleanup,
1239 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1240 * giscanner/giscannermodule.c (directive_get_options,
1241 type_get_child_list):
1242 * giscanner/scannerlexer.l (parse_gtkdoc):
1243 * giscanner/scannerparser.y (ctype_free):
1244 * giscanner/sourcescanner.c:
1245 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1246 * tests/types/gitesttypes.c:
1247 * tools/compiler.c (main):
1248 * tools/generate.c (write_repository): Remove unused variables
1249 and code, add missing includes, declarations and case
1252 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1254 Bug 556541 – access union members through UnionBlob rather than
1257 * girepository/ginfo.c (g_union_info_find_method): access union
1258 members through UnionBlob rather than StructBlob
1260 2008-10-15 Colin Walters <walters@verbum.org>
1262 Bug 556331 - clean up includes handling
1264 * tools/g-ir-scanner: Rework command line arguments; now we take
1265 --add-include-path and --include separately.
1266 * giscanner/girwriter.py: Separate name= and version= in include
1268 * giscanner/ast.py: Add Include type.
1269 * giscanner/transformer.py: Cleanups to register_include now that
1270 we don't need to handle mixed filenames and relative arguments.
1271 * girepository/girparser.c: Parse name and version separately;
1272 this fixes a bug as a side effect where we weren't resolving
1273 through aliases for basic types.
1274 * girepository/girepository.c: Fix format string args.
1275 * gir/Makefile.am: Update.
1278 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1280 Bug 556434 – unhandled interface/object/... member types
1282 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1283 g_ir_node_build_typelib): Check all
1284 interface/object/boxed/struct/union members are processed and
1285 abort if they are not. (Mostly callbacks in structs, but also
1286 fields in interfaces.)
1288 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1290 * a/girepository/girnode.c (g_ir_node_build_members,
1291 g_ir_node_build_typelib): refactor common code for processing
1292 members to a function
1294 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1296 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1297 transformation is lossless (it's not)
1299 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1301 * tests/Makefile.am: fix tests to compare xml to xml instead of
1302 typelib to xml, and stop on error
1304 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1306 * tools/generate.c (write_type_name, write_type_info,
1307 write_type_info, write_object_info, write_object_info,
1308 write_interface_info, write_error_domain_info): reduce code
1311 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1313 Bug 556174 – parse types for lists etc.
1315 * girepository/girparser.c (end_type_recurse):
1317 * tools/generate.c (write_type_info, write_field_info,
1318 write_callable_info, write_callable_info, write_constant_info,
1319 write_property_info): use nested <type>s for lists and hashes
1321 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1324 * tests/object.gir: remove trailing whitespace from inside
1325 elements to match g-ir-generate output
1327 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1329 * tools/generate.c (xml_printf): quote printf arguments so that
1330 we don't generate invalid XML by writing unescaped double quotes
1331 and such in attributes
1333 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1335 * tools/generate.c (write_field_info, write_callable_info,
1336 write_function_info, write_callback_info, write_struct_info,
1337 write_constant_value, write_signal_info, write_vfunc_info,
1338 write_object_info, write_interface_info, write_union_info,
1339 write_repository): remove unused indent parameters, xmlwriter
1340 keeps track of necessary indentation
1342 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1344 * tools/generate.c (xml_element_new, xml_element_free,
1345 xml_start_element, xml_end_element, xml_end_element_unchecked,
1346 xml_open, xml_close): Keep track of generated XML tree and
1347 handle indentation and closing tags properly.
1348 (write_field_info, write_callable_info, write_function_info,
1349 write_callback_info, write_struct_info, write_value_info,
1350 write_constant_info, write_enum_info, write_signal_info,
1351 write_vfunc_info, write_property_info, write_object_info,
1352 write_interface_info, write_error_domain_info, write_union_info,
1353 write_repository): Use xml_start_element and xml_end_element to
1356 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1358 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1359 (write_type_name, write_type_info, write_field_info,
1360 write_callable_info, write_function_info, write_callback_info,
1361 write_struct_info, write_value_info, write_constant_value,
1362 write_constant_info, write_enum_info, write_signal_info,
1363 write_vfunc_info, write_property_info, write_object_info,
1364 write_interface_info, write_error_domain_info, write_union_info,
1365 write_repository): wrap all FILE access to go through simple xmlwriter
1367 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1369 Bug 556400 – Fails to build on OS X 10.4
1371 * configure.ac: check for functions backtrace and backtrace_symbols
1372 * girepository/girparser.c (backtrace_stderr): Comment out
1373 implementation if the functions are not available.
1374 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1375 directory for better portability
1377 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1379 Bug 556433 – assume direction = out for int * parameters
1381 * giscanner/ast.py: define a list of types for which, if passed as
1382 reference, we assume a default direction of 'out'
1383 * giscanner/transformer.py: if a type has type pointer to one of the
1384 previously defined types, and no direction is set, assume out.
1385 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1387 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1389 * tests/scanner/annotation.c: fixed a few copy-paste errors
1391 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1393 Bug 556323 – transfer-ownership is wrong for functions returning const
1396 * giscanner/transformer.py: check for a const string as return value,
1397 not just const char*. Suggested by Colin Walters
1398 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1400 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1402 * girepository/ginfo.c, girepository/girepository.h: add
1403 g_union_info_find_method
1405 2008-10-14 Colin Walters <walters@verbum.org>
1407 * tests/repository/Makefile.am: Reenable repo test.
1408 * tests/repository/gitestrepo.c: Prepend search
1409 path for $(top_builddir)/gir dir so that we don't
1410 require installation for "make check" to pass.
1412 2008-10-13 Jürg Billeter <j@bitron.ch>
1414 * giscanner/glibtransformer.py:
1415 * tests/scanner/annotation-1.0-expected.gir:
1416 * tests/scanner/drawable-1.0-expected.gir:
1417 * tests/scanner/foo-1.0-expected.gir:
1418 * tests/scanner/utility-1.0-expected.gir:
1420 Support fields in GObject structs
1422 2008-10-13 Jürg Billeter <j@bitron.ch>
1424 * giscanner/ast.py: add signed integer and off_t to type_names
1426 2008-10-12 Jürg Billeter <j@bitron.ch>
1428 * giscanner/girparser.py: Parse bits attribute of fields
1430 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1432 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1433 * tests/repository/gitestrepo.c (main): instantiate
1434 'GCancellable' to ensure the GType is registered before using
1437 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1439 * giscanner/girparser.py: actually add the parsed constant nodes
1441 2008-10-12 Colin Walters <walters@verbum.org>
1443 * girepository/girepository.c: Don't cast DirEntry to Blob,
1444 actually look it up by offset.
1446 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1448 * giscanner/girparser.py: parse constant nodes in gir files
1450 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1452 * giscanner/transformer.py: prefix for constants have an underscore,
1453 so remove them as if they were functions, not objects.
1455 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1457 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1460 2008-10-12 Colin Walters <walters@verbum.org>
1462 Initial patch from Jani Monoses.
1464 * girepository/gtypelib.c: Fix inverted test for success
1467 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1469 * tools/generate.c (write_callable_info): use "transfer-ownership"
1470 attribute for return values
1472 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1474 * tools/generate.c (write_callable_info): move "transfer" and
1475 "null-ok" attributes from <function> to <return-value> element
1477 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1479 * girepository/girparser.c (start_return_value): handle
1480 "transfer-ownership" attribute
1482 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1484 * girepository/girparser.c (parse_param_transfer):
1485 * tools/generate.c (write_callable_info): use "container" for
1486 container/shallow ownership transfer (not "shallow")
1488 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1490 * girepository/girparser.c (parse_param_transfer,
1491 start_parameter): Refactor handling of transfer=none/shallow/full
1492 to separate function
1494 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1496 Bug 556048 – Crash in g_irepository_find_by_gtype
1498 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1499 * girepository/girepository.c (find_interface): Fix
1500 find_by_gtype case to get the type name from right offset
1502 2008-10-12 Jürg Billeter <j@bitron.ch>
1504 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1507 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1509 * girepository/gtypelib.h (RegisteredTypeBlob): make
1510 'unregistered' one bit wide as everywhere else
1512 2008-10-12 Jürg Billeter <j@bitron.ch>
1514 * giscanner/glibtransformer.py:
1515 * tests/scanner/annotation-1.0-expected.gir:
1516 * tests/scanner/drawable-1.0-expected.gir:
1517 * tests/scanner/drawable.h:
1518 * tests/scanner/foo-1.0-expected.gir:
1519 * tests/scanner/utility-1.0-expected.gir:
1521 Readd class records as workaround to not break Gtk typelib
1523 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1525 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1527 2008-10-12 Jürg Billeter <j@bitron.ch>
1529 * giscanner/glibtransformer.py: Don't generate <record> elements
1531 * tests/scanner/*: Update test cases
1533 2008-10-11 Colin Walters <walters@verbum.org>
1535 Bug 552858: versioning
1537 This is a big patch. You should probably remove your installation
1540 * docs/typelib-format.txt: Add nsversion entry which holds
1541 version of namespace.
1542 * girepository/girepository.h: Add 'version' parameter to
1543 g_irepository_require. This may be NULL. Normally
1544 bindings should pass an explicit version though.
1545 * girepository/girepository.c: Lots of infrastructure to
1546 support versioning. Add some more documentation. Disallow
1547 some usage of NULL namespaces.
1548 * girepository/girmodule.c: Add version parameter.
1549 * girepository/gtypelib.c: Update header size.
1550 * giscanner/ast.py: Add version to Namespace.
1551 * giscanner/girparser.py: Parse version attribute from
1552 XML, pass to Namespace.
1553 * giscanner/girwriter.py: Write out version parameter.
1554 * giscanner/transformer.py: Clean up include registration.
1555 * tests/*: Add version attribute.
1556 * tests/invoke/invoke.c: Don't try looking up test before
1557 it's loaded in repository.
1558 * tools/generate.c: Output version parameter.
1559 * gir/Makefile.am: Add 2.0 version to .gir files.
1561 2008-10-11 Colin Walters <walters@verbum.org>
1563 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1564 if we have mismatched parens.
1566 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1568 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1569 on 'members' variable.
1571 2008-10-11 Colin Walters <walters@verbum.org>
1573 Bug 555947 - update annotations syntax
1575 * giscanner/ast.py: Default to None for transfer. Remove
1576 default transfers for container types; we require this to
1578 * giscanner/girwriter.py: Transfer is now 'none', 'container',
1579 'full' to match repository.
1580 * giscanner/scannerlexer.l: Annotations now are parenthesized.
1581 * giscanner/transformer.py: Update for new annotations syntax.
1584 2008-10-11 Johan Bilien <jobi@litl.com>
1586 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1588 2008-10-11 Johan Bilien <jobi@litl.com>
1590 Bug 552347: Parse #defines constants
1592 * girepository/gtypelib.c: update the list of value_size
1593 with recently defined type tags
1594 * giscanner/scannerparser.y: brought back parsing of #defined, as
1595 present in older version
1596 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1597 * giscanner/girwriter.py: write out constant tags in the gir
1598 * giscanner/sourcescanner.py: add accessor for const_string
1599 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1602 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
1604 Bug 555946: Install a test module exercising all types, transfer
1609 * tests/types/*: Add and install a test module that has functions
1610 accepting and returning most of the basic types to enable bindings
1611 implementors to more easily test their type conversion routines.
1613 2008-10-11 Jürg Billeter <j@bitron.ch>
1615 Bug 552374: Const strings should be identified in the gir.
1617 * giscanner/transformer.py: support string memory management
1618 * tests/scanner/foo.h: use char * and const char *
1619 * tests/scanner/foo-expected.gir: test that
1621 2008-10-11 Johan Dahlin <johan@gnome.org>
1623 * giscanner/girparser.py:
1624 Also parse enums which are not glib types.
1626 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1628 Bug 552370: add one more test for unsigned as a type, not as
1631 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
1632 * test/scanner/foo.h: add function which uses unsigned as a type.
1633 * test/scanner/foo-expected.gir: test that.
1635 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
1637 Bug 555712: Struct and union issues
1639 * giscanner/scannerparser.y (struct_declarator): Use information
1640 provided about the bit width of a field.
1641 * giscanner/transformer.py (Transformer._create_member): Pass the
1642 symbol's const_int member to the created field (it represents the
1644 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
1645 field attribute, if present.
1646 * giscanner/ast.py (Field): Add 'bits' member, specifying the
1647 width in bits of the field (only relevant for bitfields).
1650 * giscanner/transformer.py (Transformer._create_typedef_struct)
1651 (Transformer._create_typedef_union): Add calls to _create_struct()
1652 and _create_union(), respectively. This causes the scanner to
1653 generate output for fields of struct and union typedefs.
1656 2008-10-11 Jürg Billeter <j@bitron.ch>
1658 Bug 552370: unsigned not scanned properly
1660 * giscanner/scannerparser.y: combine basic types such as unsigned
1661 int and long long when scanning
1662 * tests/scanner/foo-expected.gir:
1663 * tests/scanner/foo.c: (foo_test_unsigned):
1664 * tests/scanner/foo.h: test that
1666 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1668 Bug 554854: The --typelib-xml and --inject options should reuse
1669 giscanner parser/writer.
1671 * giscanner/ast.py: add constructor list to Struct and Union.
1672 Add new param in Return's contructor to define transfer.
1673 * giscanner/girparser.py: several additions to the parser in order
1674 to have parsing all nodes of the gir xml files.
1675 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
1676 and writer in --inject and --typelib-xml options.
1677 * giscanner/xmlwriter.py: ignore empty attributes instead of
1678 raising an error as this basically exposes a bug in GIRParser.
1679 This should be reverted as soon as the parser is fixed.
1681 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1683 Bug 552376: scanner generates wrong names for enum members when
1684 there's no defined gtype.
1686 * giscanner/utils.py (strip_common_prefix): Always strip common
1687 prefix exactly up to the last "_", and not beyond.
1688 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
1689 here is that the first character after the last '_' should should be
1690 the same as the character in the same position on the type name.
1691 * tests/scanner/foo-expected.gir: test that
1693 2008-10-10 Lucas Rocha <lucasr@gnome.org>
1695 Bug 555293: append library_paths to LPATH env variable to work
1696 around a bug in find_library when using ldconfig.
1698 * tools/g-ir-scanner (main): ditto.
1700 2008-10-09 Lucas Rocha <lucasr@gnome.org>
1702 * girepository/girepository.c (register_internal): fix regression on
1703 invoke test case by making sure we load the global module in the
1704 typelib when dealing with inline typelibs.
1705 * girepository/gtypelib.c: a couple of coding style fixes.
1707 2008-10-06 Lucas Rocha <lucasr@gnome.org>
1709 Bug 555294: Add support for multiple shared libraries per typelib.
1711 * girepository/ginvoke.c (g_function_info_invoke),
1712 girepository/ginfo.c(g_registered_type_info_get_g_type): use
1713 g_typelib_symbol instead of g_module_symbol.
1714 * girepository/girepository.h: remove g_typelib_set_module and add
1716 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
1717 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
1718 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
1719 modules instead of just one. The symbol lookup is now abstracted
1720 behind g_typelib_symbol which tries to find the passed symbol name in
1722 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
1723 and write shared_library attribute as a comma-separated list of libs.
1725 2008-10-06 Colin Walters <walters@verbum.org>
1727 * giscanner/transformer.py: Parse length= annotation as
1728 a parameter name, not a raw int.
1731 2008-10-03 Colin Walters <walters@verbum.org>
1733 Bug 551744: Non-GObject types aren't aggregating ctors and methods
1735 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
1737 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
1741 2008-10-03 Colin Walters <walters@verbum.org>
1743 Bug 554576: scan problem with ev_selection_render_selection()
1745 * giscanner/transformer.py: Only do type resolution once we've
1746 scanned all types. What could happen before is that we'd strip
1747 the namespace from local type "EvSelection" => Selection, and
1748 then later pull a "Selection" from some other namespace because
1749 we hadn't yet seen the local EvSelection. This could come
1750 down to hash table ordering and other things so not easy
1751 to write a test for.
1753 2008-10-03 Lucas Rocha <lucasr@gnome.org>
1755 * giscanner/girwriter.py (_parser_member): fix the last parameter of
1756 GLibEnumMember constructor as it should be the enum member nick.
1758 2008-10-02 Colin Walters <walters@verbum.org>
1760 Bug 552961: remove this parameter for methods
1762 * giscanner/glibtransformer.py: Delete this parameter; it is
1764 * girepository/ginvoke.c: Insert this parameter for methods.
1765 * girepository/gtypelib.c: Remove no longer needed verification of
1766 method this parameter.
1769 2008-09-30 Dan Winship <danw@gnome.org>
1771 Bug 554490: g-ir-scanner gets confused by '\\'
1773 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
1774 backslashes so it will correctly parse '\\' and "\\"
1776 * tests/scanner/annotation.c: add a use of '\\' to make sure that
1779 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
1781 2008-10-02 Colin Walters <walters@verbum.org>
1783 bug 552393: Note variadic functions
1785 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
1786 to use parameter_list directly.
1787 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
1788 * giscanner/ast.py: Add Varargs type.
1789 * giscanner/transformer.py: Check for ellipsis symbol, transform
1791 * girepository/girnode.h: Add varargs flag to in-memory nodes.
1792 Parse varargs functions, but filter them out before we start
1793 compiling the typelib.
1795 2008-10-02 Colin Walters <walters@verbum.org>
1797 Bug 554632: type tag for GType
1799 * girepository/girepository.h, girepository/girepository.c:
1800 Add type tag for GType - it's a special type we don't want
1801 to resolve to just "long".
1802 * docs/typelib-format.txt: Update.
1803 * girepository/girparser.c: Parse it.
1804 * giscanner/glibtransformer.py: Ensure we don't put GType in
1806 * tools/generate.c: Remove hardcoded type list.
1809 2008-09-30 Dan Winship <danw@gnome.org>
1811 Bug 554521: scanner generates wrong names for enum members with
1812 full type name prefix
1814 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
1815 right amount when the entire "first" string is a prefix of
1818 * tests/scanner/foo.h (FooEnumFullname):
1819 * tests/scanner/foo-expected.gir: test that
1821 2008-09-29 Colin Walters <walters@verbum.org>
1823 Bug 552380: Array parameters should be marked in the gir
1825 * giscanner/ast.py: Default char** to utf8[], and guchar* to
1826 uint8[]. Add Array, List, and Map subclasses of Type;
1827 these types can be generic. Return transfer defaults
1828 to true if return value is string or container type.
1829 Delete Sequence type.
1830 * giscanner/scannerlexer.l: Syntax change for annotations;
1831 use <> since it's more readable.
1832 * giscanner/girwriter.py: Write out these changes.
1833 * giscanner/girparser.py: Parse them.
1834 * giscanner/transformer.py: Have a defined set of
1835 both list and map types. When creating a type,
1836 check if the ctype we've parsed is one of them,
1837 if so create a container type subclass as appropriate.
1838 * girepository/girparser.c: Parse in generic types.
1841 2008-09-27 Colin Walters <walters@verbum.org>
1843 * tools/g-ir-scanner: Add --inject option.
1845 2008-09-25 Colin Walters <walters@verbum.org>
1847 Remove non-repository types from GIR
1849 * giscanner/ast.py: The canonical name is 'utf8', not
1851 * giscanner/glibast.py: A few more glib type mappings.
1852 * girepository/girparser.c: We only parse repository types.
1853 * tests/*.gir: Update.
1855 2008-09-23 Colin Walters <walters@verbum.org>
1857 Bug 552566: Add time_t type
1859 We need a type for time_t since it's special in C, and just
1860 mapping it to long precluded bindings from handling it
1863 2008-09-19 Colin Walters <walters@verbum.org>
1865 Bug 552390: Handle capitialization like "DBus" more robustly
1867 The to_underscores function was designed for use against prefixed
1868 names; we need a separate function which will convert names like
1869 DBusFoo into dbus_foo, not d_bus_foo.
1871 2008-09-19 Colin Walters <walters@verbum.org>
1873 Add check to make sure we're not hitting out unresolved types
1875 Validate the "this" argument for methods
1877 Remove heuristic matching of methods to classes based on prefix
1879 It was a broken hack that dated from when we handled underscoring
1880 and capitalization conventions less well.
1882 2008-09-18 Colin Walters <walters@verbum.org>
1884 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
1886 On Darwin, the suffix for installed shared libraries (.dylib) is
1887 different from loadable modules (.so). We use a bit of magic shell
1888 script from Behdad Esfahbod to figure out the right suffix.
1890 2008-09-15 Johan Dahlin <johan@gnome.org>
1892 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
1893 a wrapper for type_qualifier as well.
1895 2008-09-15 Colin Walters <walters@verbum.org>
1897 http://bugzilla.gnome.org/show_bug.cgi?id=552065
1899 * giscanner/ast.py: Add deprecation attributes.
1900 * giscanner/girwriter.py: Write out deprecation data.
1901 * girepository/girparser.c: Relax parsing; deprecated
1902 attribute now includes freeform string.
1903 * giscanner/scannerlexer.l: Parse Deprecated.
1904 * giscanner/transformer.py: Look for deprecated attribute
1906 * tests/scanner/*: Add a Deprecated test.
1908 2008-09-14 Tor Lillqvist <tml@novell.com>
1910 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
1912 2008-09-14 Colin Walters <walters@verbum.org>
1914 * giscanner/glibtransformer.py: Ignore functions with
1917 2008-09-12 Colin Walters <walters@verbum.org>
1919 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
1921 2008-09-12 Colin Walters <walters@verbum.org>
1923 * giscanner/ast.py: Bind pid_t to INT for vte.
1925 2008-09-12 Colin Walters <walters@verbum.org>
1927 * giscanner/girparser.py: Parse c:type for boxed records/unions.
1928 * giscanner/glibast.py: Avoid overwriting ctype.
1929 * giscsanner/transformer.py: Try resolving types using the GType names.
1931 2008-09-12 Colin Walters <walters@verbum.org>
1933 * giscanner/minixpath.py: Code to run an "XPath"
1934 assertion against an XML tree, taken from
1935 gir-repository/gir/tests.py.
1936 * giscanner/Makefile.am: Ship it.
1937 * tools/g-ir-scanner: Add --xpath-assertions option.
1938 * gir/GLib-assertions.txt: Add a few assertions.
1939 * gir/Makefile.am: Run them.
1941 2008-09-11 Colin Walters <walters@verbum.org>
1943 http://bugzilla.gnome.org/show_bug.cgi?id=551737
1945 * giscanner/transformer.py: Fix strip_namespace_func to only strip
1946 prefix if it ends with _. Tweak callback stripping to determine
1947 based on presence of _ whether we need to use strip_namespace_func
1948 or strip_namespace_object.
1950 2008-09-09 Owen Taylor <otaylor@redhat.com>
1952 * docs/typelib-format.txt: Wether => Whether
1954 2008-09-08 Colin Walters <walters@verbum.org>
1956 * girepository/girparser.c: Default to "readable" for properties.
1957 * giscanner/ast.py: Add readable, writable etc.
1958 * giscanner/girwriter.py: Writ them.
1959 * giscanner/glibtransformer.py: Inspect them.
1962 2008-09-07 Colin Walters <walters@verbum.org>
1964 * giscanner/cgobject.py: Add comment.
1966 2008-09-07 Colin Walters <walters@verbum.org>
1968 * giscanner/cgobject.py: Also call g_thread_init.
1970 2008-09-07 Colin Walters <walters@verbum.org>
1972 * giscanner/transformer.py: Fix regression by not
1973 stripping prefix before stripping namespace for unions
1976 2008-09-06 Colin Walters <walters@verbum.org>
1978 * giscanner/transformer.py: If a namespace contains
1979 multiple caps, try stripping both gnomekeyring_ and
1982 2008-09-07 Johan Dahlin <johan@gnome.org>
1984 Bug 551162 – giscanner does not recognize asm and __asm__
1985 * giscanner/scannerlexer.l:
1986 Patch by Jani Monoses.
1988 2008-09-06 Colin Walters <walters@verbum.org>
1990 * girepository/girnode.c: Allow gtype_name
1991 and gtype_init in struct and union.
1992 * girepository/girparser.c: Parse glib:
1993 boxed bits for both structure and union.
1994 * girepository/gtypelib.c: Don't barf
1995 if structure is boxed.
1996 * giscanner/girparser.py: Parse new XML
1998 * giscanner/girwriter.py: Write out new
2000 * giscanner/glibast.py: Define new classes
2001 which are both Boxed and Struct/Union, as
2002 well as an "Other" for everything else.
2003 * giscanner/glibtransformer.py: Handle
2004 boxed types specially; we try to merge
2005 them with a struct/union if one exists,
2006 otherwise fall back to generic boxed.
2008 * tools/generate.c: Write out new format.
2010 2008-09-06 Johan Dahlin <johan@gnome.org>
2012 * giscanner/grealpath.h: Include stdlib.h
2014 * docs/g-ir-generate.1: Remove leading %
2016 2008-09-01 Colin Walters <walters@verbum.org>
2018 * girepository/girparser.c: Look at c:type to determine
2019 whether or not an item is a pointer.
2021 2008-09-01 Johan Dahlin <johan@gnome.org>
2023 * tests/scanner/Makefile.am:
2024 Set PYTHONPATH so the scanner can run
2025 even if you didn't install anything.
2027 2008-09-01 Johan Dahlin <johan@gnome.org>
2030 Post-release version bump
2033 2008-09-01 Johan Dahlin <johan@gnome.org>
2037 2008-08-31 Colin Walters <walters@verbum.org>
2039 * giscanner/glibtransformer.py: Quiet info
2042 2008-08-31 Johan Dahlin <johan@gnome.org>
2045 Bump version to 0.5.0
2047 2008-08-31 Colin Walters <walters@verbum.org>
2049 * giscanner/glibtransformer.py: Follow aliases to ensure
2050 we don't get a constructor returning a basic type.
2051 * giscanner/transformer.py: Add function to follow aliases.
2054 2008-08-31 Johan Dahlin <johan@gnome.org>
2056 * giscanner/scannerlexer.l:
2057 * giscanner/scannerparser.y:
2058 * giscanner/sourcescanner.h:
2059 * giscanner/sourcescanner.py:
2060 Parse GCC extensions in the parser instead of just undeffing them
2061 in the pre-processor.
2063 2008-08-31 Johan Dahlin <johan@gnome.org>
2065 * giscanner/glibtransformer.py:
2066 Clean up a huge if. Do not add methods or constructors
2068 * giscanner/utils.py:
2069 second might be longer than first, check that.
2071 2008-08-31 Johan Dahlin <johan@gnome.org>
2076 2008-08-31 Colin Walters <walters@verbum.org>
2078 * girepository/girparser.c: Don't lose if we
2081 2008-08-31 Colin Walters <walters@verbum.org>
2083 * giscanner/glibtransformer.py: Look for libtool
2084 library in current directory
2085 * tests/scanner - Update.
2087 2008-08-30 Colin Walters <walters@verbum.org>
2089 * docs/typelib-format.txt: Add a guint32
2091 * gir/Makefile.am: Dep on Makefile
2092 * girepository/ginfo.c:
2093 * girepository/girepository.c: Clean up
2094 default typelib handling; remove global
2095 default_typelib variable. Ensure we handle
2096 NULL repository in more places.
2097 Support dependency resolution.
2098 Support lazy loading.
2099 * girepository/girepository.h: Remove
2100 g_irepository_unregister; we don't support
2101 unloading typelibs since really they're
2102 process-global. Update for lazy loading
2104 * girepository/girmodule.c: Use g_new0.
2105 Add dependencies to GirModule.
2106 * girepository/girparser.c: Parse dependencies.
2107 * girepository/gtypelib.c: Add 4 bytes for
2109 * tests/Makefile.am: Kill off gobject.gir,
2110 it conflicts with the real one.
2111 * tests/object.gir: Dep on GObject.
2112 * tools/generate.c: Take --includedir
2113 argument to say which directories to search
2114 for typelibs. Print out dependencies.
2116 2008-08-30 Colin Walters <walters@verbum.org>
2118 * giscanner/glibtransformer.py: Reduce warning noise.
2120 2008-08-29 Colin Walters <walters@verbum.org>
2122 * girepository/ginfo.c: Add some assertions regarding
2123 refcounts, just to be sure.
2124 * giscanner/glibtransformer.py: Blacklist a few more
2127 2008-08-29 Colin Walters <walters@verbum.org>
2129 * giscanner/glibtransformer.py: Blacklist a few
2130 functions that use GError oddly
2132 2008-08-29 Colin Walters <walters@verbum.org>
2134 * girepository/gtypelib.c: Don't crash if no
2137 2008-08-29 Colin Walters <walters@verbum.org>
2139 * girepository/girparser.c: Handle chains of aliases
2140 across modules by ensuring we fully qualify aliases
2143 2008-08-29 Colin Walters <walters@verbum.org>
2145 * girepository/girparser.c: Don't search aliases
2148 2008-08-29 Colin Walters <walters@verbum.org>
2150 * girepository/girparser.c: Rewrite type parsing
2151 to handle both GLib parsing case as well as correctly
2152 handling GLib.List and friends. Don't try to treat
2153 e.g. ListStore as a List.
2155 2008-08-29 Colin Walters <walters@verbum.org>
2157 * girepository/gtypelib.c: Add more context
2160 2008-08-29 Colin Walters <walters@verbum.org>
2162 * giscanner/glibtransformer.py: Add some informative
2163 logging messages in corner cases. Be sure we use
2164 the most recent node set instead of a cache
2165 when generating result set.
2166 * tests/: Remove duplicated bits in expected girs
2167 * girepository/girparser.c: Accept both List (for
2168 compiling GLib) and GLib.List (what the scanner
2171 * tools/generate.c: Generate canonical form.
2173 2008-08-29 Johan Dahlin <johan@gnome.org>
2175 * giscanner/config.py.in:
2176 Use datarootdir instead of datadir to avoid
2177 an autoconf warning.
2179 2008-08-29 Johan Dahlin <johan@gnome.org>
2183 * examples/gdk-pixbuf.gidl:
2185 Update and remove old cruft.
2187 2008-08-29 Johan Dahlin <johan@gnome.org>
2190 * docs/g-ir-compiler.1:
2191 * docs/g-ir-generate.1:
2192 * docs/g-ir-scanner.1:
2193 Add man pages for the generator and compiler.
2195 2008-08-29 Johan Dahlin <johan@gnome.org>
2197 * docs/g-ir-scanner.1: Document
2199 * giscanner/Makefile.am:
2200 * giscanner/gidlparser.py:
2201 * giscanner/gidlwriter.py:
2202 * tools/g-ir-scanner:
2203 Remove gidl support.
2205 2008-08-28 Colin Walters <walters@verbum.org>
2207 * tests/scanner/Makefile.am: Pass the right
2208 --includedir args. Add a Makefile dep.
2209 * tools/compiler.c: Pass includedirs down.
2210 * girepository/girparser.c: Actually put
2211 includedirs in context, pass down. Fix
2214 2008-08-28 Colin Walters <walters@verbum.org>
2216 * gir/Makefile.am: Use --includedir
2217 * girepository/girparser.c: Recursively parse
2218 includes to pull in aliases and expand them.
2219 We need this to avoid putting unknown names in
2221 * tools/compiler.c: Add --includedir option.
2222 * giscanner/ast.py: Map size/ssize to types
2225 2008-08-28 Tor Lillqvist <tml@novell.com>
2227 Make check now runs successfully on Windows.
2229 * tools/compiler.c (write_out_typelib): Use binary mode for output
2232 * girepository/girnode.c: Don't print NULL strings.
2234 * tests/invoke/Makefile.am
2235 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2236 convince libtool to build shared libraries.
2238 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2239 g_assert() instead of printing out expected errors.
2241 2008-08-28 Tor Lillqvist <tml@novell.com>
2243 * girepository/gtypelib.h: Change type of bitfield fields from
2244 guint to the most suitable smaller type. This makes the struct
2245 sizes match the ones on Linux that the sanity check expects when
2246 using gcc -mms-bitfields on Windows.
2248 2008-08-28 Johan Dahlin <johan@gnome.org>
2253 * giscanner/Makefile.am:
2254 * tests/Makefile.am:
2255 * tests/scanner/Makefile.am:
2256 Make distcheck pass.
2258 2008-08-27 Johan Dahlin <johan@gnome.org>
2260 * giscanner/Makefile.am:
2261 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2263 2008-08-27 Tor Lillqvist <tml@novell.com>
2265 Make g-ir-scanner work on Windows. Still problems with the typelib
2266 code. Changes okayed by jdahlin.
2268 * configure.ac: Check for Windows, set Automake conditional
2269 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2270 avoid shell quoting issues
2272 * girepository/Makefile.am: Use -no-undefined so that libtool
2273 agrees to build a shared library on Windows.
2275 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2276 Windows. Empty implementation on Windows so far.
2278 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2279 informative error message for the assertion failures. Tell also
2280 what the expected size of the struct is. Check all sizes first and
2281 fail afterwards if at least one size was different from expected.
2283 * tools/Makefile.am: Reorder libraries into proper logical
2286 * tools/generate.c: Don't include <dlfcn.h>, not used.
2288 * giscanner/Makefile.am: On Windows, link with the Python library,
2289 and install the module DLL as _giscanner.pyd. Remove the
2290 unnecessary import library and libtool library that libtool has
2293 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2294 and just skip it. Recognize also two "l" suffixes for long long
2295 constants. Recognize also __inline__.
2297 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2298 GetFullPathName(). As such, GetFullPathName() does more than the
2299 UNIX realpath(). It also changes relative paths into absolute
2300 paths. But for our purposes that shouldn't matter.
2302 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2303 Windows the file descriptor passed to us is from Python. Python
2304 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2305 uses msvcrt.dll. On Windows, file descriptors are specific to
2306 which C library is used. So we must find out what underlying OS
2307 handle corresponds to the file descriptor Python passes us, and
2308 then make that into a file descriptor valid for the C library this
2311 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2312 __attribute__ as the lexer now handles it. The definition as empty
2313 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2314 __attribute__. Close the temp file before unlinking it.
2316 * giscanner/cgobject.py: Use correct library name for the gobject
2319 * gir/Makefile.am: Must pass the full basename of the DLLs on
2320 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2321 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2322 reality they won't change, until there is a GLib 3, and then also
2323 the Unix code here needs changing.
2325 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2328 2008-08-26 Colin Walters <walters@verbum.org>
2330 * girepository/girepository.c: Search
2331 $DATADIR/girepository instead of
2332 $DATADIR/gitypelibs; this naming makes
2333 it clearer that e.g. jgir can install
2335 * gir/Makefile.am: Install there.
2337 2008-08-26 Colin Walters <walters@verbum.org>
2339 * girepository/gtypelib.c (_g_typelib_init): Also
2340 use G_MODULE_SUFFIX instead of hardcoding .so.
2342 2008-08-26 Colin Walters <walters@verbum.org>
2344 * girepository/gtypelib.c (_g_typelib_init): Free
2345 string in the right place.
2347 2008-08-26 Colin Walters <walters@verbum.org>
2349 * girepository/gtypelib.c (_g_typelib_init): Handle
2350 both .la and .so names; this works better in the
2351 uninstalled library case.
2353 2008-08-26 Johan Dahlin <johan@gnome.org>
2356 * giscanner/Makefile.am:
2357 * giscanner/cgobject.py:
2358 * giscanner/config.py.in:
2359 * giscanner/sourcescanner.py:
2360 Avoid undeffing __GNUC__, instead define
2361 __attribute__ & friends. Remove glibconfig.h hack.
2362 This makes gobject-introspection work better on
2363 MacOS X, Thanks to Richard Hult for kind help.
2365 2008-08-25 Colin Walters <walters@verbum.org>
2367 * giscanner/glibtransformer.py: Always print
2370 2008-08-25 Colin Walters <walters@verbum.org>
2372 * giscanner/glibtransformer.py: Skip over
2373 interfaces we don't know.
2375 2008-08-25 Colin Walters <walters@verbum.org>
2377 * girepository/girparser.c: Parse new implements
2378 syntax, drop gapi one.
2379 * tests/object.gir: Update.
2380 * tools/generate.c: Generate new syntax.
2382 2008-08-25 Colin Walters <walters@verbum.org>
2384 * giscanner/ast.py: Add interfaces property
2386 * giscanner/girwriter.py: Write out implemented
2388 * giscanner/glibtransformer.py: Introspect
2389 implemented interfaces.
2390 * tests/scanner/*: Make FooObject implement
2393 2008-08-25 Colin Walters <walters@verbum.org>
2395 * giscanner/glibtransformer.py: More correctly pair
2396 methods; if we have a symbol that starts with
2397 e.g. hippo_canvas look for a matching HippoCanvas
2398 class before accepting e.g. HippoCanvasImage.
2400 2008-08-24 Colin Walters <walters@verbum.org>
2402 * tools/g-ir-scanner: Filter out unknown options from
2405 2008-08-24 Colin Walters <walters@verbum.org>
2407 * giscanner/glibtransformer.py: Fail with better
2408 error if we can't find library.
2410 2008-08-24 Colin Walters <walters@verbum.org>
2412 * tools/g-ir-scanner: Use subprocess instead of
2413 commands, works on Windows and avoids the evil
2416 2008-08-24 Colin Walters <walters@verbum.org>
2418 * giscanner/glibtransformer.py: Skip over
2419 g_object_get_type from GLib trunk.
2421 2008-08-24 Colin Walters <walters@verbum.org>
2423 * girepository/girepository.c (g_irepository_require):
2424 Don't open shared library here; we already do it
2427 2008-08-24 Colin Walters <walters@verbum.org>
2429 * girepository/gtypelib.c: Add context stack so
2430 when we get an error we can print out nicely
2433 2008-08-24 Johan Dahlin <johan@gnome.org>
2435 * girepository/girparser.c (start_glib_boxed), (start_function),
2436 (start_field), (start_alias):
2437 Refactor a couple of parsing functions to be simpler to follow.
2440 2008-08-24 Johan Dahlin <johan@gnome.org>
2442 * girepository/girparser.c (start_function):
2443 Remove left-over code, checking type of function.
2445 2008-08-23 Colin Walters <walters@verbum.org>
2447 * giscanner/config.py: Define DATADIR.
2448 * giscanner/transformer.py: Look in DATADIR.
2450 2008-08-23 Colin Walters <walters@verbum.org>
2452 * girepository/gtypelib.c: Check constructor
2454 * girepository/girnode.c: Small tweaks.
2455 * girepository/ginfo.c: Calculate signature offsets
2457 * girepository/girparser.c: Remove duplicate
2459 * giscanner/glibtransformer.py: Avoid marking
2460 functions which return a basic type as
2463 2008-08-23 Colin Walters <walters@verbum.org>
2465 * girepository/girparser.c: Ignore <include>.
2466 * giscanner/girparser.py: Parse them.
2467 * giscanner/girwriter.py: Generate them.
2468 * giscanner/transformer.py: Process <include>
2469 recursively. Don't require full path for
2470 includes, look in {$XDG_DATA_DIRS}/gir.
2471 * tools/g-ir-scanner: Pass through includes.
2472 * Makefile.am: Remove extra --include
2474 * *-expected.gir: Add expected includes.
2476 2008-08-23 Johan Dahlin <johan@gnome.org>
2478 * tests/scanner/Makefile.am:
2479 * tests/scanner/annotation-expected.gir:
2480 * tests/scanner/drawable-expected.gir:
2481 Avoid duplication in the Makefile, regenerate with new
2482 namespaces (same as the filename)
2484 2008-08-22 Colin Walters <walters@verbum.org>
2486 * girepository/girnode.c: Don't hardcode integers,
2489 2008-08-22 Johan Dahlin <johan@gnome.org>
2491 * giscanner/sourcescanner.py:
2492 Check for ../gobject-introspection-1.0.pc.in to determine
2493 if we run installed or uninstalled.
2495 2008-08-22 Johan Dahlin <johan@gnome.org>
2498 * giscanner/sourcescanner.py:
2499 Send in undefs/defines via writing it directly to stdin
2500 of cpp instead of via arguments.
2502 2008-08-22 Colin Walters <walters@verbum.org>
2504 * tools/generate.c, tools/compiler.c: Default
2506 * all Makefile.am: Update.
2508 2008-08-22 Colin Walters <walters@verbum.org>
2510 * girepository/girparser.c: Pass through
2511 recursive types. Avoid overwriting errors.
2512 * giscanner/xmlwriter.py: Always write the
2514 * tests/*.gir: Adjust.
2515 * tests/scanner/Makefile.am: Build typelibs,
2516 and generate XML from those. Once we
2517 have a good diff mechanism...
2518 * tests/scanner/*-expected.gir: Add XML
2520 * tools/g-ir-scanner: Accept --typelib-xml
2522 * tools/generate.c: Better defaults for transfer.
2524 2008-08-22 Johan Dahlin <johan@gnome.org>
2528 * giscanner/Makefile.am:
2529 * giscanner/config.py.in:
2530 * giscanner/sourcescanner.py:
2531 Use the generated glibconfig.h for all scanner invokations.
2532 Rename it to glibconfig-scanner.h and install it.
2533 Add a config.py which so far contains the include dir.
2535 2008-08-22 Johan Dahlin <johan@gnome.org>
2538 Replace glibconfig.h with our own, do some replacement
2539 for CPP/C features we do not support
2541 2008-08-22 Colin Walters <walters@verbum.org>
2543 * tools/generate.c (write_callable_info): Fix unref
2546 2008-08-22 Colin Walters <walters@verbum.org>
2548 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2549 * tests/Makefile.am: Support $(DEBUG)
2550 * tools/generate.c: Do immediate close tags if no
2553 2008-08-21 Colin Walters <walters@verbum.org>
2555 * tests/scanner/drawable-expected.gir,
2556 * tests/scanner/drawable.c,
2557 * tests/scanner/drawable.h:
2560 2008-08-21 Colin Walters <walters@verbum.org>
2562 * giscanner/glibtransformer.py: Compute prefix
2563 by searching through the symbol for bits
2564 rather than going directly from ctype; this fixes
2567 2008-08-21 Colin Walters <walters@verbum.org>
2569 * giscanner/glibtransformer.py: Also try squashing
2570 underscores from namespace, fixes webkit_web_view_new.
2572 2008-08-21 Colin Walters <walters@verbum.org>
2574 * giscanner/glibtransformer.py: More ctor work,
2575 avoid having gtk_window_group_new end up under
2578 2008-08-21 Colin Walters <walters@verbum.org>
2580 * giscanner/glibtransformer.py: Much simpler approach
2581 of mapping uscored names to classes.
2582 * giscanner/utils.py: Remove unnecessary function.
2584 2008-08-21 Johan Dahlin <johan@gnome.org>
2586 * girepository/girepository.c (g_irepository_require):
2587 Plug memory leak and avoid using freed memory.
2588 Resolve the whole module path, here as well.
2590 2008-08-21 Colin Walters <walters@verbum.org>
2592 * giscanner/glibtransformer.py: Look up all permutations
2593 of class names when scanning methods/ctors based on
2594 the prefix instead of using the return value. This
2595 associates gtk_window_new with the right class.
2597 2008-08-21 Colin Walters <walters@verbum.org>
2599 * girepository/girmodule.c (g_ir_module_build_typelib):
2600 Revert change to increment header_size; we do that in
2603 2008-08-21 Colin Walters <walters@verbum.org>
2605 * girepository/girnode.c (write_string): Tweak to
2606 use UINT instead of INT. Not likely to matter.
2607 * girepository/girmodule.c (g_ir_module_build_typelib):
2608 Add to header_offset as well for header strings
2609 to match what write_string does.
2610 * girepository/gtypelib.c: Replace is_name with
2611 validate_name, which more strongly validates and
2612 handles errors in a better way. Update all callers.
2613 * giscanner/glibtransformer.py: Handle constructors
2616 2008-08-21 Johan Dahlin <johan@gnome.org>
2618 * gir/Makefile.am (typelibs_DATA): Build and
2619 install the Gio.typelib too
2621 * girepository/gtypelib.c (_g_typelib_init):
2622 Use g_module_build_path to resolve the shlib name
2624 2008-08-21 Colin Walters <walters@verbum.org>
2626 * gir/Makefile.am: CLEANFILES typelibs too.
2628 2008-08-21 Johan Dahlin <johan@gnome.org>
2630 * giscanner/glibtransformer.py:
2631 Do not send .la files through find_library.
2633 2008-08-21 Colin Walters <walters@verbum.org>
2635 * girepository/girparser.c (g_irepository_require):
2636 Fix one small leak in error case.
2638 2008-08-21 Johan Dahlin <johan@gnome.org>
2641 Parse glibconfig.h as well and install the compiled
2644 2008-08-21 Johan Dahlin <johan@gnome.org>
2647 * giscanner/glibtransformer.py:
2648 * tools/g-ir-scanner:
2649 Do not hard-core library names in the Makefile, reuse
2650 ctypes find_library instead.
2652 2008-08-21 Johan Dahlin <johan@gnome.org>
2654 * girepository/girparser.c (resolve_aliases):
2655 Remove compilation warnings
2657 2008-08-21 Johan Dahlin <johan@gnome.org>
2659 * girepository/girepository.c (g_irepository_require):
2660 Rewrap and fix double free bug by leaking a bit.
2662 2008-08-20 Colin Walters <walters@verbum.org>
2664 * girepository/girepository.c: Add new function
2665 g_irepository_get_typelib_path which tells
2666 us from where we loaded a namespace.
2668 2008-08-20 Colin Walters <walters@verbum.org>
2670 * tests/scanner/*-expected.gir: Adjust for
2671 added shared-library.
2672 * giscanner/giwriter.py: Make pylint happy.
2674 2008-08-20 Colin Walters <walters@verbum.org>
2676 * girepository/girmodule.c (g_ir_module_build_typelib):
2677 Calculate size correctly, avoid use-after-free.
2679 2008-08-20 Colin Walters <walters@verbum.org>
2681 * girepository/girepository.c: Remove
2682 g_irepository_register_file in favor of
2683 g_irepository_require. There are two
2684 possible deployment scenarios for typelibs:
2685 First, separate in $DATADIR/gitypelibs/. Second,
2686 they may be embedded in shlibs. However since
2687 the first is now the normal case, the API is
2688 optimized around it.
2690 Refactor internals to look up typelibs for
2691 namespaces just-in-time, but we expect
2692 consumers to call g_irepository_require.
2694 Also, add some docs. No one has died from that
2696 * gir/Makefile.am: Need --library for glib.
2697 * giscanner/girwriter.py: Write out shared-library.
2698 * tools/g-ir-writer: Take the first --library
2699 argument as the target of shared-library. In
2700 the future we should make this nicer with pkg-config
2703 2008-08-20 Colin Walters <walters@verbum.org>
2705 * girepository/girparser.py: And parse them.
2707 2008-08-20 Johan Dahlin <johan@gnome.org>
2709 * giscanner/glibast.py: Add gshort/gushort types
2711 2008-08-20 Colin Walters <walters@verbum.org>
2713 * gir/Makefile.am: Rename .gir files using GI namespace.
2714 * girepository/girepository.c: Use XDG_DATA_DIRS for
2715 looking up typelibs. Also typelibs are now suffixed
2717 * tests/invoke/Makefile.am: Only use metadata.
2718 * girepository/Makefile.am: Remove unnecessary include.
2719 * tests/scanner/Makefile.am: Update using GI namespaces
2720 for scanner includes.
2722 2008-08-20 Colin Walters <walters@verbum.org>
2724 * girepository/transformer.py: Suppress aliases whose
2726 * girepository/ast.py: Define some more aliases.
2728 2008-08-20 Colin Walters <walters@verbum.org>
2730 * girepository/girparser.c: Avoid alias infloops.
2732 2008-08-20 Colin Walters <walters@verbum.org>
2734 * tests/scanner/foo-expected.gir: Fix expected list type.
2736 2008-08-20 Johan Dahlin <johan@gnome.org>
2738 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
2739 Add a workaround for #548689.
2740 We can now compile gtk!
2742 2008-08-20 Colin Walters <walters@verbum.org>
2744 * giscanner/glibtransformer.py: Try to look up
2745 aliases using the c:type too.
2747 2008-08-20 Colin Walters <walters@verbum.org>
2749 * girepository/girparser.c: Parse union fields.
2751 2008-08-20 Johan Dahlin <johan@gnome.org>
2753 * giscanner/ast.py: Make time_t an alias for long
2755 * gir/gio-2.0-good.gir:
2756 * gir/glib-2.0-good.gir:
2757 * gir/gobject-2.0-good.gir:
2759 * giscanner/glibtransformer.py:
2760 Do not delete Class structures, we need them in gdk/gtk.
2761 * tests/scanner/drawable-expected.gir:
2762 * tests/scanner/foo-expected.gir:
2763 * tests/scanner/utility-expected.gir:
2766 2008-08-20 Johan Dahlin <johan@gnome.org>
2768 * tests/scanner/Makefile.am:
2769 * tests/scanner/annotation-expected.gir:
2770 * tests/scanner/annotation.c (annotation_object_class_init),
2771 (annotation_object_init), (annotation_object_method),
2772 (annotation_object_in), (annotation_object_out),
2773 (annotation_object_inout), (annotation_object_inout2),
2774 (annotation_object_inout3), (annotation_object_calleeowns),
2775 (annotation_object_calleesowns), (annotation_object_get_strings),
2776 (annotation_object_with_voidp), (annotation_object_get_objects),
2777 (annotation_object_create_object), (annotation_object_allow_none):
2778 * tests/scanner/annotation.h:
2779 * tests/scanner/foo-expected.gir:
2780 * tests/scanner/foo.c:
2781 * tests/scanner/foo.h:
2782 Split out annotation tests out of foo
2784 2008-08-20 Johan Dahlin <johan@gnome.org>
2786 * tests/scanner/Foo-expected.gir:
2787 * tests/scanner/Makefile.am:
2788 * tests/scanner/foo-expected.gir:
2789 * tests/scanner/foo-object.h:
2790 * tests/scanner/foo.c:
2791 Foo->foo, foo-object.h -> foo.h
2793 2008-08-20 Johan Dahlin <johan@gnome.org>
2795 * tests/scanner/Foo-expected.gir:
2796 * tests/scanner/Makefile.am:
2797 * tests/scanner/drawable-expected.gir:
2798 * tests/scanner/drawable.c (test_drawable_class_init),
2799 (test_drawable_init):
2800 * tests/scanner/drawable.h:
2801 * tests/scanner/foo-object.h:
2802 * tests/scanner/foo.c (foo_boxed_method):
2803 Move the drawable parts out of Foo to its own test.
2805 2008-08-20 Johan Dahlin <johan@gnome.org>
2807 * tests/scanner/Foo-expected.gir:
2808 * tests/scanner/foo-object.h:
2809 * tests/scanner/foo.c (foo_drawable_class_init),
2810 (foo_drawable_init):
2811 Add a based on GdkDrawable which generates
2814 2008-08-19 Colin Walters <walters@verbum.org>
2816 * giscanner/transformer.py: Don't try
2817 to strip prefix before namespace.
2819 2008-08-19 Johan Dahlin <johan@gnome.org>
2821 * giscanner/transformer.py:
2822 * tests/scanner/Foo-expected.gir:
2823 * tests/scanner/foo-object.h:
2824 Add support for typedef void foo type of
2827 2008-08-19 Johan Dahlin <johan@gnome.org>
2830 * giscanner/girwriter.py:
2831 * giscanner/glibtransformer.py:
2832 * giscanner/transformer.py:
2833 * tests/scanner/Foo-expected.gir:
2834 Add basic support for union, base the code much
2835 on Struct. Add a testcase.
2837 2008-08-19 Johan Dahlin <johan@gnome.org>
2839 * tests/scanner/Foo-expected.gir:
2840 * tests/scanner/foo-object.h:
2841 Add a union testcase which the compiler currently
2844 2008-08-19 Johan Dahlin <johan@gnome.org>
2846 * gobject-introspection-1.0.pc.in:
2847 Add a g_ir_compiler variable
2849 2008-08-19 Colin Walters <walters@verbum.org>
2851 * giscanner/ast.py: Rework types to be more closely
2853 * giscanner/girparser.py: Parse more bits.
2854 * giscanner/girwriter.py: Write sequences in a new
2855 way that specifies container type.
2856 * giscanner/glibast.py: Adjust for ast.py changes,
2857 add 'ctype' property to GLibObject and GLibInterface
2858 so we can look things up by it later.
2859 * gicanner/transformer.py: Names is new class holding
2860 the various namespaces we manage. Do not confuse
2861 with Namespace which is toplevel XML node effectively.
2862 Rework all type resolution to go through
2863 _resolve_type_name_1.
2864 * giscanner/glibtransformer.py: Raise UnknownTypeError
2865 instead of ValueError for cleanliness. Add Unresolved
2866 class to mark types whose parent we haven't seen yet.
2867 Use new Names object from transformer.py.
2868 Correctly look up parent=.
2869 Fix type validation to handle sequences.
2870 * tests/scanner/Foo-expected.gir: Update for sequence
2871 work, int instead of int32.
2872 * tools/g-ir-scanner: Add --noclosure option
2873 * gir/Makefile.am: Use --noclosure by default for
2876 2008-08-18 Johan Dahlin <johan@gnome.org>
2878 * gir/gio-2.0-good.gir:
2879 * gir/glib-2.0-good.gir:
2880 * gir/gobject-2.0-good.gir:
2883 2008-08-18 Johan Dahlin <johan@gnome.org>
2886 * giscanner/girparser.py:
2887 * giscanner/girwriter.py:
2888 * giscanner/glibast.py:
2889 * giscanner/glibtransformer.py:
2890 * giscanner/transformer.py:
2891 * tests/scanner/Foo-expected.gir:
2892 * tests/scanner/foo-object.h:
2893 * tests/scanner/utility-expected.gir:
2894 * tests/scanner/utility.h:
2895 Redo type resolving and validation.
2896 Add a couple of new tests.
2897 Patch mostly written by Colin.
2899 2008-08-18 Johan Dahlin <johan@gnome.org>
2902 * giscanner/girparser.py:
2904 * giscanner/transformer.py:
2905 Improve enum parsing for enums without a GType.
2906 Make flags/enum references to other girs work
2907 * giscanner/utils.py:
2909 * tests/scanner/Makefile.am:
2910 * tests/scanner/foo-object.h:
2911 * tests/scanner/utility-expected.gir:
2912 * tests/scanner/utility.h:
2913 Add a new test for external enum references
2915 2008-08-18 Johan Dahlin <johan@gnome.org>
2917 * docs/global-module-registry.txt: Update
2919 * tests/array.gir: Update with new type proposal
2921 * girepository/girepository.c (g_type_tag_to_string):
2922 * girepository/girepository.h:
2923 * girepository/girnode.c (g_ir_node_get_full_size_internal),
2925 * girepository/girnode.h:
2926 Make enum serializing functions public. Clean up some whitespace.
2928 2008-08-17 Johan Dahlin <johan@gnome.org>
2930 * docs/global-module-registry.txt:
2931 Add a document for an on disk module registry format
2933 2008-08-17 Johan Dahlin <johan@gnome.org>
2936 * gir/gio-2.0-good.gir:
2939 2008-08-17 Johan Dahlin <johan@gnome.org>
2942 * gir/glib-2.0-good.gir:
2943 * gir/gobject-2.0-good.gir:
2944 * giscanner/cgobject.py:
2945 * giscanner/glibtransformer.py:
2946 Regenerate GObject & GType.
2947 Avoid warnings when generating gobject-2.0.gir.
2948 Introspect a little more, and skip *_get_type functions.
2950 2008-08-17 Colin Walters <walters@verbum.org>
2952 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
2953 Rename to -good, always generate during build.
2954 * gir/Makefile.am: Ensure .gir files dep on
2955 all scanner sources.
2956 * Makefile.am: Switch build order to ensure
2957 the scanner is ready before we do gir/.
2958 * tools/g-ir-scanner: Look for .git too.
2960 2008-08-17 Johan Dahlin <johan@gnome.org>
2962 * girepository/gtypelib.c (validate_enum_blob):
2963 * giscanner/glibtransformer.py:
2964 * giscanner/transformer.py:
2965 Remove resolve_possible_typedefs, it was unused.
2966 Allow multiple enum values of the sample value in an enum,
2967 since it's actually pretty common.
2968 Register enums so they can be resolved too.
2970 2008-08-16 Johan Dahlin <johan@gnome.org>
2972 * giscanner/girparser.py:
2973 Parse enumeration/bitfield.
2975 2008-08-16 Johan Dahlin <johan@gnome.org>
2977 * giscanner/girparser.py:
2980 2008-08-16 Johan Dahlin <johan@gnome.org>
2982 * giscanner/glibtransformer.py:
2983 Resolve type names for alias targets
2984 * giscanner/transformer.py:
2985 Skip FILE* parameters fow now
2987 2008-08-16 Johan Dahlin <johan@gnome.org>
2990 * gir/gobject-2.0.gir:
2993 * tests/scanner/Makefile.am:
2996 2008-08-15 Colin Walters <walters@verbum.org>
2998 * giscanner/glibtransformer.py: Explicitly construct
2999 new list, since we're deleting as we iterate.
3000 Don't delete all structures which end in Class; just
3001 ones which have a paired GObject.
3002 Fix printing of type warning.
3003 * giscanner/transformer.py: Make strip_namespace_object
3004 be the identity function if it doesn't match the
3007 2008-08-15 Colin Walters <walters@verbum.org>
3009 * giscanner/cgobject.py: Define yet more argument
3010 prototypes; fix prototype for g_type_fundamental.
3012 2008-08-14 Johan Dahlin <johan@gnome.org>
3014 * tests/Makefile.am:
3015 * tests/constant.gir:
3016 * tests/gobject.gir:
3018 * tools/generate.c (write_struct_info):
3019 Fix generator for constant/gobject/struct
3021 2008-08-14 Johan Dahlin <johan@gnome.org>
3023 * tests/Makefile.am:
3025 * tools/generate.c (write_enum_info):
3026 Fix generation of enum/bitfields
3028 2008-08-14 Johan Dahlin <johan@gnome.org>
3030 * girepository/girparser.c (start_field), (start_constant),
3031 (start_type), (end_element_handler):
3032 Clear up constant parsing
3037 * tools/generate.c (write_callable_info), (write_function_info),
3038 (write_callback_info), (write_constant_info), (write_signal_info),
3039 (write_vfunc_info), (write_property_info), (write_object_info),
3040 (write_interface_info):
3041 Constants/Signals are handled now.
3043 2008-08-14 Johan Dahlin <johan@gnome.org>
3045 * girepository/girparser.c (start_type):
3046 Don't require c:type.
3047 * tests/Makefile.am:
3050 Update, remove parts we don't support yet
3051 * tests/roundtrips.sh:
3053 * tools/generate.c (write_type_info), (write_field_info),
3054 (write_callable_info), (write_struct_info):
3055 Make it emit proper gir.
3057 2008-08-14 Johan Dahlin <johan@gnome.org>
3059 * giscanner/transformer.py:
3060 New internal function for adding a new node.
3062 2008-08-14 Johan Dahlin <johan@gnome.org>
3065 Define an internal _H_ variable so we skip parsing both
3066 i18n headers, only one is needed.
3068 Add the glib-2.0.gir too.
3069 * giscanner/glibast.py:
3070 Add gconstpointer as an alias for ANY
3071 * giscanner/transformer.py:
3072 Do not lower case enumeration names per se.
3073 Skip functions which has parameters called 'va_list'
3075 2008-08-14 Colin Walters <walters@verbum.org>
3077 * giscanner/transformer.py: Comment data structures.
3078 Also squash pointers in resolve_type_name to correspond
3079 with what we do for params.
3080 * giscanner/glibtransformer.py: Print warnings in more
3081 situations. Rework checks for method/constructor to
3082 look up in our GType database instead of just checking
3083 for *. Avoid generating <record> for GObject which
3084 duplicate the <class>.
3085 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3088 2008-08-14 Johan Dahlin <johan@gnome.org>
3090 * giscanner/girwriter.py:
3091 * giscanner/glibast.py:
3092 * giscanner/glibtransformer.py:
3093 * giscanner/transformer.py:
3095 * tests/Makefile.am:
3096 Add pyflakes.py and run it in make check.
3097 Update the source code to fix the errors reported by
3100 2008-08-14 Johan Dahlin <johan@gnome.org>
3103 * giscanner/girparser.py:
3104 * giscanner/glibast.py:
3105 * giscanner/glibtransformer.py:
3106 Refactor the parser a bit.
3107 Add parent type to interfaces and update callsites.
3109 2008-08-14 Johan Dahlin <johan@gnome.org>
3111 * giscanner/glibtransformer.py:
3112 * giscanner/utils.py:
3113 Refactor a bit, avoid isinstance and add a method
3114 for each type we parse.
3116 2008-08-14 Johan Dahlin <johan@gnome.org>
3119 * giscanner/girparser.py:
3120 * giscanner/glibtransformer.py:
3121 * tests/Makefile.am:
3122 Run pep8.py in make check, fix old errors.
3124 2008-08-13 Colin Walters <walters@verbum.org>
3126 * giscanner/girparser.py: Parse records.
3128 2008-08-13 Colin Walters <walters@verbum.org>
3130 * gir/Makefile.am: Install again.
3131 * gir/gobject-2.0.gir: Add some more bits.
3133 2008-08-13 Colin Walters <walters@verbum.org>
3135 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3136 * giscanner/girparser.py: Handle aliases.
3137 * giscanner/transformer.py: Record aliases. Make resolver
3138 functions public; we now call into these explicitly from
3139 glibtransformer. Handle resolving aliases.
3140 * giscanner/glibtransformer.py: Separate our internal namespace
3141 from included ones. Call up into transformer's resolver functions.
3143 2008-08-13 Johan Dahlin <johan@gnome.org>
3145 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3146 * girepository/girparser.c (start_class):
3147 * giscanner/glibtransformer.py:
3148 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3150 2008-08-13 Johan Dahlin <johan@gnome.org>
3152 * giscanner/cgobject.py:
3153 Register GInitiallyUnowned
3154 * giscanner/girwriter.py:
3155 * giscanner/glibtransformer.py:
3156 Special case GObject/GInitially owned as they are a bit special to use.
3158 2008-08-13 Colin Walters <walters@verbum.org>
3160 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3161 Object is in GObject namespace.
3163 2008-08-13 Colin Walters <walters@verbum.org>
3165 * giscanner/girparser.py: Fix processing of functions
3168 2008-08-13 Colin Walters <walters@verbum.org>
3170 * giscanner/girparser.py: Parse more than just <class.
3171 * giscanner/glibtransformer.py: Put aliases in a separate
3172 data structure since their name is not canonicall.
3173 * giscanner/transformer.py: Handle resolving type names
3176 2008-08-13 Johan Dahlin <johan@gnome.org>
3178 * tools/g-ir-scanner:
3179 Allow multiple libraries
3180 * giscanner/glibtransformer.py:
3181 Rename load_library to add_library, traverse over all libraries
3182 when trying to resolve a function
3184 2008-08-12 Colin Walters <walters@verbum.org>
3186 * giscanner/transformer.py: Record typedefs as <alias> elements.
3187 Also attempt to look up types in external namespaces.
3188 * giscanner/girwriter.py: Write them.
3189 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3190 checks. Resolve interface methods and properties.
3191 * tests/scanner/foo-object.h: Add a method with typedef.
3192 * tests/scanner/Foo-expected.gir: Update.
3193 * girepository/girnode.c: Debug tweaks.
3194 * girepository/girparser.c: Make a first pass through the XML where we
3195 record all the aliases. This lets us resolve them as we go through the
3197 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3198 from gir-repository.
3200 2008-08-12 Colin Walters <walters@verbum.org>
3202 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3203 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3205 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3207 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3209 2008-08-12 Colin Walters <walters@verbum.org>
3211 * giscanner/glibtransformer.py: Also transform object properties.
3213 2008-08-12 Colin Walters <walters@verbum.org>
3215 * giscanner/glibtransformer.py: Also transform callbacks
3216 and structure field types.
3217 * tests/scanner/Fooe-expected.gir: Update to expect correct
3218 names for callbacks and structs.
3220 2008-08-12 Colin Walters <walters@verbum.org>
3222 * girepository/girparser.c: Handle 'any'.
3223 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3224 Add test for void *.
3226 2008-08-12 Colin Walters <walters@verbum.org>
3228 * giscanner/glibtransformer.py: We need to do type
3229 resolution in a second pass after we've seen all the
3230 enums, records, etc.
3232 2008-08-12 Colin Walters <walters@verbum.org>
3234 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3235 Add enum return value.
3236 * giscanner/glibtransformer.py: Transform function return types
3239 2008-08-12 Colin Walters <walters@verbum.org>
3241 * tests/scanner/Makefile.am: Dep .gir files on scanner
3242 sources too. Also remove @ so we see scanner invocations.
3244 2008-08-12 Colin Walters <walters@verbum.org>
3246 * girepository/girparser.c, girepository/gtypelib.c,
3247 girepository/gtypelib.h, girepository/girnode.c:
3248 Remove usage of (GAPI-oriented) TypeTag in favor of
3249 GITypeTag from girepository.h.
3251 2008-08-10 Colin Walters <walters@verbum.org>
3253 * tests/roundtrips.sh: Use the correct tests.
3255 2008-08-10 Colin Walters <walters@verbum.org>
3257 * giscanner/cgobject.py: Declare/wrap a few more functions.
3258 Fix parameter types for g_object_new and g_type_fundamental.
3260 2008-08-10 Colin Walters <walters@verbum.org>
3262 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3263 us to declare types for both return value and parameters. The
3264 ctypes default of 'int' is bad because it hides 32/64 bit
3265 problems. Convert all existing functions to use it.
3267 2008-08-09 Johan Dahlin <johan@gnome.org>
3269 * giscanner/__init__.py:
3271 * giscanner/cgobject.py:
3272 * giscanner/gidlparser.py:
3273 * giscanner/gidlwriter.py:
3274 * giscanner/girparser.py:
3275 * giscanner/girwriter.py:
3276 * giscanner/glibast.py:
3277 * giscanner/glibtransformer.py:
3278 * giscanner/odict.py:
3279 * giscanner/sourcescanner.py:
3280 * giscanner/transformer.py:
3281 * giscanner/utils.py:
3282 * giscanner/xmlwriter.py:
3283 * tools/g-ir-scanner:
3287 2008-08-09 Johan Dahlin <johan@gnome.org>
3290 * relaxng/c-types.xml:
3291 * relaxng/g-types.xml:
3292 * relaxng/relaxng.rng:
3294 Remove outdated relaxng schemas.
3296 2008-08-09 Johan Dahlin <johan@gnome.org>
3299 Rename metadata to typelib in variable names,
3302 2008-08-09 Johan Dahlin <johan@gnome.org>
3306 Remove old C scanner, which got rewritten in python.
3308 2008-08-09 Johan Dahlin <johan@gnome.org>
3310 * girepository/Makefile.am:
3311 * tools/Makefile.am:
3312 * tools/girmodule.c:
3313 * tools/girmodule.h:
3316 * tools/girparser.c:
3317 * tools/girparser.h:
3318 * tools/girwriter.c:
3319 * tools/girwriter.h:
3320 Move shared *.[ch] files to girepository from tools
3322 2008-08-09 Johan Dahlin <johan@gnome.org>
3324 * tests/Makefile.am:
3327 * tests/constant.test:
3329 * tests/errors.test:
3330 * tests/function.test:
3331 * tests/gobject.test:
3332 * tests/interface.test:
3333 * tests/object.test:
3334 * tests/struct.test:
3339 Rename *.test to *.gir
3341 2008-08-09 Johan Dahlin <johan@gnome.org>
3344 * tests/Makefile.am:
3345 * tests/parser/Foo-expected.gir:
3346 * tests/parser/Makefile.am:
3347 * tests/parser/foo-object.h:
3348 * tests/parser/foo.c:
3349 * tests/parser/utility-expected.gir:
3350 * tests/parser/utility.c:
3351 * tests/parser/utility.h:
3352 * tests/scanner/Makefile.am:
3353 Rename tests/parser to test/scanner
3355 2008-08-08 Colin Walters <walters@verbum.org>
3357 * tests/roundtrips.sh: Use local .gir files again.
3359 2008-08-08 Colin Walters <walters@verbum.org>
3361 * tests/invoke/Makefile.am: .gir file depends on libtool
3364 2008-08-08 Colin Walters <walters@verbum.org>
3366 * tools/girnode.c: Pass through parent node so we can
3367 print the node whose child is NULL, if that occurs.
3369 2008-08-08 Johan Dahlin <johan@gnome.org>
3371 * tests/Makefile.am:
3372 Disable roundtrip tests which are not yet working
3373 * tests/invoke/testfns.gir:
3376 2008-08-08 Johan Dahlin <johan@gnome.org>
3378 * giscanner/girwriter.py:
3380 * giscanner/glibast.py:
3381 * giscanner/glibtransformer.py:
3382 Swap order of members, to keep it consistent with
3385 2008-08-08 Johan Dahlin <johan@gnome.org>
3387 * girepository/gtypelib.c (validate_header):
3388 * girepository/gtypelib.h:
3390 * giscanner/girwriter.py:
3391 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3392 (gi_source_symbol_unref):
3395 * tests/constant.test:
3397 * tests/errors.test:
3398 * tests/function.test:
3399 * tests/gobject.test:
3400 * tests/interface.test:
3401 * tests/invoke/Makefile.am:
3402 * tests/invoke/testfns.xml:
3403 * tests/object.test:
3404 * tests/parser/Makefile.am:
3405 * tests/roundtrips.sh:
3406 * tests/struct.test:
3411 * tools/Makefile.am:
3412 * tools/compiler.c (main):
3413 * tools/generate.c (write_callable_info), (write_function_info),
3415 * tools/gidlmodule.c:
3416 * tools/gidlmodule.h:
3419 * tools/gidlparser.c:
3420 * tools/gidlparser.h:
3421 * tools/gidlwriter.c:
3422 * tools/gidlwriter.h:
3423 * tools/scanner.c (create_node_from_gtype),
3424 (create_node_from_ctype), (g_igenerator_process_properties),
3425 (g_igenerator_process_signals), (g_igenerator_create_object),
3426 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3427 (g_igenerator_create_enum), (g_igenerator_create_flags),
3428 (g_igenerator_process_function_symbol),
3429 (g_igenerator_process_unregistered_struct_typedef),
3430 (g_igenerator_process_struct_typedef),
3431 (g_igenerator_process_union_typedef),
3432 (g_igenerator_process_enum_typedef),
3433 (g_igenerator_process_function_typedef),
3434 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3435 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3436 Merge in the gir-compiler branch.
3437 Thanks to Philip and Colin for their help.
3439 2008-07-26 Colin Walters <walters@verbum.org>
3441 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3442 and g-idl-generate to go along with how we're changing this
3443 module to be installed.
3444 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3446 2008-07-24 Colin Walters <walters@verbum.org>
3448 * girepository/girepository.c (g_irepository_register): Add
3449 environment variable G_IREPOSITORY_VERBOSE so we can print
3450 out what we're doing.
3451 * girepository/girepository.c (g_irepository_register_file):
3452 Add GError error message to g_debug call.
3454 2008-07-08 Jürg Billeter <j@bitron.ch>
3456 * giscanner/glibast.py:
3460 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3462 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3465 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3468 * giscanner/girwriter.py:
3469 * giscanner/transformer.py:
3470 * tests/parser/Foo-expected.gir:
3471 * tests/parser/foo-object.h:
3472 * tests/parser/foo.c (foo_object_allow_none):
3473 Add support for gtk-doc annotations for allow-none.
3476 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3479 * giscanner/girwriter.py:
3480 * giscanner/glibast.py:
3481 * giscanner/glibtransformer.py:
3482 * giscanner/transformer.py:
3483 * tests/parser/Foo-expected.gir:
3484 Start using abstract type instead of the raw C types.
3485 Register a bunch of glib types we care about.
3487 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3492 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3494 * girepository/girepository.c:
3495 * girepository/gtypelib.c:
3496 * girepository/ginfo.c:
3497 * girepository/ginvoke.c:
3498 * girepository/girepository.h:
3499 * girepository/gtypelib.h:
3500 * girepository/gmetadata.c:
3501 * girepository/Makefile.am:
3502 * girepository/gmetadata.h:
3504 * tools/gidlmodule.c:
3507 * tools/gidlmodule.h:
3508 * tools/gidlparser.c:
3510 Renamed GMetadata to GTypelib
3512 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3514 * giscanner/xmlwriter.py:
3515 Improve line wrapping when > 79 charaters
3517 2008-06-05 Jürg Billeter <j@bitron.ch>
3520 * giscanner/girwriter.py:
3521 * giscanner/transformer.py:
3522 Use <type> element for field types
3523 * tests/parser/Foo-expected.gir:
3526 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3528 * giscanner/glibtransformer.py:
3529 Fix a bug which prevented GdkEvent from being generated
3531 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3533 * giscanner/Makefile.am:
3535 * giscanner/girwriter.py:
3536 * giscanner/glibast.py:
3537 * giscanner/glibtransformer.py:
3538 * giscanner/transformer.py:
3539 * giscanner/utils.py:
3540 * tests/parser/Foo-expected.gir:
3541 Improve enum member parsing and introspection
3543 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3545 * giscanner/scannerparser.y:
3546 * giscanner/sourcescanner.h:
3547 * giscanner/sourcescanner.py:
3548 Add a new source type enum for member.
3549 Use __repr__ for improved debugging
3550 * giscanner/girparser.py:
3552 * giscanner/transformer.py:
3553 Improve parsing of struct members.
3554 * tests/parser/foo-object.h:
3557 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3559 * giscanner/xmlwriter.py:
3560 Improve error reporting when trying to quote None.
3561 * giscanner/girparser.py:
3562 Do not print warnings when including more complete .gir files
3563 * giscanner/girwriter.py:
3564 Do not require a name for parameters, add a todo for singletons
3565 * giscanner/glibtransformer.py:
3566 Refactor the way structs are done, add a couple of hacks to allow
3568 * giscanner/transformer.py:
3569 Add enough hacks so cairo, atk and pango.gir can be parsed properly
3570 * gobject-introspection-1.0.pc.in:
3571 Export girdir, so we can access gobject-2.0.gir from outside
3573 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3575 * tools/g-ir-scanner:
3576 * tests/parser/Makefile.am:
3577 Update sys.path before running the parser so we don't have
3578 to setup PYTHONPATH ourselves.
3582 * girepository/Makefile.am:
3583 * giscanner/transformer.py:
3584 * gobject-introspection-1.0.pc.in:
3585 * gobject-introspection.pc.in:
3586 * tools/Makefile.am:
3588 Rename pkg-config name to gobject-introspection-1.0,
3589 Do not installed anything which is not using the gir format.
3590 Disable compililation the old C scanner, but still keep the source
3591 until all the remaning functionallity has been ported.
3593 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3595 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3596 a crash when symbol->indent is NULL.
3598 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3599 a function to convert a CTYPE symbol to a string
3601 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
3604 * giscanner/girwriter.py:
3605 * giscanner/giscannermodule.c
3606 (pygi_source_scanner_append_filename),
3607 (pygi_source_scanner_parse_file):
3608 * giscanner/glibtransformer.py:
3609 * giscanner/sourcescanner.py:
3610 Revert back to using temporary files to send in headers.
3611 Allow Functions to be passed in as callbacks, add a couple
3612 of try/excepts missing features.
3613 We can now scan pango
3615 2008-05-08 Johan Dahlin <johan@gnome.org>
3617 * giscanner/glibtransformer.py:
3618 * giscanner/transformer.py:
3619 Move namespace stripping glibtransformer->transformer
3621 2008-05-08 Johan Dahlin <johan@gnome.org>
3624 * giscanner/girwriter.py:
3625 * giscanner/glibtransformer.py:
3626 * giscanner/transformer.py:
3627 * tools/g-ir-scanner:
3628 Introduce a namespace ast node
3630 2008-05-05 Johan Dahlin <johan@gnome.org>
3632 * giscanner/__init__.py:
3633 * giscanner/sourcescanner.py:
3634 * giscanner/transformer.py:
3635 Move sourcescanner symbols to the sourcescanner module, instead
3636 of in the global __init__ namespace.
3638 2008-05-03 Johan Dahlin <johan@gnome.org>
3640 * giscanner/glibtransformer.py:
3641 * tools/g-ir-scanner:
3642 Handle missing parameters better, allow - and + in .la dlname
3645 2008-05-03 Johan Dahlin <johan@gnome.org>
3647 * giscanner/__init__.py:
3649 * giscanner/girwriter.py:
3650 * giscanner/glibtransformer.py:
3651 * giscanner/transformer.py:
3652 Parse struct fields properly, improve debugging.
3654 2008-04-29 Johan Dahlin <johan@gnome.org>
3657 * giscanner/girwriter.py:
3658 * giscanner/transformer.py:
3659 * tests/parser/Foo-expected.gir:
3661 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
3663 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3666 * docs/g-ir-scanner.1:
3667 * metadata-annotations-proposal.txt:
3668 * metadata-format.txt:
3669 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
3671 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3673 * giscanner/girwriter.py:
3674 * giscanner/glibtransformer.py:
3675 * giscanner/transformer.py:
3676 * giscanner/xmlwriter.py:
3677 * tests/parser/Foo-expected.gir:
3678 * tests/parser/foo-object.h:
3679 Write record/structs to gir file too. Add a couple of tests,
3680 fix an off by one error in xmlwriter.py.
3682 2008-04-28 Johan Dahlin <johan@gnome.org>
3684 * giscanner/xmlwriter.py: Calculate the line length properly,
3685 include the provided extra indentation in the calculation, really.
3687 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3690 * giscanner/glibast.py:
3691 * giscanner/glibtransformer.py:
3692 * giscanner/transformer.py:
3693 * tools/g-ir-scanner:
3694 Add a --strip-prefix and sort out confusion between names and symbols
3695 for functions and struct + derivaties.
3696 Refactor bootstrap of g-ir-scanner, so we can set options on
3697 Transformer() before parsing everything.
3699 2008-04-28 Johan Dahlin <johan@gnome.org>
3701 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
3702 when scanning girepository.h
3704 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
3705 a __GI_SCANNER__ when we run.
3707 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3710 * giscanner/girwriter.py:
3711 * giscanner/glibast.py:
3712 * giscanner/glibtransformer.py:
3713 * tests/parser/Foo-expected.gir:
3714 * tests/parser/utility-expected.gir:
3715 Rename most c:identifier to c:type. Add new ones to
3716 class/interface/enum/boxed.
3718 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3721 * giscanner/girwriter.py:
3722 * giscanner/glibtransformer.py:
3723 * tests/parser/Foo-expected.gidl:
3724 * tests/parser/Makefile.am:
3725 Move c:identifier from return-value to subchild type,
3726 as per Jürgs suggestion
3728 2008-04-28 Johan Dahlin <johan@gnome.org>
3730 * giscanner/girwriter.py:
3731 * tests/parser/Foo-expected.gir:
3732 Write property.type as a child node.
3734 2008-04-27 Johan Dahlin <johan@gnome.org>
3739 * gidl/gobject-2.0.gidl:
3741 * gir/gobject-2.0.gir:
3742 * tests/parser/Makefile.am:
3743 Replace the GObject gidl with a GObject gir.
3745 2008-04-27 Johan Dahlin <johan@gnome.org>
3747 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
3750 * giscanner/xmlwriter.py:
3751 * tests/parser/Foo-expected.gir:
3752 Include indentation in line length calculation
3754 2008-04-27 Johan Dahlin <johan@gnome.org>
3756 * giscanner/girparser.py:
3757 Prettify NS parsing using elementtree.
3759 2008-04-27 Johan Dahlin <johan@gnome.org>
3762 * giscanner/Makefile.am:
3763 * giscanner/girparser.py:
3764 * giscanner/glibtransformer.py:
3765 * tests/parser/Foo-expected.gidl:
3766 * tests/parser/Foo-expected.gir:
3767 * tests/parser/Makefile.am:
3768 * tests/parser/utility-expected.gidl:
3769 * tests/parser/utility-expected.gir:
3770 * tools/g-ir-scanner:
3771 Switch over to GIR as the default format. Add a simple GIDL
3773 Update tests and fix simplify makefiles by depending
3774 on GNU make extensions.
3776 2008-04-27 Johan Dahlin <johan@gnome.org>
3778 * giscanner/xmlwriter.py:
3779 Wrap attributes for lines which are wider than 79 characters
3781 * giscanner/scannerlexer.l:
3782 Allow parenthesis in annotations
3785 * giscanner/gidlwriter.py:
3786 * giscanner/girwriter.py:
3787 * giscanner/glibtransformer.py:
3788 * giscanner/transformer.py:
3789 Add initial sequence support, including annotation.
3790 Refactor type handling a bit.
3792 2008-04-27 Johan Dahlin <johan@gnome.org>
3794 * tests/parser/Foo-expected.gidl:
3795 * tests/parser/foo-object.h:
3796 * tests/parser/foo.c (foo_object_class_init),
3797 (foo_object_get_strings), (foo_object_get_objects):
3798 Add two new functions to check sequence return values.
3799 Also fixes a compilation warning.
3801 2008-04-27 Johan Dahlin <johan@gnome.org>
3803 * giscanner/giscannermodule.c (]): Cast the getter, avoids
3804 a compilation warning.
3806 * tools/Makefile.am (g_ir_scanner_SOURCES):
3807 g-ir-scanner has no sources.
3809 2008-04-25 Johan Dahlin <johan@gnome.org>
3811 * giscanner/Makefile.am:
3813 * giscanner/gidlparser.py:
3814 * giscanner/gidlwriter.py:
3815 * giscanner/girwriter.py:
3816 * giscanner/glibast.py:
3817 * giscanner/glibtransformer.py:
3818 * giscanner/transformer.py:
3819 Split out nodes to ast.py and glibast.py
3821 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3823 * giscanner/Makefile.am:
3824 * giscanner/gidlparser.py:
3825 * giscanner/gidlwriter.py:
3826 * giscanner/girwriter.py:
3827 * giscanner/glibtransformer.py:
3828 * giscanner/gobjecttreebuilder.py:
3829 * giscanner/transformer.py:
3830 * giscanner/treebuilder.py:
3831 * tools/g-ir-scanner:
3832 Rename treebuilder to transformer and
3833 gobjectreebuilder to glibtransformer.
3835 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3837 * giscanner/Makefile.am:
3838 * giscanner/__init__.py:
3839 * giscanner/cgobject.py:
3840 * giscanner/gidlparser.py:
3841 * giscanner/gidlwriter.py:
3842 * giscanner/girwriter.py:
3843 * giscanner/gobjecttreebuilder.py:
3844 * giscanner/odict.py:
3845 * giscanner/sourcescanner.py:
3846 * giscanner/treebuilder.py:
3847 * giscanner/xmlwriter.py:
3848 * tools/Makefile.am:
3849 * tools/g-ir-scanner:
3850 Add LGPLv2 license header and install all python files
3852 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3855 * giscanner/gidlwriter.py:
3856 * giscanner/giscannermodule.c (pygi_source_directive_new),
3857 (directive_get_options), (pygi_source_symbol_new),
3858 (symbol_get_base_type), (pygi_source_type_new),
3859 (type_get_base_type), (type_get_child_list),
3860 (pygi_source_scanner_get_symbols),
3861 (pygi_source_scanner_get_directives):
3862 * giscanner/gobjecttreebuilder.py:
3863 * giscanner/sourcescanner.py:
3864 * giscanner/treebuilder.py:
3865 * tests/parser/foo-object.h:
3866 Add support for virtual methods.
3867 Pair struct FooClass with struct Foo.
3868 Clean up the SourceScanner bindings a bit.
3869 Add a testcase for virtual methods.
3871 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3873 * giscanner/cgobject.py:
3874 * giscanner/gidlwriter.py:
3875 * giscanner/gobjecttreebuilder.py:
3876 Add support for signals
3878 * tests/parser/foo.c (foo_object_class_init):
3879 * Foo-expected.gidl:
3880 Add a signal and update the expected output.
3882 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
3884 * giscanner/gidlwriter.py:
3885 * giscanner/girwriter.py:
3886 * giscanner/giscannermodule.c (directive_get_name),
3887 (directive_get_value), (directive_get_options),
3888 (symbol_get_directives), (symbol_set_directives),
3889 (pygi_source_scanner_parse_file),
3890 (pygi_source_scanner_lex_filename),
3891 (pygi_source_scanner_get_directives), (init_giscanner):
3892 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
3893 * giscanner/sourcescanner.h:
3894 * giscanner/sourcescanner.py:
3895 * giscanner/treebuilder.py:
3896 * tools/g-ir-scanner:
3897 Add support for source/header annotations.
3899 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3901 * giscanner/gidlwriter.py:
3902 * giscanner/girwriter.py:
3903 * giscanner/gobjecttreebuilder.py:
3904 * giscanner/treebuilder.py:
3905 Add support for Callbacks
3907 2008-04-22 Havoc Pennington <hp@pobox.com>
3909 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
3910 not in metadata->module, look for it in the global module, in case
3911 some other object or the app itself provides the symbol.
3913 2008-04-22 Havoc Pennington <hp@pobox.com>
3915 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
3916 dlopening a library that is already in the main app, by checking
3917 whether one of the lib's symbols is already loaded.
3919 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3921 * tests/parser/Foo-expected.gidl:
3922 * tests/parser/foo-object.h:
3925 2008-04-22 Havoc Pennington <hp@pobox.com>
3927 * girepository/ginfo.c (g_interface_info_find_method):
3928 Use interface_blob_size not object_blob_size to compute offset.
3930 2008-04-22 Havoc Pennington <hp@pobox.com>
3932 * girepository/gmetadata.c (_g_metadata_init): remove
3933 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
3934 (Glade and Clutter for example) rely on being loaded globally.
3936 2008-04-22 Havoc Pennington <hp@pobox.com>
3938 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
3939 function to get the GType given a RegisteredTypeInfo
3941 2008-04-22 Johan Dahlin <johan@gnome.org>
3943 * COPYING: Add a LGPL license, to prevent automake to
3944 put in a copy of GPL here. Pointed out by Havoc.
3946 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
3947 (g_type_info_is_pointer), (g_type_info_get_tag),
3948 (g_type_info_get_param_type), (g_type_info_get_interface),
3949 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
3950 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
3951 (g_error_domain_info_get_codes), (g_enum_info_get_value),
3952 (g_object_info_get_interface), (g_object_info_get_field),
3953 (g_interface_info_get_prerequisite),
3954 (g_signal_info_get_class_closure), (g_constant_info_get_value):
3955 * girepository/ginvoke.c (get_ffi_type):
3956 * girepository/girepository.h:
3957 * girepository/gmetadata.c (g_metadata_get_dir_entry),
3958 (g_metadata_check_sanity), (validate_header),
3959 (validate_array_type_blob), (validate_iface_type_blob),
3960 (validate_param_type_blob), (validate_error_type_blob),
3961 (validate_type_blob), (validate_constant_blob),
3962 (validate_struct_blob), (validate_enum_blob):
3963 * girepository/gmetadata.h:
3964 * tests/Makefile.am:
3965 * tests/invoke/Makefile.am:
3966 * tests/invoke/invoke.c (main):
3967 * tests/roundtrips.sh:
3968 * tools/Makefile.am:
3969 * tools/compiler.c (format_output), (write_out_metadata), (main):
3970 * tools/generate.c (write_type_name), (write_type_info),
3971 (write_constant_value), (write_enum_info), (load_metadata), (main):
3972 * tools/gidlcompilercontext.c:
3973 * tools/gidlcompilercontext.h:
3974 * tools/gidlcompilerentrynode.c:
3975 * tools/gidlcompilerentrynode.h:
3976 * tools/gidlcompilertypenode.c:
3977 * tools/gidlcompilertypenode.h:
3978 * tools/gidlmodule.c (g_idl_module_build_metadata):
3979 * tools/gidlmodule.h:
3980 * tools/gidlnode.c (init_stats), (dump_stats),
3981 (g_idl_node_get_size), (g_idl_node_get_full_size),
3982 (g_idl_node_cmp), (g_idl_node_can_have_member),
3983 (g_idl_node_add_member), (g_idl_node_param_direction_string),
3984 (parse_int_value), (parse_uint_value), (parse_float_value),
3985 (parse_boolean_value), (find_entry_node), (find_entry),
3986 (serialize_type), (g_idl_node_build_metadata), (write_string):
3988 * tools/gidlparser.c (parse_type_internal):
3989 * tools/quote-file.sh:
3990 Revert revisions 157,149-148,136-129 and 120.
3991 Move back to using g-idl-generate to generate the metadata and
3992 avoids dependency on a c compiler.
3994 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3996 * giscanner/girwriter.py:
3997 * tools/g-ir-scanner:
3998 Add an initial GIR writer and a --format option to g-ir-scanner
4000 2008-04-21 Johan Dahlin <johan@gnome.org>
4002 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4003 gobject-2.0 and raise ImportError if not found.
4005 * giscanner/gidlparser.py:
4006 * giscanner/gidlwriter.py:
4007 * giscanner/gobjecttreebuilder.py:
4008 * tools/g-ir-scanner:
4009 Add a --include argument to include types from other idls.
4010 Add a minimalistic GIDL parser (just objects for now)
4011 Implement resolving of external type references and use it to
4012 resolve parent types, argument types and return types.
4014 2008-04-21 Johan Dahlin <johan@gnome.org>
4016 * giscanner/gidlwriter.py:
4017 * giscanner/gobjecttreebuilder.py:
4018 * giscanner/treebuilder.py:
4019 Add support for properties.
4020 Refactor Class/Interface support a bit, to share more code and
4021 always initialize their method attribute to an empty list.
4023 2008-04-21 Johan Dahlin <johan@gnome.org>
4025 * giscanner/cgobject.py:
4026 Add a workaround for a glib bug interface introspection bug
4027 (object_interface_list_properties, object_class_list_properties):
4028 Cast the return value to GParamSpec.
4030 * tests/parser/Foo-expected.gidl: Update
4031 * tests/parser/foo.c: Add a string property
4033 * giscanner/gobjecttreebuilder.py:
4034 After stripping namespaces, remove the original
4035 item to avoid duplication (GtkButton struct and Button object)
4037 2008-04-21 Johan Dahlin <johan@gnome.org>
4039 * giscanner/gobjecttreebuilder.py:
4040 * giscanner/treebuilder.py:
4041 Strip namespaces before objects, so we'll export
4042 GtkButton as Button in the gtk namespace
4044 2008-04-21 Johan Dahlin <johan@gnome.org>
4046 * giscanner/gidlwriter.py:
4047 * giscanner/gobjecttreebuilder.py:
4048 * giscanner/treebuilder.py:
4049 Add constructors for object/boxed types.
4051 2008-04-21 Johan Dahlin <johan@gnome.org>
4053 * giscanner/gidlwriter.py:
4054 * giscanner/gobjecttreebuilder.py:
4055 Add support for boxed types
4057 2008-04-21 Johan Dahlin <johan@gnome.org>
4059 * giscanner/giscannermodule.c: Mark structures as const,
4060 wrap SourceType.const_string.
4062 * tests/parser/foo-object.h: Add a couple of constants.
4064 * giscanner/gidlwriter.py:
4065 * giscanner/gobjecttreebuilder.py:
4066 * giscanner/treebuilder.py:
4067 Add basic support for interfaces
4069 * tools/g-ir-scanner:
4070 Add -o/--output for writing to a file
4072 2008-04-21 Havoc Pennington <hp@redhat.com>
4074 * TODO: add some C API wishlist items I could think of quickly
4076 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4078 * giscanner/gidlwriter.py:
4079 * giscanner/xmlwriter.py:
4080 Add a simple api for writing tags which can be used
4081 with the new 'with statement' in python 2.5
4083 2008-04-21 Johan Dahlin <johan@gnome.org>
4085 * giscanner/gobjecttreebuilder.py:
4086 Strip namespace and object prefix from method names.
4088 2008-04-21 Johan Dahlin <johan@gnome.org>
4090 * tools/g-ir-scanner (main): Add --pkg option to pass in
4091 pkg-config modules to get cflags from.
4093 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4094 Avoid duplication, reuse function writer for methods.
4096 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4098 * giscanner/gidlwriter.py:
4099 * giscanner/gobjecttreebuilder.py:
4100 * giscanner/treebuilder.py:
4101 * tools/g-ir-scanner:
4102 Resolve libtool .la files.
4103 Strip name spaces for methods.
4104 Add function symbols
4106 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4108 * giscanner/cgobject.py:
4109 * giscanner/gidlwriter.py:
4110 * giscanner/gobjecttreebuilder.py:
4111 * giscanner/treebuilder.py:
4112 Add support for classes and methods
4114 2008-04-20 Johan Dahlin <johan@gnome.org>
4116 * giscanner/gidlwriter.py:
4117 * giscanner/gobjecttreebuilder.py:
4118 * giscanner/odict.py:
4119 Avoid conflicts, keep the output ordered similar to
4120 the order of the input.
4121 Add a simple ordered dictionary implemenation
4123 2008-04-19 Johan Dahlin <johan@gnome.org>
4125 * giscanner/cgobject.py:
4126 * giscanner/gidlwriter.py:
4127 * giscanner/gobjecttreebuilder.py:
4128 * tools/g-ir-scanner:
4129 Start introspecting get-type functions.
4130 Implement support for GLib/GFlags GTypes.
4131 Add a ctype based GObject binding.
4133 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4135 * giscanner/gidlwriter.py:
4136 * giscanner/xmlwriter.py:
4137 * tools/g-ir-scanner:
4138 Add a simplistic gidl writer, which can't do too much.
4140 2008-04-18 Johan Dahlin <johan@gnome.org>
4142 * giscanner/sourcescanner.py:
4143 * giscanner/treebuilder.py:
4144 * tools/g-ir-scanner:
4145 split tree building and source scanning interface to separate files.
4147 2008-04-18 Johan Dahlin <johan@gnome.org>
4149 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4151 - Add support for struct/parameter/return, start parsing of ctypes
4153 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4156 2008-03-31 Johan Dahlin <johan@gnome.org>
4158 * tools/g-ir-scanner:
4159 Start to build abstract syntax node of scanned sources.
4160 Add support for cpp options.
4162 2008-03-27 Johan Dahlin <johan@gnome.org>
4164 * giscanner/giscannermodule.c:
4165 * giscanner/scannerlexer.l:
4166 * giscanner/sourcescanner.c:
4167 * tools/g-ir-scanner:
4169 Add simple pre-processor using subprocess and a PIPE.
4170 Change the parse_file apis to accept a file descriptor.
4172 2008-03-25 Johan Dahlin <johan@gnome.org>
4174 * giscanner/__init__.py:
4175 * tools/g-ir-scanner:
4176 Fix a typo and add an example python test program.
4178 2008-03-25 Johan Dahlin <johan@gnome.org>
4180 * giscanner/__init__.py:
4181 * giscanner/giscannermodule.c:
4182 * giscanner/sourcescanner.c:
4183 * giscanner/sourcescanner.h:
4184 Add constants and wrap a few more SymbolType fields
4186 2008-03-25 Johan Dahlin <johan@gnome.org>
4190 * giscanner/__init__.py:
4191 * giscanner/giscannermodule.c:
4192 * giscanner/Makefile.am:
4194 Add initial python bindings for the scanner and
4195 depend on python 2.5.
4197 2008-03-25 Johan Dahlin <johan@gnome.org>
4201 * giscanner/Makefile.am:
4202 * giscanner/sourcescanner.c:
4203 * giscanner/sourcescanner.h:
4204 * tools/Makefile.am:
4205 * tools/grealpath.h:
4206 * tools/sourcescanner.c:
4207 * tools/sourcescanner.h:
4209 Move the scanner to a separate library.
4211 2008-03-23 Johan Dahlin <johan@gnome.org>
4213 * tools/Makefile.am:
4216 * tools/scannerlexer.l:
4217 * tools/scannerparser.y:
4218 * tools/sourcescanner.c:
4219 * tools/sourcescanner.h:
4220 Split out the source scanner from the generator.
4221 Rename the symbols used in the scanner to use the gi_ prefix.
4222 This should make it possible to use the raw C parser from
4225 2008-03-23 Johan Dahlin <johan@gnome.org>
4227 * tests/parser/Makefile.am (utility.gidl):
4228 * tests/parser/utility-expected.gidl:
4229 Pass in the gobject.gidl since we're defining a GObject.
4231 2008-03-12 Johan Dahlin <johan@gnome.org>
4233 * relaxng/relaxng.rng:
4234 Add a releaxng in relaxng we can use to validate the relaxngs
4237 2008-03-12 Jürg Billeter <j@bitron.ch>
4239 * tools/scanner.c: (g_igenerator_new):
4240 * tools/scannerparser.y:
4241 Fix compiler warnings.
4243 2008-03-12 Jürg Billeter <j@bitron.ch>
4247 * tools/scannerparser.y:
4248 Start fixing memory management in g-idl-scanner.
4250 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4252 * tools/gidlcompilercontext.c: (write_compiled):
4253 Fix critical warning when no shlib passed to g-idl-compiler.
4255 2008-03-12 Johan Dahlin <johan@gnome.org>
4257 * tests/parser/utility-expected.gidl:
4258 * tests/parser/utility.h:
4259 Add a get_type-function, so the scanner actually
4260 parses it as an object.
4262 2008-03-12 Johan Dahlin <johan@gnome.org>
4264 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4267 * tests/parser/Foo-expected.gidl:
4268 * tests/parser/Makefile.am:
4269 * tests/parser/foo-object.h:
4270 * tests/parser/foo.c:
4271 * tests/parser/utility-expected.gidl:
4272 * tests/parser/utility.c:
4273 * tests/parser/utility.h:
4275 Add a new gidl test. 'utility.gidl', which is used to be able
4276 to test external type references. Add a reference to UtilityObject*
4279 2008-03-11 Johan Dahlin <johan@gnome.org>
4283 Remove most global variables
4285 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4287 * tools/scannerlexer.l:
4289 * tests/parser/Foo-expected.gidl:
4290 * tests/parser/foo.c:
4291 * tests/parser/Makefile.am:
4292 * tests/parser/foo-object.h:
4294 Added a few extra tests. Which resulted in finding a few
4295 bugs. Which resulted in me fixing those bugs
4297 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4299 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4300 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4301 Add some comments for strings into generated output for
4304 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4306 * tools/gidlcompilercontext.c: (write_compiled):
4307 Write out the shlibs variable before writing out the strings
4308 length. Fixes compiler warning when using '-l' flag with
4311 2008-03-11 Johan Dahlin <johan@gnome.org>
4313 * tests/parser/Foo-expected.gidl:
4314 * tests/parser/foo-object.h:
4317 * tools/scannerlexer.l:
4318 Add support for parsing return arguments. Add support for
4319 caller-owns return types.
4320 Patch by Philip Van Hoof.
4322 * tools/scannerparser.y:
4323 Remove parsing of the @deprecated syntax used in headers.
4324 We will support gtk-doc deprecation in the future instead.
4326 2008-03-11 Johan Dahlin <johan@gnome.org>
4328 * tools/compiler.c (main): Coding style fixes
4330 2008-03-10 Johan Dahlin <johan@gnome.org>
4333 Add GCOV_LIBS to GILIBS
4335 2008-03-10 Johan Dahlin <johan@gnome.org>
4337 * tests/parser/Foo-expected.gidl:
4338 * tests/parser/foo.c:
4339 Rename null-ok to direction=out
4341 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4343 reviewed and extensively tested by Johan
4345 * tests/parser/Foo-expected.gidl:
4346 * tests/parser/foo-object.h:
4347 * tests/parser/foo.c:
4350 * tools/gidlwriter.c:
4353 * tools/scannerlexer.l:
4354 * tools/scannerparser.y:
4356 Add support for scanning for gtk-doc comments inside
4357 C source files. Add tests
4359 2008-03-10 Johan Dahlin <johan@gnome.org>
4361 * tests/parser/Makefile.am:
4362 * tests/parser/foo.c:
4365 * tools/scannerparser.y:
4366 Add an api to lex filenames.
4367 Lex all source .c files passed in on the command line.
4368 Scan sources in a test and a couple of private structures
4369 which should not be included in the generated gidl
4371 2008-03-10 Johan Dahlin <johan@gnome.org>
4373 * tests/invoke/Makefile.am: Make the generated metadata
4374 depend on the g-idl-compiler
4376 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4378 * tools/gidlmodule.c
4379 * tools/gidlmodule.h
4382 Remove the old g-idl-compiler code.
4385 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4387 * tools/quote-file.sh
4390 Move to using the 'C' struct compiler code.
4392 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4394 * girepository/ginfo.c
4396 Change the way that external references with no namespace
4397 are dealt with. External references with no namespace
4398 are placed into the XML as-if they are a local reference.
4399 This is temporary, but helps with roundtrip tests.
4401 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4403 * girepository/ginfo.c
4404 Add the ability to get the value of a constant of
4405 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4406 is provided as a string.
4408 This would deal properly with:
4409 typedef char* random;
4410 const random = "A string";
4412 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4414 * girepository/ginfo.c
4415 * girepository/girepository.h
4417 Add a function to check if an enum is registered or not.
4418 Previously anything testing this relied on the g-type
4419 string offset having a value of 0.
4421 * girepository/gmetadata.c
4422 * girepository/gmetadata.h
4424 Remove unneccesary or erroneous checks. There were two
4425 metadata validation checks which made sure that the blob
4426 sizes were the same as some magic numbers compiled into the code.
4427 This is wrong as it breaks any forwards compatibility that may
4430 Checks were also present that made sure that unregistered type
4431 blobs had a value of 0 in the g-type offset field. This is
4432 unneccessary. If a type blob is unregistered then any value
4433 in its g-type field is simply invalid.
4435 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4437 * girepository/ginfo.c
4438 * girepository/gmetadata.c
4439 * girepository/gmetadata.h
4441 Change the metadata format to have a standard header
4442 for all the type blobs. Merge the SimpleTypeBlob
4443 and InterfaceTypeBlob into a union. A union of these
4444 two blobs existed previously but was not explicit
4445 in the metadata format.
4447 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4449 * tools/gidlcompilercontext.c
4450 * tools/gidlcompilercontext.h
4451 * tools/gidlcompilerentrynode.c
4452 * tools/gidlcompilerentrynode.h
4453 * tools/gidlcompilertypenode.c
4454 * tools/gidlcompilertypenode.h
4456 Add code to compile a tree of GIdlNodes to
4457 a 'C' struct representing the metadata.
4458 This is to aid cross-compiling. Previously
4459 the g-idl-compiler created a binary blob with
4460 data written in the byte order and alignment
4461 of the tool rather than the intended target.
4463 Cleaned up and improved by Johan and Robert :-)
4465 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4467 * girepository/ginvoke.c
4468 * girepository/girepository.h
4469 * girepository/gmetadata.c
4470 * girepository/gmetadata.h
4472 * tools/gidlparser.c
4473 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4474 to avoid confusion with the interface blob.
4477 * tools/gidlparser.c
4478 Remove magic numbers and replace with type-tag
4479 enumeration symbols.
4481 * girepository/gmetadata.c
4482 Add validate declaration.
4484 2008-03-10 Jürg Billeter <j@bitron.ch>
4486 * tools/gidlparser.c: (parse_type_internal):
4487 * tools/scannerlexer.l:
4488 * tools/scannerparser.y:
4489 Support C99 _Bool type in scanner.
4491 2008-03-10 Jürg Billeter <j@bitron.ch>
4493 * tests/parser/Foo-expected.gidl:
4494 * tests/parser/foo-object.h:
4495 * tests/parser/foo.c: (foo_enum_method):
4496 * tools/scanner.c: (g_igenerator_process_function_symbol):
4497 Don't skip functions that are defined in the namespace of a type
4498 that doesn't support methods, as for example enums.
4500 2008-03-10 Johan Dahlin <johan@gnome.org>
4502 * gidl.dtd: Remove, we're using relaxng for now
4504 * tests/parser/Foo-expected.gidl:
4505 * tests/parser/foo-object.h:
4506 * tests/parser/foo.c:
4507 Rename the enum/flags get_type functions to include the whole type.
4509 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4511 * tools/gidlwriter.c (enum_generate): added "type-name",
4512 "get-type" and "deprecated" missing arguments.
4513 * tests/parser/Foo-expected.gidl:
4514 * tests/parser/foo-object.h: test enum type, and no type.
4516 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4519 Consistent checks, add missing 'test'
4521 2008-03-05 Havoc Pennington <hp@redhat.com>
4523 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4524 does on Fedora 8. Make libffi a hard requirement, since it was in
4525 practice anyway (was not really conditional in the code or
4526 makefile, only in configure).
4528 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4530 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4531 reviewed by: Johan Dahlin <johan@gnome.org>
4533 * tests/Makefile.am:
4534 * tests/roundtrips.sh:
4535 Modify the roundtrips test so that they do not use the
4536 --raw option of the gidl compiler but instead compile a
4537 shared library to use with g_module.
4539 * tests/invoke/Makefile.am:
4540 * tests/invoke/invoke.c:
4541 Modify the invoke tests to build a shared library rather
4542 than use the --raw option.
4544 * tests/invoke/invoke-namespace-find.sh: Removed:
4545 Noone knows why this was here, so removed.
4547 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4549 * tools/scanner.c: (g_igenerator_process_function_symbol):
4550 Move g_idl_node_can_have_member test later, as it broke spotting
4551 get_type's for nodes that can't have members.
4553 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4556 * tools/gidlnode.c: (g_idl_node_can_have_member):
4557 Add g_idl_node_can_have_member.
4559 * tools/scanner.c: (g_igenerator_process_function_symbol):
4560 Use g_idl_node_can_have_member to test if we should add a function
4561 as a member of the type node.
4563 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4565 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4567 * tests/parser/Makefile.am:
4568 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4570 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4572 * tools/scanner.c: (main):
4573 Ignore -pthread when passed to g-idl-scanner.
4575 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4577 * tools/grealpath.h: Added:
4578 * tools/scanner.c: (main):
4579 * tools/scannerlexer.l:
4580 * tools/Makefile.am:
4581 Always use absolute paths with symbolic links resolved when
4582 comparing filenames.
4584 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4586 * gobject-introspection.pc.in:
4587 Provide variables for g-idl-parser, scanner and compiler in the
4590 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
4593 * girepository/Makefile.am:
4594 * tools/Makefile.am:
4595 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4597 2008-02-10 Johan Dahlin <johan@gnome.org>
4599 * tests/parser/Foo-expected.gidl:
4600 * tests/parser/foo-object.h:
4601 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4602 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4605 2008-02-10 Johan Dahlin <johan@gnome.org>
4607 * tests/parser/Foo-expected.gidl:
4608 * tests/parser/foo-object.h:
4609 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4610 Add enum and flags test.
4612 2008-02-10 Johan Dahlin <johan@gnome.org>
4616 * girepository/Makefile.am:
4617 Make 'make distcheck' work again.
4619 2008-02-10 Johan Dahlin <johan@gnome.org>
4621 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
4624 * tests/parser/Makefile.am: Only create Foo.gidl when running make
4625 check, eg exclude it from BUILT_SOURCES.
4627 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4632 * girepository/Makefile.am:
4633 * m4/Makefile.am: Added:
4634 * m4/as-compiler-flag.m4: Added:
4635 * m4/gcov.m4: Added:
4636 * tools/Makefile.am:
4637 Add ability to generate a coverage report.
4638 Adds configure option --enable-gcov and make rule 'check-coverage'.
4640 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4644 * gidl/Makefile.am: Added:
4645 * girepository/Makefile.am: Added:
4646 * src/Makefile.am: Renamed to tools/Makefile.am:
4647 * src/compiler.c: Renamed to tools/compiler.c:
4648 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
4649 * src/generate.c: Renamed to tools/generate.c:
4650 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
4651 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
4652 * src/gidlnode.c: Renamed to tools/gidlnode.c:
4653 * src/gidlnode.h: Renamed to tools/gidlnode.h:
4654 * src/gidlparser.c: Renamed to tools/gidlparser.c:
4655 * src/gidlparser.h: Renamed to tools/gidlparser.h:
4656 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
4657 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
4658 * src/ginfo.c: Renamed to girepository/ginfo.c:
4659 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
4660 * src/girepository.c: Renamed to girepository/girepository.c:
4661 * src/girepository.h: Renamed to girepository/girepository.h:
4662 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
4663 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
4664 * src/scanner.c: Renamed to tools/scanner.c:
4665 * src/scanner.h: Renamed to tools/scanner.h:
4666 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
4667 * src/scannerparser.y: Renamed to tools/scannerparser.y:
4668 * tests/invoke/Makefile.am:
4669 Split src/ into girepository/ and tools/
4673 * girepository/Makefile.am:
4674 * tests/Makefile.am:
4675 * tests/invoke/Makefile.am:
4676 * tests/parser/Makefile.am:
4677 * tests/roundtrips.sh:
4678 * tools/Makefile.am:
4679 Make distcheck work.
4681 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
4683 * tests/invoke/invoke.c: (main):
4684 * tests/invoke/testfns.c: (test6), (test7):
4685 * tests/invoke/testfns.xml:
4686 Add tests for invokation with a GList argument.
4687 Also tests caller-owns return values.
4689 2008-02-04 Rob Taylor <robtaylor@floopily.org>
4692 Add some documentation for GICallableInfo
4694 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
4697 Correct syntax errors in the DTD file.
4699 * relaxng/c-types.xml:
4700 * relaxng/g-types.xml:
4702 Add a RelaxNG specification for the GObject Introspection XML data.
4703 The Specification has validated all of the test files.
4705 2008-01-25 Rob Taylor <robtaylor@floopily.org>
4707 * tests/roundtrips.sh:
4708 * tests/struct.test:
4709 Add roundtrip tests for structs.
4711 2008-01-11 Johan Dahlin <johan@gnome.org>
4713 * src/scanner.c (g_igenerator_process_function_symbol):
4714 Refactor out g_idle_node_add_member.
4715 (create_node_from_gtype, create_node_from_ctype):
4716 Use case instead of if...else
4717 (get_type_from_type_id):
4718 Rename to create_node_from_gtype
4719 (get_type_from_ctype):
4720 Rename to create_node_from_ctype
4722 Rename ginode -> node, gitype -> type, gifunc -> func.
4724 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
4725 Two new functions, refactor out of scanner.c
4727 * src/scanner.c: (g_igenerator_process_function_symbol):
4728 * src/scannerlexer.l:
4729 Do not save the content of the deprecated variable, only
4732 2008-01-11 Johan Dahlin <johan@gnome.org>
4734 * tests/parser/foo-object.h: Add a couple of comment parser tests.
4736 2008-01-11 Jürg Billeter <j@bitron.ch>
4738 * src/scannerlexer.l:
4739 Fix GTK-Doc parsing.
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/scanner.c: (lookup_symbol):
4749 Return unresolved name if we find unknown symbol.
4751 2008-01-11 Jürg Billeter <j@bitron.ch>
4753 * src/scanner.c: (g_igenerator_generate):
4754 Initialize GObject to fix scanning interface properties.
4756 * tests/parser/Foo-expected.gidl:
4757 * tests/parser/foo-object.h:
4758 * tests/parser/foo.c: (foo_interface_get_type):
4759 Test interfaces with GObject prerequisite.
4761 * tests/parser/Makefile.am:
4762 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
4764 2007-12-27 Johan Dahlin <johan@gnome.org>
4766 * src/scannerlexer.l:
4767 Parse gtk-doc comments.
4769 * src/gidlwriter.c: (function_generate):
4770 Reorganize, avoid duplication and add support for
4771 writing deprecated functions.
4773 * src/scannerparser.y:
4775 Add new structure CDirective and functions to create/free them.
4777 * src/scanner.c: (g_igenerator_process_function_symbol),
4778 (g_igenerator_process_unregistered_struct_typedef),
4779 (g_igenerator_process_struct_typedef),
4780 (g_igenerator_process_union_typedef),
4781 (g_igenerator_process_enum_typedef),
4782 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
4783 (g_igenerator_start_preprocessor):
4784 Parse @deprecated directive for functions.
4785 Remove some more C99isms.
4786 Send in -C to cpp to avoid stripping comments.
4788 * tests/parser/foo-object.h:
4789 * tests/parser/Foo-expected.gidl:
4790 Add deprecated directive
4792 2007-12-27 Johan Dahlin <johan@gnome.org>
4794 * src/scannerlexer.l (intsuffix): Add emacs mode line and
4795 escape ' and " so it looks more like C.
4798 Unlink temporary file used.
4800 2007-12-27 Johan Dahlin <johan@gnome.org>
4802 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
4803 (g_igenerator_start_preprocessor), (main):
4805 * src/scannerparser.y:
4806 Plug a couple of simple memory leaks.
4808 2007-12-27 Johan Dahlin <johan@gnome.org>
4810 * src/scanner.c: (g_igenerator_parse_macros),
4811 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
4814 * src/scannerparser.y:
4815 * tests/parser/Makefile.am:
4817 Improve error reporting, return when the preprocessor fails.
4818 Add a verbose parameter, to aid debugging.
4819 Revert to using a temporary file to communicate between the
4820 preprocessor and the parser, because we need to wait for
4821 the exit code from the pre-processor before starting to parse.
4823 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
4825 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
4826 cparser.y to scannerparser.y
4828 2007-12-11 Johan Dahlin <johan@gnome.org>
4832 * src/scanner.c: (g_igenerator_new):
4834 Get rid of the global the_generator variable.
4836 2007-12-10 Johan Dahlin <johan@gnome.org>
4838 * src/scanner.c (main): Add an output option,
4839 add checks for required parameters
4842 set BUILD_SOURCES and CLEANFILES properly
4844 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
4845 (g_writer_write_indent), (g_writer_write_unindent),
4846 (field_generate), (value_generate), (constant_generate),
4847 (property_generate), (function_generate), (vfunc_generate),
4848 (signal_generate), (interface_generate), (struct_generate),
4849 (union_generate), (boxed_generate), (enum_generate),
4850 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
4852 * src/scanner.c: (g_igenerator_generate):
4854 * src/scannerwriter.c:
4856 Refactor scannerwriter to only be tied to a GIdlModule and move
4857 it (again!) to gidlwriter.c. Change the writer function to take
4860 2007-12-10 Johan Dahlin <johan@gnome.org>
4863 * src/scanner.c: (g_igenerator_generate):
4865 * src/scannerwriter.c: (g_igenerator_write_inline),
4866 (g_igenerator_write), (g_igenerator_write_indent),
4867 (g_igenerator_write_unindent), (field_generate), (value_generate),
4868 (constant_generate), (property_generate), (function_generate),
4869 (vfunc_generate), (signal_generate), (interface_generate),
4870 (struct_generate), (union_generate), (boxed_generate),
4871 (enum_generate), (node_generate), (module_generate),
4872 (g_scanner_write_file):
4874 Move the scanner gidl writing to a separate source file.
4876 2007-12-10 Johan Dahlin <johan@gnome.org>
4881 Move over all CType construction functions.
4883 * tests/parser/Makefile.am:
4884 Be verbose when printing parsing tests results.
4886 2007-12-10 Johan Dahlin <johan@gnome.org>
4888 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
4889 preprocessor handling to here. Start cpp insteado of cc -E,
4890 always include -U__GNUC__, since it's specific to the preprocessor
4893 * tests/parser/Makefile.am (check-local): Silent diff and skip
4894 -U__GNUC__ which is always defined now
4896 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
4898 reviewed by: <delete if not using a buddy>
4900 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
4901 * tests/parser/Makefile.am:
4903 2007-12-09 Johan Dahlin <johan@gnome.org>
4906 Use GOption for command line options.
4907 (g_igenerator_new, main): Simplify constructor and they way
4908 parameters are passed into it.
4914 * src/gen-introspect.c:
4915 * src/gen-introspect.h:
4917 Rename gen-introspect.[ch] to scanner.[ch]
4919 2007-12-09 Johan Dahlin <johan@gnome.org>
4923 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
4924 don't make the repository library and the other utilites link against
4927 * src/gen-introspect.c: (g_igenerator_create_object),
4928 (g_igenerator_create_interface), (g_igenerator_create_boxed),
4929 (g_igenerator_create_enum), (g_igenerator_create_flags),
4930 (g_igenerator_process_module_symbol),
4931 (g_igenerator_process_module), (g_igenerator_generate), (main):
4932 * src/gen-introspect.h:
4933 Refactor g_igenerator_process_types into smaller pieces.
4935 * tests/parser/Makefile.am:
4936 Depend on the gen-introspect binary
4938 2007-12-09 Johan Dahlin <johan@gnome.org>
4940 * src/gen-introspect.c (g_igenerator_process_types):
4941 Break into smaller pieces, one for each generated node type.
4943 2007-12-08 Johan Dahlin <johan@gnome.org>
4945 * src/gen-introspect.c: (g_igenerator_process_types),
4946 (g_igenerator_add_module):
4947 * tests/parser/Foo-expected.gidl:
4948 * tests/parser/foo-object.h:
4949 * tests/parser/foo.c: (foo_subobject_class_init),
4950 (foo_subobject_init):
4952 Add a subobject test and make sure to register defined classes
4953 in the lookup symbol hash table.
4955 2007-12-08 Johan Dahlin <johan@gnome.org>
4959 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
4960 (g_igenerator_process_types), (g_igenerator_add_module),
4961 (g_igenerator_add_include_idl), (main):
4962 * src/gen-introspect.h:
4963 * tests/parser/Makefile.am:
4964 * tests/parser/Foo-expected.gidl:
4966 Change the gen-introspect to generate namespaced module names,
4967 such as GLib.Object instead of GObject.
4968 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
4969 add a --include-idl parameter to gen-introspect,
4970 and update the parser test.
4972 2007-12-08 Johan Dahlin <johan@gnome.org>
4974 * src/gen-introspect.c:
4975 Move main to the end of the file and attempt to make it valid
4978 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
4979 we're not quite ready to generate metadata yet.
4984 Add a simple gen-introspect parser test
4986 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
4988 reviewed by: Johan Dahlin <johan@gnome.org>
4991 * gobject-introspection.pc.in:
4993 * src/compiler.c: (format_output), (write_out_metadata), (main):
4994 * src/gen-introspect.c: (main):
4995 * src/gen-introspect.h:
4996 * src/generate.c: (write_callable_info), (write_repository),
4997 (load_metadata), (main):
4998 * src/gidlmodule.c: (g_idl_module_new),
4999 (g_idl_module_build_metadata):
5001 * src/gidlparser.c: (start_element_handler):
5002 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5003 (g_base_info_get_name), (g_base_info_get_namespace),
5004 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5005 (g_base_info_get_metadata), (g_function_info_get_symbol),
5006 (g_function_info_get_flags), (g_function_info_get_property),
5007 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5008 (g_callable_info_may_return_null),
5009 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5010 (g_callable_info_get_arg), (g_arg_info_get_direction),
5011 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5012 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5013 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5014 (g_type_info_get_tag), (g_type_info_get_param_type),
5015 (g_type_info_get_interface), (g_type_info_get_array_length),
5016 (g_type_info_is_zero_terminated),
5017 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5018 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5019 (g_value_info_get_value), (g_field_info_get_flags),
5020 (g_field_info_get_size), (g_field_info_get_offset),
5021 (g_registered_type_info_get_type_name),
5022 (g_registered_type_info_get_type_init),
5023 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5024 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5025 (find_method), (g_struct_info_find_method),
5026 (g_enum_info_get_n_values), (g_enum_info_get_value),
5027 (g_object_info_get_parent), (g_object_info_get_type_name),
5028 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5029 (g_object_info_get_interface), (g_object_info_get_n_fields),
5030 (g_object_info_get_field), (g_object_info_get_n_properties),
5031 (g_object_info_get_property), (g_object_info_get_n_methods),
5032 (g_object_info_get_method), (g_object_info_find_method),
5033 (g_object_info_get_n_signals), (g_object_info_get_signal),
5034 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5035 (g_object_info_get_n_constants), (g_object_info_get_constant),
5036 (g_interface_info_get_n_prerequisites),
5037 (g_interface_info_get_prerequisite),
5038 (g_interface_info_get_n_properties),
5039 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5040 (g_interface_info_get_method), (g_interface_info_find_method),
5041 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5042 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5043 (g_interface_info_get_n_constants),
5044 (g_interface_info_get_constant), (g_property_info_get_flags),
5045 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5046 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5047 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5048 (g_constant_info_get_value), (g_union_info_get_n_fields),
5049 (g_union_info_get_field), (g_union_info_get_n_methods),
5050 (g_union_info_get_method), (g_union_info_is_discriminated),
5051 (g_union_info_get_discriminator_offset),
5052 (g_union_info_get_discriminator):
5053 * src/ginvoke.c: (g_function_info_invoke):
5054 * src/girepository.c: (g_irepository_register),
5055 (g_irepository_unregister), (g_irepository_get_default),
5056 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5057 (g_irepository_get_info), (g_irepository_find_by_name),
5058 (g_irepository_get_shared_library),
5059 (g_irepository_build_search_path), (g_irepository_register_file),
5060 (g_irepository_error_quark):
5061 * src/girepository.h:
5062 * src/gmetadata.c: (g_metadata_get_dir_entry),
5063 (g_metadata_check_sanity), (validate_header),
5064 (validate_array_type_blob), (validate_iface_type_blob),
5065 (validate_param_type_blob), (validate_error_type_blob),
5066 (validate_type_blob), (validate_arg_blob),
5067 (validate_signature_blob), (validate_function_blob),
5068 (validate_callback_blob), (validate_constant_blob),
5069 (validate_value_blob), (validate_field_blob),
5070 (validate_property_blob), (validate_signal_blob),
5071 (validate_vfunc_blob), (validate_struct_blob),
5072 (validate_enum_blob), (validate_object_blob),
5073 (validate_interface_blob), (validate_errordomain_blob),
5074 (validate_union_blob), (validate_blob), (validate_directory),
5075 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5076 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5077 (g_metadata_new_from_mapped_file), (g_metadata_free),
5078 (g_metadata_set_module), (g_metadata_get_namespace):
5080 * tests/Makefile.am:
5081 * tests/invoke/Makefile.am:
5082 * tests/invoke/invoke-namespace-find.sh:
5083 * tests/invoke/invoke.c: (main):
5085 Add a namespace/shared library mapping. fixes #313268.
5087 2007-12-03 Johan Dahlin <johan@gnome.org>
5089 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5092 2007-11-30 Jürg Billeter <j@bitron.ch>
5098 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5099 (g_igenerator_write_inline), (g_igenerator_write),
5100 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5101 (field_generate), (value_generate), (constant_generate),
5102 (property_generate), (function_generate), (vfunc_generate),
5103 (signal_generate), (interface_generate), (struct_generate),
5104 (union_generate), (boxed_generate), (enum_generate),
5105 (node_generate), (module_generate), (get_type_from_type_id),
5106 (str_replace), (g_igenerator_process_properties),
5107 (g_igenerator_process_signals), (g_igenerator_process_types),
5108 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5109 (g_igenerator_process_unregistered_struct_typedef),
5110 (g_igenerator_process_struct_typedef),
5111 (g_igenerator_process_union_typedef),
5112 (g_igenerator_process_enum_typedef),
5113 (g_igenerator_process_function_typedef),
5114 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5115 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5116 (g_igenerator_generate), (main), (csymbol_new),
5117 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5118 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5119 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5120 (eat_hspace), (eat_line), (read_identifier),
5121 (g_igenerator_parse_macros):
5122 * src/gen-introspect.h:
5124 Import gen-introspect to generate introspection information by
5127 2007-11-30 Jürg Billeter <j@bitron.ch>
5129 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5131 2007-11-30 Jürg Billeter <j@bitron.ch>
5133 * src/gidlparser.c: (end_element_handler): Don't leave requires
5136 2007-11-29 Johan Dahlin <johan@gnome.org>
5138 * src/gidlparser.c (parse_type_internal): Add char,
5139 gchar and guchar to the builtin types.
5141 2007-11-26 Johan Dahlin <johan@gnome.org>
5143 * src/ginfo.c: (g_object_info_get_type_name),
5144 (g_object_info_get_type_init):
5145 * src/girepository.c: (g_irepository_is_registered):
5146 * src/girepository.h:
5148 Add g_object_info_get_type_name, g_object_info_get_type_init and
5149 g_irepository_is_registered.
5151 2006-08-14 Jürg Billeter <j@bitron.ch>
5153 * src/gidlparser.c: (end_element_handler): Don't leave
5154 namespace and implements states too early.
5157 2007-11-26 Johan Dahlin <johan@gnome.org>
5159 * src/gmetadata.c (validate_struct_blob):
5160 pass blob_type to validate_function_blob instead of
5161 hard-coding BLOB_TYPE_STRUCT.
5163 Patch by Torsten Schoenfeld, fixes #314190
5165 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5167 * src/compiler.c, src/generate.c, src/gidlnode.c,
5168 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5169 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5170 warnings about return values, signedness mismatches, unused
5171 variables, and unhandles enum values in switch statements.
5173 * tests/invoke/Makefile.am: Don't install the invoke test program.
5174 Add -I ../../src to the cflags used for the test functions files.
5176 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5178 * src/girepository.h: Export g_invoke_error_quark.
5180 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5182 * src/ginvoke.c: Remove the fallback implementation of
5183 g_function_info_invoke since we now formally depend on libffi.
5185 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5187 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5188 Remove these files from cvs, as they are now generated.
5190 * src/gmetadata.c (validate_iface_type_blob): Don't
5191 complain if blob->pointer is not set, since that
5192 happens for enum and flag types. (#308935, Gustavo
5195 * Commit an autoconf-conversion patch by
5196 Gustavo Carneiro (#308708)
5198 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5200 * src/compiler.c (main): Use it here to validate
5201 the generated metadata.
5203 * src/gmetadata.[hc]: Add code to validate a
5206 * metadata-format.txt: Updates
5208 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5210 * tests/*: Add struct offsets to field and vfunc
5213 * src/generate.c (write_vfunc_info): Write offset
5214 information for vfuncs.
5216 * src/gidlnode.c (g_idl_node_build_metadata): Write
5217 the struct offsets into the metadata.
5219 * src/gidlparser.c: Parse the offset attributes of
5220 field and vfunc elements.
5222 * src/gidlnode.h: Add offset members to field and
5225 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5229 * gidl.dtd: Updates.
5231 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5232 file, creates, compiles and runs a C file, and folds the
5233 resulting struct offsets back into the .gidl file.
5235 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5237 * src/gidlparser.c (start_field): Make fields in objects
5240 * src/gidlmodule.c: Include string.h
5245 * metadata-format.txt: Cleanup basic types.
5246 * src/*: Adapt to the changes.
5247 * tests/*: Adapt to the changes.
5248 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5250 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5251 size for enum blobs.
5252 (g_idl_node_get_full_size): Report the correct size for
5255 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5256 error checking for blob sizes.
5258 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5260 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5261 interface types for which is_pointer is FALSE, e.g. enums.
5263 * src/gidlnode.c (g_idl_node_get_full_size)
5264 * src/gidlparser.c (parse_type_internal):
5265 * src/generate.c (write_type_info): Support unspecialized
5266 lists, hashtables and errors. Also emit a '*' after these.
5270 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5274 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5276 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5278 * src/*.c: Change the directory to be addressed by
5279 1-based indexes, and use an index of zero to mean
5282 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5284 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5286 * tests/union.test: Add a union test.
5288 * src/generate.c: Handle unions.
5290 * src/girepository.h:
5291 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5293 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5295 * src/gidlparser.c (start_union): Parse <union> elements.
5297 * src/gidlnode.h: Add a GIdlNodeUnion.
5299 * gidl.dtd: Add a <union> element.
5301 * src/gmetadata.c (g_metadata_check_sanity): Check
5304 * src/gmetadata.h: Add union_blob_size to Header,
5307 * metadata-format.txt: Add a UnionBlob.
5309 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5311 * tests/*: Update testcases.
5313 * src/generate.c (write_callable_info): Don't forget to
5314 write transfer and null-ok attributes for return types
5317 * src/girepository.h:
5318 * src/ginfo.c (g_callable_info_may_return_null):
5319 New function to find out if a function may return NULL.
5321 * src/compiler.c (format_output): Make the generated
5324 * README: Point to a recent libffi snapshot.
5326 * tests/invoke/*: Some invoke tests.
5328 * src/Makefile: Add ginvoke.c and the necessary
5331 * src/girepository.h (g_function_info_invoke): Add
5334 * src/ginvoke.c (g_function_info_invoke): Initial
5335 implementation of invoke functionality based on libffi.
5337 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5338 strings and types hash tables in the right order when
5340 (find_entry_node): Free the name parts.
5342 2005-05-12 Johan Dahlin <johan@gnome.org>
5344 * src/generate.c: Generate consistent end tags.
5348 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5352 * src/gidlparser.c (start_function): Actually add
5353 methods to objects. (Steven Walter)
5355 * src/girepository.h:
5356 * src/ginfo.c: Rename Transfer and Direction to
5357 GITransfer and GIDirection. (Torsten Schoenfeld)
5359 * tests/*: Make tests work with the changes in name
5362 * src/gidlnode.c (find_entry_node): Parse qualified
5363 names and generate xref nodes for them if needed. Don't
5364 require all modules to be loaded any more.
5366 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5369 * src/ginfo.c (g_object_info_get_parent): Return NULL
5370 if blob->parent is 0. Still need to make sure index
5373 * src/generate.c: Generate qualified names when
5374 referring to non-local types. Emit transfer attribute
5377 * src/compiler.c (format_output): Put the function
5378 attributes where gcc accepts them.
5380 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5382 * src/compiler.c (main): Add a --verbose cmdline option
5383 and only log messages if it is specified.
5386 * src/gidlnode.c (init_stats, dump_stats): Collect some
5387 statistics on string and type sharing.
5389 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5390 g_message() instead of fprintf().
5392 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5393 (g_idl_node_get_size): Implement for structs.
5394 (g_idl_node_get_full_size): Handle parent being NULL.
5395 (serialize_type): Handle lookup failures more gracefully.
5397 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5399 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5400 size calculation for 2-parameter types and for objects.
5402 * src/compiler.c: Add a cmdline option for debug output
5403 and install a log handler to implement it.
5404 * src/gidlnode.c: Add some debug spew.
5408 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5409 forget to count the module name when calculating the
5410 required size for the metadata.
5413 * src/gidlparser.c: Fix compiler warnings.
5415 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5417 * src/compiler.c (main): Free the option context.
5419 * gidl.dtd: Clean up handling of names. All elements
5420 have a "name", only the elements corresponding to
5421 actual callable functions (function, method, constructor),
5422 have an additional "symbol" attribute holding the
5423 dlsym()-able function name.
5425 * src/generate.c: Adapt to generate xml matching the
5429 * src/gidlnode.c: Adapt to parse the new dtd.
5431 * tests/*.test: Adjust to the new dtd.
5433 * metadata-format.txt:
5434 * src/gmetadata.h: Remove the short_name field
5436 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5437 * src/girepository.h:
5438 * src/ginfo.c (g_value_info_get_short_name): Removed
5440 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5442 * gidl.dtd: Allow constructors for boxed types,
5443 patch by Jonathan Blandford.
5446 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5448 * --- Initial import ---