1 2008-11-16 Owen Taylor <otaylor@redhat.com>
3 Bug 560825 – Add size and alignment to typelib
5 Include the size and alignment of structures and unions in the typelib,
6 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
8 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
9 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
10 to StructBlob and UnionBlob.
12 * girepository/ginfo.c girepository/girepository.h:
13 Add g_[struct|union]_get[size|alignment]().
15 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
17 2008-11-16 Owen Taylor <otaylor@redhat.com>
19 Bug 552371 – implement struct field get/set
21 * girepository/gfield.c girepository/girepository.h: Add
22 convenience functions g_field_info_set_field() and
23 g_field_info_get_field() to set and get fields based on the
24 offsets in GIFieldInfo.
26 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
28 Bug 560241 - Out-arguments should not be marked as being pointers
31 * girepository/girparser.c: Improved logic for out arguments.
33 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
35 Bug 559601 - Pointers in structs/unions unduly treated as arrays
37 * giscanner/transformer.py: Differentiate type creation logic
38 between parameters and struct components.
40 2008-11-15 Colin Walters <walters@verbum.org>
42 * giscanner/dumper.py: Check return code from pkg-config
45 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
47 * tests/everything/everything.c (test_array_int_in),
48 (test_array_gtype_in):
49 * tests/everything/everything.h:
50 Rename the int/gtype array tests. Make the return value
51 useful, an aggregation of the array input values.
53 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
55 * tests/everything/Makefile.am:
56 * tests/everything/everything.c:
57 * tests/everything/everything.h:
58 * tests/everything/gitesttypes.c:
59 * tests/everything/gitesttypes.h:
60 Rename gitesttypes.[ch] to everything.[ch]
62 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
64 Bug 560708 – Don't treat arrays that have a length specified as
65 zero-terminated by default
67 * giscanner/transformer.py: Default to non zero terminated for
69 * tests/*: Update, add test for zero vs not.
71 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
73 Bug 557788 - Return types for constructors in generated typelib bogus
75 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
76 obviously broken in the face of duplicate names in different
78 * tests/scanner/*expected.gir: Fix up.
80 2008-11-13 Owen Taylor <otaylor@redhat.com>
82 * girepository/girffi.c: Fix "Unexpected time for time_t"
85 2008-11-13 Colin Walters <walters@verbum.org>
87 Bug 558436 - avoid having scanner load app code
89 * giscanner/cgobject.py: Delete; we no longer load shared
91 * giscanner/dumper.py: Support for linking a library to
92 a stub binary for introspection.
93 * giscanner/glibtransformer.py: Rewrite to use gdump XML
94 from invocation of child binary.
95 * giscanner/transformer.py: Fix up to use fully qualified
96 name in parse tree. Make parse_ctype public so we can use
97 it inside glibtransformer.
98 * tests/scanner/barapp.c: New test, using --program arg
100 * tests/*: Update to use common.mk for invoking scanner.
101 * tools/g-ir-scanner: Add options --program, --program-arg,
103 * docs/g-ir-scanner.1: Update.
105 2008-11-13 Colin Walters <walters@verbum.org>
107 * configure.ac: Depend on Gio, we use it in gdump.c.
108 * girepository/gdump.c: Code to dump GType data to XML.
109 * girepository/girepository.c: Add option group for dumping.
110 * girepository/girepository.h: Define API for the above.
112 2008-11-13 Colin Walters <walters@verbum.org>
114 * common.mk: Add a file to include with Makefile fragments
115 useful for scanner invocation.
117 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
119 * tests/everything/gitesttypes.c (test_filename_return): Return
120 strings in filename encoding.
122 2008-11-13 Owen Taylor <otaylor@redhat.com>
124 Bug 560253 – Add structure and boxed types to Everything test module
126 * tests/everything/gitesttypes.[ch]: Add examples of:
128 Plain old data structs
129 Plain old data structs with nested fields
131 Plain old data boxed with nested fields
132 More complicated boxed types with internal state
134 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
136 * tests/everything/gitesttypes.c (test_gtype_in):
137 * tests/everything/gitesttypes.h:
138 Add a test of GType arrays, a la gtk_list_store_set_columns.
140 2008-11-12 Owen Taylor <otaylor@redhat.com>
142 Bug 560419 – Cache includes when parsing
144 Keep track of all modules parsed within a GIrParser, and when a
145 module is referenced a second time, use the existing parsed copy
146 instead of reparsing.
148 2008-11-12 Owen Taylor <otaylor@redhat.com>
150 Fix management of ParseContext.includes_modules (#560419)
152 * girepository/girparser.c: Fix some trivial bugs in managing the
153 list of include modules. (Add to module's list twice, not
154 initialized to NULL, not freed.)
156 2008-11-12 Owen Taylor <otaylor@redhat.com>
158 Keep aliases and disguised_structures local to each module (#560419)
160 * girepository/girmodule.[ch]: When parsing, keep keep a separate
161 hash tables of aliases and 'disguised' flags for each module, and
162 store that on the module.
164 After parsing an include merge the aliases/disguised flags to the
167 * girepository/girparser.c: Remove 'prefix_aliases' flag and
168 always prefix aliases/disguised structure types when parsing; this
169 simplifies the code considerably.
171 2008-11-12 Owen Taylor <otaylor@redhat.com>
173 Fix mismatches between .gir name and 'name' attribute (#560419)
175 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
176 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
177 where the 'name' element of <namespace/> didn't match the filename of the
178 gir, an assumption that the compiler has always expected and now enforces.
180 2008-11-12 Owen Taylor <otaylor@redhat.com>
182 Only allow one <namespace/> element per <repository/> (#560419)
184 * girepository/girparser.c: The logic in girparser.c didn't work
185 very well if there were multiple <namespace/> nodes within a
186 single <repository/> (context->namespace was always the overall
187 filename and not the the name specified in the <namespace/>
188 element for one thing; this would cause aliases to be mis-prefixed
189 in include modules.) Also check that the "name" in the
190 <namespace/> node matches the filename.
192 2008-11-12 Owen Taylor <otaylor@redhat.com>
194 Add a GirParser object to hold the state of a compilation
196 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
197 GirParser object to hold state that is global across a
198 compilation. Currently just holds the include path, but will
199 eventually also keep a cached list of parsed modules.
201 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
203 * girepository/girepository.c (find_namespace_latest): Fix
206 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
208 * configure.ac: use 'introspection' component for bugs
210 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
212 * tests/everything/gitesttypes.c (test_filename_return):
213 * tests/everything/gitesttypes.h:
214 Add a filename return test.
216 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
218 * tests/offsets/Makefile.am (gitestoffsets.c): fix
219 gen-gitestoffsets invocation with builddir != srcdir
221 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
223 * girepository/girepository.c:
224 Change the element type from utf8 to filename
225 * girepository/girnode.c (g_ir_node_build_typelib):
226 Special case filename equally to utf8 here.
228 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
231 Remove unused variables, add a dependency of girepository.ch, so when
232 they change we rebuild the gir automatically.
234 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
236 * girepository/girepository.c (g_irepository_get_search_path):
237 * girepository/girepository.h:
238 Add a g_irepository_get_search_path, so we can access the search
241 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
243 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
245 * girepository/girparser.c: avoid freeing an uninitialized pointer
247 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
250 * giscanner/glibtransformer.py:
251 * tools/g-ir-scanner:
252 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
253 so we can just pass in --library=foo/bar/baz.la and the scanner
254 does the right thing.
255 Don't warn for _get_type() functions if they don't take any
258 2008-11-11 Owen Taylor <otaylor@redhat.com>
260 Bug 560404 – Prefix types when resolving aliases in included modules
262 * girepository/girparser.c: When resolving aliases in an included
263 module, prefix types before looking them up.
265 2008-11-11 Owen Taylor <otaylor@redhat.com>
267 Compute field offsets and overall size for object structures
269 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
270 field of type object in structure"
272 Do basic computation of field offsets for objects and interfaces;
273 this doesn't attempt to address all of the "mess" for virtual
274 functions described in Bug 560281.
276 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
278 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
280 Based on patch by Johan Bilien.
282 * giscanner/transformer.py (_create_member, _create_parameter):
283 Resolve types here as well.
284 (_resolve_type_name_1): Try resolving using 'ctype' first since
285 it's least ambiguous. Fixes struct member type resolution with
286 similarly named types, e.g. Gdk.PangoRendererClass and
288 * tests/scanner/foo*: Add test.
290 2008-11-11 Owen Taylor <otaylor@redhat.com>
292 * girepository/girparser.c: Search provided include dirs before
293 the default directories.
295 2008-11-11 Owen Taylor <otaylor@redhat.com>
297 * girepository/giroffsets.c: Include fully-qualified names in
300 2008-11-11 Owen Taylor <otaylor@redhat.com>
302 * girepository/giroffsets.c: Fail gracefully with an informative
303 error message when recursion is encountered when computing a
306 2008-11-11 Owen Taylor <otaylor@redhat.com>
308 * girepository/girparser.c: Remove an unused variable.
310 2008-11-10 Owen Taylor <otaylor@redhat.com>
312 Add tests for field offset computations
314 * tests/offsets/offsets.h: Header file with structure definitions to test
316 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
317 field offsets for the structures in offsets.h two ways: using
318 the information from a generated typelib, and as computed by the
321 We diff these two versions to test that everything is OK.
323 2008-11-10 Owen Taylor <otaylor@redhat.com>
325 Remove field offsets from g-ir-generate output and test inputs
327 Field offsets are a) architecture dependent so they shouldn't be part
328 of the architecture-independent gir format which is installed in
329 datadir. b) Are architecture-dependent so they shouldn't be in test
332 * girepository/girparser.c: Don't parse offset for fields
333 * tools/generate.c: Don't parse offset for fields
334 * tests/*.gir test/scanner/*.tgir: Remove offsets
336 (Virtual function and discriminator offsets are not removed, as they
337 aren't fully hooked up to the field-offset computation machinery yet.)
339 2008-11-10 Owen Taylor <otaylor@redhat.com>
341 Bug 560252 - Compute field offsets before writing typelib
343 * girepository/girnode.h: Store the total size and alignment for
344 GIrNodeStruct/Boxed/Union.
346 * girepository/giroffset.c: New file implementing computation of
347 structure field offsets.
349 * girepository/girnode.c: Compute structure field offsets before
350 writing types into the typelib.
352 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
353 means "unknown". Also fix description of the discriminator_offset
356 2008-11-10 Owen Taylor <otaylor@redhat.com>
358 Bug 560250 - Fully parse included modules
360 For some things, like computing structure offsets to put into the typelib
361 we need more than just the aliases from included modules. Do a completel
362 parse of included modules and store in module->included_modules.
364 Also add g_ir_find_node() to find node information from within the
365 active set of modules and their includes.
367 2008-11-10 Owen Taylor <otaylor@redhat.com>
369 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
371 Extract a function to convert GITypeTag to ffi_type from the internals
372 of ginvoke.c. This will be useful in figure out structure alignment.
374 Also fix handling of gsize and time_t to be portable. (Add a check
375 to configure.ac to figure out the width of time_t.)
377 2008-11-10 Owen Taylor <otaylor@redhat.com>
379 Bug 560248 – "disguised structures"
381 Certain types like GIConv and GdkAtom are pointers internally but don't
382 look like pointers when referenced. They have the form.
384 typedef struct _X *X;
386 Parse these as structures/records but mark them in the gir with a 'disguised'
387 attribute so that we know that they need special handling.
389 In the typelib treat them like any other structure.
391 2008-11-09 Jürg Billeter <j@bitron.ch>
394 * giscanner/girwriter.py:
396 Write throws attribute for virtual functions, fixes bug 559703
398 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
400 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
401 up some confusion about the second argument to find_module, it's
402 actually the packages __path__ attribute which we can safely ignore
404 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
406 2008-11-07 Owen Taylor <otaylor@redhat.com>
408 Bug 559737 – Deal with continuations in macros
410 * giscanner/giscannerlexer.l: Treat continuation lines the same
411 as regular newlines. This makes the scanner not complain about
412 #define foo(x) \ <stuff> inside a C file. There's no attempt
413 however to handle parsing macro definitions split across lines.
415 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
417 * giscanner/cachestore.py:
418 Handle broken cache entries, write only filesystems and
419 running out of diskspace.
421 2008-11-07 Owen Taylor <otaylor@redhat.com>
423 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
424 Set current_filename before lexing the file so error messages
425 are reported in the right file.
427 2008-11-06 Colin Walters <walters@verbum.org>
429 * tests/everything/*: Add some tests for strv.
431 2008-11-05 Colin Walters <walters@verbum.org>
433 * girepository/ginvoke.c (g_function_info_invoke): Don't use
434 nested scope local variable for error which may go away after
435 conditional is complete.
437 2008-11-05 Colin Walters <walters@verbum.org>
439 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
440 manipulate hackily; just use GString. This avoids an
441 uninitialized memory read pointed out by Havoc.
443 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
445 * giscanner/__init__.py:
447 * giscanner/cachestore.py:
448 * giscanner/cgobject.py:
449 * giscanner/girparser.py:
450 * giscanner/girwriter.py:
451 * giscanner/giscannermodule.c:
452 * giscanner/glibast.py:
453 * giscanner/glibtransformer.py:
454 * giscanner/libtoolimporter.py:
455 * giscanner/minixpath.py:
456 * giscanner/odict.py:
457 * giscanner/sourcescanner.c:
458 * giscanner/sourcescanner.h:
459 * giscanner/sourcescanner.py:
460 * giscanner/transformer.py:
461 * giscanner/utils.py:
462 * giscanner/xmlwriter.py:
464 Relicense the giscanner library under LGPLv2+.
465 This has been approved by all contributors.
467 2008-11-01 Owen Taylor <otaylor@redhat.com>
469 Bug 558848 giparser.py: shared library should be optional
471 When parsing a .gir, allow the shared-library attribute
472 of <namespace/> to be missing: this corresponds to the handling
473 in libgirepository and elsewhere.
475 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
477 Bug 557898 – Fails to build on OSX 10.4
479 * configure.ac: Check for $shrext_cmds that should be implicitly
480 available if you're using libtool >= 2.0. If undefined, call
481 libtool --config explicitly to get its value.
482 * girepository/gtypelib.c: Remove special case for (non-)Darwin
485 2008-10-31 Colin Walters <walters@verbum.org>
487 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
489 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
491 * configure.ac: Post release version bump
494 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
498 * docs/release-checklist.txt:
501 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
503 * Makefile.am: add an upload-release target
504 * docs/release-checklist.txt:
505 Release process documentation
507 2008-10-31 Colin Walters <walters@verbum.org>
509 Bug 558109 – _g_typelib_init fails to find shared libraries
511 * transformer/glibtransformer.py: Use ctypes' find_library
512 on passed libraries and write that for the shared-library
513 entry. We want to avoid depending on -devel packages.
515 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
517 * docs/g-ir-scanner.1:
518 Document the renaming options.
520 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
522 * giscanner/Makefile.am:
523 * tests/invoke/Makefile.am:
524 * tests/repository/Makefile.am: List in-tree libraries first in
525 LDADD / LIBADD. If installed library is listed first, the
526 resulting binary will prefer installed version to one in .libs,
527 possibly making 'make check' behave strangely.
529 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
531 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
532 gir-repository from choking with gdk/quartz
534 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
536 * giscanner/giscannermodule.c (calc_attrs_length),
537 (pygi_collect_attributes):
538 * giscanner/xmlwriter.py:
539 Write a C version of the xml namespace formatter.
540 Saves 15% of the time it takes to create a gtk gir.
542 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
544 * giscanner/xmlwriter.py: Abstract attribute formatting
545 to a function external to the XMLWriter class.
547 * giscanner/scannerlexer.l:
548 Parse and discard __typeof and __attribute.
550 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
552 * giscanner/girparser.py:
553 Remove arguments from the constructor, move them to
554 separate accessors. Add a new parse_tree method
555 which takes an element tree instance.
556 * tools/g-ir-scanner:
557 Update callsite for this
559 * giscanner/Makefile.am:
560 * giscanner/cachestore.py:
561 * giscanner/transformer.py:
562 Cache the include parsing. Saves ~25% time when
563 creating vte (which includes everything up to gtk+).
565 2008-10-30 Colin Walters <walters@verbum.org>
567 * giscanner/transformer.py: Don't reparse includes
568 we've already processed.
570 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
572 * giscanner/girparser.py:
573 * giscanner/transformer.py:
574 Avoid parsing parameters, types etc when parsing
575 includes. Should speed up include parsing a bit.
577 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
579 * giscanner/girparser.py:
580 Avoid big if/else and use a dispatch table like
583 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
585 * giscanner/transformer.py:
586 Clean up include parsing and registration.
588 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
590 * giscanner/transformer.py:
593 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
595 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
598 construct PYTHONPATH just once
600 * tests/everything/Makefile.am:
601 * tests/scanner/Makefile.am:
602 add $(top_srcdir) to PYTHONPATH to
603 handle builddir != srcdir
605 * giscanner/libtoolimporter.py:
606 * giscanner/sourcescanner.py:
607 Make the libtoolimporter work when distchecking too.
609 Mostly based on patch by Tommi Komulainen
611 2008-10-29 Owen Taylor <otaylor@redhat.com>
613 * giscanner/glibtransformer.py: If a filename of an existing
614 file is passed to --library, hunt for it directly, rather than
615 searching for a corresponding library.
617 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
619 * giscanner/libtoolimporter.py:
620 * giscanner/sourcescanner.py:
621 Clean up the libtool importer a bit. Add a context so we
622 can use it through a with statement.
623 Don't just look in the current directory, look in the whole
626 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
628 Bug 558065 – gitesttypes should be installed
632 * tests/types/Makefile.am -> tests/everything/Makefile.am
633 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
634 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
635 move tests/types to tests/everything
637 * tests/everything/Makefile.am: build normal shared library
638 libgirepository-everything.so.1.0.0 and corresponding typelib
639 Everything-1.0.typelib
641 * tests/everything/Makefile.am: explicitly link libtool
642 versioning with typelib versioning with variables
644 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
646 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
648 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
650 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
653 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
655 Bug 558068 – when invoking a method, offset the in arguments by one,
658 * tests/invoke/invoke.c, tests/invoke/testfns.c,
659 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
660 * girepository/ginvoke.c: do not offset the index of given out
661 arguments by one for methods, "this" is provided as in argument only.
663 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
665 * gir/gio-2.0.c: add annotation for g_file_delete
667 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
669 Bug 558062 – provide and use paths in the .pc file
671 * gobject-introspection-1.0.pc.in: provide typelibdir variable
672 for where .typelibs should be installed (callers shouldn't need
673 to construct paths from bits and pieces)
675 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
677 Bug 557791 – g_irepository_require() could return a GTypelib *
679 * girepository/girepository.c: Return GTypelib; this is useful
680 for low level manipulation.
682 2008-10-25 Colin Walters <walters@verbum.org>
684 Bug 557788 – Return types for constructors in generated typelib bogus
686 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
687 rely on end pass resolution.
689 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
691 Bug 557786 - support fixed size arrays
693 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
694 * giscanner/scannerparser.y: Retain fixed array size.
695 * giscanner/ast.py: Add to note.
696 * giscanner/girwriter.py: Write to gir.
697 * girepository/girnode.c: Write it to typelib.
698 * tools/generate.c: Generate.
699 * tests/*: Add tests.
701 2008-10-25 Colin Walters <walters@verbum.org>
703 Bug 557076 - move typelibs to $libdir
705 * configure.ac: Steal some configury bits from dbus to expand
707 * gir/Makefile.am: Move to libdir.
708 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
709 instead just look at one hardcoded path in libdir.
710 * acinclude.m4: Bits from dbus.
712 2008-10-24 Johan Dahlin <johan@gnome.org>
714 * girepository/girnode.c (g_ir_node_check_unhandled_members):
715 Be quiet, do not warn about unhandled members.
717 2008-10-24 Johan Dahlin <johan@gnome.org>
719 * girepository/gtypelib.c:
720 Only use SHLIB_SUFFIX on darwin, otherwise use
721 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
723 2008-10-24 Lucas Rocha <lucasr@gnome.org>
725 Bug 557623 - Constructors shouldn't be flagged as methods.
727 * girepository/ginfo.c (g_function_info_get_flags): ditto.
729 2008-10-24 Johan Dahlin <johan@gnome.org>
731 * giscanner/scannerparser.y:
732 Check against division by zero for the modula operator.
733 This fixes header parsing of OSX system headers included
736 2008-10-24 Johan Dahlin <johan@gnome.org>
740 Add a CONTRIBUTORS file and dist it.
742 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
744 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
746 * girepository/girparser.c (parse_param_transfer):
747 * giscanner/transformer.py (_create_parameter, _create_return):
748 * giscanner/girwriter.py (_write_return, _write_parameter):
749 * tools/generate.c (write_callable_info): always write and
750 require "transfer-ownership" for return-values and parameters
753 * tests/invoke/testfns-1.0.gir:
755 * tests/scanner/DrawableAdditions.xml:
756 * tests/scanner/GtkFrob-1.0-expected.tgir:
757 * tests/scanner/annotation-1.0-expected.tgir:
758 * tests/scanner/drawable-1.0-expected.tgir:
759 * tests/scanner/drawable-injected-1.0-expected.gir:
760 * tests/scanner/drawable-injected-1.0-expected.tgir:
761 * tests/scanner/foo-1.0-expected.tgir: Updated
763 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
765 * giscanner/cgobject.py: build fundamental types same way as glib
767 * giscanner/glibtransformer.py (_type_from_gtype): record GType
768 when constructing the Type from it
770 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
771 the parameter is a GObject from its GType, if available.
773 * giscanner/glibtransformer.py (_adjust_transfer):
774 * tests/scanner/foo-1.0-expected.gir:
775 * tests/scanner/foo-1.0-expected.tgir: deduce
776 transfer-ownership from GTypes
778 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
780 * giscanner/transformer.py (_create_parameter):
781 * tests/scanner/foo-1.0-expected.gir: make varargs
782 transfer-ownership="none"
784 2008-10-23 Colin Walters <walters@verbum.org>
786 Bug 556739 - transfer ownership
788 * giscanner/ast.py: Refactor Parameter/Return to share
789 common attributes. Add transfer_inferred attribute
790 which says whether or not we made a guess.
791 * giscanner/transformer.py: Add much more extensive
792 heuristics around parameter and return transfer.
793 * giscanner/glibtransformer.py: Adjust to inspect
797 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
799 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
801 * tests/scanner/Makefile.am:
802 * tests/scanner/annotation-1.0-expected.tgir:
803 * tests/scanner/drawable-1.0-expected.tgir:
804 * tests/scanner/drawable-injected-1.0-expected.tgir:
805 * tests/scanner/foo-1.0-expected.tgir:
806 * tests/scanner/GtkFrob-1.0-expected.tgir:
807 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
808 annotations survive the roundtrip via typelib
810 The expectations are as currently produced by g-ir-generate,
811 comparison with the .gir files shows there are differences.
813 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
815 Bug 557468 – Support for GI_TYPELIB_PATH
817 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
818 provided paths to the global search path.
820 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
822 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
824 * tests/scanner/drawable-1.0-expected.tgir:
825 * tests/scanner/drawable-injected-1.0-expected.tgir:
826 * tests/scanner/foo-1.0-expected.tgir:
827 * tools/generate.c (write_object_info): write 'abstract'
828 attribute for classes
830 2008-10-22 Lucas Rocha <lucasr@gnome.org>
832 * girepository/girmodule.c, girepository/gtypelib.c,
833 girepository/girparser.[ch]: fix some build warnings.
835 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
837 Bug 557405 – Use 'allow-none' consistently
839 * docs/typelib-format.txt:
840 * girepository/ginfo.c (g_arg_info_may_be_null):
841 * girepository/girnode.c (g_ir_node_build_typelib):
842 * girepository/girnode.h (struct _GIrNodeParam):
843 * girepository/girparser.c (start_parameter):
844 * girepository/girwriter.c (function_generate):
845 * girepository/gtypelib.h (ArgBlob):
847 * tests/function.gir:
848 * tools/generate.c (write_callable_info): Use 'allow-none'
849 consistently throughout
851 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
853 Bug 557092 – Callback annotations not used
855 * giscanner/transformer.py (_create_callback): use annotations
857 * tests/scanner/annotation.h
858 * tests/scanner/annotation-1.0-expected.gir: add tests
860 2008-10-21 Colin Walters <walters@verbum.org>
862 * giscanner/scannerlexer.l: Don't require trailing whitespace after
863 uncommented parameters.
866 2008-10-21 Colin Walters <walters@verbum.org>
868 * girepository/girepository.c: Ensure that when doing an unversioned
869 require, we prefer items earlier in the search path to later ones.
871 2008-10-21 Owen Taylor <otaylor@redhat.com>
873 * giscanner/transformer.py: For string parameters allow transfer annotation
874 to override the standard automatic guessing based on 'const'.
876 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
878 Bug 557241 – "throws" flag for functions
880 * tests/scanner/drawable-1.0-expected.gir,
881 tests/scanner/drawable-injected-1.0-expected.gir,
882 tests/scanner/drawable.[ch]: add simple test for throwing
883 function (has GError ** as last argument)
885 * giscanner/ast.py: add a 'throws' flag to Function
886 * giscanner/glibtransformer.py: if a function's last paramerter is
887 a GError, set the 'throws' flag and remove that parameter
888 * giscanner/girwriter.py: write out the 'throws' attribute
889 * giscanner/girparser.py: support parsing the 'throws' attribute
891 * tests/repository/gitestthrows.c: add a simple test to check the
892 throws flag in a typelib and invoke the function
894 * girepository/ginfo.c, girepository/girnode.[ch],
895 girepository/girnode.h, girepository/girparser.c,
896 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
898 * girepository/ginvoke.c: if a function throws, add a GError as last
899 arguments, and propagate the error to the invoker.
901 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
903 * giscanner/transformer.py (_create_parameters): Warn if we see
904 annotations for unknown parameters. If .h and .c files name
905 parameters differently, the annotations may be lost.
907 2008-10-21 Johan Dahlin <johan@gnome.org>
909 Bug 556358 - don't use libtool internals
911 * giscanner/Makefile.am:
912 * giscanner/libtoolimporter.py:
913 * giscanner/sourcescanner.py:
914 * giscanner/utils.py:
915 Add a python meta importer and remove a libtool symlink hack.
917 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
919 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
920 and --add-include-path appropriately when invoking the scanner.
921 * tests/types/Makefile.am (%typelib): Likewise.
923 2008-10-20 Colin Walters <walters@verbum.org>
925 Bug 556777 - validate properties
927 * giscanner/transformer.py: Add option to throw on unknown types.
928 * giscanner/glibtransformer.py: Use it on properties.
929 * tests/*: Add a test.
931 2008-10-20 Colin Walters <walters@verbum.org>
933 * giscanner/glibast.py: Also register g variants of
934 default_array_types. This is not beautiful, but
935 good alternatives aren't easy to come by.
936 This fixes gchar ** parsing.
938 2008-10-20 Colin Walters <walters@verbum.org>
940 * docs/typelib-format.txt, girepository/gtypelib.h:
941 Take a bit from ObjectInfo to represent abstract flag.
942 * giscanner/cgobject.py: Expose g_type_get_flags.
943 * girepository/girepository.h: Add accessor.
944 * girepository/ginfo.c: Implement it.
945 * giscanner/ast.py: Add is_abstract flag to generic
947 * giscanner/glibast.py: Use it.
948 * giscanner/girwriter.py: Write it.
949 * girepository/girparser.c: Parse it.
952 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
954 * giscanner/girparser.py (_parse_function): don't lose
955 'transfer-ownership' attributes when injecting, check for the
958 2008-10-19 Johan Dahlin <johan@gnome.org>
960 * giscanner/scannerlexer.l: Parse and ignore __asm.
962 2008-10-19 Colin Walters <walters@verbum.org>
964 * giscanner/girparser.py: Parse array length= to ensure
965 it doesn't get lost from --inject.
967 2008-10-17 Colin Walters <walters@verbum.org>
969 Bug 556795 - char ** regression
971 * giscanner/transformer.py: Fix parsing of ctypes, add some
972 comments about what's going on.
973 * tests/*: Add a test for char **.
975 2008-10-17 Colin Walters <walters@verbum.org>
977 Bug 556783 - change namespace handling to be more consistent
979 * giscanner/transformer.py: Eliminate usage of
980 strip_namespace_object. We now treat --namespace as the default
981 --strip-prefix; however, if --strip-prefix is specified it
982 overrides --namespace. This applies to everything except function
983 names, where we do also strip the namespace.
984 * giscanner/glibtransformer.py: Remove usage of
985 strip_namespace_object.
987 * tests/*: Add skeletal GtkFrob-1.0 test which has different
988 --namespace and --strip-prefix.
990 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
992 Bug 556732 – generate gir files consistently
994 * girepository/girparser.c (start_parameter):
996 * tests/invoke/testfns-1.0.gir:
997 * tools/generate.c (write_callable_info): write
998 'transfer-ownership' attribute consistently with both
999 return-value and parameter elements
1001 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1003 Bug 556732 – generate gir files consistently
1005 * tools/generate.c (write_callable_info): write 'direction'
1006 attribute only if other than 'in' to be consistent with
1009 * tests/object.gir: remove direction="in" which is the default
1011 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1013 Bug 556732 – generate gir files consistently
1015 * giscanner/ast.py (Field): add readable and writable properties
1016 * giscanner/girparser.py (_parse_field): copy 'readable' and
1017 'writable' attributes
1018 * giscanner/transformer.py (_create_member): create fields as
1020 * giscanner/glibtransformer.py (_introspect_object,
1021 _pair_class_struct): make object instance and class fields
1023 * giscanner/girwriter.py (_write_field):
1024 * tools/generate.c (write_field_info): write field 'readable'
1025 and 'writable' attributes only if non-default (read-only)
1026 * girepository/girparser.c (start_field): in the absence of
1027 attributes assume fields are read-only
1029 * tests/struct.gir: remove redundant readable="1" from fields
1030 * tests/scanner/foo-1.0-expected.gir:
1031 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1032 all record and union fields
1034 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1036 Bug 556732 – generate gir files consistently
1038 * giscanner/girwriter.py (_write_property): write properties
1039 'construct' attribute if set
1040 * tools/generate.c (write_property_info): write properties
1041 'readable' and 'writable' attributes only if non-default
1042 * tests/object.gir: add writable="0"
1043 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1045 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1047 * gir/glib-2.0.c: added annotations
1049 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1051 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1054 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1056 Bug 556610 – giscanner/girparser.py drops parameter options
1058 * tests/scanner/drawable-injected-1.0-expected.gir,
1059 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1060 * giscanner/ast.py: allow Parameter to take options in the constructor
1061 * giscanner/girparser.py: parse parameter options (transfer,
1062 direction, allow-none)
1064 2008-10-16 Colin Walters <walters@verbum.org>
1066 Bug 556185 - segfault on g_callable_info_get_return_type
1068 Initial patch from John Ehresman.
1070 * tests/repository/*: Add a test using
1071 g_callable_info_get_return_type. Instead of casting a
1072 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1073 to call g_type_info_get_interface.
1075 2008-10-16 Colin Walters <walters@verbum.org>
1077 Bug 556579 - union and struct name misresolved
1079 * giscanner/transformer.py: The calls to _resolve_type_name
1080 for struct/union names was a legacy holdover from when type
1081 resolution had multiple phases. Now it's actively harmful
1082 since we might pull in an identical name from another
1086 2008-10-16 Colin Walters <walters@verbum.org>
1088 Bug 556432 - transfer annotations and defaults
1090 * giscanner/transformer.py: Canonicalize type
1091 after removing *, not before. This ensures that
1092 guchar* is transformed to 'uint8'.
1093 Add some comments here.
1094 * giscanner/glibtransformer.py: Add _adjust_transfer
1095 phase for tweaking GObject transfers.
1098 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1100 * configure.ac: enable bunch of gcc warning CFLAGS
1102 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1104 Bug 556543 – reduce compiler warnings
1106 * girepository/ginfo.c:
1107 * girepository/girepository.c (register_internal,
1108 count_interfaces, find_interface, find_namespace_version,
1109 parse_version, g_irepository_require):
1110 * girepository/girmodule.c (g_ir_module_build_typelib):
1111 * girepository/girnode.c (init_stats, dump_stats,
1112 _g_irnode_init_stats, _g_irnode_dump_stats,
1113 g_ir_node_can_have_member):
1114 * girepository/girparser.c (firstpass_end_element_handler,
1115 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1116 start_alias, start_type, end_type_top, parse_include, cleanup,
1118 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1119 * giscanner/giscannermodule.c (directive_get_options,
1120 type_get_child_list):
1121 * giscanner/scannerlexer.l (parse_gtkdoc):
1122 * giscanner/scannerparser.y (ctype_free):
1123 * giscanner/sourcescanner.c:
1124 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1125 * tests/types/gitesttypes.c:
1126 * tools/compiler.c (main):
1127 * tools/generate.c (write_repository): Remove unused variables
1128 and code, add missing includes, declarations and case
1131 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1133 Bug 556541 – access union members through UnionBlob rather than
1136 * girepository/ginfo.c (g_union_info_find_method): access union
1137 members through UnionBlob rather than StructBlob
1139 2008-10-15 Colin Walters <walters@verbum.org>
1141 Bug 556331 - clean up includes handling
1143 * tools/g-ir-scanner: Rework command line arguments; now we take
1144 --add-include-path and --include separately.
1145 * giscanner/girwriter.py: Separate name= and version= in include
1147 * giscanner/ast.py: Add Include type.
1148 * giscanner/transformer.py: Cleanups to register_include now that
1149 we don't need to handle mixed filenames and relative arguments.
1150 * girepository/girparser.c: Parse name and version separately;
1151 this fixes a bug as a side effect where we weren't resolving
1152 through aliases for basic types.
1153 * girepository/girepository.c: Fix format string args.
1154 * gir/Makefile.am: Update.
1157 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1159 Bug 556434 – unhandled interface/object/... member types
1161 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1162 g_ir_node_build_typelib): Check all
1163 interface/object/boxed/struct/union members are processed and
1164 abort if they are not. (Mostly callbacks in structs, but also
1165 fields in interfaces.)
1167 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1169 * a/girepository/girnode.c (g_ir_node_build_members,
1170 g_ir_node_build_typelib): refactor common code for processing
1171 members to a function
1173 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1175 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1176 transformation is lossless (it's not)
1178 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1180 * tests/Makefile.am: fix tests to compare xml to xml instead of
1181 typelib to xml, and stop on error
1183 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1185 * tools/generate.c (write_type_name, write_type_info,
1186 write_type_info, write_object_info, write_object_info,
1187 write_interface_info, write_error_domain_info): reduce code
1190 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1192 Bug 556174 – parse types for lists etc.
1194 * girepository/girparser.c (end_type_recurse):
1196 * tools/generate.c (write_type_info, write_field_info,
1197 write_callable_info, write_callable_info, write_constant_info,
1198 write_property_info): use nested <type>s for lists and hashes
1200 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1203 * tests/object.gir: remove trailing whitespace from inside
1204 elements to match g-ir-generate output
1206 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1208 * tools/generate.c (xml_printf): quote printf arguments so that
1209 we don't generate invalid XML by writing unescaped double quotes
1210 and such in attributes
1212 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1214 * tools/generate.c (write_field_info, write_callable_info,
1215 write_function_info, write_callback_info, write_struct_info,
1216 write_constant_value, write_signal_info, write_vfunc_info,
1217 write_object_info, write_interface_info, write_union_info,
1218 write_repository): remove unused indent parameters, xmlwriter
1219 keeps track of necessary indentation
1221 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1223 * tools/generate.c (xml_element_new, xml_element_free,
1224 xml_start_element, xml_end_element, xml_end_element_unchecked,
1225 xml_open, xml_close): Keep track of generated XML tree and
1226 handle indentation and closing tags properly.
1227 (write_field_info, write_callable_info, write_function_info,
1228 write_callback_info, write_struct_info, write_value_info,
1229 write_constant_info, write_enum_info, write_signal_info,
1230 write_vfunc_info, write_property_info, write_object_info,
1231 write_interface_info, write_error_domain_info, write_union_info,
1232 write_repository): Use xml_start_element and xml_end_element to
1235 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1237 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1238 (write_type_name, write_type_info, write_field_info,
1239 write_callable_info, write_function_info, write_callback_info,
1240 write_struct_info, write_value_info, write_constant_value,
1241 write_constant_info, write_enum_info, write_signal_info,
1242 write_vfunc_info, write_property_info, write_object_info,
1243 write_interface_info, write_error_domain_info, write_union_info,
1244 write_repository): wrap all FILE access to go through simple xmlwriter
1246 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1248 Bug 556400 – Fails to build on OS X 10.4
1250 * configure.ac: check for functions backtrace and backtrace_symbols
1251 * girepository/girparser.c (backtrace_stderr): Comment out
1252 implementation if the functions are not available.
1253 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1254 directory for better portability
1256 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1258 Bug 556433 – assume direction = out for int * parameters
1260 * giscanner/ast.py: define a list of types for which, if passed as
1261 reference, we assume a default direction of 'out'
1262 * giscanner/transformer.py: if a type has type pointer to one of the
1263 previously defined types, and no direction is set, assume out.
1264 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1266 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1268 * tests/scanner/annotation.c: fixed a few copy-paste errors
1270 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1272 Bug 556323 – transfer-ownership is wrong for functions returning const
1275 * giscanner/transformer.py: check for a const string as return value,
1276 not just const char*. Suggested by Colin Walters
1277 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1279 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1281 * girepository/ginfo.c, girepository/girepository.h: add
1282 g_union_info_find_method
1284 2008-10-14 Colin Walters <walters@verbum.org>
1286 * tests/repository/Makefile.am: Reenable repo test.
1287 * tests/repository/gitestrepo.c: Prepend search
1288 path for $(top_builddir)/gir dir so that we don't
1289 require installation for "make check" to pass.
1291 2008-10-13 Jürg Billeter <j@bitron.ch>
1293 * giscanner/glibtransformer.py:
1294 * tests/scanner/annotation-1.0-expected.gir:
1295 * tests/scanner/drawable-1.0-expected.gir:
1296 * tests/scanner/foo-1.0-expected.gir:
1297 * tests/scanner/utility-1.0-expected.gir:
1299 Support fields in GObject structs
1301 2008-10-13 Jürg Billeter <j@bitron.ch>
1303 * giscanner/ast.py: add signed integer and off_t to type_names
1305 2008-10-12 Jürg Billeter <j@bitron.ch>
1307 * giscanner/girparser.py: Parse bits attribute of fields
1309 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1311 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1312 * tests/repository/gitestrepo.c (main): instantiate
1313 'GCancellable' to ensure the GType is registered before using
1316 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1318 * giscanner/girparser.py: actually add the parsed constant nodes
1320 2008-10-12 Colin Walters <walters@verbum.org>
1322 * girepository/girepository.c: Don't cast DirEntry to Blob,
1323 actually look it up by offset.
1325 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1327 * giscanner/girparser.py: parse constant nodes in gir files
1329 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1331 * giscanner/transformer.py: prefix for constants have an underscore,
1332 so remove them as if they were functions, not objects.
1334 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1336 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1339 2008-10-12 Colin Walters <walters@verbum.org>
1341 Initial patch from Jani Monoses.
1343 * girepository/gtypelib.c: Fix inverted test for success
1346 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1348 * tools/generate.c (write_callable_info): use "transfer-ownership"
1349 attribute for return values
1351 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1353 * tools/generate.c (write_callable_info): move "transfer" and
1354 "null-ok" attributes from <function> to <return-value> element
1356 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1358 * girepository/girparser.c (start_return_value): handle
1359 "transfer-ownership" attribute
1361 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1363 * girepository/girparser.c (parse_param_transfer):
1364 * tools/generate.c (write_callable_info): use "container" for
1365 container/shallow ownership transfer (not "shallow")
1367 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1369 * girepository/girparser.c (parse_param_transfer,
1370 start_parameter): Refactor handling of transfer=none/shallow/full
1371 to separate function
1373 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1375 Bug 556048 – Crash in g_irepository_find_by_gtype
1377 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1378 * girepository/girepository.c (find_interface): Fix
1379 find_by_gtype case to get the type name from right offset
1381 2008-10-12 Jürg Billeter <j@bitron.ch>
1383 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1386 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1388 * girepository/gtypelib.h (RegisteredTypeBlob): make
1389 'unregistered' one bit wide as everywhere else
1391 2008-10-12 Jürg Billeter <j@bitron.ch>
1393 * giscanner/glibtransformer.py:
1394 * tests/scanner/annotation-1.0-expected.gir:
1395 * tests/scanner/drawable-1.0-expected.gir:
1396 * tests/scanner/drawable.h:
1397 * tests/scanner/foo-1.0-expected.gir:
1398 * tests/scanner/utility-1.0-expected.gir:
1400 Readd class records as workaround to not break Gtk typelib
1402 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1404 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1406 2008-10-12 Jürg Billeter <j@bitron.ch>
1408 * giscanner/glibtransformer.py: Don't generate <record> elements
1410 * tests/scanner/*: Update test cases
1412 2008-10-11 Colin Walters <walters@verbum.org>
1414 Bug 552858: versioning
1416 This is a big patch. You should probably remove your installation
1419 * docs/typelib-format.txt: Add nsversion entry which holds
1420 version of namespace.
1421 * girepository/girepository.h: Add 'version' parameter to
1422 g_irepository_require. This may be NULL. Normally
1423 bindings should pass an explicit version though.
1424 * girepository/girepository.c: Lots of infrastructure to
1425 support versioning. Add some more documentation. Disallow
1426 some usage of NULL namespaces.
1427 * girepository/girmodule.c: Add version parameter.
1428 * girepository/gtypelib.c: Update header size.
1429 * giscanner/ast.py: Add version to Namespace.
1430 * giscanner/girparser.py: Parse version attribute from
1431 XML, pass to Namespace.
1432 * giscanner/girwriter.py: Write out version parameter.
1433 * giscanner/transformer.py: Clean up include registration.
1434 * tests/*: Add version attribute.
1435 * tests/invoke/invoke.c: Don't try looking up test before
1436 it's loaded in repository.
1437 * tools/generate.c: Output version parameter.
1438 * gir/Makefile.am: Add 2.0 version to .gir files.
1440 2008-10-11 Colin Walters <walters@verbum.org>
1442 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1443 if we have mismatched parens.
1445 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1447 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1448 on 'members' variable.
1450 2008-10-11 Colin Walters <walters@verbum.org>
1452 Bug 555947 - update annotations syntax
1454 * giscanner/ast.py: Default to None for transfer. Remove
1455 default transfers for container types; we require this to
1457 * giscanner/girwriter.py: Transfer is now 'none', 'container',
1458 'full' to match repository.
1459 * giscanner/scannerlexer.l: Annotations now are parenthesized.
1460 * giscanner/transformer.py: Update for new annotations syntax.
1463 2008-10-11 Johan Bilien <jobi@litl.com>
1465 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1467 2008-10-11 Johan Bilien <jobi@litl.com>
1469 Bug 552347: Parse #defines constants
1471 * girepository/gtypelib.c: update the list of value_size
1472 with recently defined type tags
1473 * giscanner/scannerparser.y: brought back parsing of #defined, as
1474 present in older version
1475 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1476 * giscanner/girwriter.py: write out constant tags in the gir
1477 * giscanner/sourcescanner.py: add accessor for const_string
1478 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1481 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
1483 Bug 555946: Install a test module exercising all types, transfer
1488 * tests/types/*: Add and install a test module that has functions
1489 accepting and returning most of the basic types to enable bindings
1490 implementors to more easily test their type conversion routines.
1492 2008-10-11 Jürg Billeter <j@bitron.ch>
1494 Bug 552374: Const strings should be identified in the gir.
1496 * giscanner/transformer.py: support string memory management
1497 * tests/scanner/foo.h: use char * and const char *
1498 * tests/scanner/foo-expected.gir: test that
1500 2008-10-11 Johan Dahlin <johan@gnome.org>
1502 * giscanner/girparser.py:
1503 Also parse enums which are not glib types.
1505 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1507 Bug 552370: add one more test for unsigned as a type, not as
1510 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
1511 * test/scanner/foo.h: add function which uses unsigned as a type.
1512 * test/scanner/foo-expected.gir: test that.
1514 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
1516 Bug 555712: Struct and union issues
1518 * giscanner/scannerparser.y (struct_declarator): Use information
1519 provided about the bit width of a field.
1520 * giscanner/transformer.py (Transformer._create_member): Pass the
1521 symbol's const_int member to the created field (it represents the
1523 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
1524 field attribute, if present.
1525 * giscanner/ast.py (Field): Add 'bits' member, specifying the
1526 width in bits of the field (only relevant for bitfields).
1529 * giscanner/transformer.py (Transformer._create_typedef_struct)
1530 (Transformer._create_typedef_union): Add calls to _create_struct()
1531 and _create_union(), respectively. This causes the scanner to
1532 generate output for fields of struct and union typedefs.
1535 2008-10-11 Jürg Billeter <j@bitron.ch>
1537 Bug 552370: unsigned not scanned properly
1539 * giscanner/scannerparser.y: combine basic types such as unsigned
1540 int and long long when scanning
1541 * tests/scanner/foo-expected.gir:
1542 * tests/scanner/foo.c: (foo_test_unsigned):
1543 * tests/scanner/foo.h: test that
1545 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1547 Bug 554854: The --typelib-xml and --inject options should reuse
1548 giscanner parser/writer.
1550 * giscanner/ast.py: add constructor list to Struct and Union.
1551 Add new param in Return's contructor to define transfer.
1552 * giscanner/girparser.py: several additions to the parser in order
1553 to have parsing all nodes of the gir xml files.
1554 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
1555 and writer in --inject and --typelib-xml options.
1556 * giscanner/xmlwriter.py: ignore empty attributes instead of
1557 raising an error as this basically exposes a bug in GIRParser.
1558 This should be reverted as soon as the parser is fixed.
1560 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1562 Bug 552376: scanner generates wrong names for enum members when
1563 there's no defined gtype.
1565 * giscanner/utils.py (strip_common_prefix): Always strip common
1566 prefix exactly up to the last "_", and not beyond.
1567 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
1568 here is that the first character after the last '_' should should be
1569 the same as the character in the same position on the type name.
1570 * tests/scanner/foo-expected.gir: test that
1572 2008-10-10 Lucas Rocha <lucasr@gnome.org>
1574 Bug 555293: append library_paths to LPATH env variable to work
1575 around a bug in find_library when using ldconfig.
1577 * tools/g-ir-scanner (main): ditto.
1579 2008-10-09 Lucas Rocha <lucasr@gnome.org>
1581 * girepository/girepository.c (register_internal): fix regression on
1582 invoke test case by making sure we load the global module in the
1583 typelib when dealing with inline typelibs.
1584 * girepository/gtypelib.c: a couple of coding style fixes.
1586 2008-10-06 Lucas Rocha <lucasr@gnome.org>
1588 Bug 555294: Add support for multiple shared libraries per typelib.
1590 * girepository/ginvoke.c (g_function_info_invoke),
1591 girepository/ginfo.c(g_registered_type_info_get_g_type): use
1592 g_typelib_symbol instead of g_module_symbol.
1593 * girepository/girepository.h: remove g_typelib_set_module and add
1595 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
1596 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
1597 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
1598 modules instead of just one. The symbol lookup is now abstracted
1599 behind g_typelib_symbol which tries to find the passed symbol name in
1601 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
1602 and write shared_library attribute as a comma-separated list of libs.
1604 2008-10-06 Colin Walters <walters@verbum.org>
1606 * giscanner/transformer.py: Parse length= annotation as
1607 a parameter name, not a raw int.
1610 2008-10-03 Colin Walters <walters@verbum.org>
1612 Bug 551744: Non-GObject types aren't aggregating ctors and methods
1614 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
1616 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
1620 2008-10-03 Colin Walters <walters@verbum.org>
1622 Bug 554576: scan problem with ev_selection_render_selection()
1624 * giscanner/transformer.py: Only do type resolution once we've
1625 scanned all types. What could happen before is that we'd strip
1626 the namespace from local type "EvSelection" => Selection, and
1627 then later pull a "Selection" from some other namespace because
1628 we hadn't yet seen the local EvSelection. This could come
1629 down to hash table ordering and other things so not easy
1630 to write a test for.
1632 2008-10-03 Lucas Rocha <lucasr@gnome.org>
1634 * giscanner/girwriter.py (_parser_member): fix the last parameter of
1635 GLibEnumMember constructor as it should be the enum member nick.
1637 2008-10-02 Colin Walters <walters@verbum.org>
1639 Bug 552961: remove this parameter for methods
1641 * giscanner/glibtransformer.py: Delete this parameter; it is
1643 * girepository/ginvoke.c: Insert this parameter for methods.
1644 * girepository/gtypelib.c: Remove no longer needed verification of
1645 method this parameter.
1648 2008-09-30 Dan Winship <danw@gnome.org>
1650 Bug 554490: g-ir-scanner gets confused by '\\'
1652 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
1653 backslashes so it will correctly parse '\\' and "\\"
1655 * tests/scanner/annotation.c: add a use of '\\' to make sure that
1658 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
1660 2008-10-02 Colin Walters <walters@verbum.org>
1662 bug 552393: Note variadic functions
1664 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
1665 to use parameter_list directly.
1666 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
1667 * giscanner/ast.py: Add Varargs type.
1668 * giscanner/transformer.py: Check for ellipsis symbol, transform
1670 * girepository/girnode.h: Add varargs flag to in-memory nodes.
1671 Parse varargs functions, but filter them out before we start
1672 compiling the typelib.
1674 2008-10-02 Colin Walters <walters@verbum.org>
1676 Bug 554632: type tag for GType
1678 * girepository/girepository.h, girepository/girepository.c:
1679 Add type tag for GType - it's a special type we don't want
1680 to resolve to just "long".
1681 * docs/typelib-format.txt: Update.
1682 * girepository/girparser.c: Parse it.
1683 * giscanner/glibtransformer.py: Ensure we don't put GType in
1685 * tools/generate.c: Remove hardcoded type list.
1688 2008-09-30 Dan Winship <danw@gnome.org>
1690 Bug 554521: scanner generates wrong names for enum members with
1691 full type name prefix
1693 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
1694 right amount when the entire "first" string is a prefix of
1697 * tests/scanner/foo.h (FooEnumFullname):
1698 * tests/scanner/foo-expected.gir: test that
1700 2008-09-29 Colin Walters <walters@verbum.org>
1702 Bug 552380: Array parameters should be marked in the gir
1704 * giscanner/ast.py: Default char** to utf8[], and guchar* to
1705 uint8[]. Add Array, List, and Map subclasses of Type;
1706 these types can be generic. Return transfer defaults
1707 to true if return value is string or container type.
1708 Delete Sequence type.
1709 * giscanner/scannerlexer.l: Syntax change for annotations;
1710 use <> since it's more readable.
1711 * giscanner/girwriter.py: Write out these changes.
1712 * giscanner/girparser.py: Parse them.
1713 * giscanner/transformer.py: Have a defined set of
1714 both list and map types. When creating a type,
1715 check if the ctype we've parsed is one of them,
1716 if so create a container type subclass as appropriate.
1717 * girepository/girparser.c: Parse in generic types.
1720 2008-09-27 Colin Walters <walters@verbum.org>
1722 * tools/g-ir-scanner: Add --inject option.
1724 2008-09-25 Colin Walters <walters@verbum.org>
1726 Remove non-repository types from GIR
1728 * giscanner/ast.py: The canonical name is 'utf8', not
1730 * giscanner/glibast.py: A few more glib type mappings.
1731 * girepository/girparser.c: We only parse repository types.
1732 * tests/*.gir: Update.
1734 2008-09-23 Colin Walters <walters@verbum.org>
1736 Bug 552566: Add time_t type
1738 We need a type for time_t since it's special in C, and just
1739 mapping it to long precluded bindings from handling it
1742 2008-09-19 Colin Walters <walters@verbum.org>
1744 Bug 552390: Handle capitialization like "DBus" more robustly
1746 The to_underscores function was designed for use against prefixed
1747 names; we need a separate function which will convert names like
1748 DBusFoo into dbus_foo, not d_bus_foo.
1750 2008-09-19 Colin Walters <walters@verbum.org>
1752 Add check to make sure we're not hitting out unresolved types
1754 Validate the "this" argument for methods
1756 Remove heuristic matching of methods to classes based on prefix
1758 It was a broken hack that dated from when we handled underscoring
1759 and capitalization conventions less well.
1761 2008-09-18 Colin Walters <walters@verbum.org>
1763 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
1765 On Darwin, the suffix for installed shared libraries (.dylib) is
1766 different from loadable modules (.so). We use a bit of magic shell
1767 script from Behdad Esfahbod to figure out the right suffix.
1769 2008-09-15 Johan Dahlin <johan@gnome.org>
1771 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
1772 a wrapper for type_qualifier as well.
1774 2008-09-15 Colin Walters <walters@verbum.org>
1776 http://bugzilla.gnome.org/show_bug.cgi?id=552065
1778 * giscanner/ast.py: Add deprecation attributes.
1779 * giscanner/girwriter.py: Write out deprecation data.
1780 * girepository/girparser.c: Relax parsing; deprecated
1781 attribute now includes freeform string.
1782 * giscanner/scannerlexer.l: Parse Deprecated.
1783 * giscanner/transformer.py: Look for deprecated attribute
1785 * tests/scanner/*: Add a Deprecated test.
1787 2008-09-14 Tor Lillqvist <tml@novell.com>
1789 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
1791 2008-09-14 Colin Walters <walters@verbum.org>
1793 * giscanner/glibtransformer.py: Ignore functions with
1796 2008-09-12 Colin Walters <walters@verbum.org>
1798 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
1800 2008-09-12 Colin Walters <walters@verbum.org>
1802 * giscanner/ast.py: Bind pid_t to INT for vte.
1804 2008-09-12 Colin Walters <walters@verbum.org>
1806 * giscanner/girparser.py: Parse c:type for boxed records/unions.
1807 * giscanner/glibast.py: Avoid overwriting ctype.
1808 * giscsanner/transformer.py: Try resolving types using the GType names.
1810 2008-09-12 Colin Walters <walters@verbum.org>
1812 * giscanner/minixpath.py: Code to run an "XPath"
1813 assertion against an XML tree, taken from
1814 gir-repository/gir/tests.py.
1815 * giscanner/Makefile.am: Ship it.
1816 * tools/g-ir-scanner: Add --xpath-assertions option.
1817 * gir/GLib-assertions.txt: Add a few assertions.
1818 * gir/Makefile.am: Run them.
1820 2008-09-11 Colin Walters <walters@verbum.org>
1822 http://bugzilla.gnome.org/show_bug.cgi?id=551737
1824 * giscanner/transformer.py: Fix strip_namespace_func to only strip
1825 prefix if it ends with _. Tweak callback stripping to determine
1826 based on presence of _ whether we need to use strip_namespace_func
1827 or strip_namespace_object.
1829 2008-09-09 Owen Taylor <otaylor@redhat.com>
1831 * docs/typelib-format.txt: Wether => Whether
1833 2008-09-08 Colin Walters <walters@verbum.org>
1835 * girepository/girparser.c: Default to "readable" for properties.
1836 * giscanner/ast.py: Add readable, writable etc.
1837 * giscanner/girwriter.py: Writ them.
1838 * giscanner/glibtransformer.py: Inspect them.
1841 2008-09-07 Colin Walters <walters@verbum.org>
1843 * giscanner/cgobject.py: Add comment.
1845 2008-09-07 Colin Walters <walters@verbum.org>
1847 * giscanner/cgobject.py: Also call g_thread_init.
1849 2008-09-07 Colin Walters <walters@verbum.org>
1851 * giscanner/transformer.py: Fix regression by not
1852 stripping prefix before stripping namespace for unions
1855 2008-09-06 Colin Walters <walters@verbum.org>
1857 * giscanner/transformer.py: If a namespace contains
1858 multiple caps, try stripping both gnomekeyring_ and
1861 2008-09-07 Johan Dahlin <johan@gnome.org>
1863 Bug 551162 – giscanner does not recognize asm and __asm__
1864 * giscanner/scannerlexer.l:
1865 Patch by Jani Monoses.
1867 2008-09-06 Colin Walters <walters@verbum.org>
1869 * girepository/girnode.c: Allow gtype_name
1870 and gtype_init in struct and union.
1871 * girepository/girparser.c: Parse glib:
1872 boxed bits for both structure and union.
1873 * girepository/gtypelib.c: Don't barf
1874 if structure is boxed.
1875 * giscanner/girparser.py: Parse new XML
1877 * giscanner/girwriter.py: Write out new
1879 * giscanner/glibast.py: Define new classes
1880 which are both Boxed and Struct/Union, as
1881 well as an "Other" for everything else.
1882 * giscanner/glibtransformer.py: Handle
1883 boxed types specially; we try to merge
1884 them with a struct/union if one exists,
1885 otherwise fall back to generic boxed.
1887 * tools/generate.c: Write out new format.
1889 2008-09-06 Johan Dahlin <johan@gnome.org>
1891 * giscanner/grealpath.h: Include stdlib.h
1893 * docs/g-ir-generate.1: Remove leading %
1895 2008-09-01 Colin Walters <walters@verbum.org>
1897 * girepository/girparser.c: Look at c:type to determine
1898 whether or not an item is a pointer.
1900 2008-09-01 Johan Dahlin <johan@gnome.org>
1902 * tests/scanner/Makefile.am:
1903 Set PYTHONPATH so the scanner can run
1904 even if you didn't install anything.
1906 2008-09-01 Johan Dahlin <johan@gnome.org>
1909 Post-release version bump
1912 2008-09-01 Johan Dahlin <johan@gnome.org>
1916 2008-08-31 Colin Walters <walters@verbum.org>
1918 * giscanner/glibtransformer.py: Quiet info
1921 2008-08-31 Johan Dahlin <johan@gnome.org>
1924 Bump version to 0.5.0
1926 2008-08-31 Colin Walters <walters@verbum.org>
1928 * giscanner/glibtransformer.py: Follow aliases to ensure
1929 we don't get a constructor returning a basic type.
1930 * giscanner/transformer.py: Add function to follow aliases.
1933 2008-08-31 Johan Dahlin <johan@gnome.org>
1935 * giscanner/scannerlexer.l:
1936 * giscanner/scannerparser.y:
1937 * giscanner/sourcescanner.h:
1938 * giscanner/sourcescanner.py:
1939 Parse GCC extensions in the parser instead of just undeffing them
1940 in the pre-processor.
1942 2008-08-31 Johan Dahlin <johan@gnome.org>
1944 * giscanner/glibtransformer.py:
1945 Clean up a huge if. Do not add methods or constructors
1947 * giscanner/utils.py:
1948 second might be longer than first, check that.
1950 2008-08-31 Johan Dahlin <johan@gnome.org>
1955 2008-08-31 Colin Walters <walters@verbum.org>
1957 * girepository/girparser.c: Don't lose if we
1960 2008-08-31 Colin Walters <walters@verbum.org>
1962 * giscanner/glibtransformer.py: Look for libtool
1963 library in current directory
1964 * tests/scanner - Update.
1966 2008-08-30 Colin Walters <walters@verbum.org>
1968 * docs/typelib-format.txt: Add a guint32
1970 * gir/Makefile.am: Dep on Makefile
1971 * girepository/ginfo.c:
1972 * girepository/girepository.c: Clean up
1973 default typelib handling; remove global
1974 default_typelib variable. Ensure we handle
1975 NULL repository in more places.
1976 Support dependency resolution.
1977 Support lazy loading.
1978 * girepository/girepository.h: Remove
1979 g_irepository_unregister; we don't support
1980 unloading typelibs since really they're
1981 process-global. Update for lazy loading
1983 * girepository/girmodule.c: Use g_new0.
1984 Add dependencies to GirModule.
1985 * girepository/girparser.c: Parse dependencies.
1986 * girepository/gtypelib.c: Add 4 bytes for
1988 * tests/Makefile.am: Kill off gobject.gir,
1989 it conflicts with the real one.
1990 * tests/object.gir: Dep on GObject.
1991 * tools/generate.c: Take --includedir
1992 argument to say which directories to search
1993 for typelibs. Print out dependencies.
1995 2008-08-30 Colin Walters <walters@verbum.org>
1997 * giscanner/glibtransformer.py: Reduce warning noise.
1999 2008-08-29 Colin Walters <walters@verbum.org>
2001 * girepository/ginfo.c: Add some assertions regarding
2002 refcounts, just to be sure.
2003 * giscanner/glibtransformer.py: Blacklist a few more
2006 2008-08-29 Colin Walters <walters@verbum.org>
2008 * giscanner/glibtransformer.py: Blacklist a few
2009 functions that use GError oddly
2011 2008-08-29 Colin Walters <walters@verbum.org>
2013 * girepository/gtypelib.c: Don't crash if no
2016 2008-08-29 Colin Walters <walters@verbum.org>
2018 * girepository/girparser.c: Handle chains of aliases
2019 across modules by ensuring we fully qualify aliases
2022 2008-08-29 Colin Walters <walters@verbum.org>
2024 * girepository/girparser.c: Don't search aliases
2027 2008-08-29 Colin Walters <walters@verbum.org>
2029 * girepository/girparser.c: Rewrite type parsing
2030 to handle both GLib parsing case as well as correctly
2031 handling GLib.List and friends. Don't try to treat
2032 e.g. ListStore as a List.
2034 2008-08-29 Colin Walters <walters@verbum.org>
2036 * girepository/gtypelib.c: Add more context
2039 2008-08-29 Colin Walters <walters@verbum.org>
2041 * giscanner/glibtransformer.py: Add some informative
2042 logging messages in corner cases. Be sure we use
2043 the most recent node set instead of a cache
2044 when generating result set.
2045 * tests/: Remove duplicated bits in expected girs
2046 * girepository/girparser.c: Accept both List (for
2047 compiling GLib) and GLib.List (what the scanner
2050 * tools/generate.c: Generate canonical form.
2052 2008-08-29 Johan Dahlin <johan@gnome.org>
2054 * giscanner/config.py.in:
2055 Use datarootdir instead of datadir to avoid
2056 an autoconf warning.
2058 2008-08-29 Johan Dahlin <johan@gnome.org>
2062 * examples/gdk-pixbuf.gidl:
2064 Update and remove old cruft.
2066 2008-08-29 Johan Dahlin <johan@gnome.org>
2069 * docs/g-ir-compiler.1:
2070 * docs/g-ir-generate.1:
2071 * docs/g-ir-scanner.1:
2072 Add man pages for the generator and compiler.
2074 2008-08-29 Johan Dahlin <johan@gnome.org>
2076 * docs/g-ir-scanner.1: Document
2078 * giscanner/Makefile.am:
2079 * giscanner/gidlparser.py:
2080 * giscanner/gidlwriter.py:
2081 * tools/g-ir-scanner:
2082 Remove gidl support.
2084 2008-08-28 Colin Walters <walters@verbum.org>
2086 * tests/scanner/Makefile.am: Pass the right
2087 --includedir args. Add a Makefile dep.
2088 * tools/compiler.c: Pass includedirs down.
2089 * girepository/girparser.c: Actually put
2090 includedirs in context, pass down. Fix
2093 2008-08-28 Colin Walters <walters@verbum.org>
2095 * gir/Makefile.am: Use --includedir
2096 * girepository/girparser.c: Recursively parse
2097 includes to pull in aliases and expand them.
2098 We need this to avoid putting unknown names in
2100 * tools/compiler.c: Add --includedir option.
2101 * giscanner/ast.py: Map size/ssize to types
2104 2008-08-28 Tor Lillqvist <tml@novell.com>
2106 Make check now runs successfully on Windows.
2108 * tools/compiler.c (write_out_typelib): Use binary mode for output
2111 * girepository/girnode.c: Don't print NULL strings.
2113 * tests/invoke/Makefile.am
2114 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2115 convince libtool to build shared libraries.
2117 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2118 g_assert() instead of printing out expected errors.
2120 2008-08-28 Tor Lillqvist <tml@novell.com>
2122 * girepository/gtypelib.h: Change type of bitfield fields from
2123 guint to the most suitable smaller type. This makes the struct
2124 sizes match the ones on Linux that the sanity check expects when
2125 using gcc -mms-bitfields on Windows.
2127 2008-08-28 Johan Dahlin <johan@gnome.org>
2132 * giscanner/Makefile.am:
2133 * tests/Makefile.am:
2134 * tests/scanner/Makefile.am:
2135 Make distcheck pass.
2137 2008-08-27 Johan Dahlin <johan@gnome.org>
2139 * giscanner/Makefile.am:
2140 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2142 2008-08-27 Tor Lillqvist <tml@novell.com>
2144 Make g-ir-scanner work on Windows. Still problems with the typelib
2145 code. Changes okayed by jdahlin.
2147 * configure.ac: Check for Windows, set Automake conditional
2148 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2149 avoid shell quoting issues
2151 * girepository/Makefile.am: Use -no-undefined so that libtool
2152 agrees to build a shared library on Windows.
2154 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2155 Windows. Empty implementation on Windows so far.
2157 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2158 informative error message for the assertion failures. Tell also
2159 what the expected size of the struct is. Check all sizes first and
2160 fail afterwards if at least one size was different from expected.
2162 * tools/Makefile.am: Reorder libraries into proper logical
2165 * tools/generate.c: Don't include <dlfcn.h>, not used.
2167 * giscanner/Makefile.am: On Windows, link with the Python library,
2168 and install the module DLL as _giscanner.pyd. Remove the
2169 unnecessary import library and libtool library that libtool has
2172 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2173 and just skip it. Recognize also two "l" suffixes for long long
2174 constants. Recognize also __inline__.
2176 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2177 GetFullPathName(). As such, GetFullPathName() does more than the
2178 UNIX realpath(). It also changes relative paths into absolute
2179 paths. But for our purposes that shouldn't matter.
2181 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2182 Windows the file descriptor passed to us is from Python. Python
2183 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2184 uses msvcrt.dll. On Windows, file descriptors are specific to
2185 which C library is used. So we must find out what underlying OS
2186 handle corresponds to the file descriptor Python passes us, and
2187 then make that into a file descriptor valid for the C library this
2190 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2191 __attribute__ as the lexer now handles it. The definition as empty
2192 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2193 __attribute__. Close the temp file before unlinking it.
2195 * giscanner/cgobject.py: Use correct library name for the gobject
2198 * gir/Makefile.am: Must pass the full basename of the DLLs on
2199 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2200 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2201 reality they won't change, until there is a GLib 3, and then also
2202 the Unix code here needs changing.
2204 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2207 2008-08-26 Colin Walters <walters@verbum.org>
2209 * girepository/girepository.c: Search
2210 $DATADIR/girepository instead of
2211 $DATADIR/gitypelibs; this naming makes
2212 it clearer that e.g. jgir can install
2214 * gir/Makefile.am: Install there.
2216 2008-08-26 Colin Walters <walters@verbum.org>
2218 * girepository/gtypelib.c (_g_typelib_init): Also
2219 use G_MODULE_SUFFIX instead of hardcoding .so.
2221 2008-08-26 Colin Walters <walters@verbum.org>
2223 * girepository/gtypelib.c (_g_typelib_init): Free
2224 string in the right place.
2226 2008-08-26 Colin Walters <walters@verbum.org>
2228 * girepository/gtypelib.c (_g_typelib_init): Handle
2229 both .la and .so names; this works better in the
2230 uninstalled library case.
2232 2008-08-26 Johan Dahlin <johan@gnome.org>
2235 * giscanner/Makefile.am:
2236 * giscanner/cgobject.py:
2237 * giscanner/config.py.in:
2238 * giscanner/sourcescanner.py:
2239 Avoid undeffing __GNUC__, instead define
2240 __attribute__ & friends. Remove glibconfig.h hack.
2241 This makes gobject-introspection work better on
2242 MacOS X, Thanks to Richard Hult for kind help.
2244 2008-08-25 Colin Walters <walters@verbum.org>
2246 * giscanner/glibtransformer.py: Always print
2249 2008-08-25 Colin Walters <walters@verbum.org>
2251 * giscanner/glibtransformer.py: Skip over
2252 interfaces we don't know.
2254 2008-08-25 Colin Walters <walters@verbum.org>
2256 * girepository/girparser.c: Parse new implements
2257 syntax, drop gapi one.
2258 * tests/object.gir: Update.
2259 * tools/generate.c: Generate new syntax.
2261 2008-08-25 Colin Walters <walters@verbum.org>
2263 * giscanner/ast.py: Add interfaces property
2265 * giscanner/girwriter.py: Write out implemented
2267 * giscanner/glibtransformer.py: Introspect
2268 implemented interfaces.
2269 * tests/scanner/*: Make FooObject implement
2272 2008-08-25 Colin Walters <walters@verbum.org>
2274 * giscanner/glibtransformer.py: More correctly pair
2275 methods; if we have a symbol that starts with
2276 e.g. hippo_canvas look for a matching HippoCanvas
2277 class before accepting e.g. HippoCanvasImage.
2279 2008-08-24 Colin Walters <walters@verbum.org>
2281 * tools/g-ir-scanner: Filter out unknown options from
2284 2008-08-24 Colin Walters <walters@verbum.org>
2286 * giscanner/glibtransformer.py: Fail with better
2287 error if we can't find library.
2289 2008-08-24 Colin Walters <walters@verbum.org>
2291 * tools/g-ir-scanner: Use subprocess instead of
2292 commands, works on Windows and avoids the evil
2295 2008-08-24 Colin Walters <walters@verbum.org>
2297 * giscanner/glibtransformer.py: Skip over
2298 g_object_get_type from GLib trunk.
2300 2008-08-24 Colin Walters <walters@verbum.org>
2302 * girepository/girepository.c (g_irepository_require):
2303 Don't open shared library here; we already do it
2306 2008-08-24 Colin Walters <walters@verbum.org>
2308 * girepository/gtypelib.c: Add context stack so
2309 when we get an error we can print out nicely
2312 2008-08-24 Johan Dahlin <johan@gnome.org>
2314 * girepository/girparser.c (start_glib_boxed), (start_function),
2315 (start_field), (start_alias):
2316 Refactor a couple of parsing functions to be simpler to follow.
2319 2008-08-24 Johan Dahlin <johan@gnome.org>
2321 * girepository/girparser.c (start_function):
2322 Remove left-over code, checking type of function.
2324 2008-08-23 Colin Walters <walters@verbum.org>
2326 * giscanner/config.py: Define DATADIR.
2327 * giscanner/transformer.py: Look in DATADIR.
2329 2008-08-23 Colin Walters <walters@verbum.org>
2331 * girepository/gtypelib.c: Check constructor
2333 * girepository/girnode.c: Small tweaks.
2334 * girepository/ginfo.c: Calculate signature offsets
2336 * girepository/girparser.c: Remove duplicate
2338 * giscanner/glibtransformer.py: Avoid marking
2339 functions which return a basic type as
2342 2008-08-23 Colin Walters <walters@verbum.org>
2344 * girepository/girparser.c: Ignore <include>.
2345 * giscanner/girparser.py: Parse them.
2346 * giscanner/girwriter.py: Generate them.
2347 * giscanner/transformer.py: Process <include>
2348 recursively. Don't require full path for
2349 includes, look in {$XDG_DATA_DIRS}/gir.
2350 * tools/g-ir-scanner: Pass through includes.
2351 * Makefile.am: Remove extra --include
2353 * *-expected.gir: Add expected includes.
2355 2008-08-23 Johan Dahlin <johan@gnome.org>
2357 * tests/scanner/Makefile.am:
2358 * tests/scanner/annotation-expected.gir:
2359 * tests/scanner/drawable-expected.gir:
2360 Avoid duplication in the Makefile, regenerate with new
2361 namespaces (same as the filename)
2363 2008-08-22 Colin Walters <walters@verbum.org>
2365 * girepository/girnode.c: Don't hardcode integers,
2368 2008-08-22 Johan Dahlin <johan@gnome.org>
2370 * giscanner/sourcescanner.py:
2371 Check for ../gobject-introspection-1.0.pc.in to determine
2372 if we run installed or uninstalled.
2374 2008-08-22 Johan Dahlin <johan@gnome.org>
2377 * giscanner/sourcescanner.py:
2378 Send in undefs/defines via writing it directly to stdin
2379 of cpp instead of via arguments.
2381 2008-08-22 Colin Walters <walters@verbum.org>
2383 * tools/generate.c, tools/compiler.c: Default
2385 * all Makefile.am: Update.
2387 2008-08-22 Colin Walters <walters@verbum.org>
2389 * girepository/girparser.c: Pass through
2390 recursive types. Avoid overwriting errors.
2391 * giscanner/xmlwriter.py: Always write the
2393 * tests/*.gir: Adjust.
2394 * tests/scanner/Makefile.am: Build typelibs,
2395 and generate XML from those. Once we
2396 have a good diff mechanism...
2397 * tests/scanner/*-expected.gir: Add XML
2399 * tools/g-ir-scanner: Accept --typelib-xml
2401 * tools/generate.c: Better defaults for transfer.
2403 2008-08-22 Johan Dahlin <johan@gnome.org>
2407 * giscanner/Makefile.am:
2408 * giscanner/config.py.in:
2409 * giscanner/sourcescanner.py:
2410 Use the generated glibconfig.h for all scanner invokations.
2411 Rename it to glibconfig-scanner.h and install it.
2412 Add a config.py which so far contains the include dir.
2414 2008-08-22 Johan Dahlin <johan@gnome.org>
2417 Replace glibconfig.h with our own, do some replacement
2418 for CPP/C features we do not support
2420 2008-08-22 Colin Walters <walters@verbum.org>
2422 * tools/generate.c (write_callable_info): Fix unref
2425 2008-08-22 Colin Walters <walters@verbum.org>
2427 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2428 * tests/Makefile.am: Support $(DEBUG)
2429 * tools/generate.c: Do immediate close tags if no
2432 2008-08-21 Colin Walters <walters@verbum.org>
2434 * tests/scanner/drawable-expected.gir,
2435 * tests/scanner/drawable.c,
2436 * tests/scanner/drawable.h:
2439 2008-08-21 Colin Walters <walters@verbum.org>
2441 * giscanner/glibtransformer.py: Compute prefix
2442 by searching through the symbol for bits
2443 rather than going directly from ctype; this fixes
2446 2008-08-21 Colin Walters <walters@verbum.org>
2448 * giscanner/glibtransformer.py: Also try squashing
2449 underscores from namespace, fixes webkit_web_view_new.
2451 2008-08-21 Colin Walters <walters@verbum.org>
2453 * giscanner/glibtransformer.py: More ctor work,
2454 avoid having gtk_window_group_new end up under
2457 2008-08-21 Colin Walters <walters@verbum.org>
2459 * giscanner/glibtransformer.py: Much simpler approach
2460 of mapping uscored names to classes.
2461 * giscanner/utils.py: Remove unnecessary function.
2463 2008-08-21 Johan Dahlin <johan@gnome.org>
2465 * girepository/girepository.c (g_irepository_require):
2466 Plug memory leak and avoid using freed memory.
2467 Resolve the whole module path, here as well.
2469 2008-08-21 Colin Walters <walters@verbum.org>
2471 * giscanner/glibtransformer.py: Look up all permutations
2472 of class names when scanning methods/ctors based on
2473 the prefix instead of using the return value. This
2474 associates gtk_window_new with the right class.
2476 2008-08-21 Colin Walters <walters@verbum.org>
2478 * girepository/girmodule.c (g_ir_module_build_typelib):
2479 Revert change to increment header_size; we do that in
2482 2008-08-21 Colin Walters <walters@verbum.org>
2484 * girepository/girnode.c (write_string): Tweak to
2485 use UINT instead of INT. Not likely to matter.
2486 * girepository/girmodule.c (g_ir_module_build_typelib):
2487 Add to header_offset as well for header strings
2488 to match what write_string does.
2489 * girepository/gtypelib.c: Replace is_name with
2490 validate_name, which more strongly validates and
2491 handles errors in a better way. Update all callers.
2492 * giscanner/glibtransformer.py: Handle constructors
2495 2008-08-21 Johan Dahlin <johan@gnome.org>
2497 * gir/Makefile.am (typelibs_DATA): Build and
2498 install the Gio.typelib too
2500 * girepository/gtypelib.c (_g_typelib_init):
2501 Use g_module_build_path to resolve the shlib name
2503 2008-08-21 Colin Walters <walters@verbum.org>
2505 * gir/Makefile.am: CLEANFILES typelibs too.
2507 2008-08-21 Johan Dahlin <johan@gnome.org>
2509 * giscanner/glibtransformer.py:
2510 Do not send .la files through find_library.
2512 2008-08-21 Colin Walters <walters@verbum.org>
2514 * girepository/girparser.c (g_irepository_require):
2515 Fix one small leak in error case.
2517 2008-08-21 Johan Dahlin <johan@gnome.org>
2520 Parse glibconfig.h as well and install the compiled
2523 2008-08-21 Johan Dahlin <johan@gnome.org>
2526 * giscanner/glibtransformer.py:
2527 * tools/g-ir-scanner:
2528 Do not hard-core library names in the Makefile, reuse
2529 ctypes find_library instead.
2531 2008-08-21 Johan Dahlin <johan@gnome.org>
2533 * girepository/girparser.c (resolve_aliases):
2534 Remove compilation warnings
2536 2008-08-21 Johan Dahlin <johan@gnome.org>
2538 * girepository/girepository.c (g_irepository_require):
2539 Rewrap and fix double free bug by leaking a bit.
2541 2008-08-20 Colin Walters <walters@verbum.org>
2543 * girepository/girepository.c: Add new function
2544 g_irepository_get_typelib_path which tells
2545 us from where we loaded a namespace.
2547 2008-08-20 Colin Walters <walters@verbum.org>
2549 * tests/scanner/*-expected.gir: Adjust for
2550 added shared-library.
2551 * giscanner/giwriter.py: Make pylint happy.
2553 2008-08-20 Colin Walters <walters@verbum.org>
2555 * girepository/girmodule.c (g_ir_module_build_typelib):
2556 Calculate size correctly, avoid use-after-free.
2558 2008-08-20 Colin Walters <walters@verbum.org>
2560 * girepository/girepository.c: Remove
2561 g_irepository_register_file in favor of
2562 g_irepository_require. There are two
2563 possible deployment scenarios for typelibs:
2564 First, separate in $DATADIR/gitypelibs/. Second,
2565 they may be embedded in shlibs. However since
2566 the first is now the normal case, the API is
2567 optimized around it.
2569 Refactor internals to look up typelibs for
2570 namespaces just-in-time, but we expect
2571 consumers to call g_irepository_require.
2573 Also, add some docs. No one has died from that
2575 * gir/Makefile.am: Need --library for glib.
2576 * giscanner/girwriter.py: Write out shared-library.
2577 * tools/g-ir-writer: Take the first --library
2578 argument as the target of shared-library. In
2579 the future we should make this nicer with pkg-config
2582 2008-08-20 Colin Walters <walters@verbum.org>
2584 * girepository/girparser.py: And parse them.
2586 2008-08-20 Johan Dahlin <johan@gnome.org>
2588 * giscanner/glibast.py: Add gshort/gushort types
2590 2008-08-20 Colin Walters <walters@verbum.org>
2592 * gir/Makefile.am: Rename .gir files using GI namespace.
2593 * girepository/girepository.c: Use XDG_DATA_DIRS for
2594 looking up typelibs. Also typelibs are now suffixed
2596 * tests/invoke/Makefile.am: Only use metadata.
2597 * girepository/Makefile.am: Remove unnecessary include.
2598 * tests/scanner/Makefile.am: Update using GI namespaces
2599 for scanner includes.
2601 2008-08-20 Colin Walters <walters@verbum.org>
2603 * girepository/transformer.py: Suppress aliases whose
2605 * girepository/ast.py: Define some more aliases.
2607 2008-08-20 Colin Walters <walters@verbum.org>
2609 * girepository/girparser.c: Avoid alias infloops.
2611 2008-08-20 Colin Walters <walters@verbum.org>
2613 * tests/scanner/foo-expected.gir: Fix expected list type.
2615 2008-08-20 Johan Dahlin <johan@gnome.org>
2617 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
2618 Add a workaround for #548689.
2619 We can now compile gtk!
2621 2008-08-20 Colin Walters <walters@verbum.org>
2623 * giscanner/glibtransformer.py: Try to look up
2624 aliases using the c:type too.
2626 2008-08-20 Colin Walters <walters@verbum.org>
2628 * girepository/girparser.c: Parse union fields.
2630 2008-08-20 Johan Dahlin <johan@gnome.org>
2632 * giscanner/ast.py: Make time_t an alias for long
2634 * gir/gio-2.0-good.gir:
2635 * gir/glib-2.0-good.gir:
2636 * gir/gobject-2.0-good.gir:
2638 * giscanner/glibtransformer.py:
2639 Do not delete Class structures, we need them in gdk/gtk.
2640 * tests/scanner/drawable-expected.gir:
2641 * tests/scanner/foo-expected.gir:
2642 * tests/scanner/utility-expected.gir:
2645 2008-08-20 Johan Dahlin <johan@gnome.org>
2647 * tests/scanner/Makefile.am:
2648 * tests/scanner/annotation-expected.gir:
2649 * tests/scanner/annotation.c (annotation_object_class_init),
2650 (annotation_object_init), (annotation_object_method),
2651 (annotation_object_in), (annotation_object_out),
2652 (annotation_object_inout), (annotation_object_inout2),
2653 (annotation_object_inout3), (annotation_object_calleeowns),
2654 (annotation_object_calleesowns), (annotation_object_get_strings),
2655 (annotation_object_with_voidp), (annotation_object_get_objects),
2656 (annotation_object_create_object), (annotation_object_allow_none):
2657 * tests/scanner/annotation.h:
2658 * tests/scanner/foo-expected.gir:
2659 * tests/scanner/foo.c:
2660 * tests/scanner/foo.h:
2661 Split out annotation tests out of foo
2663 2008-08-20 Johan Dahlin <johan@gnome.org>
2665 * tests/scanner/Foo-expected.gir:
2666 * tests/scanner/Makefile.am:
2667 * tests/scanner/foo-expected.gir:
2668 * tests/scanner/foo-object.h:
2669 * tests/scanner/foo.c:
2670 Foo->foo, foo-object.h -> foo.h
2672 2008-08-20 Johan Dahlin <johan@gnome.org>
2674 * tests/scanner/Foo-expected.gir:
2675 * tests/scanner/Makefile.am:
2676 * tests/scanner/drawable-expected.gir:
2677 * tests/scanner/drawable.c (test_drawable_class_init),
2678 (test_drawable_init):
2679 * tests/scanner/drawable.h:
2680 * tests/scanner/foo-object.h:
2681 * tests/scanner/foo.c (foo_boxed_method):
2682 Move the drawable parts out of Foo to its own test.
2684 2008-08-20 Johan Dahlin <johan@gnome.org>
2686 * tests/scanner/Foo-expected.gir:
2687 * tests/scanner/foo-object.h:
2688 * tests/scanner/foo.c (foo_drawable_class_init),
2689 (foo_drawable_init):
2690 Add a based on GdkDrawable which generates
2693 2008-08-19 Colin Walters <walters@verbum.org>
2695 * giscanner/transformer.py: Don't try
2696 to strip prefix before namespace.
2698 2008-08-19 Johan Dahlin <johan@gnome.org>
2700 * giscanner/transformer.py:
2701 * tests/scanner/Foo-expected.gir:
2702 * tests/scanner/foo-object.h:
2703 Add support for typedef void foo type of
2706 2008-08-19 Johan Dahlin <johan@gnome.org>
2709 * giscanner/girwriter.py:
2710 * giscanner/glibtransformer.py:
2711 * giscanner/transformer.py:
2712 * tests/scanner/Foo-expected.gir:
2713 Add basic support for union, base the code much
2714 on Struct. Add a testcase.
2716 2008-08-19 Johan Dahlin <johan@gnome.org>
2718 * tests/scanner/Foo-expected.gir:
2719 * tests/scanner/foo-object.h:
2720 Add a union testcase which the compiler currently
2723 2008-08-19 Johan Dahlin <johan@gnome.org>
2725 * gobject-introspection-1.0.pc.in:
2726 Add a g_ir_compiler variable
2728 2008-08-19 Colin Walters <walters@verbum.org>
2730 * giscanner/ast.py: Rework types to be more closely
2732 * giscanner/girparser.py: Parse more bits.
2733 * giscanner/girwriter.py: Write sequences in a new
2734 way that specifies container type.
2735 * giscanner/glibast.py: Adjust for ast.py changes,
2736 add 'ctype' property to GLibObject and GLibInterface
2737 so we can look things up by it later.
2738 * gicanner/transformer.py: Names is new class holding
2739 the various namespaces we manage. Do not confuse
2740 with Namespace which is toplevel XML node effectively.
2741 Rework all type resolution to go through
2742 _resolve_type_name_1.
2743 * giscanner/glibtransformer.py: Raise UnknownTypeError
2744 instead of ValueError for cleanliness. Add Unresolved
2745 class to mark types whose parent we haven't seen yet.
2746 Use new Names object from transformer.py.
2747 Correctly look up parent=.
2748 Fix type validation to handle sequences.
2749 * tests/scanner/Foo-expected.gir: Update for sequence
2750 work, int instead of int32.
2751 * tools/g-ir-scanner: Add --noclosure option
2752 * gir/Makefile.am: Use --noclosure by default for
2755 2008-08-18 Johan Dahlin <johan@gnome.org>
2757 * gir/gio-2.0-good.gir:
2758 * gir/glib-2.0-good.gir:
2759 * gir/gobject-2.0-good.gir:
2762 2008-08-18 Johan Dahlin <johan@gnome.org>
2765 * giscanner/girparser.py:
2766 * giscanner/girwriter.py:
2767 * giscanner/glibast.py:
2768 * giscanner/glibtransformer.py:
2769 * giscanner/transformer.py:
2770 * tests/scanner/Foo-expected.gir:
2771 * tests/scanner/foo-object.h:
2772 * tests/scanner/utility-expected.gir:
2773 * tests/scanner/utility.h:
2774 Redo type resolving and validation.
2775 Add a couple of new tests.
2776 Patch mostly written by Colin.
2778 2008-08-18 Johan Dahlin <johan@gnome.org>
2781 * giscanner/girparser.py:
2783 * giscanner/transformer.py:
2784 Improve enum parsing for enums without a GType.
2785 Make flags/enum references to other girs work
2786 * giscanner/utils.py:
2788 * tests/scanner/Makefile.am:
2789 * tests/scanner/foo-object.h:
2790 * tests/scanner/utility-expected.gir:
2791 * tests/scanner/utility.h:
2792 Add a new test for external enum references
2794 2008-08-18 Johan Dahlin <johan@gnome.org>
2796 * docs/global-module-registry.txt: Update
2798 * tests/array.gir: Update with new type proposal
2800 * girepository/girepository.c (g_type_tag_to_string):
2801 * girepository/girepository.h:
2802 * girepository/girnode.c (g_ir_node_get_full_size_internal),
2804 * girepository/girnode.h:
2805 Make enum serializing functions public. Clean up some whitespace.
2807 2008-08-17 Johan Dahlin <johan@gnome.org>
2809 * docs/global-module-registry.txt:
2810 Add a document for an on disk module registry format
2812 2008-08-17 Johan Dahlin <johan@gnome.org>
2815 * gir/gio-2.0-good.gir:
2818 2008-08-17 Johan Dahlin <johan@gnome.org>
2821 * gir/glib-2.0-good.gir:
2822 * gir/gobject-2.0-good.gir:
2823 * giscanner/cgobject.py:
2824 * giscanner/glibtransformer.py:
2825 Regenerate GObject & GType.
2826 Avoid warnings when generating gobject-2.0.gir.
2827 Introspect a little more, and skip *_get_type functions.
2829 2008-08-17 Colin Walters <walters@verbum.org>
2831 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
2832 Rename to -good, always generate during build.
2833 * gir/Makefile.am: Ensure .gir files dep on
2834 all scanner sources.
2835 * Makefile.am: Switch build order to ensure
2836 the scanner is ready before we do gir/.
2837 * tools/g-ir-scanner: Look for .git too.
2839 2008-08-17 Johan Dahlin <johan@gnome.org>
2841 * girepository/gtypelib.c (validate_enum_blob):
2842 * giscanner/glibtransformer.py:
2843 * giscanner/transformer.py:
2844 Remove resolve_possible_typedefs, it was unused.
2845 Allow multiple enum values of the sample value in an enum,
2846 since it's actually pretty common.
2847 Register enums so they can be resolved too.
2849 2008-08-16 Johan Dahlin <johan@gnome.org>
2851 * giscanner/girparser.py:
2852 Parse enumeration/bitfield.
2854 2008-08-16 Johan Dahlin <johan@gnome.org>
2856 * giscanner/girparser.py:
2859 2008-08-16 Johan Dahlin <johan@gnome.org>
2861 * giscanner/glibtransformer.py:
2862 Resolve type names for alias targets
2863 * giscanner/transformer.py:
2864 Skip FILE* parameters fow now
2866 2008-08-16 Johan Dahlin <johan@gnome.org>
2869 * gir/gobject-2.0.gir:
2872 * tests/scanner/Makefile.am:
2875 2008-08-15 Colin Walters <walters@verbum.org>
2877 * giscanner/glibtransformer.py: Explicitly construct
2878 new list, since we're deleting as we iterate.
2879 Don't delete all structures which end in Class; just
2880 ones which have a paired GObject.
2881 Fix printing of type warning.
2882 * giscanner/transformer.py: Make strip_namespace_object
2883 be the identity function if it doesn't match the
2886 2008-08-15 Colin Walters <walters@verbum.org>
2888 * giscanner/cgobject.py: Define yet more argument
2889 prototypes; fix prototype for g_type_fundamental.
2891 2008-08-14 Johan Dahlin <johan@gnome.org>
2893 * tests/Makefile.am:
2894 * tests/constant.gir:
2895 * tests/gobject.gir:
2897 * tools/generate.c (write_struct_info):
2898 Fix generator for constant/gobject/struct
2900 2008-08-14 Johan Dahlin <johan@gnome.org>
2902 * tests/Makefile.am:
2904 * tools/generate.c (write_enum_info):
2905 Fix generation of enum/bitfields
2907 2008-08-14 Johan Dahlin <johan@gnome.org>
2909 * girepository/girparser.c (start_field), (start_constant),
2910 (start_type), (end_element_handler):
2911 Clear up constant parsing
2916 * tools/generate.c (write_callable_info), (write_function_info),
2917 (write_callback_info), (write_constant_info), (write_signal_info),
2918 (write_vfunc_info), (write_property_info), (write_object_info),
2919 (write_interface_info):
2920 Constants/Signals are handled now.
2922 2008-08-14 Johan Dahlin <johan@gnome.org>
2924 * girepository/girparser.c (start_type):
2925 Don't require c:type.
2926 * tests/Makefile.am:
2929 Update, remove parts we don't support yet
2930 * tests/roundtrips.sh:
2932 * tools/generate.c (write_type_info), (write_field_info),
2933 (write_callable_info), (write_struct_info):
2934 Make it emit proper gir.
2936 2008-08-14 Johan Dahlin <johan@gnome.org>
2938 * giscanner/transformer.py:
2939 New internal function for adding a new node.
2941 2008-08-14 Johan Dahlin <johan@gnome.org>
2944 Define an internal _H_ variable so we skip parsing both
2945 i18n headers, only one is needed.
2947 Add the glib-2.0.gir too.
2948 * giscanner/glibast.py:
2949 Add gconstpointer as an alias for ANY
2950 * giscanner/transformer.py:
2951 Do not lower case enumeration names per se.
2952 Skip functions which has parameters called 'va_list'
2954 2008-08-14 Colin Walters <walters@verbum.org>
2956 * giscanner/transformer.py: Comment data structures.
2957 Also squash pointers in resolve_type_name to correspond
2958 with what we do for params.
2959 * giscanner/glibtransformer.py: Print warnings in more
2960 situations. Rework checks for method/constructor to
2961 look up in our GType database instead of just checking
2962 for *. Avoid generating <record> for GObject which
2963 duplicate the <class>.
2964 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
2967 2008-08-14 Johan Dahlin <johan@gnome.org>
2969 * giscanner/girwriter.py:
2970 * giscanner/glibast.py:
2971 * giscanner/glibtransformer.py:
2972 * giscanner/transformer.py:
2974 * tests/Makefile.am:
2975 Add pyflakes.py and run it in make check.
2976 Update the source code to fix the errors reported by
2979 2008-08-14 Johan Dahlin <johan@gnome.org>
2982 * giscanner/girparser.py:
2983 * giscanner/glibast.py:
2984 * giscanner/glibtransformer.py:
2985 Refactor the parser a bit.
2986 Add parent type to interfaces and update callsites.
2988 2008-08-14 Johan Dahlin <johan@gnome.org>
2990 * giscanner/glibtransformer.py:
2991 * giscanner/utils.py:
2992 Refactor a bit, avoid isinstance and add a method
2993 for each type we parse.
2995 2008-08-14 Johan Dahlin <johan@gnome.org>
2998 * giscanner/girparser.py:
2999 * giscanner/glibtransformer.py:
3000 * tests/Makefile.am:
3001 Run pep8.py in make check, fix old errors.
3003 2008-08-13 Colin Walters <walters@verbum.org>
3005 * giscanner/girparser.py: Parse records.
3007 2008-08-13 Colin Walters <walters@verbum.org>
3009 * gir/Makefile.am: Install again.
3010 * gir/gobject-2.0.gir: Add some more bits.
3012 2008-08-13 Colin Walters <walters@verbum.org>
3014 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3015 * giscanner/girparser.py: Handle aliases.
3016 * giscanner/transformer.py: Record aliases. Make resolver
3017 functions public; we now call into these explicitly from
3018 glibtransformer. Handle resolving aliases.
3019 * giscanner/glibtransformer.py: Separate our internal namespace
3020 from included ones. Call up into transformer's resolver functions.
3022 2008-08-13 Johan Dahlin <johan@gnome.org>
3024 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3025 * girepository/girparser.c (start_class):
3026 * giscanner/glibtransformer.py:
3027 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3029 2008-08-13 Johan Dahlin <johan@gnome.org>
3031 * giscanner/cgobject.py:
3032 Register GInitiallyUnowned
3033 * giscanner/girwriter.py:
3034 * giscanner/glibtransformer.py:
3035 Special case GObject/GInitially owned as they are a bit special to use.
3037 2008-08-13 Colin Walters <walters@verbum.org>
3039 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3040 Object is in GObject namespace.
3042 2008-08-13 Colin Walters <walters@verbum.org>
3044 * giscanner/girparser.py: Fix processing of functions
3047 2008-08-13 Colin Walters <walters@verbum.org>
3049 * giscanner/girparser.py: Parse more than just <class.
3050 * giscanner/glibtransformer.py: Put aliases in a separate
3051 data structure since their name is not canonicall.
3052 * giscanner/transformer.py: Handle resolving type names
3055 2008-08-13 Johan Dahlin <johan@gnome.org>
3057 * tools/g-ir-scanner:
3058 Allow multiple libraries
3059 * giscanner/glibtransformer.py:
3060 Rename load_library to add_library, traverse over all libraries
3061 when trying to resolve a function
3063 2008-08-12 Colin Walters <walters@verbum.org>
3065 * giscanner/transformer.py: Record typedefs as <alias> elements.
3066 Also attempt to look up types in external namespaces.
3067 * giscanner/girwriter.py: Write them.
3068 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3069 checks. Resolve interface methods and properties.
3070 * tests/scanner/foo-object.h: Add a method with typedef.
3071 * tests/scanner/Foo-expected.gir: Update.
3072 * girepository/girnode.c: Debug tweaks.
3073 * girepository/girparser.c: Make a first pass through the XML where we
3074 record all the aliases. This lets us resolve them as we go through the
3076 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3077 from gir-repository.
3079 2008-08-12 Colin Walters <walters@verbum.org>
3081 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3082 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3084 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3086 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3088 2008-08-12 Colin Walters <walters@verbum.org>
3090 * giscanner/glibtransformer.py: Also transform object properties.
3092 2008-08-12 Colin Walters <walters@verbum.org>
3094 * giscanner/glibtransformer.py: Also transform callbacks
3095 and structure field types.
3096 * tests/scanner/Fooe-expected.gir: Update to expect correct
3097 names for callbacks and structs.
3099 2008-08-12 Colin Walters <walters@verbum.org>
3101 * girepository/girparser.c: Handle 'any'.
3102 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3103 Add test for void *.
3105 2008-08-12 Colin Walters <walters@verbum.org>
3107 * giscanner/glibtransformer.py: We need to do type
3108 resolution in a second pass after we've seen all the
3109 enums, records, etc.
3111 2008-08-12 Colin Walters <walters@verbum.org>
3113 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3114 Add enum return value.
3115 * giscanner/glibtransformer.py: Transform function return types
3118 2008-08-12 Colin Walters <walters@verbum.org>
3120 * tests/scanner/Makefile.am: Dep .gir files on scanner
3121 sources too. Also remove @ so we see scanner invocations.
3123 2008-08-12 Colin Walters <walters@verbum.org>
3125 * girepository/girparser.c, girepository/gtypelib.c,
3126 girepository/gtypelib.h, girepository/girnode.c:
3127 Remove usage of (GAPI-oriented) TypeTag in favor of
3128 GITypeTag from girepository.h.
3130 2008-08-10 Colin Walters <walters@verbum.org>
3132 * tests/roundtrips.sh: Use the correct tests.
3134 2008-08-10 Colin Walters <walters@verbum.org>
3136 * giscanner/cgobject.py: Declare/wrap a few more functions.
3137 Fix parameter types for g_object_new and g_type_fundamental.
3139 2008-08-10 Colin Walters <walters@verbum.org>
3141 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3142 us to declare types for both return value and parameters. The
3143 ctypes default of 'int' is bad because it hides 32/64 bit
3144 problems. Convert all existing functions to use it.
3146 2008-08-09 Johan Dahlin <johan@gnome.org>
3148 * giscanner/__init__.py:
3150 * giscanner/cgobject.py:
3151 * giscanner/gidlparser.py:
3152 * giscanner/gidlwriter.py:
3153 * giscanner/girparser.py:
3154 * giscanner/girwriter.py:
3155 * giscanner/glibast.py:
3156 * giscanner/glibtransformer.py:
3157 * giscanner/odict.py:
3158 * giscanner/sourcescanner.py:
3159 * giscanner/transformer.py:
3160 * giscanner/utils.py:
3161 * giscanner/xmlwriter.py:
3162 * tools/g-ir-scanner:
3166 2008-08-09 Johan Dahlin <johan@gnome.org>
3169 * relaxng/c-types.xml:
3170 * relaxng/g-types.xml:
3171 * relaxng/relaxng.rng:
3173 Remove outdated relaxng schemas.
3175 2008-08-09 Johan Dahlin <johan@gnome.org>
3178 Rename metadata to typelib in variable names,
3181 2008-08-09 Johan Dahlin <johan@gnome.org>
3185 Remove old C scanner, which got rewritten in python.
3187 2008-08-09 Johan Dahlin <johan@gnome.org>
3189 * girepository/Makefile.am:
3190 * tools/Makefile.am:
3191 * tools/girmodule.c:
3192 * tools/girmodule.h:
3195 * tools/girparser.c:
3196 * tools/girparser.h:
3197 * tools/girwriter.c:
3198 * tools/girwriter.h:
3199 Move shared *.[ch] files to girepository from tools
3201 2008-08-09 Johan Dahlin <johan@gnome.org>
3203 * tests/Makefile.am:
3206 * tests/constant.test:
3208 * tests/errors.test:
3209 * tests/function.test:
3210 * tests/gobject.test:
3211 * tests/interface.test:
3212 * tests/object.test:
3213 * tests/struct.test:
3218 Rename *.test to *.gir
3220 2008-08-09 Johan Dahlin <johan@gnome.org>
3223 * tests/Makefile.am:
3224 * tests/parser/Foo-expected.gir:
3225 * tests/parser/Makefile.am:
3226 * tests/parser/foo-object.h:
3227 * tests/parser/foo.c:
3228 * tests/parser/utility-expected.gir:
3229 * tests/parser/utility.c:
3230 * tests/parser/utility.h:
3231 * tests/scanner/Makefile.am:
3232 Rename tests/parser to test/scanner
3234 2008-08-08 Colin Walters <walters@verbum.org>
3236 * tests/roundtrips.sh: Use local .gir files again.
3238 2008-08-08 Colin Walters <walters@verbum.org>
3240 * tests/invoke/Makefile.am: .gir file depends on libtool
3243 2008-08-08 Colin Walters <walters@verbum.org>
3245 * tools/girnode.c: Pass through parent node so we can
3246 print the node whose child is NULL, if that occurs.
3248 2008-08-08 Johan Dahlin <johan@gnome.org>
3250 * tests/Makefile.am:
3251 Disable roundtrip tests which are not yet working
3252 * tests/invoke/testfns.gir:
3255 2008-08-08 Johan Dahlin <johan@gnome.org>
3257 * giscanner/girwriter.py:
3259 * giscanner/glibast.py:
3260 * giscanner/glibtransformer.py:
3261 Swap order of members, to keep it consistent with
3264 2008-08-08 Johan Dahlin <johan@gnome.org>
3266 * girepository/gtypelib.c (validate_header):
3267 * girepository/gtypelib.h:
3269 * giscanner/girwriter.py:
3270 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3271 (gi_source_symbol_unref):
3274 * tests/constant.test:
3276 * tests/errors.test:
3277 * tests/function.test:
3278 * tests/gobject.test:
3279 * tests/interface.test:
3280 * tests/invoke/Makefile.am:
3281 * tests/invoke/testfns.xml:
3282 * tests/object.test:
3283 * tests/parser/Makefile.am:
3284 * tests/roundtrips.sh:
3285 * tests/struct.test:
3290 * tools/Makefile.am:
3291 * tools/compiler.c (main):
3292 * tools/generate.c (write_callable_info), (write_function_info),
3294 * tools/gidlmodule.c:
3295 * tools/gidlmodule.h:
3298 * tools/gidlparser.c:
3299 * tools/gidlparser.h:
3300 * tools/gidlwriter.c:
3301 * tools/gidlwriter.h:
3302 * tools/scanner.c (create_node_from_gtype),
3303 (create_node_from_ctype), (g_igenerator_process_properties),
3304 (g_igenerator_process_signals), (g_igenerator_create_object),
3305 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3306 (g_igenerator_create_enum), (g_igenerator_create_flags),
3307 (g_igenerator_process_function_symbol),
3308 (g_igenerator_process_unregistered_struct_typedef),
3309 (g_igenerator_process_struct_typedef),
3310 (g_igenerator_process_union_typedef),
3311 (g_igenerator_process_enum_typedef),
3312 (g_igenerator_process_function_typedef),
3313 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3314 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3315 Merge in the gir-compiler branch.
3316 Thanks to Philip and Colin for their help.
3318 2008-07-26 Colin Walters <walters@verbum.org>
3320 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3321 and g-idl-generate to go along with how we're changing this
3322 module to be installed.
3323 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3325 2008-07-24 Colin Walters <walters@verbum.org>
3327 * girepository/girepository.c (g_irepository_register): Add
3328 environment variable G_IREPOSITORY_VERBOSE so we can print
3329 out what we're doing.
3330 * girepository/girepository.c (g_irepository_register_file):
3331 Add GError error message to g_debug call.
3333 2008-07-08 Jürg Billeter <j@bitron.ch>
3335 * giscanner/glibast.py:
3339 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3341 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3344 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3347 * giscanner/girwriter.py:
3348 * giscanner/transformer.py:
3349 * tests/parser/Foo-expected.gir:
3350 * tests/parser/foo-object.h:
3351 * tests/parser/foo.c (foo_object_allow_none):
3352 Add support for gtk-doc annotations for allow-none.
3355 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3358 * giscanner/girwriter.py:
3359 * giscanner/glibast.py:
3360 * giscanner/glibtransformer.py:
3361 * giscanner/transformer.py:
3362 * tests/parser/Foo-expected.gir:
3363 Start using abstract type instead of the raw C types.
3364 Register a bunch of glib types we care about.
3366 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3371 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3373 * girepository/girepository.c:
3374 * girepository/gtypelib.c:
3375 * girepository/ginfo.c:
3376 * girepository/ginvoke.c:
3377 * girepository/girepository.h:
3378 * girepository/gtypelib.h:
3379 * girepository/gmetadata.c:
3380 * girepository/Makefile.am:
3381 * girepository/gmetadata.h:
3383 * tools/gidlmodule.c:
3386 * tools/gidlmodule.h:
3387 * tools/gidlparser.c:
3389 Renamed GMetadata to GTypelib
3391 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3393 * giscanner/xmlwriter.py:
3394 Improve line wrapping when > 79 charaters
3396 2008-06-05 Jürg Billeter <j@bitron.ch>
3399 * giscanner/girwriter.py:
3400 * giscanner/transformer.py:
3401 Use <type> element for field types
3402 * tests/parser/Foo-expected.gir:
3405 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3407 * giscanner/glibtransformer.py:
3408 Fix a bug which prevented GdkEvent from being generated
3410 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3412 * giscanner/Makefile.am:
3414 * giscanner/girwriter.py:
3415 * giscanner/glibast.py:
3416 * giscanner/glibtransformer.py:
3417 * giscanner/transformer.py:
3418 * giscanner/utils.py:
3419 * tests/parser/Foo-expected.gir:
3420 Improve enum member parsing and introspection
3422 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3424 * giscanner/scannerparser.y:
3425 * giscanner/sourcescanner.h:
3426 * giscanner/sourcescanner.py:
3427 Add a new source type enum for member.
3428 Use __repr__ for improved debugging
3429 * giscanner/girparser.py:
3431 * giscanner/transformer.py:
3432 Improve parsing of struct members.
3433 * tests/parser/foo-object.h:
3436 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3438 * giscanner/xmlwriter.py:
3439 Improve error reporting when trying to quote None.
3440 * giscanner/girparser.py:
3441 Do not print warnings when including more complete .gir files
3442 * giscanner/girwriter.py:
3443 Do not require a name for parameters, add a todo for singletons
3444 * giscanner/glibtransformer.py:
3445 Refactor the way structs are done, add a couple of hacks to allow
3447 * giscanner/transformer.py:
3448 Add enough hacks so cairo, atk and pango.gir can be parsed properly
3449 * gobject-introspection-1.0.pc.in:
3450 Export girdir, so we can access gobject-2.0.gir from outside
3452 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3454 * tools/g-ir-scanner:
3455 * tests/parser/Makefile.am:
3456 Update sys.path before running the parser so we don't have
3457 to setup PYTHONPATH ourselves.
3461 * girepository/Makefile.am:
3462 * giscanner/transformer.py:
3463 * gobject-introspection-1.0.pc.in:
3464 * gobject-introspection.pc.in:
3465 * tools/Makefile.am:
3467 Rename pkg-config name to gobject-introspection-1.0,
3468 Do not installed anything which is not using the gir format.
3469 Disable compililation the old C scanner, but still keep the source
3470 until all the remaning functionallity has been ported.
3472 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3474 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3475 a crash when symbol->indent is NULL.
3477 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3478 a function to convert a CTYPE symbol to a string
3480 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
3483 * giscanner/girwriter.py:
3484 * giscanner/giscannermodule.c
3485 (pygi_source_scanner_append_filename),
3486 (pygi_source_scanner_parse_file):
3487 * giscanner/glibtransformer.py:
3488 * giscanner/sourcescanner.py:
3489 Revert back to using temporary files to send in headers.
3490 Allow Functions to be passed in as callbacks, add a couple
3491 of try/excepts missing features.
3492 We can now scan pango
3494 2008-05-08 Johan Dahlin <johan@gnome.org>
3496 * giscanner/glibtransformer.py:
3497 * giscanner/transformer.py:
3498 Move namespace stripping glibtransformer->transformer
3500 2008-05-08 Johan Dahlin <johan@gnome.org>
3503 * giscanner/girwriter.py:
3504 * giscanner/glibtransformer.py:
3505 * giscanner/transformer.py:
3506 * tools/g-ir-scanner:
3507 Introduce a namespace ast node
3509 2008-05-05 Johan Dahlin <johan@gnome.org>
3511 * giscanner/__init__.py:
3512 * giscanner/sourcescanner.py:
3513 * giscanner/transformer.py:
3514 Move sourcescanner symbols to the sourcescanner module, instead
3515 of in the global __init__ namespace.
3517 2008-05-03 Johan Dahlin <johan@gnome.org>
3519 * giscanner/glibtransformer.py:
3520 * tools/g-ir-scanner:
3521 Handle missing parameters better, allow - and + in .la dlname
3524 2008-05-03 Johan Dahlin <johan@gnome.org>
3526 * giscanner/__init__.py:
3528 * giscanner/girwriter.py:
3529 * giscanner/glibtransformer.py:
3530 * giscanner/transformer.py:
3531 Parse struct fields properly, improve debugging.
3533 2008-04-29 Johan Dahlin <johan@gnome.org>
3536 * giscanner/girwriter.py:
3537 * giscanner/transformer.py:
3538 * tests/parser/Foo-expected.gir:
3540 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
3542 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3545 * docs/g-ir-scanner.1:
3546 * metadata-annotations-proposal.txt:
3547 * metadata-format.txt:
3548 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
3550 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3552 * giscanner/girwriter.py:
3553 * giscanner/glibtransformer.py:
3554 * giscanner/transformer.py:
3555 * giscanner/xmlwriter.py:
3556 * tests/parser/Foo-expected.gir:
3557 * tests/parser/foo-object.h:
3558 Write record/structs to gir file too. Add a couple of tests,
3559 fix an off by one error in xmlwriter.py.
3561 2008-04-28 Johan Dahlin <johan@gnome.org>
3563 * giscanner/xmlwriter.py: Calculate the line length properly,
3564 include the provided extra indentation in the calculation, really.
3566 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3569 * giscanner/glibast.py:
3570 * giscanner/glibtransformer.py:
3571 * giscanner/transformer.py:
3572 * tools/g-ir-scanner:
3573 Add a --strip-prefix and sort out confusion between names and symbols
3574 for functions and struct + derivaties.
3575 Refactor bootstrap of g-ir-scanner, so we can set options on
3576 Transformer() before parsing everything.
3578 2008-04-28 Johan Dahlin <johan@gnome.org>
3580 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
3581 when scanning girepository.h
3583 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
3584 a __GI_SCANNER__ when we run.
3586 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3589 * giscanner/girwriter.py:
3590 * giscanner/glibast.py:
3591 * giscanner/glibtransformer.py:
3592 * tests/parser/Foo-expected.gir:
3593 * tests/parser/utility-expected.gir:
3594 Rename most c:identifier to c:type. Add new ones to
3595 class/interface/enum/boxed.
3597 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3600 * giscanner/girwriter.py:
3601 * giscanner/glibtransformer.py:
3602 * tests/parser/Foo-expected.gidl:
3603 * tests/parser/Makefile.am:
3604 Move c:identifier from return-value to subchild type,
3605 as per Jürgs suggestion
3607 2008-04-28 Johan Dahlin <johan@gnome.org>
3609 * giscanner/girwriter.py:
3610 * tests/parser/Foo-expected.gir:
3611 Write property.type as a child node.
3613 2008-04-27 Johan Dahlin <johan@gnome.org>
3618 * gidl/gobject-2.0.gidl:
3620 * gir/gobject-2.0.gir:
3621 * tests/parser/Makefile.am:
3622 Replace the GObject gidl with a GObject gir.
3624 2008-04-27 Johan Dahlin <johan@gnome.org>
3626 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
3629 * giscanner/xmlwriter.py:
3630 * tests/parser/Foo-expected.gir:
3631 Include indentation in line length calculation
3633 2008-04-27 Johan Dahlin <johan@gnome.org>
3635 * giscanner/girparser.py:
3636 Prettify NS parsing using elementtree.
3638 2008-04-27 Johan Dahlin <johan@gnome.org>
3641 * giscanner/Makefile.am:
3642 * giscanner/girparser.py:
3643 * giscanner/glibtransformer.py:
3644 * tests/parser/Foo-expected.gidl:
3645 * tests/parser/Foo-expected.gir:
3646 * tests/parser/Makefile.am:
3647 * tests/parser/utility-expected.gidl:
3648 * tests/parser/utility-expected.gir:
3649 * tools/g-ir-scanner:
3650 Switch over to GIR as the default format. Add a simple GIDL
3652 Update tests and fix simplify makefiles by depending
3653 on GNU make extensions.
3655 2008-04-27 Johan Dahlin <johan@gnome.org>
3657 * giscanner/xmlwriter.py:
3658 Wrap attributes for lines which are wider than 79 characters
3660 * giscanner/scannerlexer.l:
3661 Allow parenthesis in annotations
3664 * giscanner/gidlwriter.py:
3665 * giscanner/girwriter.py:
3666 * giscanner/glibtransformer.py:
3667 * giscanner/transformer.py:
3668 Add initial sequence support, including annotation.
3669 Refactor type handling a bit.
3671 2008-04-27 Johan Dahlin <johan@gnome.org>
3673 * tests/parser/Foo-expected.gidl:
3674 * tests/parser/foo-object.h:
3675 * tests/parser/foo.c (foo_object_class_init),
3676 (foo_object_get_strings), (foo_object_get_objects):
3677 Add two new functions to check sequence return values.
3678 Also fixes a compilation warning.
3680 2008-04-27 Johan Dahlin <johan@gnome.org>
3682 * giscanner/giscannermodule.c (]): Cast the getter, avoids
3683 a compilation warning.
3685 * tools/Makefile.am (g_ir_scanner_SOURCES):
3686 g-ir-scanner has no sources.
3688 2008-04-25 Johan Dahlin <johan@gnome.org>
3690 * giscanner/Makefile.am:
3692 * giscanner/gidlparser.py:
3693 * giscanner/gidlwriter.py:
3694 * giscanner/girwriter.py:
3695 * giscanner/glibast.py:
3696 * giscanner/glibtransformer.py:
3697 * giscanner/transformer.py:
3698 Split out nodes to ast.py and glibast.py
3700 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3702 * giscanner/Makefile.am:
3703 * giscanner/gidlparser.py:
3704 * giscanner/gidlwriter.py:
3705 * giscanner/girwriter.py:
3706 * giscanner/glibtransformer.py:
3707 * giscanner/gobjecttreebuilder.py:
3708 * giscanner/transformer.py:
3709 * giscanner/treebuilder.py:
3710 * tools/g-ir-scanner:
3711 Rename treebuilder to transformer and
3712 gobjectreebuilder to glibtransformer.
3714 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3716 * giscanner/Makefile.am:
3717 * giscanner/__init__.py:
3718 * giscanner/cgobject.py:
3719 * giscanner/gidlparser.py:
3720 * giscanner/gidlwriter.py:
3721 * giscanner/girwriter.py:
3722 * giscanner/gobjecttreebuilder.py:
3723 * giscanner/odict.py:
3724 * giscanner/sourcescanner.py:
3725 * giscanner/treebuilder.py:
3726 * giscanner/xmlwriter.py:
3727 * tools/Makefile.am:
3728 * tools/g-ir-scanner:
3729 Add LGPLv2 license header and install all python files
3731 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3734 * giscanner/gidlwriter.py:
3735 * giscanner/giscannermodule.c (pygi_source_directive_new),
3736 (directive_get_options), (pygi_source_symbol_new),
3737 (symbol_get_base_type), (pygi_source_type_new),
3738 (type_get_base_type), (type_get_child_list),
3739 (pygi_source_scanner_get_symbols),
3740 (pygi_source_scanner_get_directives):
3741 * giscanner/gobjecttreebuilder.py:
3742 * giscanner/sourcescanner.py:
3743 * giscanner/treebuilder.py:
3744 * tests/parser/foo-object.h:
3745 Add support for virtual methods.
3746 Pair struct FooClass with struct Foo.
3747 Clean up the SourceScanner bindings a bit.
3748 Add a testcase for virtual methods.
3750 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3752 * giscanner/cgobject.py:
3753 * giscanner/gidlwriter.py:
3754 * giscanner/gobjecttreebuilder.py:
3755 Add support for signals
3757 * tests/parser/foo.c (foo_object_class_init):
3758 * Foo-expected.gidl:
3759 Add a signal and update the expected output.
3761 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
3763 * giscanner/gidlwriter.py:
3764 * giscanner/girwriter.py:
3765 * giscanner/giscannermodule.c (directive_get_name),
3766 (directive_get_value), (directive_get_options),
3767 (symbol_get_directives), (symbol_set_directives),
3768 (pygi_source_scanner_parse_file),
3769 (pygi_source_scanner_lex_filename),
3770 (pygi_source_scanner_get_directives), (init_giscanner):
3771 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
3772 * giscanner/sourcescanner.h:
3773 * giscanner/sourcescanner.py:
3774 * giscanner/treebuilder.py:
3775 * tools/g-ir-scanner:
3776 Add support for source/header annotations.
3778 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3780 * giscanner/gidlwriter.py:
3781 * giscanner/girwriter.py:
3782 * giscanner/gobjecttreebuilder.py:
3783 * giscanner/treebuilder.py:
3784 Add support for Callbacks
3786 2008-04-22 Havoc Pennington <hp@pobox.com>
3788 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
3789 not in metadata->module, look for it in the global module, in case
3790 some other object or the app itself provides the symbol.
3792 2008-04-22 Havoc Pennington <hp@pobox.com>
3794 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
3795 dlopening a library that is already in the main app, by checking
3796 whether one of the lib's symbols is already loaded.
3798 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3800 * tests/parser/Foo-expected.gidl:
3801 * tests/parser/foo-object.h:
3804 2008-04-22 Havoc Pennington <hp@pobox.com>
3806 * girepository/ginfo.c (g_interface_info_find_method):
3807 Use interface_blob_size not object_blob_size to compute offset.
3809 2008-04-22 Havoc Pennington <hp@pobox.com>
3811 * girepository/gmetadata.c (_g_metadata_init): remove
3812 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
3813 (Glade and Clutter for example) rely on being loaded globally.
3815 2008-04-22 Havoc Pennington <hp@pobox.com>
3817 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
3818 function to get the GType given a RegisteredTypeInfo
3820 2008-04-22 Johan Dahlin <johan@gnome.org>
3822 * COPYING: Add a LGPL license, to prevent automake to
3823 put in a copy of GPL here. Pointed out by Havoc.
3825 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
3826 (g_type_info_is_pointer), (g_type_info_get_tag),
3827 (g_type_info_get_param_type), (g_type_info_get_interface),
3828 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
3829 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
3830 (g_error_domain_info_get_codes), (g_enum_info_get_value),
3831 (g_object_info_get_interface), (g_object_info_get_field),
3832 (g_interface_info_get_prerequisite),
3833 (g_signal_info_get_class_closure), (g_constant_info_get_value):
3834 * girepository/ginvoke.c (get_ffi_type):
3835 * girepository/girepository.h:
3836 * girepository/gmetadata.c (g_metadata_get_dir_entry),
3837 (g_metadata_check_sanity), (validate_header),
3838 (validate_array_type_blob), (validate_iface_type_blob),
3839 (validate_param_type_blob), (validate_error_type_blob),
3840 (validate_type_blob), (validate_constant_blob),
3841 (validate_struct_blob), (validate_enum_blob):
3842 * girepository/gmetadata.h:
3843 * tests/Makefile.am:
3844 * tests/invoke/Makefile.am:
3845 * tests/invoke/invoke.c (main):
3846 * tests/roundtrips.sh:
3847 * tools/Makefile.am:
3848 * tools/compiler.c (format_output), (write_out_metadata), (main):
3849 * tools/generate.c (write_type_name), (write_type_info),
3850 (write_constant_value), (write_enum_info), (load_metadata), (main):
3851 * tools/gidlcompilercontext.c:
3852 * tools/gidlcompilercontext.h:
3853 * tools/gidlcompilerentrynode.c:
3854 * tools/gidlcompilerentrynode.h:
3855 * tools/gidlcompilertypenode.c:
3856 * tools/gidlcompilertypenode.h:
3857 * tools/gidlmodule.c (g_idl_module_build_metadata):
3858 * tools/gidlmodule.h:
3859 * tools/gidlnode.c (init_stats), (dump_stats),
3860 (g_idl_node_get_size), (g_idl_node_get_full_size),
3861 (g_idl_node_cmp), (g_idl_node_can_have_member),
3862 (g_idl_node_add_member), (g_idl_node_param_direction_string),
3863 (parse_int_value), (parse_uint_value), (parse_float_value),
3864 (parse_boolean_value), (find_entry_node), (find_entry),
3865 (serialize_type), (g_idl_node_build_metadata), (write_string):
3867 * tools/gidlparser.c (parse_type_internal):
3868 * tools/quote-file.sh:
3869 Revert revisions 157,149-148,136-129 and 120.
3870 Move back to using g-idl-generate to generate the metadata and
3871 avoids dependency on a c compiler.
3873 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3875 * giscanner/girwriter.py:
3876 * tools/g-ir-scanner:
3877 Add an initial GIR writer and a --format option to g-ir-scanner
3879 2008-04-21 Johan Dahlin <johan@gnome.org>
3881 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
3882 gobject-2.0 and raise ImportError if not found.
3884 * giscanner/gidlparser.py:
3885 * giscanner/gidlwriter.py:
3886 * giscanner/gobjecttreebuilder.py:
3887 * tools/g-ir-scanner:
3888 Add a --include argument to include types from other idls.
3889 Add a minimalistic GIDL parser (just objects for now)
3890 Implement resolving of external type references and use it to
3891 resolve parent types, argument types and return types.
3893 2008-04-21 Johan Dahlin <johan@gnome.org>
3895 * giscanner/gidlwriter.py:
3896 * giscanner/gobjecttreebuilder.py:
3897 * giscanner/treebuilder.py:
3898 Add support for properties.
3899 Refactor Class/Interface support a bit, to share more code and
3900 always initialize their method attribute to an empty list.
3902 2008-04-21 Johan Dahlin <johan@gnome.org>
3904 * giscanner/cgobject.py:
3905 Add a workaround for a glib bug interface introspection bug
3906 (object_interface_list_properties, object_class_list_properties):
3907 Cast the return value to GParamSpec.
3909 * tests/parser/Foo-expected.gidl: Update
3910 * tests/parser/foo.c: Add a string property
3912 * giscanner/gobjecttreebuilder.py:
3913 After stripping namespaces, remove the original
3914 item to avoid duplication (GtkButton struct and Button object)
3916 2008-04-21 Johan Dahlin <johan@gnome.org>
3918 * giscanner/gobjecttreebuilder.py:
3919 * giscanner/treebuilder.py:
3920 Strip namespaces before objects, so we'll export
3921 GtkButton as Button in the gtk namespace
3923 2008-04-21 Johan Dahlin <johan@gnome.org>
3925 * giscanner/gidlwriter.py:
3926 * giscanner/gobjecttreebuilder.py:
3927 * giscanner/treebuilder.py:
3928 Add constructors for object/boxed types.
3930 2008-04-21 Johan Dahlin <johan@gnome.org>
3932 * giscanner/gidlwriter.py:
3933 * giscanner/gobjecttreebuilder.py:
3934 Add support for boxed types
3936 2008-04-21 Johan Dahlin <johan@gnome.org>
3938 * giscanner/giscannermodule.c: Mark structures as const,
3939 wrap SourceType.const_string.
3941 * tests/parser/foo-object.h: Add a couple of constants.
3943 * giscanner/gidlwriter.py:
3944 * giscanner/gobjecttreebuilder.py:
3945 * giscanner/treebuilder.py:
3946 Add basic support for interfaces
3948 * tools/g-ir-scanner:
3949 Add -o/--output for writing to a file
3951 2008-04-21 Havoc Pennington <hp@redhat.com>
3953 * TODO: add some C API wishlist items I could think of quickly
3955 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
3957 * giscanner/gidlwriter.py:
3958 * giscanner/xmlwriter.py:
3959 Add a simple api for writing tags which can be used
3960 with the new 'with statement' in python 2.5
3962 2008-04-21 Johan Dahlin <johan@gnome.org>
3964 * giscanner/gobjecttreebuilder.py:
3965 Strip namespace and object prefix from method names.
3967 2008-04-21 Johan Dahlin <johan@gnome.org>
3969 * tools/g-ir-scanner (main): Add --pkg option to pass in
3970 pkg-config modules to get cflags from.
3972 * giscanner/gidlwriter.py (GIDLWriter._write_method):
3973 Avoid duplication, reuse function writer for methods.
3975 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
3977 * giscanner/gidlwriter.py:
3978 * giscanner/gobjecttreebuilder.py:
3979 * giscanner/treebuilder.py:
3980 * tools/g-ir-scanner:
3981 Resolve libtool .la files.
3982 Strip name spaces for methods.
3983 Add function symbols
3985 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
3987 * giscanner/cgobject.py:
3988 * giscanner/gidlwriter.py:
3989 * giscanner/gobjecttreebuilder.py:
3990 * giscanner/treebuilder.py:
3991 Add support for classes and methods
3993 2008-04-20 Johan Dahlin <johan@gnome.org>
3995 * giscanner/gidlwriter.py:
3996 * giscanner/gobjecttreebuilder.py:
3997 * giscanner/odict.py:
3998 Avoid conflicts, keep the output ordered similar to
3999 the order of the input.
4000 Add a simple ordered dictionary implemenation
4002 2008-04-19 Johan Dahlin <johan@gnome.org>
4004 * giscanner/cgobject.py:
4005 * giscanner/gidlwriter.py:
4006 * giscanner/gobjecttreebuilder.py:
4007 * tools/g-ir-scanner:
4008 Start introspecting get-type functions.
4009 Implement support for GLib/GFlags GTypes.
4010 Add a ctype based GObject binding.
4012 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4014 * giscanner/gidlwriter.py:
4015 * giscanner/xmlwriter.py:
4016 * tools/g-ir-scanner:
4017 Add a simplistic gidl writer, which can't do too much.
4019 2008-04-18 Johan Dahlin <johan@gnome.org>
4021 * giscanner/sourcescanner.py:
4022 * giscanner/treebuilder.py:
4023 * tools/g-ir-scanner:
4024 split tree building and source scanning interface to separate files.
4026 2008-04-18 Johan Dahlin <johan@gnome.org>
4028 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4030 - Add support for struct/parameter/return, start parsing of ctypes
4032 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4035 2008-03-31 Johan Dahlin <johan@gnome.org>
4037 * tools/g-ir-scanner:
4038 Start to build abstract syntax node of scanned sources.
4039 Add support for cpp options.
4041 2008-03-27 Johan Dahlin <johan@gnome.org>
4043 * giscanner/giscannermodule.c:
4044 * giscanner/scannerlexer.l:
4045 * giscanner/sourcescanner.c:
4046 * tools/g-ir-scanner:
4048 Add simple pre-processor using subprocess and a PIPE.
4049 Change the parse_file apis to accept a file descriptor.
4051 2008-03-25 Johan Dahlin <johan@gnome.org>
4053 * giscanner/__init__.py:
4054 * tools/g-ir-scanner:
4055 Fix a typo and add an example python test program.
4057 2008-03-25 Johan Dahlin <johan@gnome.org>
4059 * giscanner/__init__.py:
4060 * giscanner/giscannermodule.c:
4061 * giscanner/sourcescanner.c:
4062 * giscanner/sourcescanner.h:
4063 Add constants and wrap a few more SymbolType fields
4065 2008-03-25 Johan Dahlin <johan@gnome.org>
4069 * giscanner/__init__.py:
4070 * giscanner/giscannermodule.c:
4071 * giscanner/Makefile.am:
4073 Add initial python bindings for the scanner and
4074 depend on python 2.5.
4076 2008-03-25 Johan Dahlin <johan@gnome.org>
4080 * giscanner/Makefile.am:
4081 * giscanner/sourcescanner.c:
4082 * giscanner/sourcescanner.h:
4083 * tools/Makefile.am:
4084 * tools/grealpath.h:
4085 * tools/sourcescanner.c:
4086 * tools/sourcescanner.h:
4088 Move the scanner to a separate library.
4090 2008-03-23 Johan Dahlin <johan@gnome.org>
4092 * tools/Makefile.am:
4095 * tools/scannerlexer.l:
4096 * tools/scannerparser.y:
4097 * tools/sourcescanner.c:
4098 * tools/sourcescanner.h:
4099 Split out the source scanner from the generator.
4100 Rename the symbols used in the scanner to use the gi_ prefix.
4101 This should make it possible to use the raw C parser from
4104 2008-03-23 Johan Dahlin <johan@gnome.org>
4106 * tests/parser/Makefile.am (utility.gidl):
4107 * tests/parser/utility-expected.gidl:
4108 Pass in the gobject.gidl since we're defining a GObject.
4110 2008-03-12 Johan Dahlin <johan@gnome.org>
4112 * relaxng/relaxng.rng:
4113 Add a releaxng in relaxng we can use to validate the relaxngs
4116 2008-03-12 Jürg Billeter <j@bitron.ch>
4118 * tools/scanner.c: (g_igenerator_new):
4119 * tools/scannerparser.y:
4120 Fix compiler warnings.
4122 2008-03-12 Jürg Billeter <j@bitron.ch>
4126 * tools/scannerparser.y:
4127 Start fixing memory management in g-idl-scanner.
4129 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4131 * tools/gidlcompilercontext.c: (write_compiled):
4132 Fix critical warning when no shlib passed to g-idl-compiler.
4134 2008-03-12 Johan Dahlin <johan@gnome.org>
4136 * tests/parser/utility-expected.gidl:
4137 * tests/parser/utility.h:
4138 Add a get_type-function, so the scanner actually
4139 parses it as an object.
4141 2008-03-12 Johan Dahlin <johan@gnome.org>
4143 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4146 * tests/parser/Foo-expected.gidl:
4147 * tests/parser/Makefile.am:
4148 * tests/parser/foo-object.h:
4149 * tests/parser/foo.c:
4150 * tests/parser/utility-expected.gidl:
4151 * tests/parser/utility.c:
4152 * tests/parser/utility.h:
4154 Add a new gidl test. 'utility.gidl', which is used to be able
4155 to test external type references. Add a reference to UtilityObject*
4158 2008-03-11 Johan Dahlin <johan@gnome.org>
4162 Remove most global variables
4164 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4166 * tools/scannerlexer.l:
4168 * tests/parser/Foo-expected.gidl:
4169 * tests/parser/foo.c:
4170 * tests/parser/Makefile.am:
4171 * tests/parser/foo-object.h:
4173 Added a few extra tests. Which resulted in finding a few
4174 bugs. Which resulted in me fixing those bugs
4176 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4178 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4179 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4180 Add some comments for strings into generated output for
4183 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4185 * tools/gidlcompilercontext.c: (write_compiled):
4186 Write out the shlibs variable before writing out the strings
4187 length. Fixes compiler warning when using '-l' flag with
4190 2008-03-11 Johan Dahlin <johan@gnome.org>
4192 * tests/parser/Foo-expected.gidl:
4193 * tests/parser/foo-object.h:
4196 * tools/scannerlexer.l:
4197 Add support for parsing return arguments. Add support for
4198 caller-owns return types.
4199 Patch by Philip Van Hoof.
4201 * tools/scannerparser.y:
4202 Remove parsing of the @deprecated syntax used in headers.
4203 We will support gtk-doc deprecation in the future instead.
4205 2008-03-11 Johan Dahlin <johan@gnome.org>
4207 * tools/compiler.c (main): Coding style fixes
4209 2008-03-10 Johan Dahlin <johan@gnome.org>
4212 Add GCOV_LIBS to GILIBS
4214 2008-03-10 Johan Dahlin <johan@gnome.org>
4216 * tests/parser/Foo-expected.gidl:
4217 * tests/parser/foo.c:
4218 Rename null-ok to direction=out
4220 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4222 reviewed and extensively tested by Johan
4224 * tests/parser/Foo-expected.gidl:
4225 * tests/parser/foo-object.h:
4226 * tests/parser/foo.c:
4229 * tools/gidlwriter.c:
4232 * tools/scannerlexer.l:
4233 * tools/scannerparser.y:
4235 Add support for scanning for gtk-doc comments inside
4236 C source files. Add tests
4238 2008-03-10 Johan Dahlin <johan@gnome.org>
4240 * tests/parser/Makefile.am:
4241 * tests/parser/foo.c:
4244 * tools/scannerparser.y:
4245 Add an api to lex filenames.
4246 Lex all source .c files passed in on the command line.
4247 Scan sources in a test and a couple of private structures
4248 which should not be included in the generated gidl
4250 2008-03-10 Johan Dahlin <johan@gnome.org>
4252 * tests/invoke/Makefile.am: Make the generated metadata
4253 depend on the g-idl-compiler
4255 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4257 * tools/gidlmodule.c
4258 * tools/gidlmodule.h
4261 Remove the old g-idl-compiler code.
4264 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4266 * tools/quote-file.sh
4269 Move to using the 'C' struct compiler code.
4271 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4273 * girepository/ginfo.c
4275 Change the way that external references with no namespace
4276 are dealt with. External references with no namespace
4277 are placed into the XML as-if they are a local reference.
4278 This is temporary, but helps with roundtrip tests.
4280 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4282 * girepository/ginfo.c
4283 Add the ability to get the value of a constant of
4284 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4285 is provided as a string.
4287 This would deal properly with:
4288 typedef char* random;
4289 const random = "A string";
4291 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4293 * girepository/ginfo.c
4294 * girepository/girepository.h
4296 Add a function to check if an enum is registered or not.
4297 Previously anything testing this relied on the g-type
4298 string offset having a value of 0.
4300 * girepository/gmetadata.c
4301 * girepository/gmetadata.h
4303 Remove unneccesary or erroneous checks. There were two
4304 metadata validation checks which made sure that the blob
4305 sizes were the same as some magic numbers compiled into the code.
4306 This is wrong as it breaks any forwards compatibility that may
4309 Checks were also present that made sure that unregistered type
4310 blobs had a value of 0 in the g-type offset field. This is
4311 unneccessary. If a type blob is unregistered then any value
4312 in its g-type field is simply invalid.
4314 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4316 * girepository/ginfo.c
4317 * girepository/gmetadata.c
4318 * girepository/gmetadata.h
4320 Change the metadata format to have a standard header
4321 for all the type blobs. Merge the SimpleTypeBlob
4322 and InterfaceTypeBlob into a union. A union of these
4323 two blobs existed previously but was not explicit
4324 in the metadata format.
4326 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4328 * tools/gidlcompilercontext.c
4329 * tools/gidlcompilercontext.h
4330 * tools/gidlcompilerentrynode.c
4331 * tools/gidlcompilerentrynode.h
4332 * tools/gidlcompilertypenode.c
4333 * tools/gidlcompilertypenode.h
4335 Add code to compile a tree of GIdlNodes to
4336 a 'C' struct representing the metadata.
4337 This is to aid cross-compiling. Previously
4338 the g-idl-compiler created a binary blob with
4339 data written in the byte order and alignment
4340 of the tool rather than the intended target.
4342 Cleaned up and improved by Johan and Robert :-)
4344 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4346 * girepository/ginvoke.c
4347 * girepository/girepository.h
4348 * girepository/gmetadata.c
4349 * girepository/gmetadata.h
4351 * tools/gidlparser.c
4352 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4353 to avoid confusion with the interface blob.
4356 * tools/gidlparser.c
4357 Remove magic numbers and replace with type-tag
4358 enumeration symbols.
4360 * girepository/gmetadata.c
4361 Add validate declaration.
4363 2008-03-10 Jürg Billeter <j@bitron.ch>
4365 * tools/gidlparser.c: (parse_type_internal):
4366 * tools/scannerlexer.l:
4367 * tools/scannerparser.y:
4368 Support C99 _Bool type in scanner.
4370 2008-03-10 Jürg Billeter <j@bitron.ch>
4372 * tests/parser/Foo-expected.gidl:
4373 * tests/parser/foo-object.h:
4374 * tests/parser/foo.c: (foo_enum_method):
4375 * tools/scanner.c: (g_igenerator_process_function_symbol):
4376 Don't skip functions that are defined in the namespace of a type
4377 that doesn't support methods, as for example enums.
4379 2008-03-10 Johan Dahlin <johan@gnome.org>
4381 * gidl.dtd: Remove, we're using relaxng for now
4383 * tests/parser/Foo-expected.gidl:
4384 * tests/parser/foo-object.h:
4385 * tests/parser/foo.c:
4386 Rename the enum/flags get_type functions to include the whole type.
4388 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4390 * tools/gidlwriter.c (enum_generate): added "type-name",
4391 "get-type" and "deprecated" missing arguments.
4392 * tests/parser/Foo-expected.gidl:
4393 * tests/parser/foo-object.h: test enum type, and no type.
4395 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4398 Consistent checks, add missing 'test'
4400 2008-03-05 Havoc Pennington <hp@redhat.com>
4402 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4403 does on Fedora 8. Make libffi a hard requirement, since it was in
4404 practice anyway (was not really conditional in the code or
4405 makefile, only in configure).
4407 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4409 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4410 reviewed by: Johan Dahlin <johan@gnome.org>
4412 * tests/Makefile.am:
4413 * tests/roundtrips.sh:
4414 Modify the roundtrips test so that they do not use the
4415 --raw option of the gidl compiler but instead compile a
4416 shared library to use with g_module.
4418 * tests/invoke/Makefile.am:
4419 * tests/invoke/invoke.c:
4420 Modify the invoke tests to build a shared library rather
4421 than use the --raw option.
4423 * tests/invoke/invoke-namespace-find.sh: Removed:
4424 Noone knows why this was here, so removed.
4426 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4428 * tools/scanner.c: (g_igenerator_process_function_symbol):
4429 Move g_idl_node_can_have_member test later, as it broke spotting
4430 get_type's for nodes that can't have members.
4432 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4435 * tools/gidlnode.c: (g_idl_node_can_have_member):
4436 Add g_idl_node_can_have_member.
4438 * tools/scanner.c: (g_igenerator_process_function_symbol):
4439 Use g_idl_node_can_have_member to test if we should add a function
4440 as a member of the type node.
4442 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4444 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4446 * tests/parser/Makefile.am:
4447 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4449 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4451 * tools/scanner.c: (main):
4452 Ignore -pthread when passed to g-idl-scanner.
4454 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4456 * tools/grealpath.h: Added:
4457 * tools/scanner.c: (main):
4458 * tools/scannerlexer.l:
4459 * tools/Makefile.am:
4460 Always use absolute paths with symbolic links resolved when
4461 comparing filenames.
4463 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4465 * gobject-introspection.pc.in:
4466 Provide variables for g-idl-parser, scanner and compiler in the
4469 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
4472 * girepository/Makefile.am:
4473 * tools/Makefile.am:
4474 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4476 2008-02-10 Johan Dahlin <johan@gnome.org>
4478 * tests/parser/Foo-expected.gidl:
4479 * tests/parser/foo-object.h:
4480 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4481 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4484 2008-02-10 Johan Dahlin <johan@gnome.org>
4486 * tests/parser/Foo-expected.gidl:
4487 * tests/parser/foo-object.h:
4488 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4489 Add enum and flags test.
4491 2008-02-10 Johan Dahlin <johan@gnome.org>
4495 * girepository/Makefile.am:
4496 Make 'make distcheck' work again.
4498 2008-02-10 Johan Dahlin <johan@gnome.org>
4500 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
4503 * tests/parser/Makefile.am: Only create Foo.gidl when running make
4504 check, eg exclude it from BUILT_SOURCES.
4506 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4511 * girepository/Makefile.am:
4512 * m4/Makefile.am: Added:
4513 * m4/as-compiler-flag.m4: Added:
4514 * m4/gcov.m4: Added:
4515 * tools/Makefile.am:
4516 Add ability to generate a coverage report.
4517 Adds configure option --enable-gcov and make rule 'check-coverage'.
4519 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4523 * gidl/Makefile.am: Added:
4524 * girepository/Makefile.am: Added:
4525 * src/Makefile.am: Renamed to tools/Makefile.am:
4526 * src/compiler.c: Renamed to tools/compiler.c:
4527 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
4528 * src/generate.c: Renamed to tools/generate.c:
4529 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
4530 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
4531 * src/gidlnode.c: Renamed to tools/gidlnode.c:
4532 * src/gidlnode.h: Renamed to tools/gidlnode.h:
4533 * src/gidlparser.c: Renamed to tools/gidlparser.c:
4534 * src/gidlparser.h: Renamed to tools/gidlparser.h:
4535 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
4536 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
4537 * src/ginfo.c: Renamed to girepository/ginfo.c:
4538 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
4539 * src/girepository.c: Renamed to girepository/girepository.c:
4540 * src/girepository.h: Renamed to girepository/girepository.h:
4541 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
4542 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
4543 * src/scanner.c: Renamed to tools/scanner.c:
4544 * src/scanner.h: Renamed to tools/scanner.h:
4545 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
4546 * src/scannerparser.y: Renamed to tools/scannerparser.y:
4547 * tests/invoke/Makefile.am:
4548 Split src/ into girepository/ and tools/
4552 * girepository/Makefile.am:
4553 * tests/Makefile.am:
4554 * tests/invoke/Makefile.am:
4555 * tests/parser/Makefile.am:
4556 * tests/roundtrips.sh:
4557 * tools/Makefile.am:
4558 Make distcheck work.
4560 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
4562 * tests/invoke/invoke.c: (main):
4563 * tests/invoke/testfns.c: (test6), (test7):
4564 * tests/invoke/testfns.xml:
4565 Add tests for invokation with a GList argument.
4566 Also tests caller-owns return values.
4568 2008-02-04 Rob Taylor <robtaylor@floopily.org>
4571 Add some documentation for GICallableInfo
4573 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
4576 Correct syntax errors in the DTD file.
4578 * relaxng/c-types.xml:
4579 * relaxng/g-types.xml:
4581 Add a RelaxNG specification for the GObject Introspection XML data.
4582 The Specification has validated all of the test files.
4584 2008-01-25 Rob Taylor <robtaylor@floopily.org>
4586 * tests/roundtrips.sh:
4587 * tests/struct.test:
4588 Add roundtrip tests for structs.
4590 2008-01-11 Johan Dahlin <johan@gnome.org>
4592 * src/scanner.c (g_igenerator_process_function_symbol):
4593 Refactor out g_idle_node_add_member.
4594 (create_node_from_gtype, create_node_from_ctype):
4595 Use case instead of if...else
4596 (get_type_from_type_id):
4597 Rename to create_node_from_gtype
4598 (get_type_from_ctype):
4599 Rename to create_node_from_ctype
4601 Rename ginode -> node, gitype -> type, gifunc -> func.
4603 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
4604 Two new functions, refactor out of scanner.c
4606 * src/scanner.c: (g_igenerator_process_function_symbol):
4607 * src/scannerlexer.l:
4608 Do not save the content of the deprecated variable, only
4611 2008-01-11 Johan Dahlin <johan@gnome.org>
4613 * tests/parser/foo-object.h: Add a couple of comment parser tests.
4615 2008-01-11 Jürg Billeter <j@bitron.ch>
4617 * src/scannerlexer.l:
4618 Fix GTK-Doc parsing.
4620 2008-01-11 Jürg Billeter <j@bitron.ch>
4622 * src/scannerlexer.l:
4623 Fix GTK-Doc parsing.
4625 2008-01-11 Jürg Billeter <j@bitron.ch>
4627 * src/scanner.c: (lookup_symbol):
4628 Return unresolved name if we find unknown symbol.
4630 2008-01-11 Jürg Billeter <j@bitron.ch>
4632 * src/scanner.c: (g_igenerator_generate):
4633 Initialize GObject to fix scanning interface properties.
4635 * tests/parser/Foo-expected.gidl:
4636 * tests/parser/foo-object.h:
4637 * tests/parser/foo.c: (foo_interface_get_type):
4638 Test interfaces with GObject prerequisite.
4640 * tests/parser/Makefile.am:
4641 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
4643 2007-12-27 Johan Dahlin <johan@gnome.org>
4645 * src/scannerlexer.l:
4646 Parse gtk-doc comments.
4648 * src/gidlwriter.c: (function_generate):
4649 Reorganize, avoid duplication and add support for
4650 writing deprecated functions.
4652 * src/scannerparser.y:
4654 Add new structure CDirective and functions to create/free them.
4656 * src/scanner.c: (g_igenerator_process_function_symbol),
4657 (g_igenerator_process_unregistered_struct_typedef),
4658 (g_igenerator_process_struct_typedef),
4659 (g_igenerator_process_union_typedef),
4660 (g_igenerator_process_enum_typedef),
4661 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
4662 (g_igenerator_start_preprocessor):
4663 Parse @deprecated directive for functions.
4664 Remove some more C99isms.
4665 Send in -C to cpp to avoid stripping comments.
4667 * tests/parser/foo-object.h:
4668 * tests/parser/Foo-expected.gidl:
4669 Add deprecated directive
4671 2007-12-27 Johan Dahlin <johan@gnome.org>
4673 * src/scannerlexer.l (intsuffix): Add emacs mode line and
4674 escape ' and " so it looks more like C.
4677 Unlink temporary file used.
4679 2007-12-27 Johan Dahlin <johan@gnome.org>
4681 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
4682 (g_igenerator_start_preprocessor), (main):
4684 * src/scannerparser.y:
4685 Plug a couple of simple memory leaks.
4687 2007-12-27 Johan Dahlin <johan@gnome.org>
4689 * src/scanner.c: (g_igenerator_parse_macros),
4690 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
4693 * src/scannerparser.y:
4694 * tests/parser/Makefile.am:
4696 Improve error reporting, return when the preprocessor fails.
4697 Add a verbose parameter, to aid debugging.
4698 Revert to using a temporary file to communicate between the
4699 preprocessor and the parser, because we need to wait for
4700 the exit code from the pre-processor before starting to parse.
4702 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
4704 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
4705 cparser.y to scannerparser.y
4707 2007-12-11 Johan Dahlin <johan@gnome.org>
4711 * src/scanner.c: (g_igenerator_new):
4713 Get rid of the global the_generator variable.
4715 2007-12-10 Johan Dahlin <johan@gnome.org>
4717 * src/scanner.c (main): Add an output option,
4718 add checks for required parameters
4721 set BUILD_SOURCES and CLEANFILES properly
4723 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
4724 (g_writer_write_indent), (g_writer_write_unindent),
4725 (field_generate), (value_generate), (constant_generate),
4726 (property_generate), (function_generate), (vfunc_generate),
4727 (signal_generate), (interface_generate), (struct_generate),
4728 (union_generate), (boxed_generate), (enum_generate),
4729 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
4731 * src/scanner.c: (g_igenerator_generate):
4733 * src/scannerwriter.c:
4735 Refactor scannerwriter to only be tied to a GIdlModule and move
4736 it (again!) to gidlwriter.c. Change the writer function to take
4739 2007-12-10 Johan Dahlin <johan@gnome.org>
4742 * src/scanner.c: (g_igenerator_generate):
4744 * src/scannerwriter.c: (g_igenerator_write_inline),
4745 (g_igenerator_write), (g_igenerator_write_indent),
4746 (g_igenerator_write_unindent), (field_generate), (value_generate),
4747 (constant_generate), (property_generate), (function_generate),
4748 (vfunc_generate), (signal_generate), (interface_generate),
4749 (struct_generate), (union_generate), (boxed_generate),
4750 (enum_generate), (node_generate), (module_generate),
4751 (g_scanner_write_file):
4753 Move the scanner gidl writing to a separate source file.
4755 2007-12-10 Johan Dahlin <johan@gnome.org>
4760 Move over all CType construction functions.
4762 * tests/parser/Makefile.am:
4763 Be verbose when printing parsing tests results.
4765 2007-12-10 Johan Dahlin <johan@gnome.org>
4767 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
4768 preprocessor handling to here. Start cpp insteado of cc -E,
4769 always include -U__GNUC__, since it's specific to the preprocessor
4772 * tests/parser/Makefile.am (check-local): Silent diff and skip
4773 -U__GNUC__ which is always defined now
4775 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
4777 reviewed by: <delete if not using a buddy>
4779 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
4780 * tests/parser/Makefile.am:
4782 2007-12-09 Johan Dahlin <johan@gnome.org>
4785 Use GOption for command line options.
4786 (g_igenerator_new, main): Simplify constructor and they way
4787 parameters are passed into it.
4793 * src/gen-introspect.c:
4794 * src/gen-introspect.h:
4796 Rename gen-introspect.[ch] to scanner.[ch]
4798 2007-12-09 Johan Dahlin <johan@gnome.org>
4802 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
4803 don't make the repository library and the other utilites link against
4806 * src/gen-introspect.c: (g_igenerator_create_object),
4807 (g_igenerator_create_interface), (g_igenerator_create_boxed),
4808 (g_igenerator_create_enum), (g_igenerator_create_flags),
4809 (g_igenerator_process_module_symbol),
4810 (g_igenerator_process_module), (g_igenerator_generate), (main):
4811 * src/gen-introspect.h:
4812 Refactor g_igenerator_process_types into smaller pieces.
4814 * tests/parser/Makefile.am:
4815 Depend on the gen-introspect binary
4817 2007-12-09 Johan Dahlin <johan@gnome.org>
4819 * src/gen-introspect.c (g_igenerator_process_types):
4820 Break into smaller pieces, one for each generated node type.
4822 2007-12-08 Johan Dahlin <johan@gnome.org>
4824 * src/gen-introspect.c: (g_igenerator_process_types),
4825 (g_igenerator_add_module):
4826 * tests/parser/Foo-expected.gidl:
4827 * tests/parser/foo-object.h:
4828 * tests/parser/foo.c: (foo_subobject_class_init),
4829 (foo_subobject_init):
4831 Add a subobject test and make sure to register defined classes
4832 in the lookup symbol hash table.
4834 2007-12-08 Johan Dahlin <johan@gnome.org>
4838 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
4839 (g_igenerator_process_types), (g_igenerator_add_module),
4840 (g_igenerator_add_include_idl), (main):
4841 * src/gen-introspect.h:
4842 * tests/parser/Makefile.am:
4843 * tests/parser/Foo-expected.gidl:
4845 Change the gen-introspect to generate namespaced module names,
4846 such as GLib.Object instead of GObject.
4847 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
4848 add a --include-idl parameter to gen-introspect,
4849 and update the parser test.
4851 2007-12-08 Johan Dahlin <johan@gnome.org>
4853 * src/gen-introspect.c:
4854 Move main to the end of the file and attempt to make it valid
4857 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
4858 we're not quite ready to generate metadata yet.
4863 Add a simple gen-introspect parser test
4865 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
4867 reviewed by: Johan Dahlin <johan@gnome.org>
4870 * gobject-introspection.pc.in:
4872 * src/compiler.c: (format_output), (write_out_metadata), (main):
4873 * src/gen-introspect.c: (main):
4874 * src/gen-introspect.h:
4875 * src/generate.c: (write_callable_info), (write_repository),
4876 (load_metadata), (main):
4877 * src/gidlmodule.c: (g_idl_module_new),
4878 (g_idl_module_build_metadata):
4880 * src/gidlparser.c: (start_element_handler):
4881 * src/ginfo.c: (g_info_new), (g_info_from_entry),
4882 (g_base_info_get_name), (g_base_info_get_namespace),
4883 (g_base_info_is_deprecated), (g_base_info_get_annotation),
4884 (g_base_info_get_metadata), (g_function_info_get_symbol),
4885 (g_function_info_get_flags), (g_function_info_get_property),
4886 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
4887 (g_callable_info_may_return_null),
4888 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
4889 (g_callable_info_get_arg), (g_arg_info_get_direction),
4890 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
4891 (g_arg_info_is_optional), (g_arg_info_may_be_null),
4892 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
4893 (g_type_info_get_tag), (g_type_info_get_param_type),
4894 (g_type_info_get_interface), (g_type_info_get_array_length),
4895 (g_type_info_is_zero_terminated),
4896 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4897 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
4898 (g_value_info_get_value), (g_field_info_get_flags),
4899 (g_field_info_get_size), (g_field_info_get_offset),
4900 (g_registered_type_info_get_type_name),
4901 (g_registered_type_info_get_type_init),
4902 (g_struct_info_get_n_fields), (g_struct_info_get_field),
4903 (g_struct_info_get_n_methods), (g_struct_info_get_method),
4904 (find_method), (g_struct_info_find_method),
4905 (g_enum_info_get_n_values), (g_enum_info_get_value),
4906 (g_object_info_get_parent), (g_object_info_get_type_name),
4907 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
4908 (g_object_info_get_interface), (g_object_info_get_n_fields),
4909 (g_object_info_get_field), (g_object_info_get_n_properties),
4910 (g_object_info_get_property), (g_object_info_get_n_methods),
4911 (g_object_info_get_method), (g_object_info_find_method),
4912 (g_object_info_get_n_signals), (g_object_info_get_signal),
4913 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
4914 (g_object_info_get_n_constants), (g_object_info_get_constant),
4915 (g_interface_info_get_n_prerequisites),
4916 (g_interface_info_get_prerequisite),
4917 (g_interface_info_get_n_properties),
4918 (g_interface_info_get_property), (g_interface_info_get_n_methods),
4919 (g_interface_info_get_method), (g_interface_info_find_method),
4920 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
4921 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
4922 (g_interface_info_get_n_constants),
4923 (g_interface_info_get_constant), (g_property_info_get_flags),
4924 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
4925 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
4926 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
4927 (g_constant_info_get_value), (g_union_info_get_n_fields),
4928 (g_union_info_get_field), (g_union_info_get_n_methods),
4929 (g_union_info_get_method), (g_union_info_is_discriminated),
4930 (g_union_info_get_discriminator_offset),
4931 (g_union_info_get_discriminator):
4932 * src/ginvoke.c: (g_function_info_invoke):
4933 * src/girepository.c: (g_irepository_register),
4934 (g_irepository_unregister), (g_irepository_get_default),
4935 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
4936 (g_irepository_get_info), (g_irepository_find_by_name),
4937 (g_irepository_get_shared_library),
4938 (g_irepository_build_search_path), (g_irepository_register_file),
4939 (g_irepository_error_quark):
4940 * src/girepository.h:
4941 * src/gmetadata.c: (g_metadata_get_dir_entry),
4942 (g_metadata_check_sanity), (validate_header),
4943 (validate_array_type_blob), (validate_iface_type_blob),
4944 (validate_param_type_blob), (validate_error_type_blob),
4945 (validate_type_blob), (validate_arg_blob),
4946 (validate_signature_blob), (validate_function_blob),
4947 (validate_callback_blob), (validate_constant_blob),
4948 (validate_value_blob), (validate_field_blob),
4949 (validate_property_blob), (validate_signal_blob),
4950 (validate_vfunc_blob), (validate_struct_blob),
4951 (validate_enum_blob), (validate_object_blob),
4952 (validate_interface_blob), (validate_errordomain_blob),
4953 (validate_union_blob), (validate_blob), (validate_directory),
4954 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
4955 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
4956 (g_metadata_new_from_mapped_file), (g_metadata_free),
4957 (g_metadata_set_module), (g_metadata_get_namespace):
4959 * tests/Makefile.am:
4960 * tests/invoke/Makefile.am:
4961 * tests/invoke/invoke-namespace-find.sh:
4962 * tests/invoke/invoke.c: (main):
4964 Add a namespace/shared library mapping. fixes #313268.
4966 2007-12-03 Johan Dahlin <johan@gnome.org>
4968 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
4971 2007-11-30 Jürg Billeter <j@bitron.ch>
4977 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
4978 (g_igenerator_write_inline), (g_igenerator_write),
4979 (g_igenerator_write_indent), (g_igenerator_write_unindent),
4980 (field_generate), (value_generate), (constant_generate),
4981 (property_generate), (function_generate), (vfunc_generate),
4982 (signal_generate), (interface_generate), (struct_generate),
4983 (union_generate), (boxed_generate), (enum_generate),
4984 (node_generate), (module_generate), (get_type_from_type_id),
4985 (str_replace), (g_igenerator_process_properties),
4986 (g_igenerator_process_signals), (g_igenerator_process_types),
4987 (get_type_from_ctype), (g_igenerator_process_function_symbol),
4988 (g_igenerator_process_unregistered_struct_typedef),
4989 (g_igenerator_process_struct_typedef),
4990 (g_igenerator_process_union_typedef),
4991 (g_igenerator_process_enum_typedef),
4992 (g_igenerator_process_function_typedef),
4993 (g_igenerator_process_constant), (g_igenerator_process_symbols),
4994 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
4995 (g_igenerator_generate), (main), (csymbol_new),
4996 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
4997 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
4998 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
4999 (eat_hspace), (eat_line), (read_identifier),
5000 (g_igenerator_parse_macros):
5001 * src/gen-introspect.h:
5003 Import gen-introspect to generate introspection information by
5006 2007-11-30 Jürg Billeter <j@bitron.ch>
5008 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5010 2007-11-30 Jürg Billeter <j@bitron.ch>
5012 * src/gidlparser.c: (end_element_handler): Don't leave requires
5015 2007-11-29 Johan Dahlin <johan@gnome.org>
5017 * src/gidlparser.c (parse_type_internal): Add char,
5018 gchar and guchar to the builtin types.
5020 2007-11-26 Johan Dahlin <johan@gnome.org>
5022 * src/ginfo.c: (g_object_info_get_type_name),
5023 (g_object_info_get_type_init):
5024 * src/girepository.c: (g_irepository_is_registered):
5025 * src/girepository.h:
5027 Add g_object_info_get_type_name, g_object_info_get_type_init and
5028 g_irepository_is_registered.
5030 2006-08-14 Jürg Billeter <j@bitron.ch>
5032 * src/gidlparser.c: (end_element_handler): Don't leave
5033 namespace and implements states too early.
5036 2007-11-26 Johan Dahlin <johan@gnome.org>
5038 * src/gmetadata.c (validate_struct_blob):
5039 pass blob_type to validate_function_blob instead of
5040 hard-coding BLOB_TYPE_STRUCT.
5042 Patch by Torsten Schoenfeld, fixes #314190
5044 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5046 * src/compiler.c, src/generate.c, src/gidlnode.c,
5047 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5048 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5049 warnings about return values, signedness mismatches, unused
5050 variables, and unhandles enum values in switch statements.
5052 * tests/invoke/Makefile.am: Don't install the invoke test program.
5053 Add -I ../../src to the cflags used for the test functions files.
5055 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5057 * src/girepository.h: Export g_invoke_error_quark.
5059 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5061 * src/ginvoke.c: Remove the fallback implementation of
5062 g_function_info_invoke since we now formally depend on libffi.
5064 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5066 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5067 Remove these files from cvs, as they are now generated.
5069 * src/gmetadata.c (validate_iface_type_blob): Don't
5070 complain if blob->pointer is not set, since that
5071 happens for enum and flag types. (#308935, Gustavo
5074 * Commit an autoconf-conversion patch by
5075 Gustavo Carneiro (#308708)
5077 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5079 * src/compiler.c (main): Use it here to validate
5080 the generated metadata.
5082 * src/gmetadata.[hc]: Add code to validate a
5085 * metadata-format.txt: Updates
5087 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5089 * tests/*: Add struct offsets to field and vfunc
5092 * src/generate.c (write_vfunc_info): Write offset
5093 information for vfuncs.
5095 * src/gidlnode.c (g_idl_node_build_metadata): Write
5096 the struct offsets into the metadata.
5098 * src/gidlparser.c: Parse the offset attributes of
5099 field and vfunc elements.
5101 * src/gidlnode.h: Add offset members to field and
5104 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5108 * gidl.dtd: Updates.
5110 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5111 file, creates, compiles and runs a C file, and folds the
5112 resulting struct offsets back into the .gidl file.
5114 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5116 * src/gidlparser.c (start_field): Make fields in objects
5119 * src/gidlmodule.c: Include string.h
5124 * metadata-format.txt: Cleanup basic types.
5125 * src/*: Adapt to the changes.
5126 * tests/*: Adapt to the changes.
5127 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5129 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5130 size for enum blobs.
5131 (g_idl_node_get_full_size): Report the correct size for
5134 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5135 error checking for blob sizes.
5137 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5139 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5140 interface types for which is_pointer is FALSE, e.g. enums.
5142 * src/gidlnode.c (g_idl_node_get_full_size)
5143 * src/gidlparser.c (parse_type_internal):
5144 * src/generate.c (write_type_info): Support unspecialized
5145 lists, hashtables and errors. Also emit a '*' after these.
5149 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5153 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5155 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5157 * src/*.c: Change the directory to be addressed by
5158 1-based indexes, and use an index of zero to mean
5161 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5163 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5165 * tests/union.test: Add a union test.
5167 * src/generate.c: Handle unions.
5169 * src/girepository.h:
5170 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5172 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5174 * src/gidlparser.c (start_union): Parse <union> elements.
5176 * src/gidlnode.h: Add a GIdlNodeUnion.
5178 * gidl.dtd: Add a <union> element.
5180 * src/gmetadata.c (g_metadata_check_sanity): Check
5183 * src/gmetadata.h: Add union_blob_size to Header,
5186 * metadata-format.txt: Add a UnionBlob.
5188 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5190 * tests/*: Update testcases.
5192 * src/generate.c (write_callable_info): Don't forget to
5193 write transfer and null-ok attributes for return types
5196 * src/girepository.h:
5197 * src/ginfo.c (g_callable_info_may_return_null):
5198 New function to find out if a function may return NULL.
5200 * src/compiler.c (format_output): Make the generated
5203 * README: Point to a recent libffi snapshot.
5205 * tests/invoke/*: Some invoke tests.
5207 * src/Makefile: Add ginvoke.c and the necessary
5210 * src/girepository.h (g_function_info_invoke): Add
5213 * src/ginvoke.c (g_function_info_invoke): Initial
5214 implementation of invoke functionality based on libffi.
5216 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5217 strings and types hash tables in the right order when
5219 (find_entry_node): Free the name parts.
5221 2005-05-12 Johan Dahlin <johan@gnome.org>
5223 * src/generate.c: Generate consistent end tags.
5227 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5231 * src/gidlparser.c (start_function): Actually add
5232 methods to objects. (Steven Walter)
5234 * src/girepository.h:
5235 * src/ginfo.c: Rename Transfer and Direction to
5236 GITransfer and GIDirection. (Torsten Schoenfeld)
5238 * tests/*: Make tests work with the changes in name
5241 * src/gidlnode.c (find_entry_node): Parse qualified
5242 names and generate xref nodes for them if needed. Don't
5243 require all modules to be loaded any more.
5245 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5248 * src/ginfo.c (g_object_info_get_parent): Return NULL
5249 if blob->parent is 0. Still need to make sure index
5252 * src/generate.c: Generate qualified names when
5253 referring to non-local types. Emit transfer attribute
5256 * src/compiler.c (format_output): Put the function
5257 attributes where gcc accepts them.
5259 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5261 * src/compiler.c (main): Add a --verbose cmdline option
5262 and only log messages if it is specified.
5265 * src/gidlnode.c (init_stats, dump_stats): Collect some
5266 statistics on string and type sharing.
5268 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5269 g_message() instead of fprintf().
5271 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5272 (g_idl_node_get_size): Implement for structs.
5273 (g_idl_node_get_full_size): Handle parent being NULL.
5274 (serialize_type): Handle lookup failures more gracefully.
5276 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5278 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5279 size calculation for 2-parameter types and for objects.
5281 * src/compiler.c: Add a cmdline option for debug output
5282 and install a log handler to implement it.
5283 * src/gidlnode.c: Add some debug spew.
5287 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5288 forget to count the module name when calculating the
5289 required size for the metadata.
5292 * src/gidlparser.c: Fix compiler warnings.
5294 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5296 * src/compiler.c (main): Free the option context.
5298 * gidl.dtd: Clean up handling of names. All elements
5299 have a "name", only the elements corresponding to
5300 actual callable functions (function, method, constructor),
5301 have an additional "symbol" attribute holding the
5302 dlsym()-able function name.
5304 * src/generate.c: Adapt to generate xml matching the
5308 * src/gidlnode.c: Adapt to parse the new dtd.
5310 * tests/*.test: Adjust to the new dtd.
5312 * metadata-format.txt:
5313 * src/gmetadata.h: Remove the short_name field
5315 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5316 * src/girepository.h:
5317 * src/ginfo.c (g_value_info_get_short_name): Removed
5319 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5321 * gidl.dtd: Allow constructors for boxed types,
5322 patch by Jonathan Blandford.
5325 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5327 * --- Initial import ---