1 2008-11-18 Owen Taylor <otaylor@redhat.com>
3 Add enums to the Everything test module
5 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
6 test module and register them as GTypes.
8 https://bugzilla.gnome.org/show_bug.cgi?id=561296
10 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
12 * giscanner/cachestore.py:
13 Catch BadPickleGet exceptions as well.
15 2008-11-17 Owen Taylor <otaylor@redhat.com>
17 * tests/everything/everything.c: Fix doc comment annotations
18 for test_struct_b_clone() to refer to the right function.
20 2008-11-17 Dan Winship <danw@gnome.org>
22 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
23 spelling of GHashTable. #561135
25 * tests/scanner/annotation.c (annotation_object_get_hash):
26 * tests/scanner/annotation-1.0-expected.gir:
27 * tests/scanner/annotation-1.0-expected.tgir: add a test of
28 GHashTable annotations
30 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
32 * giscanner/ast.py: Change string array match type to be in terms
33 of canonicalized type.
34 * giscanner/transformer.py: Add canonicalize_ctype which gives us
35 a version of a c:type without aliases, so we can deep canonicalize
36 char** to utf8*. Update parse_ctype to use it.
37 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
39 2008-11-16 Colin Walters <walters@verbum.org>
41 * girepository/girepository.c: Ensure we always call init_globals,
42 even if passed a non-default repository.
44 2008-11-16 Colin Walters <walters@verbum.org>
46 Bug 559706 - Interface prerequisites
48 * common.mk: Dep on libgirepository.la for scanner libs so that
49 we rebuild things even if just gdump.c changes.
50 * girepository/gdump.c: Dump prerequisites.
51 * giscanner/ast.py: Add prerequisite list.
52 * giscanner/girparser.py: Parse them from gdump.
53 * giscanner/girwriter.py: Write them.
54 * giscanner/glibtransformer.py: Resolve them.
57 2008-11-16 Owen Taylor <otaylor@redhat.com>
59 Bug 561087 - Respect is_pointer in serialize_type()
61 Add a '*' to the serialization for the cases where we set is_pointer
62 in the type blob we write out depending on node->is_pointer. Don't
63 add the '*' in the cases where is_pointer is set or not set in a
66 http://bugzilla.gnome.org/show_bug.cgi?id=561087
68 2008-11-16 Owen Taylor <otaylor@redhat.com>
70 Bug 560825 – Add size and alignment to typelib
72 Include the size and alignment of structures and unions in the typelib,
73 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
75 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
76 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
77 to StructBlob and UnionBlob.
79 * girepository/ginfo.c girepository/girepository.h:
80 Add g_[struct|union]_get[size|alignment]().
82 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
84 2008-11-16 Owen Taylor <otaylor@redhat.com>
86 Bug 552371 – implement struct field get/set
88 * girepository/gfield.c girepository/girepository.h: Add
89 convenience functions g_field_info_set_field() and
90 g_field_info_get_field() to set and get fields based on the
91 offsets in GIFieldInfo.
93 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
95 Bug 560241 - Out-arguments should not be marked as being pointers
98 * girepository/girparser.c: Improved logic for out arguments.
100 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
102 Bug 559601 - Pointers in structs/unions unduly treated as arrays
104 * giscanner/transformer.py: Differentiate type creation logic
105 between parameters and struct components.
107 2008-11-15 Colin Walters <walters@verbum.org>
109 * giscanner/dumper.py: Check return code from pkg-config
112 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
114 * tests/everything/everything.c (test_array_int_in),
115 (test_array_gtype_in):
116 * tests/everything/everything.h:
117 Rename the int/gtype array tests. Make the return value
118 useful, an aggregation of the array input values.
120 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
122 * tests/everything/Makefile.am:
123 * tests/everything/everything.c:
124 * tests/everything/everything.h:
125 * tests/everything/gitesttypes.c:
126 * tests/everything/gitesttypes.h:
127 Rename gitesttypes.[ch] to everything.[ch]
129 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
131 Bug 560708 – Don't treat arrays that have a length specified as
132 zero-terminated by default
134 * giscanner/transformer.py: Default to non zero terminated for
136 * tests/*: Update, add test for zero vs not.
138 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
140 Bug 557788 - Return types for constructors in generated typelib bogus
142 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
143 obviously broken in the face of duplicate names in different
145 * tests/scanner/*expected.gir: Fix up.
147 2008-11-13 Owen Taylor <otaylor@redhat.com>
149 * girepository/girffi.c: Fix "Unexpected time for time_t"
152 2008-11-13 Colin Walters <walters@verbum.org>
154 Bug 558436 - avoid having scanner load app code
156 * giscanner/cgobject.py: Delete; we no longer load shared
158 * giscanner/dumper.py: Support for linking a library to
159 a stub binary for introspection.
160 * giscanner/glibtransformer.py: Rewrite to use gdump XML
161 from invocation of child binary.
162 * giscanner/transformer.py: Fix up to use fully qualified
163 name in parse tree. Make parse_ctype public so we can use
164 it inside glibtransformer.
165 * tests/scanner/barapp.c: New test, using --program arg
167 * tests/*: Update to use common.mk for invoking scanner.
168 * tools/g-ir-scanner: Add options --program, --program-arg,
170 * docs/g-ir-scanner.1: Update.
172 2008-11-13 Colin Walters <walters@verbum.org>
174 * configure.ac: Depend on Gio, we use it in gdump.c.
175 * girepository/gdump.c: Code to dump GType data to XML.
176 * girepository/girepository.c: Add option group for dumping.
177 * girepository/girepository.h: Define API for the above.
179 2008-11-13 Colin Walters <walters@verbum.org>
181 * common.mk: Add a file to include with Makefile fragments
182 useful for scanner invocation.
184 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
186 * tests/everything/gitesttypes.c (test_filename_return): Return
187 strings in filename encoding.
189 2008-11-13 Owen Taylor <otaylor@redhat.com>
191 Bug 560253 – Add structure and boxed types to Everything test module
193 * tests/everything/gitesttypes.[ch]: Add examples of:
195 Plain old data structs
196 Plain old data structs with nested fields
198 Plain old data boxed with nested fields
199 More complicated boxed types with internal state
201 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
203 * tests/everything/gitesttypes.c (test_gtype_in):
204 * tests/everything/gitesttypes.h:
205 Add a test of GType arrays, a la gtk_list_store_set_columns.
207 2008-11-12 Owen Taylor <otaylor@redhat.com>
209 Bug 560419 – Cache includes when parsing
211 Keep track of all modules parsed within a GIrParser, and when a
212 module is referenced a second time, use the existing parsed copy
213 instead of reparsing.
215 2008-11-12 Owen Taylor <otaylor@redhat.com>
217 Fix management of ParseContext.includes_modules (#560419)
219 * girepository/girparser.c: Fix some trivial bugs in managing the
220 list of include modules. (Add to module's list twice, not
221 initialized to NULL, not freed.)
223 2008-11-12 Owen Taylor <otaylor@redhat.com>
225 Keep aliases and disguised_structures local to each module (#560419)
227 * girepository/girmodule.[ch]: When parsing, keep keep a separate
228 hash tables of aliases and 'disguised' flags for each module, and
229 store that on the module.
231 After parsing an include merge the aliases/disguised flags to the
234 * girepository/girparser.c: Remove 'prefix_aliases' flag and
235 always prefix aliases/disguised structure types when parsing; this
236 simplifies the code considerably.
238 2008-11-12 Owen Taylor <otaylor@redhat.com>
240 Fix mismatches between .gir name and 'name' attribute (#560419)
242 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
243 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
244 where the 'name' element of <namespace/> didn't match the filename of the
245 gir, an assumption that the compiler has always expected and now enforces.
247 2008-11-12 Owen Taylor <otaylor@redhat.com>
249 Only allow one <namespace/> element per <repository/> (#560419)
251 * girepository/girparser.c: The logic in girparser.c didn't work
252 very well if there were multiple <namespace/> nodes within a
253 single <repository/> (context->namespace was always the overall
254 filename and not the the name specified in the <namespace/>
255 element for one thing; this would cause aliases to be mis-prefixed
256 in include modules.) Also check that the "name" in the
257 <namespace/> node matches the filename.
259 2008-11-12 Owen Taylor <otaylor@redhat.com>
261 Add a GirParser object to hold the state of a compilation
263 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
264 GirParser object to hold state that is global across a
265 compilation. Currently just holds the include path, but will
266 eventually also keep a cached list of parsed modules.
268 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
270 * girepository/girepository.c (find_namespace_latest): Fix
273 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
275 * configure.ac: use 'introspection' component for bugs
277 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
279 * tests/everything/gitesttypes.c (test_filename_return):
280 * tests/everything/gitesttypes.h:
281 Add a filename return test.
283 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
285 * tests/offsets/Makefile.am (gitestoffsets.c): fix
286 gen-gitestoffsets invocation with builddir != srcdir
288 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
290 * girepository/girepository.c:
291 Change the element type from utf8 to filename
292 * girepository/girnode.c (g_ir_node_build_typelib):
293 Special case filename equally to utf8 here.
295 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
298 Remove unused variables, add a dependency of girepository.ch, so when
299 they change we rebuild the gir automatically.
301 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
303 * girepository/girepository.c (g_irepository_get_search_path):
304 * girepository/girepository.h:
305 Add a g_irepository_get_search_path, so we can access the search
308 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
310 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
312 * girepository/girparser.c: avoid freeing an uninitialized pointer
314 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
317 * giscanner/glibtransformer.py:
318 * tools/g-ir-scanner:
319 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
320 so we can just pass in --library=foo/bar/baz.la and the scanner
321 does the right thing.
322 Don't warn for _get_type() functions if they don't take any
325 2008-11-11 Owen Taylor <otaylor@redhat.com>
327 Bug 560404 – Prefix types when resolving aliases in included modules
329 * girepository/girparser.c: When resolving aliases in an included
330 module, prefix types before looking them up.
332 2008-11-11 Owen Taylor <otaylor@redhat.com>
334 Compute field offsets and overall size for object structures
336 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
337 field of type object in structure"
339 Do basic computation of field offsets for objects and interfaces;
340 this doesn't attempt to address all of the "mess" for virtual
341 functions described in Bug 560281.
343 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
345 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
347 Based on patch by Johan Bilien.
349 * giscanner/transformer.py (_create_member, _create_parameter):
350 Resolve types here as well.
351 (_resolve_type_name_1): Try resolving using 'ctype' first since
352 it's least ambiguous. Fixes struct member type resolution with
353 similarly named types, e.g. Gdk.PangoRendererClass and
355 * tests/scanner/foo*: Add test.
357 2008-11-11 Owen Taylor <otaylor@redhat.com>
359 * girepository/girparser.c: Search provided include dirs before
360 the default directories.
362 2008-11-11 Owen Taylor <otaylor@redhat.com>
364 * girepository/giroffsets.c: Include fully-qualified names in
367 2008-11-11 Owen Taylor <otaylor@redhat.com>
369 * girepository/giroffsets.c: Fail gracefully with an informative
370 error message when recursion is encountered when computing a
373 2008-11-11 Owen Taylor <otaylor@redhat.com>
375 * girepository/girparser.c: Remove an unused variable.
377 2008-11-10 Owen Taylor <otaylor@redhat.com>
379 Add tests for field offset computations
381 * tests/offsets/offsets.h: Header file with structure definitions to test
383 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
384 field offsets for the structures in offsets.h two ways: using
385 the information from a generated typelib, and as computed by the
388 We diff these two versions to test that everything is OK.
390 2008-11-10 Owen Taylor <otaylor@redhat.com>
392 Remove field offsets from g-ir-generate output and test inputs
394 Field offsets are a) architecture dependent so they shouldn't be part
395 of the architecture-independent gir format which is installed in
396 datadir. b) Are architecture-dependent so they shouldn't be in test
399 * girepository/girparser.c: Don't parse offset for fields
400 * tools/generate.c: Don't parse offset for fields
401 * tests/*.gir test/scanner/*.tgir: Remove offsets
403 (Virtual function and discriminator offsets are not removed, as they
404 aren't fully hooked up to the field-offset computation machinery yet.)
406 2008-11-10 Owen Taylor <otaylor@redhat.com>
408 Bug 560252 - Compute field offsets before writing typelib
410 * girepository/girnode.h: Store the total size and alignment for
411 GIrNodeStruct/Boxed/Union.
413 * girepository/giroffset.c: New file implementing computation of
414 structure field offsets.
416 * girepository/girnode.c: Compute structure field offsets before
417 writing types into the typelib.
419 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
420 means "unknown". Also fix description of the discriminator_offset
423 2008-11-10 Owen Taylor <otaylor@redhat.com>
425 Bug 560250 - Fully parse included modules
427 For some things, like computing structure offsets to put into the typelib
428 we need more than just the aliases from included modules. Do a completel
429 parse of included modules and store in module->included_modules.
431 Also add g_ir_find_node() to find node information from within the
432 active set of modules and their includes.
434 2008-11-10 Owen Taylor <otaylor@redhat.com>
436 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
438 Extract a function to convert GITypeTag to ffi_type from the internals
439 of ginvoke.c. This will be useful in figure out structure alignment.
441 Also fix handling of gsize and time_t to be portable. (Add a check
442 to configure.ac to figure out the width of time_t.)
444 2008-11-10 Owen Taylor <otaylor@redhat.com>
446 Bug 560248 – "disguised structures"
448 Certain types like GIConv and GdkAtom are pointers internally but don't
449 look like pointers when referenced. They have the form.
451 typedef struct _X *X;
453 Parse these as structures/records but mark them in the gir with a 'disguised'
454 attribute so that we know that they need special handling.
456 In the typelib treat them like any other structure.
458 2008-11-09 Jürg Billeter <j@bitron.ch>
461 * giscanner/girwriter.py:
463 Write throws attribute for virtual functions, fixes bug 559703
465 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
467 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
468 up some confusion about the second argument to find_module, it's
469 actually the packages __path__ attribute which we can safely ignore
471 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
473 2008-11-07 Owen Taylor <otaylor@redhat.com>
475 Bug 559737 – Deal with continuations in macros
477 * giscanner/giscannerlexer.l: Treat continuation lines the same
478 as regular newlines. This makes the scanner not complain about
479 #define foo(x) \ <stuff> inside a C file. There's no attempt
480 however to handle parsing macro definitions split across lines.
482 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
484 * giscanner/cachestore.py:
485 Handle broken cache entries, write only filesystems and
486 running out of diskspace.
488 2008-11-07 Owen Taylor <otaylor@redhat.com>
490 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
491 Set current_filename before lexing the file so error messages
492 are reported in the right file.
494 2008-11-06 Colin Walters <walters@verbum.org>
496 * tests/everything/*: Add some tests for strv.
498 2008-11-05 Colin Walters <walters@verbum.org>
500 * girepository/ginvoke.c (g_function_info_invoke): Don't use
501 nested scope local variable for error which may go away after
502 conditional is complete.
504 2008-11-05 Colin Walters <walters@verbum.org>
506 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
507 manipulate hackily; just use GString. This avoids an
508 uninitialized memory read pointed out by Havoc.
510 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
512 * giscanner/__init__.py:
514 * giscanner/cachestore.py:
515 * giscanner/cgobject.py:
516 * giscanner/girparser.py:
517 * giscanner/girwriter.py:
518 * giscanner/giscannermodule.c:
519 * giscanner/glibast.py:
520 * giscanner/glibtransformer.py:
521 * giscanner/libtoolimporter.py:
522 * giscanner/minixpath.py:
523 * giscanner/odict.py:
524 * giscanner/sourcescanner.c:
525 * giscanner/sourcescanner.h:
526 * giscanner/sourcescanner.py:
527 * giscanner/transformer.py:
528 * giscanner/utils.py:
529 * giscanner/xmlwriter.py:
531 Relicense the giscanner library under LGPLv2+.
532 This has been approved by all contributors.
534 2008-11-01 Owen Taylor <otaylor@redhat.com>
536 Bug 558848 giparser.py: shared library should be optional
538 When parsing a .gir, allow the shared-library attribute
539 of <namespace/> to be missing: this corresponds to the handling
540 in libgirepository and elsewhere.
542 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
544 Bug 557898 – Fails to build on OSX 10.4
546 * configure.ac: Check for $shrext_cmds that should be implicitly
547 available if you're using libtool >= 2.0. If undefined, call
548 libtool --config explicitly to get its value.
549 * girepository/gtypelib.c: Remove special case for (non-)Darwin
552 2008-10-31 Colin Walters <walters@verbum.org>
554 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
556 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
558 * configure.ac: Post release version bump
561 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
565 * docs/release-checklist.txt:
568 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
570 * Makefile.am: add an upload-release target
571 * docs/release-checklist.txt:
572 Release process documentation
574 2008-10-31 Colin Walters <walters@verbum.org>
576 Bug 558109 – _g_typelib_init fails to find shared libraries
578 * transformer/glibtransformer.py: Use ctypes' find_library
579 on passed libraries and write that for the shared-library
580 entry. We want to avoid depending on -devel packages.
582 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
584 * docs/g-ir-scanner.1:
585 Document the renaming options.
587 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
589 * giscanner/Makefile.am:
590 * tests/invoke/Makefile.am:
591 * tests/repository/Makefile.am: List in-tree libraries first in
592 LDADD / LIBADD. If installed library is listed first, the
593 resulting binary will prefer installed version to one in .libs,
594 possibly making 'make check' behave strangely.
596 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
598 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
599 gir-repository from choking with gdk/quartz
601 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
603 * giscanner/giscannermodule.c (calc_attrs_length),
604 (pygi_collect_attributes):
605 * giscanner/xmlwriter.py:
606 Write a C version of the xml namespace formatter.
607 Saves 15% of the time it takes to create a gtk gir.
609 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
611 * giscanner/xmlwriter.py: Abstract attribute formatting
612 to a function external to the XMLWriter class.
614 * giscanner/scannerlexer.l:
615 Parse and discard __typeof and __attribute.
617 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
619 * giscanner/girparser.py:
620 Remove arguments from the constructor, move them to
621 separate accessors. Add a new parse_tree method
622 which takes an element tree instance.
623 * tools/g-ir-scanner:
624 Update callsite for this
626 * giscanner/Makefile.am:
627 * giscanner/cachestore.py:
628 * giscanner/transformer.py:
629 Cache the include parsing. Saves ~25% time when
630 creating vte (which includes everything up to gtk+).
632 2008-10-30 Colin Walters <walters@verbum.org>
634 * giscanner/transformer.py: Don't reparse includes
635 we've already processed.
637 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
639 * giscanner/girparser.py:
640 * giscanner/transformer.py:
641 Avoid parsing parameters, types etc when parsing
642 includes. Should speed up include parsing a bit.
644 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
646 * giscanner/girparser.py:
647 Avoid big if/else and use a dispatch table like
650 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
652 * giscanner/transformer.py:
653 Clean up include parsing and registration.
655 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
657 * giscanner/transformer.py:
660 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
662 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
665 construct PYTHONPATH just once
667 * tests/everything/Makefile.am:
668 * tests/scanner/Makefile.am:
669 add $(top_srcdir) to PYTHONPATH to
670 handle builddir != srcdir
672 * giscanner/libtoolimporter.py:
673 * giscanner/sourcescanner.py:
674 Make the libtoolimporter work when distchecking too.
676 Mostly based on patch by Tommi Komulainen
678 2008-10-29 Owen Taylor <otaylor@redhat.com>
680 * giscanner/glibtransformer.py: If a filename of an existing
681 file is passed to --library, hunt for it directly, rather than
682 searching for a corresponding library.
684 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
686 * giscanner/libtoolimporter.py:
687 * giscanner/sourcescanner.py:
688 Clean up the libtool importer a bit. Add a context so we
689 can use it through a with statement.
690 Don't just look in the current directory, look in the whole
693 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
695 Bug 558065 – gitesttypes should be installed
699 * tests/types/Makefile.am -> tests/everything/Makefile.am
700 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
701 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
702 move tests/types to tests/everything
704 * tests/everything/Makefile.am: build normal shared library
705 libgirepository-everything.so.1.0.0 and corresponding typelib
706 Everything-1.0.typelib
708 * tests/everything/Makefile.am: explicitly link libtool
709 versioning with typelib versioning with variables
711 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
713 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
715 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
717 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
720 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
722 Bug 558068 – when invoking a method, offset the in arguments by one,
725 * tests/invoke/invoke.c, tests/invoke/testfns.c,
726 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
727 * girepository/ginvoke.c: do not offset the index of given out
728 arguments by one for methods, "this" is provided as in argument only.
730 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
732 * gir/gio-2.0.c: add annotation for g_file_delete
734 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
736 Bug 558062 – provide and use paths in the .pc file
738 * gobject-introspection-1.0.pc.in: provide typelibdir variable
739 for where .typelibs should be installed (callers shouldn't need
740 to construct paths from bits and pieces)
742 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
744 Bug 557791 – g_irepository_require() could return a GTypelib *
746 * girepository/girepository.c: Return GTypelib; this is useful
747 for low level manipulation.
749 2008-10-25 Colin Walters <walters@verbum.org>
751 Bug 557788 – Return types for constructors in generated typelib bogus
753 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
754 rely on end pass resolution.
756 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
758 Bug 557786 - support fixed size arrays
760 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
761 * giscanner/scannerparser.y: Retain fixed array size.
762 * giscanner/ast.py: Add to note.
763 * giscanner/girwriter.py: Write to gir.
764 * girepository/girnode.c: Write it to typelib.
765 * tools/generate.c: Generate.
766 * tests/*: Add tests.
768 2008-10-25 Colin Walters <walters@verbum.org>
770 Bug 557076 - move typelibs to $libdir
772 * configure.ac: Steal some configury bits from dbus to expand
774 * gir/Makefile.am: Move to libdir.
775 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
776 instead just look at one hardcoded path in libdir.
777 * acinclude.m4: Bits from dbus.
779 2008-10-24 Johan Dahlin <johan@gnome.org>
781 * girepository/girnode.c (g_ir_node_check_unhandled_members):
782 Be quiet, do not warn about unhandled members.
784 2008-10-24 Johan Dahlin <johan@gnome.org>
786 * girepository/gtypelib.c:
787 Only use SHLIB_SUFFIX on darwin, otherwise use
788 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
790 2008-10-24 Lucas Rocha <lucasr@gnome.org>
792 Bug 557623 - Constructors shouldn't be flagged as methods.
794 * girepository/ginfo.c (g_function_info_get_flags): ditto.
796 2008-10-24 Johan Dahlin <johan@gnome.org>
798 * giscanner/scannerparser.y:
799 Check against division by zero for the modula operator.
800 This fixes header parsing of OSX system headers included
803 2008-10-24 Johan Dahlin <johan@gnome.org>
807 Add a CONTRIBUTORS file and dist it.
809 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
811 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
813 * girepository/girparser.c (parse_param_transfer):
814 * giscanner/transformer.py (_create_parameter, _create_return):
815 * giscanner/girwriter.py (_write_return, _write_parameter):
816 * tools/generate.c (write_callable_info): always write and
817 require "transfer-ownership" for return-values and parameters
820 * tests/invoke/testfns-1.0.gir:
822 * tests/scanner/DrawableAdditions.xml:
823 * tests/scanner/GtkFrob-1.0-expected.tgir:
824 * tests/scanner/annotation-1.0-expected.tgir:
825 * tests/scanner/drawable-1.0-expected.tgir:
826 * tests/scanner/drawable-injected-1.0-expected.gir:
827 * tests/scanner/drawable-injected-1.0-expected.tgir:
828 * tests/scanner/foo-1.0-expected.tgir: Updated
830 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
832 * giscanner/cgobject.py: build fundamental types same way as glib
834 * giscanner/glibtransformer.py (_type_from_gtype): record GType
835 when constructing the Type from it
837 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
838 the parameter is a GObject from its GType, if available.
840 * giscanner/glibtransformer.py (_adjust_transfer):
841 * tests/scanner/foo-1.0-expected.gir:
842 * tests/scanner/foo-1.0-expected.tgir: deduce
843 transfer-ownership from GTypes
845 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
847 * giscanner/transformer.py (_create_parameter):
848 * tests/scanner/foo-1.0-expected.gir: make varargs
849 transfer-ownership="none"
851 2008-10-23 Colin Walters <walters@verbum.org>
853 Bug 556739 - transfer ownership
855 * giscanner/ast.py: Refactor Parameter/Return to share
856 common attributes. Add transfer_inferred attribute
857 which says whether or not we made a guess.
858 * giscanner/transformer.py: Add much more extensive
859 heuristics around parameter and return transfer.
860 * giscanner/glibtransformer.py: Adjust to inspect
864 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
866 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
868 * tests/scanner/Makefile.am:
869 * tests/scanner/annotation-1.0-expected.tgir:
870 * tests/scanner/drawable-1.0-expected.tgir:
871 * tests/scanner/drawable-injected-1.0-expected.tgir:
872 * tests/scanner/foo-1.0-expected.tgir:
873 * tests/scanner/GtkFrob-1.0-expected.tgir:
874 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
875 annotations survive the roundtrip via typelib
877 The expectations are as currently produced by g-ir-generate,
878 comparison with the .gir files shows there are differences.
880 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
882 Bug 557468 – Support for GI_TYPELIB_PATH
884 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
885 provided paths to the global search path.
887 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
889 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
891 * tests/scanner/drawable-1.0-expected.tgir:
892 * tests/scanner/drawable-injected-1.0-expected.tgir:
893 * tests/scanner/foo-1.0-expected.tgir:
894 * tools/generate.c (write_object_info): write 'abstract'
895 attribute for classes
897 2008-10-22 Lucas Rocha <lucasr@gnome.org>
899 * girepository/girmodule.c, girepository/gtypelib.c,
900 girepository/girparser.[ch]: fix some build warnings.
902 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
904 Bug 557405 – Use 'allow-none' consistently
906 * docs/typelib-format.txt:
907 * girepository/ginfo.c (g_arg_info_may_be_null):
908 * girepository/girnode.c (g_ir_node_build_typelib):
909 * girepository/girnode.h (struct _GIrNodeParam):
910 * girepository/girparser.c (start_parameter):
911 * girepository/girwriter.c (function_generate):
912 * girepository/gtypelib.h (ArgBlob):
914 * tests/function.gir:
915 * tools/generate.c (write_callable_info): Use 'allow-none'
916 consistently throughout
918 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
920 Bug 557092 – Callback annotations not used
922 * giscanner/transformer.py (_create_callback): use annotations
924 * tests/scanner/annotation.h
925 * tests/scanner/annotation-1.0-expected.gir: add tests
927 2008-10-21 Colin Walters <walters@verbum.org>
929 * giscanner/scannerlexer.l: Don't require trailing whitespace after
930 uncommented parameters.
933 2008-10-21 Colin Walters <walters@verbum.org>
935 * girepository/girepository.c: Ensure that when doing an unversioned
936 require, we prefer items earlier in the search path to later ones.
938 2008-10-21 Owen Taylor <otaylor@redhat.com>
940 * giscanner/transformer.py: For string parameters allow transfer annotation
941 to override the standard automatic guessing based on 'const'.
943 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
945 Bug 557241 – "throws" flag for functions
947 * tests/scanner/drawable-1.0-expected.gir,
948 tests/scanner/drawable-injected-1.0-expected.gir,
949 tests/scanner/drawable.[ch]: add simple test for throwing
950 function (has GError ** as last argument)
952 * giscanner/ast.py: add a 'throws' flag to Function
953 * giscanner/glibtransformer.py: if a function's last paramerter is
954 a GError, set the 'throws' flag and remove that parameter
955 * giscanner/girwriter.py: write out the 'throws' attribute
956 * giscanner/girparser.py: support parsing the 'throws' attribute
958 * tests/repository/gitestthrows.c: add a simple test to check the
959 throws flag in a typelib and invoke the function
961 * girepository/ginfo.c, girepository/girnode.[ch],
962 girepository/girnode.h, girepository/girparser.c,
963 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
965 * girepository/ginvoke.c: if a function throws, add a GError as last
966 arguments, and propagate the error to the invoker.
968 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
970 * giscanner/transformer.py (_create_parameters): Warn if we see
971 annotations for unknown parameters. If .h and .c files name
972 parameters differently, the annotations may be lost.
974 2008-10-21 Johan Dahlin <johan@gnome.org>
976 Bug 556358 - don't use libtool internals
978 * giscanner/Makefile.am:
979 * giscanner/libtoolimporter.py:
980 * giscanner/sourcescanner.py:
981 * giscanner/utils.py:
982 Add a python meta importer and remove a libtool symlink hack.
984 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
986 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
987 and --add-include-path appropriately when invoking the scanner.
988 * tests/types/Makefile.am (%typelib): Likewise.
990 2008-10-20 Colin Walters <walters@verbum.org>
992 Bug 556777 - validate properties
994 * giscanner/transformer.py: Add option to throw on unknown types.
995 * giscanner/glibtransformer.py: Use it on properties.
996 * tests/*: Add a test.
998 2008-10-20 Colin Walters <walters@verbum.org>
1000 * giscanner/glibast.py: Also register g variants of
1001 default_array_types. This is not beautiful, but
1002 good alternatives aren't easy to come by.
1003 This fixes gchar ** parsing.
1005 2008-10-20 Colin Walters <walters@verbum.org>
1007 * docs/typelib-format.txt, girepository/gtypelib.h:
1008 Take a bit from ObjectInfo to represent abstract flag.
1009 * giscanner/cgobject.py: Expose g_type_get_flags.
1010 * girepository/girepository.h: Add accessor.
1011 * girepository/ginfo.c: Implement it.
1012 * giscanner/ast.py: Add is_abstract flag to generic
1014 * giscanner/glibast.py: Use it.
1015 * giscanner/girwriter.py: Write it.
1016 * girepository/girparser.c: Parse it.
1019 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1021 * giscanner/girparser.py (_parse_function): don't lose
1022 'transfer-ownership' attributes when injecting, check for the
1025 2008-10-19 Johan Dahlin <johan@gnome.org>
1027 * giscanner/scannerlexer.l: Parse and ignore __asm.
1029 2008-10-19 Colin Walters <walters@verbum.org>
1031 * giscanner/girparser.py: Parse array length= to ensure
1032 it doesn't get lost from --inject.
1034 2008-10-17 Colin Walters <walters@verbum.org>
1036 Bug 556795 - char ** regression
1038 * giscanner/transformer.py: Fix parsing of ctypes, add some
1039 comments about what's going on.
1040 * tests/*: Add a test for char **.
1042 2008-10-17 Colin Walters <walters@verbum.org>
1044 Bug 556783 - change namespace handling to be more consistent
1046 * giscanner/transformer.py: Eliminate usage of
1047 strip_namespace_object. We now treat --namespace as the default
1048 --strip-prefix; however, if --strip-prefix is specified it
1049 overrides --namespace. This applies to everything except function
1050 names, where we do also strip the namespace.
1051 * giscanner/glibtransformer.py: Remove usage of
1052 strip_namespace_object.
1054 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1055 --namespace and --strip-prefix.
1057 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1059 Bug 556732 – generate gir files consistently
1061 * girepository/girparser.c (start_parameter):
1063 * tests/invoke/testfns-1.0.gir:
1064 * tools/generate.c (write_callable_info): write
1065 'transfer-ownership' attribute consistently with both
1066 return-value and parameter elements
1068 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1070 Bug 556732 – generate gir files consistently
1072 * tools/generate.c (write_callable_info): write 'direction'
1073 attribute only if other than 'in' to be consistent with
1076 * tests/object.gir: remove direction="in" which is the default
1078 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1080 Bug 556732 – generate gir files consistently
1082 * giscanner/ast.py (Field): add readable and writable properties
1083 * giscanner/girparser.py (_parse_field): copy 'readable' and
1084 'writable' attributes
1085 * giscanner/transformer.py (_create_member): create fields as
1087 * giscanner/glibtransformer.py (_introspect_object,
1088 _pair_class_struct): make object instance and class fields
1090 * giscanner/girwriter.py (_write_field):
1091 * tools/generate.c (write_field_info): write field 'readable'
1092 and 'writable' attributes only if non-default (read-only)
1093 * girepository/girparser.c (start_field): in the absence of
1094 attributes assume fields are read-only
1096 * tests/struct.gir: remove redundant readable="1" from fields
1097 * tests/scanner/foo-1.0-expected.gir:
1098 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1099 all record and union fields
1101 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1103 Bug 556732 – generate gir files consistently
1105 * giscanner/girwriter.py (_write_property): write properties
1106 'construct' attribute if set
1107 * tools/generate.c (write_property_info): write properties
1108 'readable' and 'writable' attributes only if non-default
1109 * tests/object.gir: add writable="0"
1110 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1112 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1114 * gir/glib-2.0.c: added annotations
1116 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1118 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1121 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1123 Bug 556610 – giscanner/girparser.py drops parameter options
1125 * tests/scanner/drawable-injected-1.0-expected.gir,
1126 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1127 * giscanner/ast.py: allow Parameter to take options in the constructor
1128 * giscanner/girparser.py: parse parameter options (transfer,
1129 direction, allow-none)
1131 2008-10-16 Colin Walters <walters@verbum.org>
1133 Bug 556185 - segfault on g_callable_info_get_return_type
1135 Initial patch from John Ehresman.
1137 * tests/repository/*: Add a test using
1138 g_callable_info_get_return_type. Instead of casting a
1139 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1140 to call g_type_info_get_interface.
1142 2008-10-16 Colin Walters <walters@verbum.org>
1144 Bug 556579 - union and struct name misresolved
1146 * giscanner/transformer.py: The calls to _resolve_type_name
1147 for struct/union names was a legacy holdover from when type
1148 resolution had multiple phases. Now it's actively harmful
1149 since we might pull in an identical name from another
1153 2008-10-16 Colin Walters <walters@verbum.org>
1155 Bug 556432 - transfer annotations and defaults
1157 * giscanner/transformer.py: Canonicalize type
1158 after removing *, not before. This ensures that
1159 guchar* is transformed to 'uint8'.
1160 Add some comments here.
1161 * giscanner/glibtransformer.py: Add _adjust_transfer
1162 phase for tweaking GObject transfers.
1165 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1167 * configure.ac: enable bunch of gcc warning CFLAGS
1169 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1171 Bug 556543 – reduce compiler warnings
1173 * girepository/ginfo.c:
1174 * girepository/girepository.c (register_internal,
1175 count_interfaces, find_interface, find_namespace_version,
1176 parse_version, g_irepository_require):
1177 * girepository/girmodule.c (g_ir_module_build_typelib):
1178 * girepository/girnode.c (init_stats, dump_stats,
1179 _g_irnode_init_stats, _g_irnode_dump_stats,
1180 g_ir_node_can_have_member):
1181 * girepository/girparser.c (firstpass_end_element_handler,
1182 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1183 start_alias, start_type, end_type_top, parse_include, cleanup,
1185 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1186 * giscanner/giscannermodule.c (directive_get_options,
1187 type_get_child_list):
1188 * giscanner/scannerlexer.l (parse_gtkdoc):
1189 * giscanner/scannerparser.y (ctype_free):
1190 * giscanner/sourcescanner.c:
1191 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1192 * tests/types/gitesttypes.c:
1193 * tools/compiler.c (main):
1194 * tools/generate.c (write_repository): Remove unused variables
1195 and code, add missing includes, declarations and case
1198 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1200 Bug 556541 – access union members through UnionBlob rather than
1203 * girepository/ginfo.c (g_union_info_find_method): access union
1204 members through UnionBlob rather than StructBlob
1206 2008-10-15 Colin Walters <walters@verbum.org>
1208 Bug 556331 - clean up includes handling
1210 * tools/g-ir-scanner: Rework command line arguments; now we take
1211 --add-include-path and --include separately.
1212 * giscanner/girwriter.py: Separate name= and version= in include
1214 * giscanner/ast.py: Add Include type.
1215 * giscanner/transformer.py: Cleanups to register_include now that
1216 we don't need to handle mixed filenames and relative arguments.
1217 * girepository/girparser.c: Parse name and version separately;
1218 this fixes a bug as a side effect where we weren't resolving
1219 through aliases for basic types.
1220 * girepository/girepository.c: Fix format string args.
1221 * gir/Makefile.am: Update.
1224 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1226 Bug 556434 – unhandled interface/object/... member types
1228 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1229 g_ir_node_build_typelib): Check all
1230 interface/object/boxed/struct/union members are processed and
1231 abort if they are not. (Mostly callbacks in structs, but also
1232 fields in interfaces.)
1234 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1236 * a/girepository/girnode.c (g_ir_node_build_members,
1237 g_ir_node_build_typelib): refactor common code for processing
1238 members to a function
1240 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1242 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1243 transformation is lossless (it's not)
1245 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1247 * tests/Makefile.am: fix tests to compare xml to xml instead of
1248 typelib to xml, and stop on error
1250 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1252 * tools/generate.c (write_type_name, write_type_info,
1253 write_type_info, write_object_info, write_object_info,
1254 write_interface_info, write_error_domain_info): reduce code
1257 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1259 Bug 556174 – parse types for lists etc.
1261 * girepository/girparser.c (end_type_recurse):
1263 * tools/generate.c (write_type_info, write_field_info,
1264 write_callable_info, write_callable_info, write_constant_info,
1265 write_property_info): use nested <type>s for lists and hashes
1267 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1270 * tests/object.gir: remove trailing whitespace from inside
1271 elements to match g-ir-generate output
1273 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1275 * tools/generate.c (xml_printf): quote printf arguments so that
1276 we don't generate invalid XML by writing unescaped double quotes
1277 and such in attributes
1279 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1281 * tools/generate.c (write_field_info, write_callable_info,
1282 write_function_info, write_callback_info, write_struct_info,
1283 write_constant_value, write_signal_info, write_vfunc_info,
1284 write_object_info, write_interface_info, write_union_info,
1285 write_repository): remove unused indent parameters, xmlwriter
1286 keeps track of necessary indentation
1288 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1290 * tools/generate.c (xml_element_new, xml_element_free,
1291 xml_start_element, xml_end_element, xml_end_element_unchecked,
1292 xml_open, xml_close): Keep track of generated XML tree and
1293 handle indentation and closing tags properly.
1294 (write_field_info, write_callable_info, write_function_info,
1295 write_callback_info, write_struct_info, write_value_info,
1296 write_constant_info, write_enum_info, write_signal_info,
1297 write_vfunc_info, write_property_info, write_object_info,
1298 write_interface_info, write_error_domain_info, write_union_info,
1299 write_repository): Use xml_start_element and xml_end_element to
1302 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1304 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1305 (write_type_name, write_type_info, write_field_info,
1306 write_callable_info, write_function_info, write_callback_info,
1307 write_struct_info, write_value_info, write_constant_value,
1308 write_constant_info, write_enum_info, write_signal_info,
1309 write_vfunc_info, write_property_info, write_object_info,
1310 write_interface_info, write_error_domain_info, write_union_info,
1311 write_repository): wrap all FILE access to go through simple xmlwriter
1313 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1315 Bug 556400 – Fails to build on OS X 10.4
1317 * configure.ac: check for functions backtrace and backtrace_symbols
1318 * girepository/girparser.c (backtrace_stderr): Comment out
1319 implementation if the functions are not available.
1320 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1321 directory for better portability
1323 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1325 Bug 556433 – assume direction = out for int * parameters
1327 * giscanner/ast.py: define a list of types for which, if passed as
1328 reference, we assume a default direction of 'out'
1329 * giscanner/transformer.py: if a type has type pointer to one of the
1330 previously defined types, and no direction is set, assume out.
1331 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1333 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1335 * tests/scanner/annotation.c: fixed a few copy-paste errors
1337 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1339 Bug 556323 – transfer-ownership is wrong for functions returning const
1342 * giscanner/transformer.py: check for a const string as return value,
1343 not just const char*. Suggested by Colin Walters
1344 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1346 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1348 * girepository/ginfo.c, girepository/girepository.h: add
1349 g_union_info_find_method
1351 2008-10-14 Colin Walters <walters@verbum.org>
1353 * tests/repository/Makefile.am: Reenable repo test.
1354 * tests/repository/gitestrepo.c: Prepend search
1355 path for $(top_builddir)/gir dir so that we don't
1356 require installation for "make check" to pass.
1358 2008-10-13 Jürg Billeter <j@bitron.ch>
1360 * giscanner/glibtransformer.py:
1361 * tests/scanner/annotation-1.0-expected.gir:
1362 * tests/scanner/drawable-1.0-expected.gir:
1363 * tests/scanner/foo-1.0-expected.gir:
1364 * tests/scanner/utility-1.0-expected.gir:
1366 Support fields in GObject structs
1368 2008-10-13 Jürg Billeter <j@bitron.ch>
1370 * giscanner/ast.py: add signed integer and off_t to type_names
1372 2008-10-12 Jürg Billeter <j@bitron.ch>
1374 * giscanner/girparser.py: Parse bits attribute of fields
1376 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1378 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1379 * tests/repository/gitestrepo.c (main): instantiate
1380 'GCancellable' to ensure the GType is registered before using
1383 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1385 * giscanner/girparser.py: actually add the parsed constant nodes
1387 2008-10-12 Colin Walters <walters@verbum.org>
1389 * girepository/girepository.c: Don't cast DirEntry to Blob,
1390 actually look it up by offset.
1392 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1394 * giscanner/girparser.py: parse constant nodes in gir files
1396 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1398 * giscanner/transformer.py: prefix for constants have an underscore,
1399 so remove them as if they were functions, not objects.
1401 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1403 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1406 2008-10-12 Colin Walters <walters@verbum.org>
1408 Initial patch from Jani Monoses.
1410 * girepository/gtypelib.c: Fix inverted test for success
1413 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1415 * tools/generate.c (write_callable_info): use "transfer-ownership"
1416 attribute for return values
1418 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1420 * tools/generate.c (write_callable_info): move "transfer" and
1421 "null-ok" attributes from <function> to <return-value> element
1423 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1425 * girepository/girparser.c (start_return_value): handle
1426 "transfer-ownership" attribute
1428 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1430 * girepository/girparser.c (parse_param_transfer):
1431 * tools/generate.c (write_callable_info): use "container" for
1432 container/shallow ownership transfer (not "shallow")
1434 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1436 * girepository/girparser.c (parse_param_transfer,
1437 start_parameter): Refactor handling of transfer=none/shallow/full
1438 to separate function
1440 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1442 Bug 556048 – Crash in g_irepository_find_by_gtype
1444 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1445 * girepository/girepository.c (find_interface): Fix
1446 find_by_gtype case to get the type name from right offset
1448 2008-10-12 Jürg Billeter <j@bitron.ch>
1450 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1453 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1455 * girepository/gtypelib.h (RegisteredTypeBlob): make
1456 'unregistered' one bit wide as everywhere else
1458 2008-10-12 Jürg Billeter <j@bitron.ch>
1460 * giscanner/glibtransformer.py:
1461 * tests/scanner/annotation-1.0-expected.gir:
1462 * tests/scanner/drawable-1.0-expected.gir:
1463 * tests/scanner/drawable.h:
1464 * tests/scanner/foo-1.0-expected.gir:
1465 * tests/scanner/utility-1.0-expected.gir:
1467 Readd class records as workaround to not break Gtk typelib
1469 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1471 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1473 2008-10-12 Jürg Billeter <j@bitron.ch>
1475 * giscanner/glibtransformer.py: Don't generate <record> elements
1477 * tests/scanner/*: Update test cases
1479 2008-10-11 Colin Walters <walters@verbum.org>
1481 Bug 552858: versioning
1483 This is a big patch. You should probably remove your installation
1486 * docs/typelib-format.txt: Add nsversion entry which holds
1487 version of namespace.
1488 * girepository/girepository.h: Add 'version' parameter to
1489 g_irepository_require. This may be NULL. Normally
1490 bindings should pass an explicit version though.
1491 * girepository/girepository.c: Lots of infrastructure to
1492 support versioning. Add some more documentation. Disallow
1493 some usage of NULL namespaces.
1494 * girepository/girmodule.c: Add version parameter.
1495 * girepository/gtypelib.c: Update header size.
1496 * giscanner/ast.py: Add version to Namespace.
1497 * giscanner/girparser.py: Parse version attribute from
1498 XML, pass to Namespace.
1499 * giscanner/girwriter.py: Write out version parameter.
1500 * giscanner/transformer.py: Clean up include registration.
1501 * tests/*: Add version attribute.
1502 * tests/invoke/invoke.c: Don't try looking up test before
1503 it's loaded in repository.
1504 * tools/generate.c: Output version parameter.
1505 * gir/Makefile.am: Add 2.0 version to .gir files.
1507 2008-10-11 Colin Walters <walters@verbum.org>
1509 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1510 if we have mismatched parens.
1512 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1514 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1515 on 'members' variable.
1517 2008-10-11 Colin Walters <walters@verbum.org>
1519 Bug 555947 - update annotations syntax
1521 * giscanner/ast.py: Default to None for transfer. Remove
1522 default transfers for container types; we require this to
1524 * giscanner/girwriter.py: Transfer is now 'none', 'container',
1525 'full' to match repository.
1526 * giscanner/scannerlexer.l: Annotations now are parenthesized.
1527 * giscanner/transformer.py: Update for new annotations syntax.
1530 2008-10-11 Johan Bilien <jobi@litl.com>
1532 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1534 2008-10-11 Johan Bilien <jobi@litl.com>
1536 Bug 552347: Parse #defines constants
1538 * girepository/gtypelib.c: update the list of value_size
1539 with recently defined type tags
1540 * giscanner/scannerparser.y: brought back parsing of #defined, as
1541 present in older version
1542 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1543 * giscanner/girwriter.py: write out constant tags in the gir
1544 * giscanner/sourcescanner.py: add accessor for const_string
1545 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1548 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
1550 Bug 555946: Install a test module exercising all types, transfer
1555 * tests/types/*: Add and install a test module that has functions
1556 accepting and returning most of the basic types to enable bindings
1557 implementors to more easily test their type conversion routines.
1559 2008-10-11 Jürg Billeter <j@bitron.ch>
1561 Bug 552374: Const strings should be identified in the gir.
1563 * giscanner/transformer.py: support string memory management
1564 * tests/scanner/foo.h: use char * and const char *
1565 * tests/scanner/foo-expected.gir: test that
1567 2008-10-11 Johan Dahlin <johan@gnome.org>
1569 * giscanner/girparser.py:
1570 Also parse enums which are not glib types.
1572 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1574 Bug 552370: add one more test for unsigned as a type, not as
1577 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
1578 * test/scanner/foo.h: add function which uses unsigned as a type.
1579 * test/scanner/foo-expected.gir: test that.
1581 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
1583 Bug 555712: Struct and union issues
1585 * giscanner/scannerparser.y (struct_declarator): Use information
1586 provided about the bit width of a field.
1587 * giscanner/transformer.py (Transformer._create_member): Pass the
1588 symbol's const_int member to the created field (it represents the
1590 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
1591 field attribute, if present.
1592 * giscanner/ast.py (Field): Add 'bits' member, specifying the
1593 width in bits of the field (only relevant for bitfields).
1596 * giscanner/transformer.py (Transformer._create_typedef_struct)
1597 (Transformer._create_typedef_union): Add calls to _create_struct()
1598 and _create_union(), respectively. This causes the scanner to
1599 generate output for fields of struct and union typedefs.
1602 2008-10-11 Jürg Billeter <j@bitron.ch>
1604 Bug 552370: unsigned not scanned properly
1606 * giscanner/scannerparser.y: combine basic types such as unsigned
1607 int and long long when scanning
1608 * tests/scanner/foo-expected.gir:
1609 * tests/scanner/foo.c: (foo_test_unsigned):
1610 * tests/scanner/foo.h: test that
1612 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1614 Bug 554854: The --typelib-xml and --inject options should reuse
1615 giscanner parser/writer.
1617 * giscanner/ast.py: add constructor list to Struct and Union.
1618 Add new param in Return's contructor to define transfer.
1619 * giscanner/girparser.py: several additions to the parser in order
1620 to have parsing all nodes of the gir xml files.
1621 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
1622 and writer in --inject and --typelib-xml options.
1623 * giscanner/xmlwriter.py: ignore empty attributes instead of
1624 raising an error as this basically exposes a bug in GIRParser.
1625 This should be reverted as soon as the parser is fixed.
1627 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1629 Bug 552376: scanner generates wrong names for enum members when
1630 there's no defined gtype.
1632 * giscanner/utils.py (strip_common_prefix): Always strip common
1633 prefix exactly up to the last "_", and not beyond.
1634 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
1635 here is that the first character after the last '_' should should be
1636 the same as the character in the same position on the type name.
1637 * tests/scanner/foo-expected.gir: test that
1639 2008-10-10 Lucas Rocha <lucasr@gnome.org>
1641 Bug 555293: append library_paths to LPATH env variable to work
1642 around a bug in find_library when using ldconfig.
1644 * tools/g-ir-scanner (main): ditto.
1646 2008-10-09 Lucas Rocha <lucasr@gnome.org>
1648 * girepository/girepository.c (register_internal): fix regression on
1649 invoke test case by making sure we load the global module in the
1650 typelib when dealing with inline typelibs.
1651 * girepository/gtypelib.c: a couple of coding style fixes.
1653 2008-10-06 Lucas Rocha <lucasr@gnome.org>
1655 Bug 555294: Add support for multiple shared libraries per typelib.
1657 * girepository/ginvoke.c (g_function_info_invoke),
1658 girepository/ginfo.c(g_registered_type_info_get_g_type): use
1659 g_typelib_symbol instead of g_module_symbol.
1660 * girepository/girepository.h: remove g_typelib_set_module and add
1662 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
1663 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
1664 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
1665 modules instead of just one. The symbol lookup is now abstracted
1666 behind g_typelib_symbol which tries to find the passed symbol name in
1668 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
1669 and write shared_library attribute as a comma-separated list of libs.
1671 2008-10-06 Colin Walters <walters@verbum.org>
1673 * giscanner/transformer.py: Parse length= annotation as
1674 a parameter name, not a raw int.
1677 2008-10-03 Colin Walters <walters@verbum.org>
1679 Bug 551744: Non-GObject types aren't aggregating ctors and methods
1681 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
1683 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
1687 2008-10-03 Colin Walters <walters@verbum.org>
1689 Bug 554576: scan problem with ev_selection_render_selection()
1691 * giscanner/transformer.py: Only do type resolution once we've
1692 scanned all types. What could happen before is that we'd strip
1693 the namespace from local type "EvSelection" => Selection, and
1694 then later pull a "Selection" from some other namespace because
1695 we hadn't yet seen the local EvSelection. This could come
1696 down to hash table ordering and other things so not easy
1697 to write a test for.
1699 2008-10-03 Lucas Rocha <lucasr@gnome.org>
1701 * giscanner/girwriter.py (_parser_member): fix the last parameter of
1702 GLibEnumMember constructor as it should be the enum member nick.
1704 2008-10-02 Colin Walters <walters@verbum.org>
1706 Bug 552961: remove this parameter for methods
1708 * giscanner/glibtransformer.py: Delete this parameter; it is
1710 * girepository/ginvoke.c: Insert this parameter for methods.
1711 * girepository/gtypelib.c: Remove no longer needed verification of
1712 method this parameter.
1715 2008-09-30 Dan Winship <danw@gnome.org>
1717 Bug 554490: g-ir-scanner gets confused by '\\'
1719 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
1720 backslashes so it will correctly parse '\\' and "\\"
1722 * tests/scanner/annotation.c: add a use of '\\' to make sure that
1725 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
1727 2008-10-02 Colin Walters <walters@verbum.org>
1729 bug 552393: Note variadic functions
1731 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
1732 to use parameter_list directly.
1733 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
1734 * giscanner/ast.py: Add Varargs type.
1735 * giscanner/transformer.py: Check for ellipsis symbol, transform
1737 * girepository/girnode.h: Add varargs flag to in-memory nodes.
1738 Parse varargs functions, but filter them out before we start
1739 compiling the typelib.
1741 2008-10-02 Colin Walters <walters@verbum.org>
1743 Bug 554632: type tag for GType
1745 * girepository/girepository.h, girepository/girepository.c:
1746 Add type tag for GType - it's a special type we don't want
1747 to resolve to just "long".
1748 * docs/typelib-format.txt: Update.
1749 * girepository/girparser.c: Parse it.
1750 * giscanner/glibtransformer.py: Ensure we don't put GType in
1752 * tools/generate.c: Remove hardcoded type list.
1755 2008-09-30 Dan Winship <danw@gnome.org>
1757 Bug 554521: scanner generates wrong names for enum members with
1758 full type name prefix
1760 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
1761 right amount when the entire "first" string is a prefix of
1764 * tests/scanner/foo.h (FooEnumFullname):
1765 * tests/scanner/foo-expected.gir: test that
1767 2008-09-29 Colin Walters <walters@verbum.org>
1769 Bug 552380: Array parameters should be marked in the gir
1771 * giscanner/ast.py: Default char** to utf8[], and guchar* to
1772 uint8[]. Add Array, List, and Map subclasses of Type;
1773 these types can be generic. Return transfer defaults
1774 to true if return value is string or container type.
1775 Delete Sequence type.
1776 * giscanner/scannerlexer.l: Syntax change for annotations;
1777 use <> since it's more readable.
1778 * giscanner/girwriter.py: Write out these changes.
1779 * giscanner/girparser.py: Parse them.
1780 * giscanner/transformer.py: Have a defined set of
1781 both list and map types. When creating a type,
1782 check if the ctype we've parsed is one of them,
1783 if so create a container type subclass as appropriate.
1784 * girepository/girparser.c: Parse in generic types.
1787 2008-09-27 Colin Walters <walters@verbum.org>
1789 * tools/g-ir-scanner: Add --inject option.
1791 2008-09-25 Colin Walters <walters@verbum.org>
1793 Remove non-repository types from GIR
1795 * giscanner/ast.py: The canonical name is 'utf8', not
1797 * giscanner/glibast.py: A few more glib type mappings.
1798 * girepository/girparser.c: We only parse repository types.
1799 * tests/*.gir: Update.
1801 2008-09-23 Colin Walters <walters@verbum.org>
1803 Bug 552566: Add time_t type
1805 We need a type for time_t since it's special in C, and just
1806 mapping it to long precluded bindings from handling it
1809 2008-09-19 Colin Walters <walters@verbum.org>
1811 Bug 552390: Handle capitialization like "DBus" more robustly
1813 The to_underscores function was designed for use against prefixed
1814 names; we need a separate function which will convert names like
1815 DBusFoo into dbus_foo, not d_bus_foo.
1817 2008-09-19 Colin Walters <walters@verbum.org>
1819 Add check to make sure we're not hitting out unresolved types
1821 Validate the "this" argument for methods
1823 Remove heuristic matching of methods to classes based on prefix
1825 It was a broken hack that dated from when we handled underscoring
1826 and capitalization conventions less well.
1828 2008-09-18 Colin Walters <walters@verbum.org>
1830 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
1832 On Darwin, the suffix for installed shared libraries (.dylib) is
1833 different from loadable modules (.so). We use a bit of magic shell
1834 script from Behdad Esfahbod to figure out the right suffix.
1836 2008-09-15 Johan Dahlin <johan@gnome.org>
1838 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
1839 a wrapper for type_qualifier as well.
1841 2008-09-15 Colin Walters <walters@verbum.org>
1843 http://bugzilla.gnome.org/show_bug.cgi?id=552065
1845 * giscanner/ast.py: Add deprecation attributes.
1846 * giscanner/girwriter.py: Write out deprecation data.
1847 * girepository/girparser.c: Relax parsing; deprecated
1848 attribute now includes freeform string.
1849 * giscanner/scannerlexer.l: Parse Deprecated.
1850 * giscanner/transformer.py: Look for deprecated attribute
1852 * tests/scanner/*: Add a Deprecated test.
1854 2008-09-14 Tor Lillqvist <tml@novell.com>
1856 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
1858 2008-09-14 Colin Walters <walters@verbum.org>
1860 * giscanner/glibtransformer.py: Ignore functions with
1863 2008-09-12 Colin Walters <walters@verbum.org>
1865 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
1867 2008-09-12 Colin Walters <walters@verbum.org>
1869 * giscanner/ast.py: Bind pid_t to INT for vte.
1871 2008-09-12 Colin Walters <walters@verbum.org>
1873 * giscanner/girparser.py: Parse c:type for boxed records/unions.
1874 * giscanner/glibast.py: Avoid overwriting ctype.
1875 * giscsanner/transformer.py: Try resolving types using the GType names.
1877 2008-09-12 Colin Walters <walters@verbum.org>
1879 * giscanner/minixpath.py: Code to run an "XPath"
1880 assertion against an XML tree, taken from
1881 gir-repository/gir/tests.py.
1882 * giscanner/Makefile.am: Ship it.
1883 * tools/g-ir-scanner: Add --xpath-assertions option.
1884 * gir/GLib-assertions.txt: Add a few assertions.
1885 * gir/Makefile.am: Run them.
1887 2008-09-11 Colin Walters <walters@verbum.org>
1889 http://bugzilla.gnome.org/show_bug.cgi?id=551737
1891 * giscanner/transformer.py: Fix strip_namespace_func to only strip
1892 prefix if it ends with _. Tweak callback stripping to determine
1893 based on presence of _ whether we need to use strip_namespace_func
1894 or strip_namespace_object.
1896 2008-09-09 Owen Taylor <otaylor@redhat.com>
1898 * docs/typelib-format.txt: Wether => Whether
1900 2008-09-08 Colin Walters <walters@verbum.org>
1902 * girepository/girparser.c: Default to "readable" for properties.
1903 * giscanner/ast.py: Add readable, writable etc.
1904 * giscanner/girwriter.py: Writ them.
1905 * giscanner/glibtransformer.py: Inspect them.
1908 2008-09-07 Colin Walters <walters@verbum.org>
1910 * giscanner/cgobject.py: Add comment.
1912 2008-09-07 Colin Walters <walters@verbum.org>
1914 * giscanner/cgobject.py: Also call g_thread_init.
1916 2008-09-07 Colin Walters <walters@verbum.org>
1918 * giscanner/transformer.py: Fix regression by not
1919 stripping prefix before stripping namespace for unions
1922 2008-09-06 Colin Walters <walters@verbum.org>
1924 * giscanner/transformer.py: If a namespace contains
1925 multiple caps, try stripping both gnomekeyring_ and
1928 2008-09-07 Johan Dahlin <johan@gnome.org>
1930 Bug 551162 – giscanner does not recognize asm and __asm__
1931 * giscanner/scannerlexer.l:
1932 Patch by Jani Monoses.
1934 2008-09-06 Colin Walters <walters@verbum.org>
1936 * girepository/girnode.c: Allow gtype_name
1937 and gtype_init in struct and union.
1938 * girepository/girparser.c: Parse glib:
1939 boxed bits for both structure and union.
1940 * girepository/gtypelib.c: Don't barf
1941 if structure is boxed.
1942 * giscanner/girparser.py: Parse new XML
1944 * giscanner/girwriter.py: Write out new
1946 * giscanner/glibast.py: Define new classes
1947 which are both Boxed and Struct/Union, as
1948 well as an "Other" for everything else.
1949 * giscanner/glibtransformer.py: Handle
1950 boxed types specially; we try to merge
1951 them with a struct/union if one exists,
1952 otherwise fall back to generic boxed.
1954 * tools/generate.c: Write out new format.
1956 2008-09-06 Johan Dahlin <johan@gnome.org>
1958 * giscanner/grealpath.h: Include stdlib.h
1960 * docs/g-ir-generate.1: Remove leading %
1962 2008-09-01 Colin Walters <walters@verbum.org>
1964 * girepository/girparser.c: Look at c:type to determine
1965 whether or not an item is a pointer.
1967 2008-09-01 Johan Dahlin <johan@gnome.org>
1969 * tests/scanner/Makefile.am:
1970 Set PYTHONPATH so the scanner can run
1971 even if you didn't install anything.
1973 2008-09-01 Johan Dahlin <johan@gnome.org>
1976 Post-release version bump
1979 2008-09-01 Johan Dahlin <johan@gnome.org>
1983 2008-08-31 Colin Walters <walters@verbum.org>
1985 * giscanner/glibtransformer.py: Quiet info
1988 2008-08-31 Johan Dahlin <johan@gnome.org>
1991 Bump version to 0.5.0
1993 2008-08-31 Colin Walters <walters@verbum.org>
1995 * giscanner/glibtransformer.py: Follow aliases to ensure
1996 we don't get a constructor returning a basic type.
1997 * giscanner/transformer.py: Add function to follow aliases.
2000 2008-08-31 Johan Dahlin <johan@gnome.org>
2002 * giscanner/scannerlexer.l:
2003 * giscanner/scannerparser.y:
2004 * giscanner/sourcescanner.h:
2005 * giscanner/sourcescanner.py:
2006 Parse GCC extensions in the parser instead of just undeffing them
2007 in the pre-processor.
2009 2008-08-31 Johan Dahlin <johan@gnome.org>
2011 * giscanner/glibtransformer.py:
2012 Clean up a huge if. Do not add methods or constructors
2014 * giscanner/utils.py:
2015 second might be longer than first, check that.
2017 2008-08-31 Johan Dahlin <johan@gnome.org>
2022 2008-08-31 Colin Walters <walters@verbum.org>
2024 * girepository/girparser.c: Don't lose if we
2027 2008-08-31 Colin Walters <walters@verbum.org>
2029 * giscanner/glibtransformer.py: Look for libtool
2030 library in current directory
2031 * tests/scanner - Update.
2033 2008-08-30 Colin Walters <walters@verbum.org>
2035 * docs/typelib-format.txt: Add a guint32
2037 * gir/Makefile.am: Dep on Makefile
2038 * girepository/ginfo.c:
2039 * girepository/girepository.c: Clean up
2040 default typelib handling; remove global
2041 default_typelib variable. Ensure we handle
2042 NULL repository in more places.
2043 Support dependency resolution.
2044 Support lazy loading.
2045 * girepository/girepository.h: Remove
2046 g_irepository_unregister; we don't support
2047 unloading typelibs since really they're
2048 process-global. Update for lazy loading
2050 * girepository/girmodule.c: Use g_new0.
2051 Add dependencies to GirModule.
2052 * girepository/girparser.c: Parse dependencies.
2053 * girepository/gtypelib.c: Add 4 bytes for
2055 * tests/Makefile.am: Kill off gobject.gir,
2056 it conflicts with the real one.
2057 * tests/object.gir: Dep on GObject.
2058 * tools/generate.c: Take --includedir
2059 argument to say which directories to search
2060 for typelibs. Print out dependencies.
2062 2008-08-30 Colin Walters <walters@verbum.org>
2064 * giscanner/glibtransformer.py: Reduce warning noise.
2066 2008-08-29 Colin Walters <walters@verbum.org>
2068 * girepository/ginfo.c: Add some assertions regarding
2069 refcounts, just to be sure.
2070 * giscanner/glibtransformer.py: Blacklist a few more
2073 2008-08-29 Colin Walters <walters@verbum.org>
2075 * giscanner/glibtransformer.py: Blacklist a few
2076 functions that use GError oddly
2078 2008-08-29 Colin Walters <walters@verbum.org>
2080 * girepository/gtypelib.c: Don't crash if no
2083 2008-08-29 Colin Walters <walters@verbum.org>
2085 * girepository/girparser.c: Handle chains of aliases
2086 across modules by ensuring we fully qualify aliases
2089 2008-08-29 Colin Walters <walters@verbum.org>
2091 * girepository/girparser.c: Don't search aliases
2094 2008-08-29 Colin Walters <walters@verbum.org>
2096 * girepository/girparser.c: Rewrite type parsing
2097 to handle both GLib parsing case as well as correctly
2098 handling GLib.List and friends. Don't try to treat
2099 e.g. ListStore as a List.
2101 2008-08-29 Colin Walters <walters@verbum.org>
2103 * girepository/gtypelib.c: Add more context
2106 2008-08-29 Colin Walters <walters@verbum.org>
2108 * giscanner/glibtransformer.py: Add some informative
2109 logging messages in corner cases. Be sure we use
2110 the most recent node set instead of a cache
2111 when generating result set.
2112 * tests/: Remove duplicated bits in expected girs
2113 * girepository/girparser.c: Accept both List (for
2114 compiling GLib) and GLib.List (what the scanner
2117 * tools/generate.c: Generate canonical form.
2119 2008-08-29 Johan Dahlin <johan@gnome.org>
2121 * giscanner/config.py.in:
2122 Use datarootdir instead of datadir to avoid
2123 an autoconf warning.
2125 2008-08-29 Johan Dahlin <johan@gnome.org>
2129 * examples/gdk-pixbuf.gidl:
2131 Update and remove old cruft.
2133 2008-08-29 Johan Dahlin <johan@gnome.org>
2136 * docs/g-ir-compiler.1:
2137 * docs/g-ir-generate.1:
2138 * docs/g-ir-scanner.1:
2139 Add man pages for the generator and compiler.
2141 2008-08-29 Johan Dahlin <johan@gnome.org>
2143 * docs/g-ir-scanner.1: Document
2145 * giscanner/Makefile.am:
2146 * giscanner/gidlparser.py:
2147 * giscanner/gidlwriter.py:
2148 * tools/g-ir-scanner:
2149 Remove gidl support.
2151 2008-08-28 Colin Walters <walters@verbum.org>
2153 * tests/scanner/Makefile.am: Pass the right
2154 --includedir args. Add a Makefile dep.
2155 * tools/compiler.c: Pass includedirs down.
2156 * girepository/girparser.c: Actually put
2157 includedirs in context, pass down. Fix
2160 2008-08-28 Colin Walters <walters@verbum.org>
2162 * gir/Makefile.am: Use --includedir
2163 * girepository/girparser.c: Recursively parse
2164 includes to pull in aliases and expand them.
2165 We need this to avoid putting unknown names in
2167 * tools/compiler.c: Add --includedir option.
2168 * giscanner/ast.py: Map size/ssize to types
2171 2008-08-28 Tor Lillqvist <tml@novell.com>
2173 Make check now runs successfully on Windows.
2175 * tools/compiler.c (write_out_typelib): Use binary mode for output
2178 * girepository/girnode.c: Don't print NULL strings.
2180 * tests/invoke/Makefile.am
2181 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2182 convince libtool to build shared libraries.
2184 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2185 g_assert() instead of printing out expected errors.
2187 2008-08-28 Tor Lillqvist <tml@novell.com>
2189 * girepository/gtypelib.h: Change type of bitfield fields from
2190 guint to the most suitable smaller type. This makes the struct
2191 sizes match the ones on Linux that the sanity check expects when
2192 using gcc -mms-bitfields on Windows.
2194 2008-08-28 Johan Dahlin <johan@gnome.org>
2199 * giscanner/Makefile.am:
2200 * tests/Makefile.am:
2201 * tests/scanner/Makefile.am:
2202 Make distcheck pass.
2204 2008-08-27 Johan Dahlin <johan@gnome.org>
2206 * giscanner/Makefile.am:
2207 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2209 2008-08-27 Tor Lillqvist <tml@novell.com>
2211 Make g-ir-scanner work on Windows. Still problems with the typelib
2212 code. Changes okayed by jdahlin.
2214 * configure.ac: Check for Windows, set Automake conditional
2215 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2216 avoid shell quoting issues
2218 * girepository/Makefile.am: Use -no-undefined so that libtool
2219 agrees to build a shared library on Windows.
2221 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2222 Windows. Empty implementation on Windows so far.
2224 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2225 informative error message for the assertion failures. Tell also
2226 what the expected size of the struct is. Check all sizes first and
2227 fail afterwards if at least one size was different from expected.
2229 * tools/Makefile.am: Reorder libraries into proper logical
2232 * tools/generate.c: Don't include <dlfcn.h>, not used.
2234 * giscanner/Makefile.am: On Windows, link with the Python library,
2235 and install the module DLL as _giscanner.pyd. Remove the
2236 unnecessary import library and libtool library that libtool has
2239 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2240 and just skip it. Recognize also two "l" suffixes for long long
2241 constants. Recognize also __inline__.
2243 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2244 GetFullPathName(). As such, GetFullPathName() does more than the
2245 UNIX realpath(). It also changes relative paths into absolute
2246 paths. But for our purposes that shouldn't matter.
2248 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2249 Windows the file descriptor passed to us is from Python. Python
2250 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2251 uses msvcrt.dll. On Windows, file descriptors are specific to
2252 which C library is used. So we must find out what underlying OS
2253 handle corresponds to the file descriptor Python passes us, and
2254 then make that into a file descriptor valid for the C library this
2257 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2258 __attribute__ as the lexer now handles it. The definition as empty
2259 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2260 __attribute__. Close the temp file before unlinking it.
2262 * giscanner/cgobject.py: Use correct library name for the gobject
2265 * gir/Makefile.am: Must pass the full basename of the DLLs on
2266 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2267 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2268 reality they won't change, until there is a GLib 3, and then also
2269 the Unix code here needs changing.
2271 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2274 2008-08-26 Colin Walters <walters@verbum.org>
2276 * girepository/girepository.c: Search
2277 $DATADIR/girepository instead of
2278 $DATADIR/gitypelibs; this naming makes
2279 it clearer that e.g. jgir can install
2281 * gir/Makefile.am: Install there.
2283 2008-08-26 Colin Walters <walters@verbum.org>
2285 * girepository/gtypelib.c (_g_typelib_init): Also
2286 use G_MODULE_SUFFIX instead of hardcoding .so.
2288 2008-08-26 Colin Walters <walters@verbum.org>
2290 * girepository/gtypelib.c (_g_typelib_init): Free
2291 string in the right place.
2293 2008-08-26 Colin Walters <walters@verbum.org>
2295 * girepository/gtypelib.c (_g_typelib_init): Handle
2296 both .la and .so names; this works better in the
2297 uninstalled library case.
2299 2008-08-26 Johan Dahlin <johan@gnome.org>
2302 * giscanner/Makefile.am:
2303 * giscanner/cgobject.py:
2304 * giscanner/config.py.in:
2305 * giscanner/sourcescanner.py:
2306 Avoid undeffing __GNUC__, instead define
2307 __attribute__ & friends. Remove glibconfig.h hack.
2308 This makes gobject-introspection work better on
2309 MacOS X, Thanks to Richard Hult for kind help.
2311 2008-08-25 Colin Walters <walters@verbum.org>
2313 * giscanner/glibtransformer.py: Always print
2316 2008-08-25 Colin Walters <walters@verbum.org>
2318 * giscanner/glibtransformer.py: Skip over
2319 interfaces we don't know.
2321 2008-08-25 Colin Walters <walters@verbum.org>
2323 * girepository/girparser.c: Parse new implements
2324 syntax, drop gapi one.
2325 * tests/object.gir: Update.
2326 * tools/generate.c: Generate new syntax.
2328 2008-08-25 Colin Walters <walters@verbum.org>
2330 * giscanner/ast.py: Add interfaces property
2332 * giscanner/girwriter.py: Write out implemented
2334 * giscanner/glibtransformer.py: Introspect
2335 implemented interfaces.
2336 * tests/scanner/*: Make FooObject implement
2339 2008-08-25 Colin Walters <walters@verbum.org>
2341 * giscanner/glibtransformer.py: More correctly pair
2342 methods; if we have a symbol that starts with
2343 e.g. hippo_canvas look for a matching HippoCanvas
2344 class before accepting e.g. HippoCanvasImage.
2346 2008-08-24 Colin Walters <walters@verbum.org>
2348 * tools/g-ir-scanner: Filter out unknown options from
2351 2008-08-24 Colin Walters <walters@verbum.org>
2353 * giscanner/glibtransformer.py: Fail with better
2354 error if we can't find library.
2356 2008-08-24 Colin Walters <walters@verbum.org>
2358 * tools/g-ir-scanner: Use subprocess instead of
2359 commands, works on Windows and avoids the evil
2362 2008-08-24 Colin Walters <walters@verbum.org>
2364 * giscanner/glibtransformer.py: Skip over
2365 g_object_get_type from GLib trunk.
2367 2008-08-24 Colin Walters <walters@verbum.org>
2369 * girepository/girepository.c (g_irepository_require):
2370 Don't open shared library here; we already do it
2373 2008-08-24 Colin Walters <walters@verbum.org>
2375 * girepository/gtypelib.c: Add context stack so
2376 when we get an error we can print out nicely
2379 2008-08-24 Johan Dahlin <johan@gnome.org>
2381 * girepository/girparser.c (start_glib_boxed), (start_function),
2382 (start_field), (start_alias):
2383 Refactor a couple of parsing functions to be simpler to follow.
2386 2008-08-24 Johan Dahlin <johan@gnome.org>
2388 * girepository/girparser.c (start_function):
2389 Remove left-over code, checking type of function.
2391 2008-08-23 Colin Walters <walters@verbum.org>
2393 * giscanner/config.py: Define DATADIR.
2394 * giscanner/transformer.py: Look in DATADIR.
2396 2008-08-23 Colin Walters <walters@verbum.org>
2398 * girepository/gtypelib.c: Check constructor
2400 * girepository/girnode.c: Small tweaks.
2401 * girepository/ginfo.c: Calculate signature offsets
2403 * girepository/girparser.c: Remove duplicate
2405 * giscanner/glibtransformer.py: Avoid marking
2406 functions which return a basic type as
2409 2008-08-23 Colin Walters <walters@verbum.org>
2411 * girepository/girparser.c: Ignore <include>.
2412 * giscanner/girparser.py: Parse them.
2413 * giscanner/girwriter.py: Generate them.
2414 * giscanner/transformer.py: Process <include>
2415 recursively. Don't require full path for
2416 includes, look in {$XDG_DATA_DIRS}/gir.
2417 * tools/g-ir-scanner: Pass through includes.
2418 * Makefile.am: Remove extra --include
2420 * *-expected.gir: Add expected includes.
2422 2008-08-23 Johan Dahlin <johan@gnome.org>
2424 * tests/scanner/Makefile.am:
2425 * tests/scanner/annotation-expected.gir:
2426 * tests/scanner/drawable-expected.gir:
2427 Avoid duplication in the Makefile, regenerate with new
2428 namespaces (same as the filename)
2430 2008-08-22 Colin Walters <walters@verbum.org>
2432 * girepository/girnode.c: Don't hardcode integers,
2435 2008-08-22 Johan Dahlin <johan@gnome.org>
2437 * giscanner/sourcescanner.py:
2438 Check for ../gobject-introspection-1.0.pc.in to determine
2439 if we run installed or uninstalled.
2441 2008-08-22 Johan Dahlin <johan@gnome.org>
2444 * giscanner/sourcescanner.py:
2445 Send in undefs/defines via writing it directly to stdin
2446 of cpp instead of via arguments.
2448 2008-08-22 Colin Walters <walters@verbum.org>
2450 * tools/generate.c, tools/compiler.c: Default
2452 * all Makefile.am: Update.
2454 2008-08-22 Colin Walters <walters@verbum.org>
2456 * girepository/girparser.c: Pass through
2457 recursive types. Avoid overwriting errors.
2458 * giscanner/xmlwriter.py: Always write the
2460 * tests/*.gir: Adjust.
2461 * tests/scanner/Makefile.am: Build typelibs,
2462 and generate XML from those. Once we
2463 have a good diff mechanism...
2464 * tests/scanner/*-expected.gir: Add XML
2466 * tools/g-ir-scanner: Accept --typelib-xml
2468 * tools/generate.c: Better defaults for transfer.
2470 2008-08-22 Johan Dahlin <johan@gnome.org>
2474 * giscanner/Makefile.am:
2475 * giscanner/config.py.in:
2476 * giscanner/sourcescanner.py:
2477 Use the generated glibconfig.h for all scanner invokations.
2478 Rename it to glibconfig-scanner.h and install it.
2479 Add a config.py which so far contains the include dir.
2481 2008-08-22 Johan Dahlin <johan@gnome.org>
2484 Replace glibconfig.h with our own, do some replacement
2485 for CPP/C features we do not support
2487 2008-08-22 Colin Walters <walters@verbum.org>
2489 * tools/generate.c (write_callable_info): Fix unref
2492 2008-08-22 Colin Walters <walters@verbum.org>
2494 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2495 * tests/Makefile.am: Support $(DEBUG)
2496 * tools/generate.c: Do immediate close tags if no
2499 2008-08-21 Colin Walters <walters@verbum.org>
2501 * tests/scanner/drawable-expected.gir,
2502 * tests/scanner/drawable.c,
2503 * tests/scanner/drawable.h:
2506 2008-08-21 Colin Walters <walters@verbum.org>
2508 * giscanner/glibtransformer.py: Compute prefix
2509 by searching through the symbol for bits
2510 rather than going directly from ctype; this fixes
2513 2008-08-21 Colin Walters <walters@verbum.org>
2515 * giscanner/glibtransformer.py: Also try squashing
2516 underscores from namespace, fixes webkit_web_view_new.
2518 2008-08-21 Colin Walters <walters@verbum.org>
2520 * giscanner/glibtransformer.py: More ctor work,
2521 avoid having gtk_window_group_new end up under
2524 2008-08-21 Colin Walters <walters@verbum.org>
2526 * giscanner/glibtransformer.py: Much simpler approach
2527 of mapping uscored names to classes.
2528 * giscanner/utils.py: Remove unnecessary function.
2530 2008-08-21 Johan Dahlin <johan@gnome.org>
2532 * girepository/girepository.c (g_irepository_require):
2533 Plug memory leak and avoid using freed memory.
2534 Resolve the whole module path, here as well.
2536 2008-08-21 Colin Walters <walters@verbum.org>
2538 * giscanner/glibtransformer.py: Look up all permutations
2539 of class names when scanning methods/ctors based on
2540 the prefix instead of using the return value. This
2541 associates gtk_window_new with the right class.
2543 2008-08-21 Colin Walters <walters@verbum.org>
2545 * girepository/girmodule.c (g_ir_module_build_typelib):
2546 Revert change to increment header_size; we do that in
2549 2008-08-21 Colin Walters <walters@verbum.org>
2551 * girepository/girnode.c (write_string): Tweak to
2552 use UINT instead of INT. Not likely to matter.
2553 * girepository/girmodule.c (g_ir_module_build_typelib):
2554 Add to header_offset as well for header strings
2555 to match what write_string does.
2556 * girepository/gtypelib.c: Replace is_name with
2557 validate_name, which more strongly validates and
2558 handles errors in a better way. Update all callers.
2559 * giscanner/glibtransformer.py: Handle constructors
2562 2008-08-21 Johan Dahlin <johan@gnome.org>
2564 * gir/Makefile.am (typelibs_DATA): Build and
2565 install the Gio.typelib too
2567 * girepository/gtypelib.c (_g_typelib_init):
2568 Use g_module_build_path to resolve the shlib name
2570 2008-08-21 Colin Walters <walters@verbum.org>
2572 * gir/Makefile.am: CLEANFILES typelibs too.
2574 2008-08-21 Johan Dahlin <johan@gnome.org>
2576 * giscanner/glibtransformer.py:
2577 Do not send .la files through find_library.
2579 2008-08-21 Colin Walters <walters@verbum.org>
2581 * girepository/girparser.c (g_irepository_require):
2582 Fix one small leak in error case.
2584 2008-08-21 Johan Dahlin <johan@gnome.org>
2587 Parse glibconfig.h as well and install the compiled
2590 2008-08-21 Johan Dahlin <johan@gnome.org>
2593 * giscanner/glibtransformer.py:
2594 * tools/g-ir-scanner:
2595 Do not hard-core library names in the Makefile, reuse
2596 ctypes find_library instead.
2598 2008-08-21 Johan Dahlin <johan@gnome.org>
2600 * girepository/girparser.c (resolve_aliases):
2601 Remove compilation warnings
2603 2008-08-21 Johan Dahlin <johan@gnome.org>
2605 * girepository/girepository.c (g_irepository_require):
2606 Rewrap and fix double free bug by leaking a bit.
2608 2008-08-20 Colin Walters <walters@verbum.org>
2610 * girepository/girepository.c: Add new function
2611 g_irepository_get_typelib_path which tells
2612 us from where we loaded a namespace.
2614 2008-08-20 Colin Walters <walters@verbum.org>
2616 * tests/scanner/*-expected.gir: Adjust for
2617 added shared-library.
2618 * giscanner/giwriter.py: Make pylint happy.
2620 2008-08-20 Colin Walters <walters@verbum.org>
2622 * girepository/girmodule.c (g_ir_module_build_typelib):
2623 Calculate size correctly, avoid use-after-free.
2625 2008-08-20 Colin Walters <walters@verbum.org>
2627 * girepository/girepository.c: Remove
2628 g_irepository_register_file in favor of
2629 g_irepository_require. There are two
2630 possible deployment scenarios for typelibs:
2631 First, separate in $DATADIR/gitypelibs/. Second,
2632 they may be embedded in shlibs. However since
2633 the first is now the normal case, the API is
2634 optimized around it.
2636 Refactor internals to look up typelibs for
2637 namespaces just-in-time, but we expect
2638 consumers to call g_irepository_require.
2640 Also, add some docs. No one has died from that
2642 * gir/Makefile.am: Need --library for glib.
2643 * giscanner/girwriter.py: Write out shared-library.
2644 * tools/g-ir-writer: Take the first --library
2645 argument as the target of shared-library. In
2646 the future we should make this nicer with pkg-config
2649 2008-08-20 Colin Walters <walters@verbum.org>
2651 * girepository/girparser.py: And parse them.
2653 2008-08-20 Johan Dahlin <johan@gnome.org>
2655 * giscanner/glibast.py: Add gshort/gushort types
2657 2008-08-20 Colin Walters <walters@verbum.org>
2659 * gir/Makefile.am: Rename .gir files using GI namespace.
2660 * girepository/girepository.c: Use XDG_DATA_DIRS for
2661 looking up typelibs. Also typelibs are now suffixed
2663 * tests/invoke/Makefile.am: Only use metadata.
2664 * girepository/Makefile.am: Remove unnecessary include.
2665 * tests/scanner/Makefile.am: Update using GI namespaces
2666 for scanner includes.
2668 2008-08-20 Colin Walters <walters@verbum.org>
2670 * girepository/transformer.py: Suppress aliases whose
2672 * girepository/ast.py: Define some more aliases.
2674 2008-08-20 Colin Walters <walters@verbum.org>
2676 * girepository/girparser.c: Avoid alias infloops.
2678 2008-08-20 Colin Walters <walters@verbum.org>
2680 * tests/scanner/foo-expected.gir: Fix expected list type.
2682 2008-08-20 Johan Dahlin <johan@gnome.org>
2684 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
2685 Add a workaround for #548689.
2686 We can now compile gtk!
2688 2008-08-20 Colin Walters <walters@verbum.org>
2690 * giscanner/glibtransformer.py: Try to look up
2691 aliases using the c:type too.
2693 2008-08-20 Colin Walters <walters@verbum.org>
2695 * girepository/girparser.c: Parse union fields.
2697 2008-08-20 Johan Dahlin <johan@gnome.org>
2699 * giscanner/ast.py: Make time_t an alias for long
2701 * gir/gio-2.0-good.gir:
2702 * gir/glib-2.0-good.gir:
2703 * gir/gobject-2.0-good.gir:
2705 * giscanner/glibtransformer.py:
2706 Do not delete Class structures, we need them in gdk/gtk.
2707 * tests/scanner/drawable-expected.gir:
2708 * tests/scanner/foo-expected.gir:
2709 * tests/scanner/utility-expected.gir:
2712 2008-08-20 Johan Dahlin <johan@gnome.org>
2714 * tests/scanner/Makefile.am:
2715 * tests/scanner/annotation-expected.gir:
2716 * tests/scanner/annotation.c (annotation_object_class_init),
2717 (annotation_object_init), (annotation_object_method),
2718 (annotation_object_in), (annotation_object_out),
2719 (annotation_object_inout), (annotation_object_inout2),
2720 (annotation_object_inout3), (annotation_object_calleeowns),
2721 (annotation_object_calleesowns), (annotation_object_get_strings),
2722 (annotation_object_with_voidp), (annotation_object_get_objects),
2723 (annotation_object_create_object), (annotation_object_allow_none):
2724 * tests/scanner/annotation.h:
2725 * tests/scanner/foo-expected.gir:
2726 * tests/scanner/foo.c:
2727 * tests/scanner/foo.h:
2728 Split out annotation tests out of foo
2730 2008-08-20 Johan Dahlin <johan@gnome.org>
2732 * tests/scanner/Foo-expected.gir:
2733 * tests/scanner/Makefile.am:
2734 * tests/scanner/foo-expected.gir:
2735 * tests/scanner/foo-object.h:
2736 * tests/scanner/foo.c:
2737 Foo->foo, foo-object.h -> foo.h
2739 2008-08-20 Johan Dahlin <johan@gnome.org>
2741 * tests/scanner/Foo-expected.gir:
2742 * tests/scanner/Makefile.am:
2743 * tests/scanner/drawable-expected.gir:
2744 * tests/scanner/drawable.c (test_drawable_class_init),
2745 (test_drawable_init):
2746 * tests/scanner/drawable.h:
2747 * tests/scanner/foo-object.h:
2748 * tests/scanner/foo.c (foo_boxed_method):
2749 Move the drawable parts out of Foo to its own test.
2751 2008-08-20 Johan Dahlin <johan@gnome.org>
2753 * tests/scanner/Foo-expected.gir:
2754 * tests/scanner/foo-object.h:
2755 * tests/scanner/foo.c (foo_drawable_class_init),
2756 (foo_drawable_init):
2757 Add a based on GdkDrawable which generates
2760 2008-08-19 Colin Walters <walters@verbum.org>
2762 * giscanner/transformer.py: Don't try
2763 to strip prefix before namespace.
2765 2008-08-19 Johan Dahlin <johan@gnome.org>
2767 * giscanner/transformer.py:
2768 * tests/scanner/Foo-expected.gir:
2769 * tests/scanner/foo-object.h:
2770 Add support for typedef void foo type of
2773 2008-08-19 Johan Dahlin <johan@gnome.org>
2776 * giscanner/girwriter.py:
2777 * giscanner/glibtransformer.py:
2778 * giscanner/transformer.py:
2779 * tests/scanner/Foo-expected.gir:
2780 Add basic support for union, base the code much
2781 on Struct. Add a testcase.
2783 2008-08-19 Johan Dahlin <johan@gnome.org>
2785 * tests/scanner/Foo-expected.gir:
2786 * tests/scanner/foo-object.h:
2787 Add a union testcase which the compiler currently
2790 2008-08-19 Johan Dahlin <johan@gnome.org>
2792 * gobject-introspection-1.0.pc.in:
2793 Add a g_ir_compiler variable
2795 2008-08-19 Colin Walters <walters@verbum.org>
2797 * giscanner/ast.py: Rework types to be more closely
2799 * giscanner/girparser.py: Parse more bits.
2800 * giscanner/girwriter.py: Write sequences in a new
2801 way that specifies container type.
2802 * giscanner/glibast.py: Adjust for ast.py changes,
2803 add 'ctype' property to GLibObject and GLibInterface
2804 so we can look things up by it later.
2805 * gicanner/transformer.py: Names is new class holding
2806 the various namespaces we manage. Do not confuse
2807 with Namespace which is toplevel XML node effectively.
2808 Rework all type resolution to go through
2809 _resolve_type_name_1.
2810 * giscanner/glibtransformer.py: Raise UnknownTypeError
2811 instead of ValueError for cleanliness. Add Unresolved
2812 class to mark types whose parent we haven't seen yet.
2813 Use new Names object from transformer.py.
2814 Correctly look up parent=.
2815 Fix type validation to handle sequences.
2816 * tests/scanner/Foo-expected.gir: Update for sequence
2817 work, int instead of int32.
2818 * tools/g-ir-scanner: Add --noclosure option
2819 * gir/Makefile.am: Use --noclosure by default for
2822 2008-08-18 Johan Dahlin <johan@gnome.org>
2824 * gir/gio-2.0-good.gir:
2825 * gir/glib-2.0-good.gir:
2826 * gir/gobject-2.0-good.gir:
2829 2008-08-18 Johan Dahlin <johan@gnome.org>
2832 * giscanner/girparser.py:
2833 * giscanner/girwriter.py:
2834 * giscanner/glibast.py:
2835 * giscanner/glibtransformer.py:
2836 * giscanner/transformer.py:
2837 * tests/scanner/Foo-expected.gir:
2838 * tests/scanner/foo-object.h:
2839 * tests/scanner/utility-expected.gir:
2840 * tests/scanner/utility.h:
2841 Redo type resolving and validation.
2842 Add a couple of new tests.
2843 Patch mostly written by Colin.
2845 2008-08-18 Johan Dahlin <johan@gnome.org>
2848 * giscanner/girparser.py:
2850 * giscanner/transformer.py:
2851 Improve enum parsing for enums without a GType.
2852 Make flags/enum references to other girs work
2853 * giscanner/utils.py:
2855 * tests/scanner/Makefile.am:
2856 * tests/scanner/foo-object.h:
2857 * tests/scanner/utility-expected.gir:
2858 * tests/scanner/utility.h:
2859 Add a new test for external enum references
2861 2008-08-18 Johan Dahlin <johan@gnome.org>
2863 * docs/global-module-registry.txt: Update
2865 * tests/array.gir: Update with new type proposal
2867 * girepository/girepository.c (g_type_tag_to_string):
2868 * girepository/girepository.h:
2869 * girepository/girnode.c (g_ir_node_get_full_size_internal),
2871 * girepository/girnode.h:
2872 Make enum serializing functions public. Clean up some whitespace.
2874 2008-08-17 Johan Dahlin <johan@gnome.org>
2876 * docs/global-module-registry.txt:
2877 Add a document for an on disk module registry format
2879 2008-08-17 Johan Dahlin <johan@gnome.org>
2882 * gir/gio-2.0-good.gir:
2885 2008-08-17 Johan Dahlin <johan@gnome.org>
2888 * gir/glib-2.0-good.gir:
2889 * gir/gobject-2.0-good.gir:
2890 * giscanner/cgobject.py:
2891 * giscanner/glibtransformer.py:
2892 Regenerate GObject & GType.
2893 Avoid warnings when generating gobject-2.0.gir.
2894 Introspect a little more, and skip *_get_type functions.
2896 2008-08-17 Colin Walters <walters@verbum.org>
2898 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
2899 Rename to -good, always generate during build.
2900 * gir/Makefile.am: Ensure .gir files dep on
2901 all scanner sources.
2902 * Makefile.am: Switch build order to ensure
2903 the scanner is ready before we do gir/.
2904 * tools/g-ir-scanner: Look for .git too.
2906 2008-08-17 Johan Dahlin <johan@gnome.org>
2908 * girepository/gtypelib.c (validate_enum_blob):
2909 * giscanner/glibtransformer.py:
2910 * giscanner/transformer.py:
2911 Remove resolve_possible_typedefs, it was unused.
2912 Allow multiple enum values of the sample value in an enum,
2913 since it's actually pretty common.
2914 Register enums so they can be resolved too.
2916 2008-08-16 Johan Dahlin <johan@gnome.org>
2918 * giscanner/girparser.py:
2919 Parse enumeration/bitfield.
2921 2008-08-16 Johan Dahlin <johan@gnome.org>
2923 * giscanner/girparser.py:
2926 2008-08-16 Johan Dahlin <johan@gnome.org>
2928 * giscanner/glibtransformer.py:
2929 Resolve type names for alias targets
2930 * giscanner/transformer.py:
2931 Skip FILE* parameters fow now
2933 2008-08-16 Johan Dahlin <johan@gnome.org>
2936 * gir/gobject-2.0.gir:
2939 * tests/scanner/Makefile.am:
2942 2008-08-15 Colin Walters <walters@verbum.org>
2944 * giscanner/glibtransformer.py: Explicitly construct
2945 new list, since we're deleting as we iterate.
2946 Don't delete all structures which end in Class; just
2947 ones which have a paired GObject.
2948 Fix printing of type warning.
2949 * giscanner/transformer.py: Make strip_namespace_object
2950 be the identity function if it doesn't match the
2953 2008-08-15 Colin Walters <walters@verbum.org>
2955 * giscanner/cgobject.py: Define yet more argument
2956 prototypes; fix prototype for g_type_fundamental.
2958 2008-08-14 Johan Dahlin <johan@gnome.org>
2960 * tests/Makefile.am:
2961 * tests/constant.gir:
2962 * tests/gobject.gir:
2964 * tools/generate.c (write_struct_info):
2965 Fix generator for constant/gobject/struct
2967 2008-08-14 Johan Dahlin <johan@gnome.org>
2969 * tests/Makefile.am:
2971 * tools/generate.c (write_enum_info):
2972 Fix generation of enum/bitfields
2974 2008-08-14 Johan Dahlin <johan@gnome.org>
2976 * girepository/girparser.c (start_field), (start_constant),
2977 (start_type), (end_element_handler):
2978 Clear up constant parsing
2983 * tools/generate.c (write_callable_info), (write_function_info),
2984 (write_callback_info), (write_constant_info), (write_signal_info),
2985 (write_vfunc_info), (write_property_info), (write_object_info),
2986 (write_interface_info):
2987 Constants/Signals are handled now.
2989 2008-08-14 Johan Dahlin <johan@gnome.org>
2991 * girepository/girparser.c (start_type):
2992 Don't require c:type.
2993 * tests/Makefile.am:
2996 Update, remove parts we don't support yet
2997 * tests/roundtrips.sh:
2999 * tools/generate.c (write_type_info), (write_field_info),
3000 (write_callable_info), (write_struct_info):
3001 Make it emit proper gir.
3003 2008-08-14 Johan Dahlin <johan@gnome.org>
3005 * giscanner/transformer.py:
3006 New internal function for adding a new node.
3008 2008-08-14 Johan Dahlin <johan@gnome.org>
3011 Define an internal _H_ variable so we skip parsing both
3012 i18n headers, only one is needed.
3014 Add the glib-2.0.gir too.
3015 * giscanner/glibast.py:
3016 Add gconstpointer as an alias for ANY
3017 * giscanner/transformer.py:
3018 Do not lower case enumeration names per se.
3019 Skip functions which has parameters called 'va_list'
3021 2008-08-14 Colin Walters <walters@verbum.org>
3023 * giscanner/transformer.py: Comment data structures.
3024 Also squash pointers in resolve_type_name to correspond
3025 with what we do for params.
3026 * giscanner/glibtransformer.py: Print warnings in more
3027 situations. Rework checks for method/constructor to
3028 look up in our GType database instead of just checking
3029 for *. Avoid generating <record> for GObject which
3030 duplicate the <class>.
3031 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3034 2008-08-14 Johan Dahlin <johan@gnome.org>
3036 * giscanner/girwriter.py:
3037 * giscanner/glibast.py:
3038 * giscanner/glibtransformer.py:
3039 * giscanner/transformer.py:
3041 * tests/Makefile.am:
3042 Add pyflakes.py and run it in make check.
3043 Update the source code to fix the errors reported by
3046 2008-08-14 Johan Dahlin <johan@gnome.org>
3049 * giscanner/girparser.py:
3050 * giscanner/glibast.py:
3051 * giscanner/glibtransformer.py:
3052 Refactor the parser a bit.
3053 Add parent type to interfaces and update callsites.
3055 2008-08-14 Johan Dahlin <johan@gnome.org>
3057 * giscanner/glibtransformer.py:
3058 * giscanner/utils.py:
3059 Refactor a bit, avoid isinstance and add a method
3060 for each type we parse.
3062 2008-08-14 Johan Dahlin <johan@gnome.org>
3065 * giscanner/girparser.py:
3066 * giscanner/glibtransformer.py:
3067 * tests/Makefile.am:
3068 Run pep8.py in make check, fix old errors.
3070 2008-08-13 Colin Walters <walters@verbum.org>
3072 * giscanner/girparser.py: Parse records.
3074 2008-08-13 Colin Walters <walters@verbum.org>
3076 * gir/Makefile.am: Install again.
3077 * gir/gobject-2.0.gir: Add some more bits.
3079 2008-08-13 Colin Walters <walters@verbum.org>
3081 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3082 * giscanner/girparser.py: Handle aliases.
3083 * giscanner/transformer.py: Record aliases. Make resolver
3084 functions public; we now call into these explicitly from
3085 glibtransformer. Handle resolving aliases.
3086 * giscanner/glibtransformer.py: Separate our internal namespace
3087 from included ones. Call up into transformer's resolver functions.
3089 2008-08-13 Johan Dahlin <johan@gnome.org>
3091 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3092 * girepository/girparser.c (start_class):
3093 * giscanner/glibtransformer.py:
3094 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3096 2008-08-13 Johan Dahlin <johan@gnome.org>
3098 * giscanner/cgobject.py:
3099 Register GInitiallyUnowned
3100 * giscanner/girwriter.py:
3101 * giscanner/glibtransformer.py:
3102 Special case GObject/GInitially owned as they are a bit special to use.
3104 2008-08-13 Colin Walters <walters@verbum.org>
3106 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3107 Object is in GObject namespace.
3109 2008-08-13 Colin Walters <walters@verbum.org>
3111 * giscanner/girparser.py: Fix processing of functions
3114 2008-08-13 Colin Walters <walters@verbum.org>
3116 * giscanner/girparser.py: Parse more than just <class.
3117 * giscanner/glibtransformer.py: Put aliases in a separate
3118 data structure since their name is not canonicall.
3119 * giscanner/transformer.py: Handle resolving type names
3122 2008-08-13 Johan Dahlin <johan@gnome.org>
3124 * tools/g-ir-scanner:
3125 Allow multiple libraries
3126 * giscanner/glibtransformer.py:
3127 Rename load_library to add_library, traverse over all libraries
3128 when trying to resolve a function
3130 2008-08-12 Colin Walters <walters@verbum.org>
3132 * giscanner/transformer.py: Record typedefs as <alias> elements.
3133 Also attempt to look up types in external namespaces.
3134 * giscanner/girwriter.py: Write them.
3135 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3136 checks. Resolve interface methods and properties.
3137 * tests/scanner/foo-object.h: Add a method with typedef.
3138 * tests/scanner/Foo-expected.gir: Update.
3139 * girepository/girnode.c: Debug tweaks.
3140 * girepository/girparser.c: Make a first pass through the XML where we
3141 record all the aliases. This lets us resolve them as we go through the
3143 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3144 from gir-repository.
3146 2008-08-12 Colin Walters <walters@verbum.org>
3148 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3149 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3151 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3153 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3155 2008-08-12 Colin Walters <walters@verbum.org>
3157 * giscanner/glibtransformer.py: Also transform object properties.
3159 2008-08-12 Colin Walters <walters@verbum.org>
3161 * giscanner/glibtransformer.py: Also transform callbacks
3162 and structure field types.
3163 * tests/scanner/Fooe-expected.gir: Update to expect correct
3164 names for callbacks and structs.
3166 2008-08-12 Colin Walters <walters@verbum.org>
3168 * girepository/girparser.c: Handle 'any'.
3169 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3170 Add test for void *.
3172 2008-08-12 Colin Walters <walters@verbum.org>
3174 * giscanner/glibtransformer.py: We need to do type
3175 resolution in a second pass after we've seen all the
3176 enums, records, etc.
3178 2008-08-12 Colin Walters <walters@verbum.org>
3180 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3181 Add enum return value.
3182 * giscanner/glibtransformer.py: Transform function return types
3185 2008-08-12 Colin Walters <walters@verbum.org>
3187 * tests/scanner/Makefile.am: Dep .gir files on scanner
3188 sources too. Also remove @ so we see scanner invocations.
3190 2008-08-12 Colin Walters <walters@verbum.org>
3192 * girepository/girparser.c, girepository/gtypelib.c,
3193 girepository/gtypelib.h, girepository/girnode.c:
3194 Remove usage of (GAPI-oriented) TypeTag in favor of
3195 GITypeTag from girepository.h.
3197 2008-08-10 Colin Walters <walters@verbum.org>
3199 * tests/roundtrips.sh: Use the correct tests.
3201 2008-08-10 Colin Walters <walters@verbum.org>
3203 * giscanner/cgobject.py: Declare/wrap a few more functions.
3204 Fix parameter types for g_object_new and g_type_fundamental.
3206 2008-08-10 Colin Walters <walters@verbum.org>
3208 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3209 us to declare types for both return value and parameters. The
3210 ctypes default of 'int' is bad because it hides 32/64 bit
3211 problems. Convert all existing functions to use it.
3213 2008-08-09 Johan Dahlin <johan@gnome.org>
3215 * giscanner/__init__.py:
3217 * giscanner/cgobject.py:
3218 * giscanner/gidlparser.py:
3219 * giscanner/gidlwriter.py:
3220 * giscanner/girparser.py:
3221 * giscanner/girwriter.py:
3222 * giscanner/glibast.py:
3223 * giscanner/glibtransformer.py:
3224 * giscanner/odict.py:
3225 * giscanner/sourcescanner.py:
3226 * giscanner/transformer.py:
3227 * giscanner/utils.py:
3228 * giscanner/xmlwriter.py:
3229 * tools/g-ir-scanner:
3233 2008-08-09 Johan Dahlin <johan@gnome.org>
3236 * relaxng/c-types.xml:
3237 * relaxng/g-types.xml:
3238 * relaxng/relaxng.rng:
3240 Remove outdated relaxng schemas.
3242 2008-08-09 Johan Dahlin <johan@gnome.org>
3245 Rename metadata to typelib in variable names,
3248 2008-08-09 Johan Dahlin <johan@gnome.org>
3252 Remove old C scanner, which got rewritten in python.
3254 2008-08-09 Johan Dahlin <johan@gnome.org>
3256 * girepository/Makefile.am:
3257 * tools/Makefile.am:
3258 * tools/girmodule.c:
3259 * tools/girmodule.h:
3262 * tools/girparser.c:
3263 * tools/girparser.h:
3264 * tools/girwriter.c:
3265 * tools/girwriter.h:
3266 Move shared *.[ch] files to girepository from tools
3268 2008-08-09 Johan Dahlin <johan@gnome.org>
3270 * tests/Makefile.am:
3273 * tests/constant.test:
3275 * tests/errors.test:
3276 * tests/function.test:
3277 * tests/gobject.test:
3278 * tests/interface.test:
3279 * tests/object.test:
3280 * tests/struct.test:
3285 Rename *.test to *.gir
3287 2008-08-09 Johan Dahlin <johan@gnome.org>
3290 * tests/Makefile.am:
3291 * tests/parser/Foo-expected.gir:
3292 * tests/parser/Makefile.am:
3293 * tests/parser/foo-object.h:
3294 * tests/parser/foo.c:
3295 * tests/parser/utility-expected.gir:
3296 * tests/parser/utility.c:
3297 * tests/parser/utility.h:
3298 * tests/scanner/Makefile.am:
3299 Rename tests/parser to test/scanner
3301 2008-08-08 Colin Walters <walters@verbum.org>
3303 * tests/roundtrips.sh: Use local .gir files again.
3305 2008-08-08 Colin Walters <walters@verbum.org>
3307 * tests/invoke/Makefile.am: .gir file depends on libtool
3310 2008-08-08 Colin Walters <walters@verbum.org>
3312 * tools/girnode.c: Pass through parent node so we can
3313 print the node whose child is NULL, if that occurs.
3315 2008-08-08 Johan Dahlin <johan@gnome.org>
3317 * tests/Makefile.am:
3318 Disable roundtrip tests which are not yet working
3319 * tests/invoke/testfns.gir:
3322 2008-08-08 Johan Dahlin <johan@gnome.org>
3324 * giscanner/girwriter.py:
3326 * giscanner/glibast.py:
3327 * giscanner/glibtransformer.py:
3328 Swap order of members, to keep it consistent with
3331 2008-08-08 Johan Dahlin <johan@gnome.org>
3333 * girepository/gtypelib.c (validate_header):
3334 * girepository/gtypelib.h:
3336 * giscanner/girwriter.py:
3337 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3338 (gi_source_symbol_unref):
3341 * tests/constant.test:
3343 * tests/errors.test:
3344 * tests/function.test:
3345 * tests/gobject.test:
3346 * tests/interface.test:
3347 * tests/invoke/Makefile.am:
3348 * tests/invoke/testfns.xml:
3349 * tests/object.test:
3350 * tests/parser/Makefile.am:
3351 * tests/roundtrips.sh:
3352 * tests/struct.test:
3357 * tools/Makefile.am:
3358 * tools/compiler.c (main):
3359 * tools/generate.c (write_callable_info), (write_function_info),
3361 * tools/gidlmodule.c:
3362 * tools/gidlmodule.h:
3365 * tools/gidlparser.c:
3366 * tools/gidlparser.h:
3367 * tools/gidlwriter.c:
3368 * tools/gidlwriter.h:
3369 * tools/scanner.c (create_node_from_gtype),
3370 (create_node_from_ctype), (g_igenerator_process_properties),
3371 (g_igenerator_process_signals), (g_igenerator_create_object),
3372 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3373 (g_igenerator_create_enum), (g_igenerator_create_flags),
3374 (g_igenerator_process_function_symbol),
3375 (g_igenerator_process_unregistered_struct_typedef),
3376 (g_igenerator_process_struct_typedef),
3377 (g_igenerator_process_union_typedef),
3378 (g_igenerator_process_enum_typedef),
3379 (g_igenerator_process_function_typedef),
3380 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3381 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3382 Merge in the gir-compiler branch.
3383 Thanks to Philip and Colin for their help.
3385 2008-07-26 Colin Walters <walters@verbum.org>
3387 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3388 and g-idl-generate to go along with how we're changing this
3389 module to be installed.
3390 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3392 2008-07-24 Colin Walters <walters@verbum.org>
3394 * girepository/girepository.c (g_irepository_register): Add
3395 environment variable G_IREPOSITORY_VERBOSE so we can print
3396 out what we're doing.
3397 * girepository/girepository.c (g_irepository_register_file):
3398 Add GError error message to g_debug call.
3400 2008-07-08 Jürg Billeter <j@bitron.ch>
3402 * giscanner/glibast.py:
3406 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3408 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3411 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3414 * giscanner/girwriter.py:
3415 * giscanner/transformer.py:
3416 * tests/parser/Foo-expected.gir:
3417 * tests/parser/foo-object.h:
3418 * tests/parser/foo.c (foo_object_allow_none):
3419 Add support for gtk-doc annotations for allow-none.
3422 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3425 * giscanner/girwriter.py:
3426 * giscanner/glibast.py:
3427 * giscanner/glibtransformer.py:
3428 * giscanner/transformer.py:
3429 * tests/parser/Foo-expected.gir:
3430 Start using abstract type instead of the raw C types.
3431 Register a bunch of glib types we care about.
3433 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3438 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3440 * girepository/girepository.c:
3441 * girepository/gtypelib.c:
3442 * girepository/ginfo.c:
3443 * girepository/ginvoke.c:
3444 * girepository/girepository.h:
3445 * girepository/gtypelib.h:
3446 * girepository/gmetadata.c:
3447 * girepository/Makefile.am:
3448 * girepository/gmetadata.h:
3450 * tools/gidlmodule.c:
3453 * tools/gidlmodule.h:
3454 * tools/gidlparser.c:
3456 Renamed GMetadata to GTypelib
3458 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3460 * giscanner/xmlwriter.py:
3461 Improve line wrapping when > 79 charaters
3463 2008-06-05 Jürg Billeter <j@bitron.ch>
3466 * giscanner/girwriter.py:
3467 * giscanner/transformer.py:
3468 Use <type> element for field types
3469 * tests/parser/Foo-expected.gir:
3472 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3474 * giscanner/glibtransformer.py:
3475 Fix a bug which prevented GdkEvent from being generated
3477 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3479 * giscanner/Makefile.am:
3481 * giscanner/girwriter.py:
3482 * giscanner/glibast.py:
3483 * giscanner/glibtransformer.py:
3484 * giscanner/transformer.py:
3485 * giscanner/utils.py:
3486 * tests/parser/Foo-expected.gir:
3487 Improve enum member parsing and introspection
3489 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3491 * giscanner/scannerparser.y:
3492 * giscanner/sourcescanner.h:
3493 * giscanner/sourcescanner.py:
3494 Add a new source type enum for member.
3495 Use __repr__ for improved debugging
3496 * giscanner/girparser.py:
3498 * giscanner/transformer.py:
3499 Improve parsing of struct members.
3500 * tests/parser/foo-object.h:
3503 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3505 * giscanner/xmlwriter.py:
3506 Improve error reporting when trying to quote None.
3507 * giscanner/girparser.py:
3508 Do not print warnings when including more complete .gir files
3509 * giscanner/girwriter.py:
3510 Do not require a name for parameters, add a todo for singletons
3511 * giscanner/glibtransformer.py:
3512 Refactor the way structs are done, add a couple of hacks to allow
3514 * giscanner/transformer.py:
3515 Add enough hacks so cairo, atk and pango.gir can be parsed properly
3516 * gobject-introspection-1.0.pc.in:
3517 Export girdir, so we can access gobject-2.0.gir from outside
3519 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3521 * tools/g-ir-scanner:
3522 * tests/parser/Makefile.am:
3523 Update sys.path before running the parser so we don't have
3524 to setup PYTHONPATH ourselves.
3528 * girepository/Makefile.am:
3529 * giscanner/transformer.py:
3530 * gobject-introspection-1.0.pc.in:
3531 * gobject-introspection.pc.in:
3532 * tools/Makefile.am:
3534 Rename pkg-config name to gobject-introspection-1.0,
3535 Do not installed anything which is not using the gir format.
3536 Disable compililation the old C scanner, but still keep the source
3537 until all the remaning functionallity has been ported.
3539 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3541 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3542 a crash when symbol->indent is NULL.
3544 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3545 a function to convert a CTYPE symbol to a string
3547 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
3550 * giscanner/girwriter.py:
3551 * giscanner/giscannermodule.c
3552 (pygi_source_scanner_append_filename),
3553 (pygi_source_scanner_parse_file):
3554 * giscanner/glibtransformer.py:
3555 * giscanner/sourcescanner.py:
3556 Revert back to using temporary files to send in headers.
3557 Allow Functions to be passed in as callbacks, add a couple
3558 of try/excepts missing features.
3559 We can now scan pango
3561 2008-05-08 Johan Dahlin <johan@gnome.org>
3563 * giscanner/glibtransformer.py:
3564 * giscanner/transformer.py:
3565 Move namespace stripping glibtransformer->transformer
3567 2008-05-08 Johan Dahlin <johan@gnome.org>
3570 * giscanner/girwriter.py:
3571 * giscanner/glibtransformer.py:
3572 * giscanner/transformer.py:
3573 * tools/g-ir-scanner:
3574 Introduce a namespace ast node
3576 2008-05-05 Johan Dahlin <johan@gnome.org>
3578 * giscanner/__init__.py:
3579 * giscanner/sourcescanner.py:
3580 * giscanner/transformer.py:
3581 Move sourcescanner symbols to the sourcescanner module, instead
3582 of in the global __init__ namespace.
3584 2008-05-03 Johan Dahlin <johan@gnome.org>
3586 * giscanner/glibtransformer.py:
3587 * tools/g-ir-scanner:
3588 Handle missing parameters better, allow - and + in .la dlname
3591 2008-05-03 Johan Dahlin <johan@gnome.org>
3593 * giscanner/__init__.py:
3595 * giscanner/girwriter.py:
3596 * giscanner/glibtransformer.py:
3597 * giscanner/transformer.py:
3598 Parse struct fields properly, improve debugging.
3600 2008-04-29 Johan Dahlin <johan@gnome.org>
3603 * giscanner/girwriter.py:
3604 * giscanner/transformer.py:
3605 * tests/parser/Foo-expected.gir:
3607 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
3609 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3612 * docs/g-ir-scanner.1:
3613 * metadata-annotations-proposal.txt:
3614 * metadata-format.txt:
3615 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
3617 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3619 * giscanner/girwriter.py:
3620 * giscanner/glibtransformer.py:
3621 * giscanner/transformer.py:
3622 * giscanner/xmlwriter.py:
3623 * tests/parser/Foo-expected.gir:
3624 * tests/parser/foo-object.h:
3625 Write record/structs to gir file too. Add a couple of tests,
3626 fix an off by one error in xmlwriter.py.
3628 2008-04-28 Johan Dahlin <johan@gnome.org>
3630 * giscanner/xmlwriter.py: Calculate the line length properly,
3631 include the provided extra indentation in the calculation, really.
3633 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3636 * giscanner/glibast.py:
3637 * giscanner/glibtransformer.py:
3638 * giscanner/transformer.py:
3639 * tools/g-ir-scanner:
3640 Add a --strip-prefix and sort out confusion between names and symbols
3641 for functions and struct + derivaties.
3642 Refactor bootstrap of g-ir-scanner, so we can set options on
3643 Transformer() before parsing everything.
3645 2008-04-28 Johan Dahlin <johan@gnome.org>
3647 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
3648 when scanning girepository.h
3650 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
3651 a __GI_SCANNER__ when we run.
3653 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3656 * giscanner/girwriter.py:
3657 * giscanner/glibast.py:
3658 * giscanner/glibtransformer.py:
3659 * tests/parser/Foo-expected.gir:
3660 * tests/parser/utility-expected.gir:
3661 Rename most c:identifier to c:type. Add new ones to
3662 class/interface/enum/boxed.
3664 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3667 * giscanner/girwriter.py:
3668 * giscanner/glibtransformer.py:
3669 * tests/parser/Foo-expected.gidl:
3670 * tests/parser/Makefile.am:
3671 Move c:identifier from return-value to subchild type,
3672 as per Jürgs suggestion
3674 2008-04-28 Johan Dahlin <johan@gnome.org>
3676 * giscanner/girwriter.py:
3677 * tests/parser/Foo-expected.gir:
3678 Write property.type as a child node.
3680 2008-04-27 Johan Dahlin <johan@gnome.org>
3685 * gidl/gobject-2.0.gidl:
3687 * gir/gobject-2.0.gir:
3688 * tests/parser/Makefile.am:
3689 Replace the GObject gidl with a GObject gir.
3691 2008-04-27 Johan Dahlin <johan@gnome.org>
3693 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
3696 * giscanner/xmlwriter.py:
3697 * tests/parser/Foo-expected.gir:
3698 Include indentation in line length calculation
3700 2008-04-27 Johan Dahlin <johan@gnome.org>
3702 * giscanner/girparser.py:
3703 Prettify NS parsing using elementtree.
3705 2008-04-27 Johan Dahlin <johan@gnome.org>
3708 * giscanner/Makefile.am:
3709 * giscanner/girparser.py:
3710 * giscanner/glibtransformer.py:
3711 * tests/parser/Foo-expected.gidl:
3712 * tests/parser/Foo-expected.gir:
3713 * tests/parser/Makefile.am:
3714 * tests/parser/utility-expected.gidl:
3715 * tests/parser/utility-expected.gir:
3716 * tools/g-ir-scanner:
3717 Switch over to GIR as the default format. Add a simple GIDL
3719 Update tests and fix simplify makefiles by depending
3720 on GNU make extensions.
3722 2008-04-27 Johan Dahlin <johan@gnome.org>
3724 * giscanner/xmlwriter.py:
3725 Wrap attributes for lines which are wider than 79 characters
3727 * giscanner/scannerlexer.l:
3728 Allow parenthesis in annotations
3731 * giscanner/gidlwriter.py:
3732 * giscanner/girwriter.py:
3733 * giscanner/glibtransformer.py:
3734 * giscanner/transformer.py:
3735 Add initial sequence support, including annotation.
3736 Refactor type handling a bit.
3738 2008-04-27 Johan Dahlin <johan@gnome.org>
3740 * tests/parser/Foo-expected.gidl:
3741 * tests/parser/foo-object.h:
3742 * tests/parser/foo.c (foo_object_class_init),
3743 (foo_object_get_strings), (foo_object_get_objects):
3744 Add two new functions to check sequence return values.
3745 Also fixes a compilation warning.
3747 2008-04-27 Johan Dahlin <johan@gnome.org>
3749 * giscanner/giscannermodule.c (]): Cast the getter, avoids
3750 a compilation warning.
3752 * tools/Makefile.am (g_ir_scanner_SOURCES):
3753 g-ir-scanner has no sources.
3755 2008-04-25 Johan Dahlin <johan@gnome.org>
3757 * giscanner/Makefile.am:
3759 * giscanner/gidlparser.py:
3760 * giscanner/gidlwriter.py:
3761 * giscanner/girwriter.py:
3762 * giscanner/glibast.py:
3763 * giscanner/glibtransformer.py:
3764 * giscanner/transformer.py:
3765 Split out nodes to ast.py and glibast.py
3767 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3769 * giscanner/Makefile.am:
3770 * giscanner/gidlparser.py:
3771 * giscanner/gidlwriter.py:
3772 * giscanner/girwriter.py:
3773 * giscanner/glibtransformer.py:
3774 * giscanner/gobjecttreebuilder.py:
3775 * giscanner/transformer.py:
3776 * giscanner/treebuilder.py:
3777 * tools/g-ir-scanner:
3778 Rename treebuilder to transformer and
3779 gobjectreebuilder to glibtransformer.
3781 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3783 * giscanner/Makefile.am:
3784 * giscanner/__init__.py:
3785 * giscanner/cgobject.py:
3786 * giscanner/gidlparser.py:
3787 * giscanner/gidlwriter.py:
3788 * giscanner/girwriter.py:
3789 * giscanner/gobjecttreebuilder.py:
3790 * giscanner/odict.py:
3791 * giscanner/sourcescanner.py:
3792 * giscanner/treebuilder.py:
3793 * giscanner/xmlwriter.py:
3794 * tools/Makefile.am:
3795 * tools/g-ir-scanner:
3796 Add LGPLv2 license header and install all python files
3798 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3801 * giscanner/gidlwriter.py:
3802 * giscanner/giscannermodule.c (pygi_source_directive_new),
3803 (directive_get_options), (pygi_source_symbol_new),
3804 (symbol_get_base_type), (pygi_source_type_new),
3805 (type_get_base_type), (type_get_child_list),
3806 (pygi_source_scanner_get_symbols),
3807 (pygi_source_scanner_get_directives):
3808 * giscanner/gobjecttreebuilder.py:
3809 * giscanner/sourcescanner.py:
3810 * giscanner/treebuilder.py:
3811 * tests/parser/foo-object.h:
3812 Add support for virtual methods.
3813 Pair struct FooClass with struct Foo.
3814 Clean up the SourceScanner bindings a bit.
3815 Add a testcase for virtual methods.
3817 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3819 * giscanner/cgobject.py:
3820 * giscanner/gidlwriter.py:
3821 * giscanner/gobjecttreebuilder.py:
3822 Add support for signals
3824 * tests/parser/foo.c (foo_object_class_init):
3825 * Foo-expected.gidl:
3826 Add a signal and update the expected output.
3828 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
3830 * giscanner/gidlwriter.py:
3831 * giscanner/girwriter.py:
3832 * giscanner/giscannermodule.c (directive_get_name),
3833 (directive_get_value), (directive_get_options),
3834 (symbol_get_directives), (symbol_set_directives),
3835 (pygi_source_scanner_parse_file),
3836 (pygi_source_scanner_lex_filename),
3837 (pygi_source_scanner_get_directives), (init_giscanner):
3838 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
3839 * giscanner/sourcescanner.h:
3840 * giscanner/sourcescanner.py:
3841 * giscanner/treebuilder.py:
3842 * tools/g-ir-scanner:
3843 Add support for source/header annotations.
3845 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3847 * giscanner/gidlwriter.py:
3848 * giscanner/girwriter.py:
3849 * giscanner/gobjecttreebuilder.py:
3850 * giscanner/treebuilder.py:
3851 Add support for Callbacks
3853 2008-04-22 Havoc Pennington <hp@pobox.com>
3855 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
3856 not in metadata->module, look for it in the global module, in case
3857 some other object or the app itself provides the symbol.
3859 2008-04-22 Havoc Pennington <hp@pobox.com>
3861 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
3862 dlopening a library that is already in the main app, by checking
3863 whether one of the lib's symbols is already loaded.
3865 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3867 * tests/parser/Foo-expected.gidl:
3868 * tests/parser/foo-object.h:
3871 2008-04-22 Havoc Pennington <hp@pobox.com>
3873 * girepository/ginfo.c (g_interface_info_find_method):
3874 Use interface_blob_size not object_blob_size to compute offset.
3876 2008-04-22 Havoc Pennington <hp@pobox.com>
3878 * girepository/gmetadata.c (_g_metadata_init): remove
3879 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
3880 (Glade and Clutter for example) rely on being loaded globally.
3882 2008-04-22 Havoc Pennington <hp@pobox.com>
3884 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
3885 function to get the GType given a RegisteredTypeInfo
3887 2008-04-22 Johan Dahlin <johan@gnome.org>
3889 * COPYING: Add a LGPL license, to prevent automake to
3890 put in a copy of GPL here. Pointed out by Havoc.
3892 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
3893 (g_type_info_is_pointer), (g_type_info_get_tag),
3894 (g_type_info_get_param_type), (g_type_info_get_interface),
3895 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
3896 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
3897 (g_error_domain_info_get_codes), (g_enum_info_get_value),
3898 (g_object_info_get_interface), (g_object_info_get_field),
3899 (g_interface_info_get_prerequisite),
3900 (g_signal_info_get_class_closure), (g_constant_info_get_value):
3901 * girepository/ginvoke.c (get_ffi_type):
3902 * girepository/girepository.h:
3903 * girepository/gmetadata.c (g_metadata_get_dir_entry),
3904 (g_metadata_check_sanity), (validate_header),
3905 (validate_array_type_blob), (validate_iface_type_blob),
3906 (validate_param_type_blob), (validate_error_type_blob),
3907 (validate_type_blob), (validate_constant_blob),
3908 (validate_struct_blob), (validate_enum_blob):
3909 * girepository/gmetadata.h:
3910 * tests/Makefile.am:
3911 * tests/invoke/Makefile.am:
3912 * tests/invoke/invoke.c (main):
3913 * tests/roundtrips.sh:
3914 * tools/Makefile.am:
3915 * tools/compiler.c (format_output), (write_out_metadata), (main):
3916 * tools/generate.c (write_type_name), (write_type_info),
3917 (write_constant_value), (write_enum_info), (load_metadata), (main):
3918 * tools/gidlcompilercontext.c:
3919 * tools/gidlcompilercontext.h:
3920 * tools/gidlcompilerentrynode.c:
3921 * tools/gidlcompilerentrynode.h:
3922 * tools/gidlcompilertypenode.c:
3923 * tools/gidlcompilertypenode.h:
3924 * tools/gidlmodule.c (g_idl_module_build_metadata):
3925 * tools/gidlmodule.h:
3926 * tools/gidlnode.c (init_stats), (dump_stats),
3927 (g_idl_node_get_size), (g_idl_node_get_full_size),
3928 (g_idl_node_cmp), (g_idl_node_can_have_member),
3929 (g_idl_node_add_member), (g_idl_node_param_direction_string),
3930 (parse_int_value), (parse_uint_value), (parse_float_value),
3931 (parse_boolean_value), (find_entry_node), (find_entry),
3932 (serialize_type), (g_idl_node_build_metadata), (write_string):
3934 * tools/gidlparser.c (parse_type_internal):
3935 * tools/quote-file.sh:
3936 Revert revisions 157,149-148,136-129 and 120.
3937 Move back to using g-idl-generate to generate the metadata and
3938 avoids dependency on a c compiler.
3940 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3942 * giscanner/girwriter.py:
3943 * tools/g-ir-scanner:
3944 Add an initial GIR writer and a --format option to g-ir-scanner
3946 2008-04-21 Johan Dahlin <johan@gnome.org>
3948 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
3949 gobject-2.0 and raise ImportError if not found.
3951 * giscanner/gidlparser.py:
3952 * giscanner/gidlwriter.py:
3953 * giscanner/gobjecttreebuilder.py:
3954 * tools/g-ir-scanner:
3955 Add a --include argument to include types from other idls.
3956 Add a minimalistic GIDL parser (just objects for now)
3957 Implement resolving of external type references and use it to
3958 resolve parent types, argument types and return types.
3960 2008-04-21 Johan Dahlin <johan@gnome.org>
3962 * giscanner/gidlwriter.py:
3963 * giscanner/gobjecttreebuilder.py:
3964 * giscanner/treebuilder.py:
3965 Add support for properties.
3966 Refactor Class/Interface support a bit, to share more code and
3967 always initialize their method attribute to an empty list.
3969 2008-04-21 Johan Dahlin <johan@gnome.org>
3971 * giscanner/cgobject.py:
3972 Add a workaround for a glib bug interface introspection bug
3973 (object_interface_list_properties, object_class_list_properties):
3974 Cast the return value to GParamSpec.
3976 * tests/parser/Foo-expected.gidl: Update
3977 * tests/parser/foo.c: Add a string property
3979 * giscanner/gobjecttreebuilder.py:
3980 After stripping namespaces, remove the original
3981 item to avoid duplication (GtkButton struct and Button object)
3983 2008-04-21 Johan Dahlin <johan@gnome.org>
3985 * giscanner/gobjecttreebuilder.py:
3986 * giscanner/treebuilder.py:
3987 Strip namespaces before objects, so we'll export
3988 GtkButton as Button in the gtk namespace
3990 2008-04-21 Johan Dahlin <johan@gnome.org>
3992 * giscanner/gidlwriter.py:
3993 * giscanner/gobjecttreebuilder.py:
3994 * giscanner/treebuilder.py:
3995 Add constructors for object/boxed types.
3997 2008-04-21 Johan Dahlin <johan@gnome.org>
3999 * giscanner/gidlwriter.py:
4000 * giscanner/gobjecttreebuilder.py:
4001 Add support for boxed types
4003 2008-04-21 Johan Dahlin <johan@gnome.org>
4005 * giscanner/giscannermodule.c: Mark structures as const,
4006 wrap SourceType.const_string.
4008 * tests/parser/foo-object.h: Add a couple of constants.
4010 * giscanner/gidlwriter.py:
4011 * giscanner/gobjecttreebuilder.py:
4012 * giscanner/treebuilder.py:
4013 Add basic support for interfaces
4015 * tools/g-ir-scanner:
4016 Add -o/--output for writing to a file
4018 2008-04-21 Havoc Pennington <hp@redhat.com>
4020 * TODO: add some C API wishlist items I could think of quickly
4022 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4024 * giscanner/gidlwriter.py:
4025 * giscanner/xmlwriter.py:
4026 Add a simple api for writing tags which can be used
4027 with the new 'with statement' in python 2.5
4029 2008-04-21 Johan Dahlin <johan@gnome.org>
4031 * giscanner/gobjecttreebuilder.py:
4032 Strip namespace and object prefix from method names.
4034 2008-04-21 Johan Dahlin <johan@gnome.org>
4036 * tools/g-ir-scanner (main): Add --pkg option to pass in
4037 pkg-config modules to get cflags from.
4039 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4040 Avoid duplication, reuse function writer for methods.
4042 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4044 * giscanner/gidlwriter.py:
4045 * giscanner/gobjecttreebuilder.py:
4046 * giscanner/treebuilder.py:
4047 * tools/g-ir-scanner:
4048 Resolve libtool .la files.
4049 Strip name spaces for methods.
4050 Add function symbols
4052 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4054 * giscanner/cgobject.py:
4055 * giscanner/gidlwriter.py:
4056 * giscanner/gobjecttreebuilder.py:
4057 * giscanner/treebuilder.py:
4058 Add support for classes and methods
4060 2008-04-20 Johan Dahlin <johan@gnome.org>
4062 * giscanner/gidlwriter.py:
4063 * giscanner/gobjecttreebuilder.py:
4064 * giscanner/odict.py:
4065 Avoid conflicts, keep the output ordered similar to
4066 the order of the input.
4067 Add a simple ordered dictionary implemenation
4069 2008-04-19 Johan Dahlin <johan@gnome.org>
4071 * giscanner/cgobject.py:
4072 * giscanner/gidlwriter.py:
4073 * giscanner/gobjecttreebuilder.py:
4074 * tools/g-ir-scanner:
4075 Start introspecting get-type functions.
4076 Implement support for GLib/GFlags GTypes.
4077 Add a ctype based GObject binding.
4079 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4081 * giscanner/gidlwriter.py:
4082 * giscanner/xmlwriter.py:
4083 * tools/g-ir-scanner:
4084 Add a simplistic gidl writer, which can't do too much.
4086 2008-04-18 Johan Dahlin <johan@gnome.org>
4088 * giscanner/sourcescanner.py:
4089 * giscanner/treebuilder.py:
4090 * tools/g-ir-scanner:
4091 split tree building and source scanning interface to separate files.
4093 2008-04-18 Johan Dahlin <johan@gnome.org>
4095 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4097 - Add support for struct/parameter/return, start parsing of ctypes
4099 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4102 2008-03-31 Johan Dahlin <johan@gnome.org>
4104 * tools/g-ir-scanner:
4105 Start to build abstract syntax node of scanned sources.
4106 Add support for cpp options.
4108 2008-03-27 Johan Dahlin <johan@gnome.org>
4110 * giscanner/giscannermodule.c:
4111 * giscanner/scannerlexer.l:
4112 * giscanner/sourcescanner.c:
4113 * tools/g-ir-scanner:
4115 Add simple pre-processor using subprocess and a PIPE.
4116 Change the parse_file apis to accept a file descriptor.
4118 2008-03-25 Johan Dahlin <johan@gnome.org>
4120 * giscanner/__init__.py:
4121 * tools/g-ir-scanner:
4122 Fix a typo and add an example python test program.
4124 2008-03-25 Johan Dahlin <johan@gnome.org>
4126 * giscanner/__init__.py:
4127 * giscanner/giscannermodule.c:
4128 * giscanner/sourcescanner.c:
4129 * giscanner/sourcescanner.h:
4130 Add constants and wrap a few more SymbolType fields
4132 2008-03-25 Johan Dahlin <johan@gnome.org>
4136 * giscanner/__init__.py:
4137 * giscanner/giscannermodule.c:
4138 * giscanner/Makefile.am:
4140 Add initial python bindings for the scanner and
4141 depend on python 2.5.
4143 2008-03-25 Johan Dahlin <johan@gnome.org>
4147 * giscanner/Makefile.am:
4148 * giscanner/sourcescanner.c:
4149 * giscanner/sourcescanner.h:
4150 * tools/Makefile.am:
4151 * tools/grealpath.h:
4152 * tools/sourcescanner.c:
4153 * tools/sourcescanner.h:
4155 Move the scanner to a separate library.
4157 2008-03-23 Johan Dahlin <johan@gnome.org>
4159 * tools/Makefile.am:
4162 * tools/scannerlexer.l:
4163 * tools/scannerparser.y:
4164 * tools/sourcescanner.c:
4165 * tools/sourcescanner.h:
4166 Split out the source scanner from the generator.
4167 Rename the symbols used in the scanner to use the gi_ prefix.
4168 This should make it possible to use the raw C parser from
4171 2008-03-23 Johan Dahlin <johan@gnome.org>
4173 * tests/parser/Makefile.am (utility.gidl):
4174 * tests/parser/utility-expected.gidl:
4175 Pass in the gobject.gidl since we're defining a GObject.
4177 2008-03-12 Johan Dahlin <johan@gnome.org>
4179 * relaxng/relaxng.rng:
4180 Add a releaxng in relaxng we can use to validate the relaxngs
4183 2008-03-12 Jürg Billeter <j@bitron.ch>
4185 * tools/scanner.c: (g_igenerator_new):
4186 * tools/scannerparser.y:
4187 Fix compiler warnings.
4189 2008-03-12 Jürg Billeter <j@bitron.ch>
4193 * tools/scannerparser.y:
4194 Start fixing memory management in g-idl-scanner.
4196 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4198 * tools/gidlcompilercontext.c: (write_compiled):
4199 Fix critical warning when no shlib passed to g-idl-compiler.
4201 2008-03-12 Johan Dahlin <johan@gnome.org>
4203 * tests/parser/utility-expected.gidl:
4204 * tests/parser/utility.h:
4205 Add a get_type-function, so the scanner actually
4206 parses it as an object.
4208 2008-03-12 Johan Dahlin <johan@gnome.org>
4210 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4213 * tests/parser/Foo-expected.gidl:
4214 * tests/parser/Makefile.am:
4215 * tests/parser/foo-object.h:
4216 * tests/parser/foo.c:
4217 * tests/parser/utility-expected.gidl:
4218 * tests/parser/utility.c:
4219 * tests/parser/utility.h:
4221 Add a new gidl test. 'utility.gidl', which is used to be able
4222 to test external type references. Add a reference to UtilityObject*
4225 2008-03-11 Johan Dahlin <johan@gnome.org>
4229 Remove most global variables
4231 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4233 * tools/scannerlexer.l:
4235 * tests/parser/Foo-expected.gidl:
4236 * tests/parser/foo.c:
4237 * tests/parser/Makefile.am:
4238 * tests/parser/foo-object.h:
4240 Added a few extra tests. Which resulted in finding a few
4241 bugs. Which resulted in me fixing those bugs
4243 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4245 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4246 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4247 Add some comments for strings into generated output for
4250 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4252 * tools/gidlcompilercontext.c: (write_compiled):
4253 Write out the shlibs variable before writing out the strings
4254 length. Fixes compiler warning when using '-l' flag with
4257 2008-03-11 Johan Dahlin <johan@gnome.org>
4259 * tests/parser/Foo-expected.gidl:
4260 * tests/parser/foo-object.h:
4263 * tools/scannerlexer.l:
4264 Add support for parsing return arguments. Add support for
4265 caller-owns return types.
4266 Patch by Philip Van Hoof.
4268 * tools/scannerparser.y:
4269 Remove parsing of the @deprecated syntax used in headers.
4270 We will support gtk-doc deprecation in the future instead.
4272 2008-03-11 Johan Dahlin <johan@gnome.org>
4274 * tools/compiler.c (main): Coding style fixes
4276 2008-03-10 Johan Dahlin <johan@gnome.org>
4279 Add GCOV_LIBS to GILIBS
4281 2008-03-10 Johan Dahlin <johan@gnome.org>
4283 * tests/parser/Foo-expected.gidl:
4284 * tests/parser/foo.c:
4285 Rename null-ok to direction=out
4287 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4289 reviewed and extensively tested by Johan
4291 * tests/parser/Foo-expected.gidl:
4292 * tests/parser/foo-object.h:
4293 * tests/parser/foo.c:
4296 * tools/gidlwriter.c:
4299 * tools/scannerlexer.l:
4300 * tools/scannerparser.y:
4302 Add support for scanning for gtk-doc comments inside
4303 C source files. Add tests
4305 2008-03-10 Johan Dahlin <johan@gnome.org>
4307 * tests/parser/Makefile.am:
4308 * tests/parser/foo.c:
4311 * tools/scannerparser.y:
4312 Add an api to lex filenames.
4313 Lex all source .c files passed in on the command line.
4314 Scan sources in a test and a couple of private structures
4315 which should not be included in the generated gidl
4317 2008-03-10 Johan Dahlin <johan@gnome.org>
4319 * tests/invoke/Makefile.am: Make the generated metadata
4320 depend on the g-idl-compiler
4322 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4324 * tools/gidlmodule.c
4325 * tools/gidlmodule.h
4328 Remove the old g-idl-compiler code.
4331 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4333 * tools/quote-file.sh
4336 Move to using the 'C' struct compiler code.
4338 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4340 * girepository/ginfo.c
4342 Change the way that external references with no namespace
4343 are dealt with. External references with no namespace
4344 are placed into the XML as-if they are a local reference.
4345 This is temporary, but helps with roundtrip tests.
4347 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4349 * girepository/ginfo.c
4350 Add the ability to get the value of a constant of
4351 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4352 is provided as a string.
4354 This would deal properly with:
4355 typedef char* random;
4356 const random = "A string";
4358 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4360 * girepository/ginfo.c
4361 * girepository/girepository.h
4363 Add a function to check if an enum is registered or not.
4364 Previously anything testing this relied on the g-type
4365 string offset having a value of 0.
4367 * girepository/gmetadata.c
4368 * girepository/gmetadata.h
4370 Remove unneccesary or erroneous checks. There were two
4371 metadata validation checks which made sure that the blob
4372 sizes were the same as some magic numbers compiled into the code.
4373 This is wrong as it breaks any forwards compatibility that may
4376 Checks were also present that made sure that unregistered type
4377 blobs had a value of 0 in the g-type offset field. This is
4378 unneccessary. If a type blob is unregistered then any value
4379 in its g-type field is simply invalid.
4381 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4383 * girepository/ginfo.c
4384 * girepository/gmetadata.c
4385 * girepository/gmetadata.h
4387 Change the metadata format to have a standard header
4388 for all the type blobs. Merge the SimpleTypeBlob
4389 and InterfaceTypeBlob into a union. A union of these
4390 two blobs existed previously but was not explicit
4391 in the metadata format.
4393 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4395 * tools/gidlcompilercontext.c
4396 * tools/gidlcompilercontext.h
4397 * tools/gidlcompilerentrynode.c
4398 * tools/gidlcompilerentrynode.h
4399 * tools/gidlcompilertypenode.c
4400 * tools/gidlcompilertypenode.h
4402 Add code to compile a tree of GIdlNodes to
4403 a 'C' struct representing the metadata.
4404 This is to aid cross-compiling. Previously
4405 the g-idl-compiler created a binary blob with
4406 data written in the byte order and alignment
4407 of the tool rather than the intended target.
4409 Cleaned up and improved by Johan and Robert :-)
4411 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4413 * girepository/ginvoke.c
4414 * girepository/girepository.h
4415 * girepository/gmetadata.c
4416 * girepository/gmetadata.h
4418 * tools/gidlparser.c
4419 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4420 to avoid confusion with the interface blob.
4423 * tools/gidlparser.c
4424 Remove magic numbers and replace with type-tag
4425 enumeration symbols.
4427 * girepository/gmetadata.c
4428 Add validate declaration.
4430 2008-03-10 Jürg Billeter <j@bitron.ch>
4432 * tools/gidlparser.c: (parse_type_internal):
4433 * tools/scannerlexer.l:
4434 * tools/scannerparser.y:
4435 Support C99 _Bool type in scanner.
4437 2008-03-10 Jürg Billeter <j@bitron.ch>
4439 * tests/parser/Foo-expected.gidl:
4440 * tests/parser/foo-object.h:
4441 * tests/parser/foo.c: (foo_enum_method):
4442 * tools/scanner.c: (g_igenerator_process_function_symbol):
4443 Don't skip functions that are defined in the namespace of a type
4444 that doesn't support methods, as for example enums.
4446 2008-03-10 Johan Dahlin <johan@gnome.org>
4448 * gidl.dtd: Remove, we're using relaxng for now
4450 * tests/parser/Foo-expected.gidl:
4451 * tests/parser/foo-object.h:
4452 * tests/parser/foo.c:
4453 Rename the enum/flags get_type functions to include the whole type.
4455 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4457 * tools/gidlwriter.c (enum_generate): added "type-name",
4458 "get-type" and "deprecated" missing arguments.
4459 * tests/parser/Foo-expected.gidl:
4460 * tests/parser/foo-object.h: test enum type, and no type.
4462 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4465 Consistent checks, add missing 'test'
4467 2008-03-05 Havoc Pennington <hp@redhat.com>
4469 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4470 does on Fedora 8. Make libffi a hard requirement, since it was in
4471 practice anyway (was not really conditional in the code or
4472 makefile, only in configure).
4474 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4476 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4477 reviewed by: Johan Dahlin <johan@gnome.org>
4479 * tests/Makefile.am:
4480 * tests/roundtrips.sh:
4481 Modify the roundtrips test so that they do not use the
4482 --raw option of the gidl compiler but instead compile a
4483 shared library to use with g_module.
4485 * tests/invoke/Makefile.am:
4486 * tests/invoke/invoke.c:
4487 Modify the invoke tests to build a shared library rather
4488 than use the --raw option.
4490 * tests/invoke/invoke-namespace-find.sh: Removed:
4491 Noone knows why this was here, so removed.
4493 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4495 * tools/scanner.c: (g_igenerator_process_function_symbol):
4496 Move g_idl_node_can_have_member test later, as it broke spotting
4497 get_type's for nodes that can't have members.
4499 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4502 * tools/gidlnode.c: (g_idl_node_can_have_member):
4503 Add g_idl_node_can_have_member.
4505 * tools/scanner.c: (g_igenerator_process_function_symbol):
4506 Use g_idl_node_can_have_member to test if we should add a function
4507 as a member of the type node.
4509 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4511 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4513 * tests/parser/Makefile.am:
4514 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4516 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4518 * tools/scanner.c: (main):
4519 Ignore -pthread when passed to g-idl-scanner.
4521 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4523 * tools/grealpath.h: Added:
4524 * tools/scanner.c: (main):
4525 * tools/scannerlexer.l:
4526 * tools/Makefile.am:
4527 Always use absolute paths with symbolic links resolved when
4528 comparing filenames.
4530 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4532 * gobject-introspection.pc.in:
4533 Provide variables for g-idl-parser, scanner and compiler in the
4536 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
4539 * girepository/Makefile.am:
4540 * tools/Makefile.am:
4541 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4543 2008-02-10 Johan Dahlin <johan@gnome.org>
4545 * tests/parser/Foo-expected.gidl:
4546 * tests/parser/foo-object.h:
4547 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4548 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4551 2008-02-10 Johan Dahlin <johan@gnome.org>
4553 * tests/parser/Foo-expected.gidl:
4554 * tests/parser/foo-object.h:
4555 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4556 Add enum and flags test.
4558 2008-02-10 Johan Dahlin <johan@gnome.org>
4562 * girepository/Makefile.am:
4563 Make 'make distcheck' work again.
4565 2008-02-10 Johan Dahlin <johan@gnome.org>
4567 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
4570 * tests/parser/Makefile.am: Only create Foo.gidl when running make
4571 check, eg exclude it from BUILT_SOURCES.
4573 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4578 * girepository/Makefile.am:
4579 * m4/Makefile.am: Added:
4580 * m4/as-compiler-flag.m4: Added:
4581 * m4/gcov.m4: Added:
4582 * tools/Makefile.am:
4583 Add ability to generate a coverage report.
4584 Adds configure option --enable-gcov and make rule 'check-coverage'.
4586 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4590 * gidl/Makefile.am: Added:
4591 * girepository/Makefile.am: Added:
4592 * src/Makefile.am: Renamed to tools/Makefile.am:
4593 * src/compiler.c: Renamed to tools/compiler.c:
4594 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
4595 * src/generate.c: Renamed to tools/generate.c:
4596 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
4597 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
4598 * src/gidlnode.c: Renamed to tools/gidlnode.c:
4599 * src/gidlnode.h: Renamed to tools/gidlnode.h:
4600 * src/gidlparser.c: Renamed to tools/gidlparser.c:
4601 * src/gidlparser.h: Renamed to tools/gidlparser.h:
4602 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
4603 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
4604 * src/ginfo.c: Renamed to girepository/ginfo.c:
4605 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
4606 * src/girepository.c: Renamed to girepository/girepository.c:
4607 * src/girepository.h: Renamed to girepository/girepository.h:
4608 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
4609 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
4610 * src/scanner.c: Renamed to tools/scanner.c:
4611 * src/scanner.h: Renamed to tools/scanner.h:
4612 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
4613 * src/scannerparser.y: Renamed to tools/scannerparser.y:
4614 * tests/invoke/Makefile.am:
4615 Split src/ into girepository/ and tools/
4619 * girepository/Makefile.am:
4620 * tests/Makefile.am:
4621 * tests/invoke/Makefile.am:
4622 * tests/parser/Makefile.am:
4623 * tests/roundtrips.sh:
4624 * tools/Makefile.am:
4625 Make distcheck work.
4627 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
4629 * tests/invoke/invoke.c: (main):
4630 * tests/invoke/testfns.c: (test6), (test7):
4631 * tests/invoke/testfns.xml:
4632 Add tests for invokation with a GList argument.
4633 Also tests caller-owns return values.
4635 2008-02-04 Rob Taylor <robtaylor@floopily.org>
4638 Add some documentation for GICallableInfo
4640 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
4643 Correct syntax errors in the DTD file.
4645 * relaxng/c-types.xml:
4646 * relaxng/g-types.xml:
4648 Add a RelaxNG specification for the GObject Introspection XML data.
4649 The Specification has validated all of the test files.
4651 2008-01-25 Rob Taylor <robtaylor@floopily.org>
4653 * tests/roundtrips.sh:
4654 * tests/struct.test:
4655 Add roundtrip tests for structs.
4657 2008-01-11 Johan Dahlin <johan@gnome.org>
4659 * src/scanner.c (g_igenerator_process_function_symbol):
4660 Refactor out g_idle_node_add_member.
4661 (create_node_from_gtype, create_node_from_ctype):
4662 Use case instead of if...else
4663 (get_type_from_type_id):
4664 Rename to create_node_from_gtype
4665 (get_type_from_ctype):
4666 Rename to create_node_from_ctype
4668 Rename ginode -> node, gitype -> type, gifunc -> func.
4670 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
4671 Two new functions, refactor out of scanner.c
4673 * src/scanner.c: (g_igenerator_process_function_symbol):
4674 * src/scannerlexer.l:
4675 Do not save the content of the deprecated variable, only
4678 2008-01-11 Johan Dahlin <johan@gnome.org>
4680 * tests/parser/foo-object.h: Add a couple of comment parser tests.
4682 2008-01-11 Jürg Billeter <j@bitron.ch>
4684 * src/scannerlexer.l:
4685 Fix GTK-Doc parsing.
4687 2008-01-11 Jürg Billeter <j@bitron.ch>
4689 * src/scannerlexer.l:
4690 Fix GTK-Doc parsing.
4692 2008-01-11 Jürg Billeter <j@bitron.ch>
4694 * src/scanner.c: (lookup_symbol):
4695 Return unresolved name if we find unknown symbol.
4697 2008-01-11 Jürg Billeter <j@bitron.ch>
4699 * src/scanner.c: (g_igenerator_generate):
4700 Initialize GObject to fix scanning interface properties.
4702 * tests/parser/Foo-expected.gidl:
4703 * tests/parser/foo-object.h:
4704 * tests/parser/foo.c: (foo_interface_get_type):
4705 Test interfaces with GObject prerequisite.
4707 * tests/parser/Makefile.am:
4708 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
4710 2007-12-27 Johan Dahlin <johan@gnome.org>
4712 * src/scannerlexer.l:
4713 Parse gtk-doc comments.
4715 * src/gidlwriter.c: (function_generate):
4716 Reorganize, avoid duplication and add support for
4717 writing deprecated functions.
4719 * src/scannerparser.y:
4721 Add new structure CDirective and functions to create/free them.
4723 * src/scanner.c: (g_igenerator_process_function_symbol),
4724 (g_igenerator_process_unregistered_struct_typedef),
4725 (g_igenerator_process_struct_typedef),
4726 (g_igenerator_process_union_typedef),
4727 (g_igenerator_process_enum_typedef),
4728 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
4729 (g_igenerator_start_preprocessor):
4730 Parse @deprecated directive for functions.
4731 Remove some more C99isms.
4732 Send in -C to cpp to avoid stripping comments.
4734 * tests/parser/foo-object.h:
4735 * tests/parser/Foo-expected.gidl:
4736 Add deprecated directive
4738 2007-12-27 Johan Dahlin <johan@gnome.org>
4740 * src/scannerlexer.l (intsuffix): Add emacs mode line and
4741 escape ' and " so it looks more like C.
4744 Unlink temporary file used.
4746 2007-12-27 Johan Dahlin <johan@gnome.org>
4748 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
4749 (g_igenerator_start_preprocessor), (main):
4751 * src/scannerparser.y:
4752 Plug a couple of simple memory leaks.
4754 2007-12-27 Johan Dahlin <johan@gnome.org>
4756 * src/scanner.c: (g_igenerator_parse_macros),
4757 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
4760 * src/scannerparser.y:
4761 * tests/parser/Makefile.am:
4763 Improve error reporting, return when the preprocessor fails.
4764 Add a verbose parameter, to aid debugging.
4765 Revert to using a temporary file to communicate between the
4766 preprocessor and the parser, because we need to wait for
4767 the exit code from the pre-processor before starting to parse.
4769 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
4771 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
4772 cparser.y to scannerparser.y
4774 2007-12-11 Johan Dahlin <johan@gnome.org>
4778 * src/scanner.c: (g_igenerator_new):
4780 Get rid of the global the_generator variable.
4782 2007-12-10 Johan Dahlin <johan@gnome.org>
4784 * src/scanner.c (main): Add an output option,
4785 add checks for required parameters
4788 set BUILD_SOURCES and CLEANFILES properly
4790 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
4791 (g_writer_write_indent), (g_writer_write_unindent),
4792 (field_generate), (value_generate), (constant_generate),
4793 (property_generate), (function_generate), (vfunc_generate),
4794 (signal_generate), (interface_generate), (struct_generate),
4795 (union_generate), (boxed_generate), (enum_generate),
4796 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
4798 * src/scanner.c: (g_igenerator_generate):
4800 * src/scannerwriter.c:
4802 Refactor scannerwriter to only be tied to a GIdlModule and move
4803 it (again!) to gidlwriter.c. Change the writer function to take
4806 2007-12-10 Johan Dahlin <johan@gnome.org>
4809 * src/scanner.c: (g_igenerator_generate):
4811 * src/scannerwriter.c: (g_igenerator_write_inline),
4812 (g_igenerator_write), (g_igenerator_write_indent),
4813 (g_igenerator_write_unindent), (field_generate), (value_generate),
4814 (constant_generate), (property_generate), (function_generate),
4815 (vfunc_generate), (signal_generate), (interface_generate),
4816 (struct_generate), (union_generate), (boxed_generate),
4817 (enum_generate), (node_generate), (module_generate),
4818 (g_scanner_write_file):
4820 Move the scanner gidl writing to a separate source file.
4822 2007-12-10 Johan Dahlin <johan@gnome.org>
4827 Move over all CType construction functions.
4829 * tests/parser/Makefile.am:
4830 Be verbose when printing parsing tests results.
4832 2007-12-10 Johan Dahlin <johan@gnome.org>
4834 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
4835 preprocessor handling to here. Start cpp insteado of cc -E,
4836 always include -U__GNUC__, since it's specific to the preprocessor
4839 * tests/parser/Makefile.am (check-local): Silent diff and skip
4840 -U__GNUC__ which is always defined now
4842 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
4844 reviewed by: <delete if not using a buddy>
4846 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
4847 * tests/parser/Makefile.am:
4849 2007-12-09 Johan Dahlin <johan@gnome.org>
4852 Use GOption for command line options.
4853 (g_igenerator_new, main): Simplify constructor and they way
4854 parameters are passed into it.
4860 * src/gen-introspect.c:
4861 * src/gen-introspect.h:
4863 Rename gen-introspect.[ch] to scanner.[ch]
4865 2007-12-09 Johan Dahlin <johan@gnome.org>
4869 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
4870 don't make the repository library and the other utilites link against
4873 * src/gen-introspect.c: (g_igenerator_create_object),
4874 (g_igenerator_create_interface), (g_igenerator_create_boxed),
4875 (g_igenerator_create_enum), (g_igenerator_create_flags),
4876 (g_igenerator_process_module_symbol),
4877 (g_igenerator_process_module), (g_igenerator_generate), (main):
4878 * src/gen-introspect.h:
4879 Refactor g_igenerator_process_types into smaller pieces.
4881 * tests/parser/Makefile.am:
4882 Depend on the gen-introspect binary
4884 2007-12-09 Johan Dahlin <johan@gnome.org>
4886 * src/gen-introspect.c (g_igenerator_process_types):
4887 Break into smaller pieces, one for each generated node type.
4889 2007-12-08 Johan Dahlin <johan@gnome.org>
4891 * src/gen-introspect.c: (g_igenerator_process_types),
4892 (g_igenerator_add_module):
4893 * tests/parser/Foo-expected.gidl:
4894 * tests/parser/foo-object.h:
4895 * tests/parser/foo.c: (foo_subobject_class_init),
4896 (foo_subobject_init):
4898 Add a subobject test and make sure to register defined classes
4899 in the lookup symbol hash table.
4901 2007-12-08 Johan Dahlin <johan@gnome.org>
4905 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
4906 (g_igenerator_process_types), (g_igenerator_add_module),
4907 (g_igenerator_add_include_idl), (main):
4908 * src/gen-introspect.h:
4909 * tests/parser/Makefile.am:
4910 * tests/parser/Foo-expected.gidl:
4912 Change the gen-introspect to generate namespaced module names,
4913 such as GLib.Object instead of GObject.
4914 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
4915 add a --include-idl parameter to gen-introspect,
4916 and update the parser test.
4918 2007-12-08 Johan Dahlin <johan@gnome.org>
4920 * src/gen-introspect.c:
4921 Move main to the end of the file and attempt to make it valid
4924 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
4925 we're not quite ready to generate metadata yet.
4930 Add a simple gen-introspect parser test
4932 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
4934 reviewed by: Johan Dahlin <johan@gnome.org>
4937 * gobject-introspection.pc.in:
4939 * src/compiler.c: (format_output), (write_out_metadata), (main):
4940 * src/gen-introspect.c: (main):
4941 * src/gen-introspect.h:
4942 * src/generate.c: (write_callable_info), (write_repository),
4943 (load_metadata), (main):
4944 * src/gidlmodule.c: (g_idl_module_new),
4945 (g_idl_module_build_metadata):
4947 * src/gidlparser.c: (start_element_handler):
4948 * src/ginfo.c: (g_info_new), (g_info_from_entry),
4949 (g_base_info_get_name), (g_base_info_get_namespace),
4950 (g_base_info_is_deprecated), (g_base_info_get_annotation),
4951 (g_base_info_get_metadata), (g_function_info_get_symbol),
4952 (g_function_info_get_flags), (g_function_info_get_property),
4953 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
4954 (g_callable_info_may_return_null),
4955 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
4956 (g_callable_info_get_arg), (g_arg_info_get_direction),
4957 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
4958 (g_arg_info_is_optional), (g_arg_info_may_be_null),
4959 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
4960 (g_type_info_get_tag), (g_type_info_get_param_type),
4961 (g_type_info_get_interface), (g_type_info_get_array_length),
4962 (g_type_info_is_zero_terminated),
4963 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4964 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
4965 (g_value_info_get_value), (g_field_info_get_flags),
4966 (g_field_info_get_size), (g_field_info_get_offset),
4967 (g_registered_type_info_get_type_name),
4968 (g_registered_type_info_get_type_init),
4969 (g_struct_info_get_n_fields), (g_struct_info_get_field),
4970 (g_struct_info_get_n_methods), (g_struct_info_get_method),
4971 (find_method), (g_struct_info_find_method),
4972 (g_enum_info_get_n_values), (g_enum_info_get_value),
4973 (g_object_info_get_parent), (g_object_info_get_type_name),
4974 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
4975 (g_object_info_get_interface), (g_object_info_get_n_fields),
4976 (g_object_info_get_field), (g_object_info_get_n_properties),
4977 (g_object_info_get_property), (g_object_info_get_n_methods),
4978 (g_object_info_get_method), (g_object_info_find_method),
4979 (g_object_info_get_n_signals), (g_object_info_get_signal),
4980 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
4981 (g_object_info_get_n_constants), (g_object_info_get_constant),
4982 (g_interface_info_get_n_prerequisites),
4983 (g_interface_info_get_prerequisite),
4984 (g_interface_info_get_n_properties),
4985 (g_interface_info_get_property), (g_interface_info_get_n_methods),
4986 (g_interface_info_get_method), (g_interface_info_find_method),
4987 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
4988 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
4989 (g_interface_info_get_n_constants),
4990 (g_interface_info_get_constant), (g_property_info_get_flags),
4991 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
4992 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
4993 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
4994 (g_constant_info_get_value), (g_union_info_get_n_fields),
4995 (g_union_info_get_field), (g_union_info_get_n_methods),
4996 (g_union_info_get_method), (g_union_info_is_discriminated),
4997 (g_union_info_get_discriminator_offset),
4998 (g_union_info_get_discriminator):
4999 * src/ginvoke.c: (g_function_info_invoke):
5000 * src/girepository.c: (g_irepository_register),
5001 (g_irepository_unregister), (g_irepository_get_default),
5002 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5003 (g_irepository_get_info), (g_irepository_find_by_name),
5004 (g_irepository_get_shared_library),
5005 (g_irepository_build_search_path), (g_irepository_register_file),
5006 (g_irepository_error_quark):
5007 * src/girepository.h:
5008 * src/gmetadata.c: (g_metadata_get_dir_entry),
5009 (g_metadata_check_sanity), (validate_header),
5010 (validate_array_type_blob), (validate_iface_type_blob),
5011 (validate_param_type_blob), (validate_error_type_blob),
5012 (validate_type_blob), (validate_arg_blob),
5013 (validate_signature_blob), (validate_function_blob),
5014 (validate_callback_blob), (validate_constant_blob),
5015 (validate_value_blob), (validate_field_blob),
5016 (validate_property_blob), (validate_signal_blob),
5017 (validate_vfunc_blob), (validate_struct_blob),
5018 (validate_enum_blob), (validate_object_blob),
5019 (validate_interface_blob), (validate_errordomain_blob),
5020 (validate_union_blob), (validate_blob), (validate_directory),
5021 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5022 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5023 (g_metadata_new_from_mapped_file), (g_metadata_free),
5024 (g_metadata_set_module), (g_metadata_get_namespace):
5026 * tests/Makefile.am:
5027 * tests/invoke/Makefile.am:
5028 * tests/invoke/invoke-namespace-find.sh:
5029 * tests/invoke/invoke.c: (main):
5031 Add a namespace/shared library mapping. fixes #313268.
5033 2007-12-03 Johan Dahlin <johan@gnome.org>
5035 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5038 2007-11-30 Jürg Billeter <j@bitron.ch>
5044 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5045 (g_igenerator_write_inline), (g_igenerator_write),
5046 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5047 (field_generate), (value_generate), (constant_generate),
5048 (property_generate), (function_generate), (vfunc_generate),
5049 (signal_generate), (interface_generate), (struct_generate),
5050 (union_generate), (boxed_generate), (enum_generate),
5051 (node_generate), (module_generate), (get_type_from_type_id),
5052 (str_replace), (g_igenerator_process_properties),
5053 (g_igenerator_process_signals), (g_igenerator_process_types),
5054 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5055 (g_igenerator_process_unregistered_struct_typedef),
5056 (g_igenerator_process_struct_typedef),
5057 (g_igenerator_process_union_typedef),
5058 (g_igenerator_process_enum_typedef),
5059 (g_igenerator_process_function_typedef),
5060 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5061 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5062 (g_igenerator_generate), (main), (csymbol_new),
5063 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5064 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5065 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5066 (eat_hspace), (eat_line), (read_identifier),
5067 (g_igenerator_parse_macros):
5068 * src/gen-introspect.h:
5070 Import gen-introspect to generate introspection information by
5073 2007-11-30 Jürg Billeter <j@bitron.ch>
5075 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5077 2007-11-30 Jürg Billeter <j@bitron.ch>
5079 * src/gidlparser.c: (end_element_handler): Don't leave requires
5082 2007-11-29 Johan Dahlin <johan@gnome.org>
5084 * src/gidlparser.c (parse_type_internal): Add char,
5085 gchar and guchar to the builtin types.
5087 2007-11-26 Johan Dahlin <johan@gnome.org>
5089 * src/ginfo.c: (g_object_info_get_type_name),
5090 (g_object_info_get_type_init):
5091 * src/girepository.c: (g_irepository_is_registered):
5092 * src/girepository.h:
5094 Add g_object_info_get_type_name, g_object_info_get_type_init and
5095 g_irepository_is_registered.
5097 2006-08-14 Jürg Billeter <j@bitron.ch>
5099 * src/gidlparser.c: (end_element_handler): Don't leave
5100 namespace and implements states too early.
5103 2007-11-26 Johan Dahlin <johan@gnome.org>
5105 * src/gmetadata.c (validate_struct_blob):
5106 pass blob_type to validate_function_blob instead of
5107 hard-coding BLOB_TYPE_STRUCT.
5109 Patch by Torsten Schoenfeld, fixes #314190
5111 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5113 * src/compiler.c, src/generate.c, src/gidlnode.c,
5114 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5115 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5116 warnings about return values, signedness mismatches, unused
5117 variables, and unhandles enum values in switch statements.
5119 * tests/invoke/Makefile.am: Don't install the invoke test program.
5120 Add -I ../../src to the cflags used for the test functions files.
5122 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5124 * src/girepository.h: Export g_invoke_error_quark.
5126 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5128 * src/ginvoke.c: Remove the fallback implementation of
5129 g_function_info_invoke since we now formally depend on libffi.
5131 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5133 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5134 Remove these files from cvs, as they are now generated.
5136 * src/gmetadata.c (validate_iface_type_blob): Don't
5137 complain if blob->pointer is not set, since that
5138 happens for enum and flag types. (#308935, Gustavo
5141 * Commit an autoconf-conversion patch by
5142 Gustavo Carneiro (#308708)
5144 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5146 * src/compiler.c (main): Use it here to validate
5147 the generated metadata.
5149 * src/gmetadata.[hc]: Add code to validate a
5152 * metadata-format.txt: Updates
5154 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5156 * tests/*: Add struct offsets to field and vfunc
5159 * src/generate.c (write_vfunc_info): Write offset
5160 information for vfuncs.
5162 * src/gidlnode.c (g_idl_node_build_metadata): Write
5163 the struct offsets into the metadata.
5165 * src/gidlparser.c: Parse the offset attributes of
5166 field and vfunc elements.
5168 * src/gidlnode.h: Add offset members to field and
5171 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5175 * gidl.dtd: Updates.
5177 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5178 file, creates, compiles and runs a C file, and folds the
5179 resulting struct offsets back into the .gidl file.
5181 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5183 * src/gidlparser.c (start_field): Make fields in objects
5186 * src/gidlmodule.c: Include string.h
5191 * metadata-format.txt: Cleanup basic types.
5192 * src/*: Adapt to the changes.
5193 * tests/*: Adapt to the changes.
5194 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5196 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5197 size for enum blobs.
5198 (g_idl_node_get_full_size): Report the correct size for
5201 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5202 error checking for blob sizes.
5204 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5206 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5207 interface types for which is_pointer is FALSE, e.g. enums.
5209 * src/gidlnode.c (g_idl_node_get_full_size)
5210 * src/gidlparser.c (parse_type_internal):
5211 * src/generate.c (write_type_info): Support unspecialized
5212 lists, hashtables and errors. Also emit a '*' after these.
5216 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5220 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5222 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5224 * src/*.c: Change the directory to be addressed by
5225 1-based indexes, and use an index of zero to mean
5228 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5230 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5232 * tests/union.test: Add a union test.
5234 * src/generate.c: Handle unions.
5236 * src/girepository.h:
5237 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5239 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5241 * src/gidlparser.c (start_union): Parse <union> elements.
5243 * src/gidlnode.h: Add a GIdlNodeUnion.
5245 * gidl.dtd: Add a <union> element.
5247 * src/gmetadata.c (g_metadata_check_sanity): Check
5250 * src/gmetadata.h: Add union_blob_size to Header,
5253 * metadata-format.txt: Add a UnionBlob.
5255 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5257 * tests/*: Update testcases.
5259 * src/generate.c (write_callable_info): Don't forget to
5260 write transfer and null-ok attributes for return types
5263 * src/girepository.h:
5264 * src/ginfo.c (g_callable_info_may_return_null):
5265 New function to find out if a function may return NULL.
5267 * src/compiler.c (format_output): Make the generated
5270 * README: Point to a recent libffi snapshot.
5272 * tests/invoke/*: Some invoke tests.
5274 * src/Makefile: Add ginvoke.c and the necessary
5277 * src/girepository.h (g_function_info_invoke): Add
5280 * src/ginvoke.c (g_function_info_invoke): Initial
5281 implementation of invoke functionality based on libffi.
5283 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5284 strings and types hash tables in the right order when
5286 (find_entry_node): Free the name parts.
5288 2005-05-12 Johan Dahlin <johan@gnome.org>
5290 * src/generate.c: Generate consistent end tags.
5294 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5298 * src/gidlparser.c (start_function): Actually add
5299 methods to objects. (Steven Walter)
5301 * src/girepository.h:
5302 * src/ginfo.c: Rename Transfer and Direction to
5303 GITransfer and GIDirection. (Torsten Schoenfeld)
5305 * tests/*: Make tests work with the changes in name
5308 * src/gidlnode.c (find_entry_node): Parse qualified
5309 names and generate xref nodes for them if needed. Don't
5310 require all modules to be loaded any more.
5312 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5315 * src/ginfo.c (g_object_info_get_parent): Return NULL
5316 if blob->parent is 0. Still need to make sure index
5319 * src/generate.c: Generate qualified names when
5320 referring to non-local types. Emit transfer attribute
5323 * src/compiler.c (format_output): Put the function
5324 attributes where gcc accepts them.
5326 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5328 * src/compiler.c (main): Add a --verbose cmdline option
5329 and only log messages if it is specified.
5332 * src/gidlnode.c (init_stats, dump_stats): Collect some
5333 statistics on string and type sharing.
5335 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5336 g_message() instead of fprintf().
5338 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5339 (g_idl_node_get_size): Implement for structs.
5340 (g_idl_node_get_full_size): Handle parent being NULL.
5341 (serialize_type): Handle lookup failures more gracefully.
5343 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5345 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5346 size calculation for 2-parameter types and for objects.
5348 * src/compiler.c: Add a cmdline option for debug output
5349 and install a log handler to implement it.
5350 * src/gidlnode.c: Add some debug spew.
5354 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5355 forget to count the module name when calculating the
5356 required size for the metadata.
5359 * src/gidlparser.c: Fix compiler warnings.
5361 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5363 * src/compiler.c (main): Free the option context.
5365 * gidl.dtd: Clean up handling of names. All elements
5366 have a "name", only the elements corresponding to
5367 actual callable functions (function, method, constructor),
5368 have an additional "symbol" attribute holding the
5369 dlsym()-able function name.
5371 * src/generate.c: Adapt to generate xml matching the
5375 * src/gidlnode.c: Adapt to parse the new dtd.
5377 * tests/*.test: Adjust to the new dtd.
5379 * metadata-format.txt:
5380 * src/gmetadata.h: Remove the short_name field
5382 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5383 * src/girepository.h:
5384 * src/ginfo.c (g_value_info_get_short_name): Removed
5386 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5388 * gidl.dtd: Allow constructors for boxed types,
5389 patch by Jonathan Blandford.
5392 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5394 * --- Initial import ---