1 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
3 * giscanner/dumper.py: Add license headers,
4 refactor into a class, avoid some duplication and do some
7 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
9 Make it compilable with -Werror on my system by adding
10 a couple of prototypes and including headers.
12 2008-11-23 Johan Dahlin <jdahlin@async.com.br>
14 Bug 562022 – gobject-introspection needs python headers
16 * configure.ac: fail without python headers present.
19 2008-11-21 Johan Dahlin <jdahlin@async.com.br>
21 Bug 561617 – Return value array annotations
23 * giscanner/transformer.py:
24 * tests/scanner/annotation.c (annotation_return_array):
25 * tests/scanner/annotation.h:
26 Add support for (array) for return value annotations as well.
28 2008-11-20 Johan Bilien <jobi@via.ecp.fr>
30 * tests/everything/everything.[ch]: add a test function which calls a
33 2008-11-19 Johan Dahlin <jdahlin@async.com.br>
35 * giscanner/cachestore.py:
36 Catch ValueError exceptions.
38 2008-11-18 Tommi Komulainen <tommi.komulainen@iki.fi>
40 * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
42 2008-11-18 Andreas Rottmann <a.rottmann@gmx.at>
44 * girepository/girnode.c (g_ir_node_build_typelib): Use sizeof()
45 instead of hard-coding struct sizes.
47 2008-11-18 Owen Taylor <otaylor@redhat.com>
49 Bug 561296 - Add "storage type" to the typelib data for enums
51 In order to set and get enum and flag fields in structures, we need
52 to know the integral type that the enumeration is stored as. We are already
53 computing that at compile time in order to compute struct offsets, so the
54 easiest thing to do is to save that in the typelib.
56 * docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
57 girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
58 and compute and save it at compile time.
60 * girepository/girepository.h girepository/ginfo.c:
61 Add g_enum_info_get_storage_type().
63 * girepository/gfield.c: Implement reading and writing enum and flags fields
64 based on the storage type.
66 2008-11-18 Owen Taylor <otaylor@redhat.com>
68 Add enums to the Everything test module
70 * tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
71 test module and register them as GTypes.
73 https://bugzilla.gnome.org/show_bug.cgi?id=561296
75 2008-11-18 Johan Dahlin <jdahlin@async.com.br>
77 * giscanner/cachestore.py:
78 Catch BadPickleGet exceptions as well.
80 2008-11-17 Owen Taylor <otaylor@redhat.com>
82 * tests/everything/everything.c: Fix doc comment annotations
83 for test_struct_b_clone() to refer to the right function.
85 2008-11-17 Dan Winship <danw@gnome.org>
87 * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
88 spelling of GHashTable. #561135
90 * tests/scanner/annotation.c (annotation_object_get_hash):
91 * tests/scanner/annotation-1.0-expected.gir:
92 * tests/scanner/annotation-1.0-expected.tgir: add a test of
93 GHashTable annotations
95 2008-11-17 Andreas Rottmann <a.rottmann@gmx.at>
97 * giscanner/ast.py: Change string array match type to be in terms
98 of canonicalized type.
99 * giscanner/transformer.py: Add canonicalize_ctype which gives us
100 a version of a c:type without aliases, so we can deep canonicalize
101 char** to utf8*. Update parse_ctype to use it.
102 * tests/*: Add gtk_init like int*/char*** arg functions for testing.
104 2008-11-16 Colin Walters <walters@verbum.org>
106 * girepository/girepository.c: Ensure we always call init_globals,
107 even if passed a non-default repository.
109 2008-11-16 Colin Walters <walters@verbum.org>
111 Bug 559706 - Interface prerequisites
113 * common.mk: Dep on libgirepository.la for scanner libs so that
114 we rebuild things even if just gdump.c changes.
115 * girepository/gdump.c: Dump prerequisites.
116 * giscanner/ast.py: Add prerequisite list.
117 * giscanner/girparser.py: Parse them from gdump.
118 * giscanner/girwriter.py: Write them.
119 * giscanner/glibtransformer.py: Resolve them.
122 2008-11-16 Owen Taylor <otaylor@redhat.com>
124 Bug 561087 - Respect is_pointer in serialize_type()
126 Add a '*' to the serialization for the cases where we set is_pointer
127 in the type blob we write out depending on node->is_pointer. Don't
128 add the '*' in the cases where is_pointer is set or not set in a
131 http://bugzilla.gnome.org/show_bug.cgi?id=561087
133 2008-11-16 Owen Taylor <otaylor@redhat.com>
135 Bug 560825 – Add size and alignment to typelib
137 Include the size and alignment of structures and unions in the typelib,
138 and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
140 * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
141 girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
142 to StructBlob and UnionBlob.
144 * girepository/ginfo.c girepository/girepository.h:
145 Add g_[struct|union]_get[size|alignment]().
147 * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
149 2008-11-16 Owen Taylor <otaylor@redhat.com>
151 Bug 552371 – implement struct field get/set
153 * girepository/gfield.c girepository/girepository.h: Add
154 convenience functions g_field_info_set_field() and
155 g_field_info_get_field() to set and get fields based on the
156 offsets in GIFieldInfo.
158 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
160 Bug 560241 - Out-arguments should not be marked as being pointers
163 * girepository/girparser.c: Improved logic for out arguments.
165 2008-11-16 Andreas Rottmann <a.rottmann@gmx.at>
167 Bug 559601 - Pointers in structs/unions unduly treated as arrays
169 * giscanner/transformer.py: Differentiate type creation logic
170 between parameters and struct components.
172 2008-11-15 Colin Walters <walters@verbum.org>
174 * giscanner/dumper.py: Check return code from pkg-config
177 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
179 * tests/everything/everything.c (test_array_int_in),
180 (test_array_gtype_in):
181 * tests/everything/everything.h:
182 Rename the int/gtype array tests. Make the return value
183 useful, an aggregation of the array input values.
185 2008-11-14 Johan Dahlin <jdahlin@async.com.br>
187 * tests/everything/Makefile.am:
188 * tests/everything/everything.c:
189 * tests/everything/everything.h:
190 * tests/everything/gitesttypes.c:
191 * tests/everything/gitesttypes.h:
192 Rename gitesttypes.[ch] to everything.[ch]
194 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
196 Bug 560708 – Don't treat arrays that have a length specified as
197 zero-terminated by default
199 * giscanner/transformer.py: Default to non zero terminated for
201 * tests/*: Update, add test for zero vs not.
203 2008-11-13 Andreas Rottmann <a.rottmann@gmx.at>
205 Bug 557788 - Return types for constructors in generated typelib bogus
207 * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
208 obviously broken in the face of duplicate names in different
210 * tests/scanner/*expected.gir: Fix up.
212 2008-11-13 Owen Taylor <otaylor@redhat.com>
214 * girepository/girffi.c: Fix "Unexpected time for time_t"
217 2008-11-13 Colin Walters <walters@verbum.org>
219 Bug 558436 - avoid having scanner load app code
221 * giscanner/cgobject.py: Delete; we no longer load shared
223 * giscanner/dumper.py: Support for linking a library to
224 a stub binary for introspection.
225 * giscanner/glibtransformer.py: Rewrite to use gdump XML
226 from invocation of child binary.
227 * giscanner/transformer.py: Fix up to use fully qualified
228 name in parse tree. Make parse_ctype public so we can use
229 it inside glibtransformer.
230 * tests/scanner/barapp.c: New test, using --program arg
232 * tests/*: Update to use common.mk for invoking scanner.
233 * tools/g-ir-scanner: Add options --program, --program-arg,
235 * docs/g-ir-scanner.1: Update.
237 2008-11-13 Colin Walters <walters@verbum.org>
239 * configure.ac: Depend on Gio, we use it in gdump.c.
240 * girepository/gdump.c: Code to dump GType data to XML.
241 * girepository/girepository.c: Add option group for dumping.
242 * girepository/girepository.h: Define API for the above.
244 2008-11-13 Colin Walters <walters@verbum.org>
246 * common.mk: Add a file to include with Makefile fragments
247 useful for scanner invocation.
249 2008-11-13 Tommi Komulainen <tommi.komulainen@iki.fi>
251 * tests/everything/gitesttypes.c (test_filename_return): Return
252 strings in filename encoding.
254 2008-11-13 Owen Taylor <otaylor@redhat.com>
256 Bug 560253 – Add structure and boxed types to Everything test module
258 * tests/everything/gitesttypes.[ch]: Add examples of:
260 Plain old data structs
261 Plain old data structs with nested fields
263 Plain old data boxed with nested fields
264 More complicated boxed types with internal state
266 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
268 * tests/everything/gitesttypes.c (test_gtype_in):
269 * tests/everything/gitesttypes.h:
270 Add a test of GType arrays, a la gtk_list_store_set_columns.
272 2008-11-12 Owen Taylor <otaylor@redhat.com>
274 Bug 560419 – Cache includes when parsing
276 Keep track of all modules parsed within a GIrParser, and when a
277 module is referenced a second time, use the existing parsed copy
278 instead of reparsing.
280 2008-11-12 Owen Taylor <otaylor@redhat.com>
282 Fix management of ParseContext.includes_modules (#560419)
284 * girepository/girparser.c: Fix some trivial bugs in managing the
285 list of include modules. (Add to module's list twice, not
286 initialized to NULL, not freed.)
288 2008-11-12 Owen Taylor <otaylor@redhat.com>
290 Keep aliases and disguised_structures local to each module (#560419)
292 * girepository/girmodule.[ch]: When parsing, keep keep a separate
293 hash tables of aliases and 'disguised' flags for each module, and
294 store that on the module.
296 After parsing an include merge the aliases/disguised flags to the
299 * girepository/girparser.c: Remove 'prefix_aliases' flag and
300 always prefix aliases/disguised structure types when parsing; this
301 simplifies the code considerably.
303 2008-11-12 Owen Taylor <otaylor@redhat.com>
305 Fix mismatches between .gir name and 'name' attribute (#560419)
307 * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
308 tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
309 where the 'name' element of <namespace/> didn't match the filename of the
310 gir, an assumption that the compiler has always expected and now enforces.
312 2008-11-12 Owen Taylor <otaylor@redhat.com>
314 Only allow one <namespace/> element per <repository/> (#560419)
316 * girepository/girparser.c: The logic in girparser.c didn't work
317 very well if there were multiple <namespace/> nodes within a
318 single <repository/> (context->namespace was always the overall
319 filename and not the the name specified in the <namespace/>
320 element for one thing; this would cause aliases to be mis-prefixed
321 in include modules.) Also check that the "name" in the
322 <namespace/> node matches the filename.
324 2008-11-12 Owen Taylor <otaylor@redhat.com>
326 Add a GirParser object to hold the state of a compilation
328 * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
329 GirParser object to hold state that is global across a
330 compilation. Currently just holds the include path, but will
331 eventually also keep a cached list of parsed modules.
333 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
335 * girepository/girepository.c (find_namespace_latest): Fix
338 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
340 * configure.ac: use 'introspection' component for bugs
342 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
344 * tests/everything/gitesttypes.c (test_filename_return):
345 * tests/everything/gitesttypes.h:
346 Add a filename return test.
348 2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi>
350 * tests/offsets/Makefile.am (gitestoffsets.c): fix
351 gen-gitestoffsets invocation with builddir != srcdir
353 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
355 * girepository/girepository.c:
356 Change the element type from utf8 to filename
357 * girepository/girnode.c (g_ir_node_build_typelib):
358 Special case filename equally to utf8 here.
360 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
363 Remove unused variables, add a dependency of girepository.ch, so when
364 they change we rebuild the gir automatically.
366 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
368 * girepository/girepository.c (g_irepository_get_search_path):
369 * girepository/girepository.h:
370 Add a g_irepository_get_search_path, so we can access the search
373 2008-11-12 Johan Bilien <jobi@via.ecp.fr>
375 Bug 560474 – g-ir-compiler crashes when compiling the glib gir
377 * girepository/girparser.c: avoid freeing an uninitialized pointer
379 2008-11-12 Johan Dahlin <jdahlin@async.com.br>
382 * giscanner/glibtransformer.py:
383 * tools/g-ir-scanner:
384 Add a GIRepository-2.0.gir. Change the libtool lookup slightly
385 so we can just pass in --library=foo/bar/baz.la and the scanner
386 does the right thing.
387 Don't warn for _get_type() functions if they don't take any
390 2008-11-11 Owen Taylor <otaylor@redhat.com>
392 Bug 560404 – Prefix types when resolving aliases in included modules
394 * girepository/girparser.c: When resolving aliases in an included
395 module, prefix types before looking them up.
397 2008-11-11 Owen Taylor <otaylor@redhat.com>
399 Compute field offsets and overall size for object structures
401 Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
402 field of type object in structure"
404 Do basic computation of field offsets for objects and interfaces;
405 this doesn't attempt to address all of the "mess" for virtual
406 functions described in Bug 560281.
408 2008-11-11 Tommi Komulainen <tommi.komulainen@iki.fi>
410 Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
412 Based on patch by Johan Bilien.
414 * giscanner/transformer.py (_create_member, _create_parameter):
415 Resolve types here as well.
416 (_resolve_type_name_1): Try resolving using 'ctype' first since
417 it's least ambiguous. Fixes struct member type resolution with
418 similarly named types, e.g. Gdk.PangoRendererClass and
420 * tests/scanner/foo*: Add test.
422 2008-11-11 Owen Taylor <otaylor@redhat.com>
424 * girepository/girparser.c: Search provided include dirs before
425 the default directories.
427 2008-11-11 Owen Taylor <otaylor@redhat.com>
429 * girepository/giroffsets.c: Include fully-qualified names in
432 2008-11-11 Owen Taylor <otaylor@redhat.com>
434 * girepository/giroffsets.c: Fail gracefully with an informative
435 error message when recursion is encountered when computing a
438 2008-11-11 Owen Taylor <otaylor@redhat.com>
440 * girepository/girparser.c: Remove an unused variable.
442 2008-11-10 Owen Taylor <otaylor@redhat.com>
444 Add tests for field offset computations
446 * tests/offsets/offsets.h: Header file with structure definitions to test
448 * tests/offsets/gen-gitestoffsets: Generate a C program that computes
449 field offsets for the structures in offsets.h two ways: using
450 the information from a generated typelib, and as computed by the
453 We diff these two versions to test that everything is OK.
455 2008-11-10 Owen Taylor <otaylor@redhat.com>
457 Remove field offsets from g-ir-generate output and test inputs
459 Field offsets are a) architecture dependent so they shouldn't be part
460 of the architecture-independent gir format which is installed in
461 datadir. b) Are architecture-dependent so they shouldn't be in test
464 * girepository/girparser.c: Don't parse offset for fields
465 * tools/generate.c: Don't parse offset for fields
466 * tests/*.gir test/scanner/*.tgir: Remove offsets
468 (Virtual function and discriminator offsets are not removed, as they
469 aren't fully hooked up to the field-offset computation machinery yet.)
471 2008-11-10 Owen Taylor <otaylor@redhat.com>
473 Bug 560252 - Compute field offsets before writing typelib
475 * girepository/girnode.h: Store the total size and alignment for
476 GIrNodeStruct/Boxed/Union.
478 * girepository/giroffset.c: New file implementing computation of
479 structure field offsets.
481 * girepository/girnode.c: Compute structure field offsets before
482 writing types into the typelib.
484 * docs/typelib-format.txt: Document that a field offset of 0xFFFF
485 means "unknown". Also fix description of the discriminator_offset
488 2008-11-10 Owen Taylor <otaylor@redhat.com>
490 Bug 560250 - Fully parse included modules
492 For some things, like computing structure offsets to put into the typelib
493 we need more than just the aliases from included modules. Do a completel
494 parse of included modules and store in module->included_modules.
496 Also add g_ir_find_node() to find node information from within the
497 active set of modules and their includes.
499 2008-11-10 Owen Taylor <otaylor@redhat.com>
501 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
503 Extract a function to convert GITypeTag to ffi_type from the internals
504 of ginvoke.c. This will be useful in figure out structure alignment.
506 Also fix handling of gsize and time_t to be portable. (Add a check
507 to configure.ac to figure out the width of time_t.)
509 2008-11-10 Owen Taylor <otaylor@redhat.com>
511 Bug 560248 – "disguised structures"
513 Certain types like GIConv and GdkAtom are pointers internally but don't
514 look like pointers when referenced. They have the form.
516 typedef struct _X *X;
518 Parse these as structures/records but mark them in the gir with a 'disguised'
519 attribute so that we know that they need special handling.
521 In the typelib treat them like any other structure.
523 2008-11-09 Jürg Billeter <j@bitron.ch>
526 * giscanner/girwriter.py:
528 Write throws attribute for virtual functions, fixes bug 559703
530 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
532 * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
533 up some confusion about the second argument to find_module, it's
534 actually the packages __path__ attribute which we can safely ignore
536 (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
538 2008-11-07 Owen Taylor <otaylor@redhat.com>
540 Bug 559737 – Deal with continuations in macros
542 * giscanner/giscannerlexer.l: Treat continuation lines the same
543 as regular newlines. This makes the scanner not complain about
544 #define foo(x) \ <stuff> inside a C file. There's no attempt
545 however to handle parsing macro definitions split across lines.
547 2008-11-07 Johan Dahlin <jdahlin@async.com.br>
549 * giscanner/cachestore.py:
550 Handle broken cache entries, write only filesystems and
551 running out of diskspace.
553 2008-11-07 Owen Taylor <otaylor@redhat.com>
555 * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
556 Set current_filename before lexing the file so error messages
557 are reported in the right file.
559 2008-11-06 Colin Walters <walters@verbum.org>
561 * tests/everything/*: Add some tests for strv.
563 2008-11-05 Colin Walters <walters@verbum.org>
565 * girepository/ginvoke.c (g_function_info_invoke): Don't use
566 nested scope local variable for error which may go away after
567 conditional is complete.
569 2008-11-05 Colin Walters <walters@verbum.org>
571 * giscanner/scannerlexer.l: Avoid static 256 char buf which we
572 manipulate hackily; just use GString. This avoids an
573 uninitialized memory read pointed out by Havoc.
575 2008-11-04 Johan Dahlin <jdahlin@async.com.br>
577 * giscanner/__init__.py:
579 * giscanner/cachestore.py:
580 * giscanner/cgobject.py:
581 * giscanner/girparser.py:
582 * giscanner/girwriter.py:
583 * giscanner/giscannermodule.c:
584 * giscanner/glibast.py:
585 * giscanner/glibtransformer.py:
586 * giscanner/libtoolimporter.py:
587 * giscanner/minixpath.py:
588 * giscanner/odict.py:
589 * giscanner/sourcescanner.c:
590 * giscanner/sourcescanner.h:
591 * giscanner/sourcescanner.py:
592 * giscanner/transformer.py:
593 * giscanner/utils.py:
594 * giscanner/xmlwriter.py:
596 Relicense the giscanner library under LGPLv2+.
597 This has been approved by all contributors.
599 2008-11-01 Owen Taylor <otaylor@redhat.com>
601 Bug 558848 giparser.py: shared library should be optional
603 When parsing a .gir, allow the shared-library attribute
604 of <namespace/> to be missing: this corresponds to the handling
605 in libgirepository and elsewhere.
607 2008-11-01 Tommi Komulainen <tommi.komulainen@iki.fi>
609 Bug 557898 – Fails to build on OSX 10.4
611 * configure.ac: Check for $shrext_cmds that should be implicitly
612 available if you're using libtool >= 2.0. If undefined, call
613 libtool --config explicitly to get its value.
614 * girepository/gtypelib.c: Remove special case for (non-)Darwin
617 2008-10-31 Colin Walters <walters@verbum.org>
619 * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
621 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
623 * configure.ac: Post release version bump
626 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
630 * docs/release-checklist.txt:
633 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
635 * Makefile.am: add an upload-release target
636 * docs/release-checklist.txt:
637 Release process documentation
639 2008-10-31 Colin Walters <walters@verbum.org>
641 Bug 558109 – _g_typelib_init fails to find shared libraries
643 * transformer/glibtransformer.py: Use ctypes' find_library
644 on passed libraries and write that for the shared-library
645 entry. We want to avoid depending on -devel packages.
647 2008-10-31 Johan Dahlin <jdahlin@async.com.br>
649 * docs/g-ir-scanner.1:
650 Document the renaming options.
652 2008-10-31 Tommi Komulainen <tommi.komulainen@iki.fi>
654 * giscanner/Makefile.am:
655 * tests/invoke/Makefile.am:
656 * tests/repository/Makefile.am: List in-tree libraries first in
657 LDADD / LIBADD. If installed library is listed first, the
658 resulting binary will prefer installed version to one in .libs,
659 possibly making 'make check' behave strangely.
661 2008-10-30 Tommi Komulainen <tommi.komulainen@iki.fi>
663 * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
664 gir-repository from choking with gdk/quartz
666 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
668 * giscanner/giscannermodule.c (calc_attrs_length),
669 (pygi_collect_attributes):
670 * giscanner/xmlwriter.py:
671 Write a C version of the xml namespace formatter.
672 Saves 15% of the time it takes to create a gtk gir.
674 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
676 * giscanner/xmlwriter.py: Abstract attribute formatting
677 to a function external to the XMLWriter class.
679 * giscanner/scannerlexer.l:
680 Parse and discard __typeof and __attribute.
682 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
684 * giscanner/girparser.py:
685 Remove arguments from the constructor, move them to
686 separate accessors. Add a new parse_tree method
687 which takes an element tree instance.
688 * tools/g-ir-scanner:
689 Update callsite for this
691 * giscanner/Makefile.am:
692 * giscanner/cachestore.py:
693 * giscanner/transformer.py:
694 Cache the include parsing. Saves ~25% time when
695 creating vte (which includes everything up to gtk+).
697 2008-10-30 Colin Walters <walters@verbum.org>
699 * giscanner/transformer.py: Don't reparse includes
700 we've already processed.
702 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
704 * giscanner/girparser.py:
705 * giscanner/transformer.py:
706 Avoid parsing parameters, types etc when parsing
707 includes. Should speed up include parsing a bit.
709 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
711 * giscanner/girparser.py:
712 Avoid big if/else and use a dispatch table like
715 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
717 * giscanner/transformer.py:
718 Clean up include parsing and registration.
720 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
722 * giscanner/transformer.py:
725 2008-10-30 Johan Dahlin <jdahlin@async.com.br>
727 Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
730 construct PYTHONPATH just once
732 * tests/everything/Makefile.am:
733 * tests/scanner/Makefile.am:
734 add $(top_srcdir) to PYTHONPATH to
735 handle builddir != srcdir
737 * giscanner/libtoolimporter.py:
738 * giscanner/sourcescanner.py:
739 Make the libtoolimporter work when distchecking too.
741 Mostly based on patch by Tommi Komulainen
743 2008-10-29 Owen Taylor <otaylor@redhat.com>
745 * giscanner/glibtransformer.py: If a filename of an existing
746 file is passed to --library, hunt for it directly, rather than
747 searching for a corresponding library.
749 2008-10-29 Johan Dahlin <jdahlin@async.com.br>
751 * giscanner/libtoolimporter.py:
752 * giscanner/sourcescanner.py:
753 Clean up the libtool importer a bit. Add a context so we
754 can use it through a with statement.
755 Don't just look in the current directory, look in the whole
758 2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
760 Bug 558065 – gitesttypes should be installed
764 * tests/types/Makefile.am -> tests/everything/Makefile.am
765 * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
766 * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
767 move tests/types to tests/everything
769 * tests/everything/Makefile.am: build normal shared library
770 libgirepository-everything.so.1.0.0 and corresponding typelib
771 Everything-1.0.typelib
773 * tests/everything/Makefile.am: explicitly link libtool
774 versioning with typelib versioning with variables
776 2008-10-28 Johan Bilien <jobi@via.ecp.fr>
778 * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
780 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
782 * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
785 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
787 Bug 558068 – when invoking a method, offset the in arguments by one,
790 * tests/invoke/invoke.c, tests/invoke/testfns.c,
791 tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
792 * girepository/ginvoke.c: do not offset the index of given out
793 arguments by one for methods, "this" is provided as in argument only.
795 2008-10-27 Johan Bilien <jobi@via.ecp.fr>
797 * gir/gio-2.0.c: add annotation for g_file_delete
799 2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
801 Bug 558062 – provide and use paths in the .pc file
803 * gobject-introspection-1.0.pc.in: provide typelibdir variable
804 for where .typelibs should be installed (callers shouldn't need
805 to construct paths from bits and pieces)
807 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
809 Bug 557791 – g_irepository_require() could return a GTypelib *
811 * girepository/girepository.c: Return GTypelib; this is useful
812 for low level manipulation.
814 2008-10-25 Colin Walters <walters@verbum.org>
816 Bug 557788 – Return types for constructors in generated typelib bogus
818 * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
819 rely on end pass resolution.
821 2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
823 Bug 557786 - support fixed size arrays
825 * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
826 * giscanner/scannerparser.y: Retain fixed array size.
827 * giscanner/ast.py: Add to note.
828 * giscanner/girwriter.py: Write to gir.
829 * girepository/girnode.c: Write it to typelib.
830 * tools/generate.c: Generate.
831 * tests/*: Add tests.
833 2008-10-25 Colin Walters <walters@verbum.org>
835 Bug 557076 - move typelibs to $libdir
837 * configure.ac: Steal some configury bits from dbus to expand
839 * gir/Makefile.am: Move to libdir.
840 * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
841 instead just look at one hardcoded path in libdir.
842 * acinclude.m4: Bits from dbus.
844 2008-10-24 Johan Dahlin <johan@gnome.org>
846 * girepository/girnode.c (g_ir_node_check_unhandled_members):
847 Be quiet, do not warn about unhandled members.
849 2008-10-24 Johan Dahlin <johan@gnome.org>
851 * girepository/gtypelib.c:
852 Only use SHLIB_SUFFIX on darwin, otherwise use
853 G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
855 2008-10-24 Lucas Rocha <lucasr@gnome.org>
857 Bug 557623 - Constructors shouldn't be flagged as methods.
859 * girepository/ginfo.c (g_function_info_get_flags): ditto.
861 2008-10-24 Johan Dahlin <johan@gnome.org>
863 * giscanner/scannerparser.y:
864 Check against division by zero for the modula operator.
865 This fixes header parsing of OSX system headers included
868 2008-10-24 Johan Dahlin <johan@gnome.org>
872 Add a CONTRIBUTORS file and dist it.
874 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
876 Bug 556739 – transfer-ownership attribute should be mandatory in .gir
878 * girepository/girparser.c (parse_param_transfer):
879 * giscanner/transformer.py (_create_parameter, _create_return):
880 * giscanner/girwriter.py (_write_return, _write_parameter):
881 * tools/generate.c (write_callable_info): always write and
882 require "transfer-ownership" for return-values and parameters
885 * tests/invoke/testfns-1.0.gir:
887 * tests/scanner/DrawableAdditions.xml:
888 * tests/scanner/GtkFrob-1.0-expected.tgir:
889 * tests/scanner/annotation-1.0-expected.tgir:
890 * tests/scanner/drawable-1.0-expected.tgir:
891 * tests/scanner/drawable-injected-1.0-expected.gir:
892 * tests/scanner/drawable-injected-1.0-expected.tgir:
893 * tests/scanner/foo-1.0-expected.tgir: Updated
895 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
897 * giscanner/cgobject.py: build fundamental types same way as glib
899 * giscanner/glibtransformer.py (_type_from_gtype): record GType
900 when constructing the Type from it
902 * giscanner/glibtransformer.py (_adjust_transfer): Check whether
903 the parameter is a GObject from its GType, if available.
905 * giscanner/glibtransformer.py (_adjust_transfer):
906 * tests/scanner/foo-1.0-expected.gir:
907 * tests/scanner/foo-1.0-expected.tgir: deduce
908 transfer-ownership from GTypes
910 2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
912 * giscanner/transformer.py (_create_parameter):
913 * tests/scanner/foo-1.0-expected.gir: make varargs
914 transfer-ownership="none"
916 2008-10-23 Colin Walters <walters@verbum.org>
918 Bug 556739 - transfer ownership
920 * giscanner/ast.py: Refactor Parameter/Return to share
921 common attributes. Add transfer_inferred attribute
922 which says whether or not we made a guess.
923 * giscanner/transformer.py: Add much more extensive
924 heuristics around parameter and return transfer.
925 * giscanner/glibtransformer.py: Adjust to inspect
929 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
931 Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
933 * tests/scanner/Makefile.am:
934 * tests/scanner/annotation-1.0-expected.tgir:
935 * tests/scanner/drawable-1.0-expected.tgir:
936 * tests/scanner/drawable-injected-1.0-expected.tgir:
937 * tests/scanner/foo-1.0-expected.tgir:
938 * tests/scanner/GtkFrob-1.0-expected.tgir:
939 * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
940 annotations survive the roundtrip via typelib
942 The expectations are as currently produced by g-ir-generate,
943 comparison with the .gir files shows there are differences.
945 2008-10-23 Johan Bilien <jobi@via.ecp.fr>
947 Bug 557468 – Support for GI_TYPELIB_PATH
949 * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
950 provided paths to the global search path.
952 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
954 Bug 557379 – g-ir-generate not writing the 'abstract' attribute
956 * tests/scanner/drawable-1.0-expected.tgir:
957 * tests/scanner/drawable-injected-1.0-expected.tgir:
958 * tests/scanner/foo-1.0-expected.tgir:
959 * tools/generate.c (write_object_info): write 'abstract'
960 attribute for classes
962 2008-10-22 Lucas Rocha <lucasr@gnome.org>
964 * girepository/girmodule.c, girepository/gtypelib.c,
965 girepository/girparser.[ch]: fix some build warnings.
967 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
969 Bug 557405 – Use 'allow-none' consistently
971 * docs/typelib-format.txt:
972 * girepository/ginfo.c (g_arg_info_may_be_null):
973 * girepository/girnode.c (g_ir_node_build_typelib):
974 * girepository/girnode.h (struct _GIrNodeParam):
975 * girepository/girparser.c (start_parameter):
976 * girepository/girwriter.c (function_generate):
977 * girepository/gtypelib.h (ArgBlob):
979 * tests/function.gir:
980 * tools/generate.c (write_callable_info): Use 'allow-none'
981 consistently throughout
983 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
985 Bug 557092 – Callback annotations not used
987 * giscanner/transformer.py (_create_callback): use annotations
989 * tests/scanner/annotation.h
990 * tests/scanner/annotation-1.0-expected.gir: add tests
992 2008-10-21 Colin Walters <walters@verbum.org>
994 * giscanner/scannerlexer.l: Don't require trailing whitespace after
995 uncommented parameters.
998 2008-10-21 Colin Walters <walters@verbum.org>
1000 * girepository/girepository.c: Ensure that when doing an unversioned
1001 require, we prefer items earlier in the search path to later ones.
1003 2008-10-21 Owen Taylor <otaylor@redhat.com>
1005 * giscanner/transformer.py: For string parameters allow transfer annotation
1006 to override the standard automatic guessing based on 'const'.
1008 2008-10-21 Johan Bilien <jobi@via.ecp.fr>
1010 Bug 557241 – "throws" flag for functions
1012 * tests/scanner/drawable-1.0-expected.gir,
1013 tests/scanner/drawable-injected-1.0-expected.gir,
1014 tests/scanner/drawable.[ch]: add simple test for throwing
1015 function (has GError ** as last argument)
1017 * giscanner/ast.py: add a 'throws' flag to Function
1018 * giscanner/glibtransformer.py: if a function's last paramerter is
1019 a GError, set the 'throws' flag and remove that parameter
1020 * giscanner/girwriter.py: write out the 'throws' attribute
1021 * giscanner/girparser.py: support parsing the 'throws' attribute
1023 * tests/repository/gitestthrows.c: add a simple test to check the
1024 throws flag in a typelib and invoke the function
1026 * girepository/ginfo.c, girepository/girnode.[ch],
1027 girepository/girnode.h, girepository/girparser.c,
1028 girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
1030 * girepository/ginvoke.c: if a function throws, add a GError as last
1031 arguments, and propagate the error to the invoker.
1033 2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
1035 * giscanner/transformer.py (_create_parameters): Warn if we see
1036 annotations for unknown parameters. If .h and .c files name
1037 parameters differently, the annotations may be lost.
1039 2008-10-21 Johan Dahlin <johan@gnome.org>
1041 Bug 556358 - don't use libtool internals
1043 * giscanner/Makefile.am:
1044 * giscanner/libtoolimporter.py:
1045 * giscanner/sourcescanner.py:
1046 * giscanner/utils.py:
1047 Add a python meta importer and remove a libtool symlink hack.
1049 2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
1051 * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
1052 and --add-include-path appropriately when invoking the scanner.
1053 * tests/types/Makefile.am (%typelib): Likewise.
1055 2008-10-20 Colin Walters <walters@verbum.org>
1057 Bug 556777 - validate properties
1059 * giscanner/transformer.py: Add option to throw on unknown types.
1060 * giscanner/glibtransformer.py: Use it on properties.
1061 * tests/*: Add a test.
1063 2008-10-20 Colin Walters <walters@verbum.org>
1065 * giscanner/glibast.py: Also register g variants of
1066 default_array_types. This is not beautiful, but
1067 good alternatives aren't easy to come by.
1068 This fixes gchar ** parsing.
1070 2008-10-20 Colin Walters <walters@verbum.org>
1072 * docs/typelib-format.txt, girepository/gtypelib.h:
1073 Take a bit from ObjectInfo to represent abstract flag.
1074 * giscanner/cgobject.py: Expose g_type_get_flags.
1075 * girepository/girepository.h: Add accessor.
1076 * girepository/ginfo.c: Implement it.
1077 * giscanner/ast.py: Add is_abstract flag to generic
1079 * giscanner/glibast.py: Use it.
1080 * giscanner/girwriter.py: Write it.
1081 * girepository/girparser.c: Parse it.
1084 2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
1086 * giscanner/girparser.py (_parse_function): don't lose
1087 'transfer-ownership' attributes when injecting, check for the
1090 2008-10-19 Johan Dahlin <johan@gnome.org>
1092 * giscanner/scannerlexer.l: Parse and ignore __asm.
1094 2008-10-19 Colin Walters <walters@verbum.org>
1096 * giscanner/girparser.py: Parse array length= to ensure
1097 it doesn't get lost from --inject.
1099 2008-10-17 Colin Walters <walters@verbum.org>
1101 Bug 556795 - char ** regression
1103 * giscanner/transformer.py: Fix parsing of ctypes, add some
1104 comments about what's going on.
1105 * tests/*: Add a test for char **.
1107 2008-10-17 Colin Walters <walters@verbum.org>
1109 Bug 556783 - change namespace handling to be more consistent
1111 * giscanner/transformer.py: Eliminate usage of
1112 strip_namespace_object. We now treat --namespace as the default
1113 --strip-prefix; however, if --strip-prefix is specified it
1114 overrides --namespace. This applies to everything except function
1115 names, where we do also strip the namespace.
1116 * giscanner/glibtransformer.py: Remove usage of
1117 strip_namespace_object.
1119 * tests/*: Add skeletal GtkFrob-1.0 test which has different
1120 --namespace and --strip-prefix.
1122 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1124 Bug 556732 – generate gir files consistently
1126 * girepository/girparser.c (start_parameter):
1128 * tests/invoke/testfns-1.0.gir:
1129 * tools/generate.c (write_callable_info): write
1130 'transfer-ownership' attribute consistently with both
1131 return-value and parameter elements
1133 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1135 Bug 556732 – generate gir files consistently
1137 * tools/generate.c (write_callable_info): write 'direction'
1138 attribute only if other than 'in' to be consistent with
1141 * tests/object.gir: remove direction="in" which is the default
1143 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1145 Bug 556732 – generate gir files consistently
1147 * giscanner/ast.py (Field): add readable and writable properties
1148 * giscanner/girparser.py (_parse_field): copy 'readable' and
1149 'writable' attributes
1150 * giscanner/transformer.py (_create_member): create fields as
1152 * giscanner/glibtransformer.py (_introspect_object,
1153 _pair_class_struct): make object instance and class fields
1155 * giscanner/girwriter.py (_write_field):
1156 * tools/generate.c (write_field_info): write field 'readable'
1157 and 'writable' attributes only if non-default (read-only)
1158 * girepository/girparser.c (start_field): in the absence of
1159 attributes assume fields are read-only
1161 * tests/struct.gir: remove redundant readable="1" from fields
1162 * tests/scanner/foo-1.0-expected.gir:
1163 * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1164 all record and union fields
1166 2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
1168 Bug 556732 – generate gir files consistently
1170 * giscanner/girwriter.py (_write_property): write properties
1171 'construct' attribute if set
1172 * tools/generate.c (write_property_info): write properties
1173 'readable' and 'writable' attributes only if non-default
1174 * tests/object.gir: add writable="0"
1175 * tests/scanner/foo-1.0-expected.gir: add construct="1"
1177 2008-10-17 Johan Bilien <jobi@via.ecp.fr>
1179 * gir/glib-2.0.c: added annotations
1181 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1183 * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1186 2008-10-16 Johan Bilien <jobi@via.ecp.fr>
1188 Bug 556610 – giscanner/girparser.py drops parameter options
1190 * tests/scanner/drawable-injected-1.0-expected.gir,
1191 tests/scanner/DrawableAdditions.xml: added simple test for injection.
1192 * giscanner/ast.py: allow Parameter to take options in the constructor
1193 * giscanner/girparser.py: parse parameter options (transfer,
1194 direction, allow-none)
1196 2008-10-16 Colin Walters <walters@verbum.org>
1198 Bug 556185 - segfault on g_callable_info_get_return_type
1200 Initial patch from John Ehresman.
1202 * tests/repository/*: Add a test using
1203 g_callable_info_get_return_type. Instead of casting a
1204 GITypeInfo directly to a GIRegisteredTypeInfo, we need
1205 to call g_type_info_get_interface.
1207 2008-10-16 Colin Walters <walters@verbum.org>
1209 Bug 556579 - union and struct name misresolved
1211 * giscanner/transformer.py: The calls to _resolve_type_name
1212 for struct/union names was a legacy holdover from when type
1213 resolution had multiple phases. Now it's actively harmful
1214 since we might pull in an identical name from another
1218 2008-10-16 Colin Walters <walters@verbum.org>
1220 Bug 556432 - transfer annotations and defaults
1222 * giscanner/transformer.py: Canonicalize type
1223 after removing *, not before. This ensures that
1224 guchar* is transformed to 'uint8'.
1225 Add some comments here.
1226 * giscanner/glibtransformer.py: Add _adjust_transfer
1227 phase for tweaking GObject transfers.
1230 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1232 * configure.ac: enable bunch of gcc warning CFLAGS
1234 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1236 Bug 556543 – reduce compiler warnings
1238 * girepository/ginfo.c:
1239 * girepository/girepository.c (register_internal,
1240 count_interfaces, find_interface, find_namespace_version,
1241 parse_version, g_irepository_require):
1242 * girepository/girmodule.c (g_ir_module_build_typelib):
1243 * girepository/girnode.c (init_stats, dump_stats,
1244 _g_irnode_init_stats, _g_irnode_dump_stats,
1245 g_ir_node_can_have_member):
1246 * girepository/girparser.c (firstpass_end_element_handler,
1247 locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1248 start_alias, start_type, end_type_top, parse_include, cleanup,
1250 * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1251 * giscanner/giscannermodule.c (directive_get_options,
1252 type_get_child_list):
1253 * giscanner/scannerlexer.l (parse_gtkdoc):
1254 * giscanner/scannerparser.y (ctype_free):
1255 * giscanner/sourcescanner.c:
1256 * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1257 * tests/types/gitesttypes.c:
1258 * tools/compiler.c (main):
1259 * tools/generate.c (write_repository): Remove unused variables
1260 and code, add missing includes, declarations and case
1263 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
1265 Bug 556541 – access union members through UnionBlob rather than
1268 * girepository/ginfo.c (g_union_info_find_method): access union
1269 members through UnionBlob rather than StructBlob
1271 2008-10-15 Colin Walters <walters@verbum.org>
1273 Bug 556331 - clean up includes handling
1275 * tools/g-ir-scanner: Rework command line arguments; now we take
1276 --add-include-path and --include separately.
1277 * giscanner/girwriter.py: Separate name= and version= in include
1279 * giscanner/ast.py: Add Include type.
1280 * giscanner/transformer.py: Cleanups to register_include now that
1281 we don't need to handle mixed filenames and relative arguments.
1282 * girepository/girparser.c: Parse name and version separately;
1283 this fixes a bug as a side effect where we weren't resolving
1284 through aliases for basic types.
1285 * girepository/girepository.c: Fix format string args.
1286 * gir/Makefile.am: Update.
1289 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1291 Bug 556434 – unhandled interface/object/... member types
1293 * girepository/girnode.c (g_ir_node_check_unhandled_members,
1294 g_ir_node_build_typelib): Check all
1295 interface/object/boxed/struct/union members are processed and
1296 abort if they are not. (Mostly callbacks in structs, but also
1297 fields in interfaces.)
1299 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1301 * a/girepository/girnode.c (g_ir_node_build_members,
1302 g_ir_node_build_typelib): refactor common code for processing
1303 members to a function
1305 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1307 * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1308 transformation is lossless (it's not)
1310 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1312 * tests/Makefile.am: fix tests to compare xml to xml instead of
1313 typelib to xml, and stop on error
1315 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1317 * tools/generate.c (write_type_name, write_type_info,
1318 write_type_info, write_object_info, write_object_info,
1319 write_interface_info, write_error_domain_info): reduce code
1322 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1324 Bug 556174 – parse types for lists etc.
1326 * girepository/girparser.c (end_type_recurse):
1328 * tools/generate.c (write_type_info, write_field_info,
1329 write_callable_info, write_callable_info, write_constant_info,
1330 write_property_info): use nested <type>s for lists and hashes
1332 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1335 * tests/object.gir: remove trailing whitespace from inside
1336 elements to match g-ir-generate output
1338 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1340 * tools/generate.c (xml_printf): quote printf arguments so that
1341 we don't generate invalid XML by writing unescaped double quotes
1342 and such in attributes
1344 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1346 * tools/generate.c (write_field_info, write_callable_info,
1347 write_function_info, write_callback_info, write_struct_info,
1348 write_constant_value, write_signal_info, write_vfunc_info,
1349 write_object_info, write_interface_info, write_union_info,
1350 write_repository): remove unused indent parameters, xmlwriter
1351 keeps track of necessary indentation
1353 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1355 * tools/generate.c (xml_element_new, xml_element_free,
1356 xml_start_element, xml_end_element, xml_end_element_unchecked,
1357 xml_open, xml_close): Keep track of generated XML tree and
1358 handle indentation and closing tags properly.
1359 (write_field_info, write_callable_info, write_function_info,
1360 write_callback_info, write_struct_info, write_value_info,
1361 write_constant_info, write_enum_info, write_signal_info,
1362 write_vfunc_info, write_property_info, write_object_info,
1363 write_interface_info, write_error_domain_info, write_union_info,
1364 write_repository): Use xml_start_element and xml_end_element to
1367 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1369 * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1370 (write_type_name, write_type_info, write_field_info,
1371 write_callable_info, write_function_info, write_callback_info,
1372 write_struct_info, write_value_info, write_constant_value,
1373 write_constant_info, write_enum_info, write_signal_info,
1374 write_vfunc_info, write_property_info, write_object_info,
1375 write_interface_info, write_error_domain_info, write_union_info,
1376 write_repository): wrap all FILE access to go through simple xmlwriter
1378 2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
1380 Bug 556400 – Fails to build on OS X 10.4
1382 * configure.ac: check for functions backtrace and backtrace_symbols
1383 * girepository/girparser.c (backtrace_stderr): Comment out
1384 implementation if the functions are not available.
1385 * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1386 directory for better portability
1388 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1390 Bug 556433 – assume direction = out for int * parameters
1392 * giscanner/ast.py: define a list of types for which, if passed as
1393 reference, we assume a default direction of 'out'
1394 * giscanner/transformer.py: if a type has type pointer to one of the
1395 previously defined types, and no direction is set, assume out.
1396 * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1398 2008-10-15 Johan Bilien <jobi@via.ecp.fr>
1400 * tests/scanner/annotation.c: fixed a few copy-paste errors
1402 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1404 Bug 556323 – transfer-ownership is wrong for functions returning const
1407 * giscanner/transformer.py: check for a const string as return value,
1408 not just const char*. Suggested by Colin Walters
1409 * tests/scanner/annotation-1.0-expected.gir: updated expected output
1411 2008-10-14 Johan Bilien <jobi@via.ecp.fr>
1413 * girepository/ginfo.c, girepository/girepository.h: add
1414 g_union_info_find_method
1416 2008-10-14 Colin Walters <walters@verbum.org>
1418 * tests/repository/Makefile.am: Reenable repo test.
1419 * tests/repository/gitestrepo.c: Prepend search
1420 path for $(top_builddir)/gir dir so that we don't
1421 require installation for "make check" to pass.
1423 2008-10-13 Jürg Billeter <j@bitron.ch>
1425 * giscanner/glibtransformer.py:
1426 * tests/scanner/annotation-1.0-expected.gir:
1427 * tests/scanner/drawable-1.0-expected.gir:
1428 * tests/scanner/foo-1.0-expected.gir:
1429 * tests/scanner/utility-1.0-expected.gir:
1431 Support fields in GObject structs
1433 2008-10-13 Jürg Billeter <j@bitron.ch>
1435 * giscanner/ast.py: add signed integer and off_t to type_names
1437 2008-10-12 Jürg Billeter <j@bitron.ch>
1439 * giscanner/girparser.py: Parse bits attribute of fields
1441 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1443 * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1444 * tests/repository/gitestrepo.c (main): instantiate
1445 'GCancellable' to ensure the GType is registered before using
1448 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1450 * giscanner/girparser.py: actually add the parsed constant nodes
1452 2008-10-12 Colin Walters <walters@verbum.org>
1454 * girepository/girepository.c: Don't cast DirEntry to Blob,
1455 actually look it up by offset.
1457 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1459 * giscanner/girparser.py: parse constant nodes in gir files
1461 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1463 * giscanner/transformer.py: prefix for constants have an underscore,
1464 so remove them as if they were functions, not objects.
1466 2008-10-12 Johan Bilien <jobi@via.ecp.fr>
1468 * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1471 2008-10-12 Colin Walters <walters@verbum.org>
1473 Initial patch from Jani Monoses.
1475 * girepository/gtypelib.c: Fix inverted test for success
1478 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1480 * tools/generate.c (write_callable_info): use "transfer-ownership"
1481 attribute for return values
1483 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1485 * tools/generate.c (write_callable_info): move "transfer" and
1486 "null-ok" attributes from <function> to <return-value> element
1488 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1490 * girepository/girparser.c (start_return_value): handle
1491 "transfer-ownership" attribute
1493 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1495 * girepository/girparser.c (parse_param_transfer):
1496 * tools/generate.c (write_callable_info): use "container" for
1497 container/shallow ownership transfer (not "shallow")
1499 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1501 * girepository/girparser.c (parse_param_transfer,
1502 start_parameter): Refactor handling of transfer=none/shallow/full
1503 to separate function
1505 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1507 Bug 556048 – Crash in g_irepository_find_by_gtype
1509 * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1510 * girepository/girepository.c (find_interface): Fix
1511 find_by_gtype case to get the type name from right offset
1513 2008-10-12 Jürg Billeter <j@bitron.ch>
1515 * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1518 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1520 * girepository/gtypelib.h (RegisteredTypeBlob): make
1521 'unregistered' one bit wide as everywhere else
1523 2008-10-12 Jürg Billeter <j@bitron.ch>
1525 * giscanner/glibtransformer.py:
1526 * tests/scanner/annotation-1.0-expected.gir:
1527 * tests/scanner/drawable-1.0-expected.gir:
1528 * tests/scanner/drawable.h:
1529 * tests/scanner/foo-1.0-expected.gir:
1530 * tests/scanner/utility-1.0-expected.gir:
1532 Readd class records as workaround to not break Gtk typelib
1534 2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
1536 * tests/types/Makefile.am: fix typo in gitesttypes namespace
1538 2008-10-12 Jürg Billeter <j@bitron.ch>
1540 * giscanner/glibtransformer.py: Don't generate <record> elements
1542 * tests/scanner/*: Update test cases
1544 2008-10-11 Colin Walters <walters@verbum.org>
1546 Bug 552858: versioning
1548 This is a big patch. You should probably remove your installation
1551 * docs/typelib-format.txt: Add nsversion entry which holds
1552 version of namespace.
1553 * girepository/girepository.h: Add 'version' parameter to
1554 g_irepository_require. This may be NULL. Normally
1555 bindings should pass an explicit version though.
1556 * girepository/girepository.c: Lots of infrastructure to
1557 support versioning. Add some more documentation. Disallow
1558 some usage of NULL namespaces.
1559 * girepository/girmodule.c: Add version parameter.
1560 * girepository/gtypelib.c: Update header size.
1561 * giscanner/ast.py: Add version to Namespace.
1562 * giscanner/girparser.py: Parse version attribute from
1563 XML, pass to Namespace.
1564 * giscanner/girwriter.py: Write out version parameter.
1565 * giscanner/transformer.py: Clean up include registration.
1566 * tests/*: Add version attribute.
1567 * tests/invoke/invoke.c: Don't try looking up test before
1568 it's loaded in repository.
1569 * tools/generate.c: Output version parameter.
1570 * gir/Makefile.am: Add 2.0 version to .gir files.
1572 2008-10-11 Colin Walters <walters@verbum.org>
1574 * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1575 if we have mismatched parens.
1577 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1579 * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1580 on 'members' variable.
1582 2008-10-11 Colin Walters <walters@verbum.org>
1584 Bug 555947 - update annotations syntax
1586 * giscanner/ast.py: Default to None for transfer. Remove
1587 default transfers for container types; we require this to
1589 * giscanner/girwriter.py: Transfer is now 'none', 'container',
1590 'full' to match repository.
1591 * giscanner/scannerlexer.l: Annotations now are parenthesized.
1592 * giscanner/transformer.py: Update for new annotations syntax.
1595 2008-10-11 Johan Bilien <jobi@litl.com>
1597 * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1599 2008-10-11 Johan Bilien <jobi@litl.com>
1601 Bug 552347: Parse #defines constants
1603 * girepository/gtypelib.c: update the list of value_size
1604 with recently defined type tags
1605 * giscanner/scannerparser.y: brought back parsing of #defined, as
1606 present in older version
1607 * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1608 * giscanner/girwriter.py: write out constant tags in the gir
1609 * giscanner/sourcescanner.py: add accessor for const_string
1610 * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1613 2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
1615 Bug 555946: Install a test module exercising all types, transfer
1620 * tests/types/*: Add and install a test module that has functions
1621 accepting and returning most of the basic types to enable bindings
1622 implementors to more easily test their type conversion routines.
1624 2008-10-11 Jürg Billeter <j@bitron.ch>
1626 Bug 552374: Const strings should be identified in the gir.
1628 * giscanner/transformer.py: support string memory management
1629 * tests/scanner/foo.h: use char * and const char *
1630 * tests/scanner/foo-expected.gir: test that
1632 2008-10-11 Johan Dahlin <johan@gnome.org>
1634 * giscanner/girparser.py:
1635 Also parse enums which are not glib types.
1637 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1639 Bug 552370: add one more test for unsigned as a type, not as
1642 * giscanner/ast.py: add 'uint' type name for 'unsigned'.
1643 * test/scanner/foo.h: add function which uses unsigned as a type.
1644 * test/scanner/foo-expected.gir: test that.
1646 2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
1648 Bug 555712: Struct and union issues
1650 * giscanner/scannerparser.y (struct_declarator): Use information
1651 provided about the bit width of a field.
1652 * giscanner/transformer.py (Transformer._create_member): Pass the
1653 symbol's const_int member to the created field (it represents the
1655 * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
1656 field attribute, if present.
1657 * giscanner/ast.py (Field): Add 'bits' member, specifying the
1658 width in bits of the field (only relevant for bitfields).
1661 * giscanner/transformer.py (Transformer._create_typedef_struct)
1662 (Transformer._create_typedef_union): Add calls to _create_struct()
1663 and _create_union(), respectively. This causes the scanner to
1664 generate output for fields of struct and union typedefs.
1667 2008-10-11 Jürg Billeter <j@bitron.ch>
1669 Bug 552370: unsigned not scanned properly
1671 * giscanner/scannerparser.y: combine basic types such as unsigned
1672 int and long long when scanning
1673 * tests/scanner/foo-expected.gir:
1674 * tests/scanner/foo.c: (foo_test_unsigned):
1675 * tests/scanner/foo.h: test that
1677 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1679 Bug 554854: The --typelib-xml and --inject options should reuse
1680 giscanner parser/writer.
1682 * giscanner/ast.py: add constructor list to Struct and Union.
1683 Add new param in Return's contructor to define transfer.
1684 * giscanner/girparser.py: several additions to the parser in order
1685 to have parsing all nodes of the gir xml files.
1686 * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
1687 and writer in --inject and --typelib-xml options.
1688 * giscanner/xmlwriter.py: ignore empty attributes instead of
1689 raising an error as this basically exposes a bug in GIRParser.
1690 This should be reverted as soon as the parser is fixed.
1692 2008-10-11 Lucas Rocha <lucasr@gnome.org>
1694 Bug 552376: scanner generates wrong names for enum members when
1695 there's no defined gtype.
1697 * giscanner/utils.py (strip_common_prefix): Always strip common
1698 prefix exactly up to the last "_", and not beyond.
1699 * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
1700 here is that the first character after the last '_' should should be
1701 the same as the character in the same position on the type name.
1702 * tests/scanner/foo-expected.gir: test that
1704 2008-10-10 Lucas Rocha <lucasr@gnome.org>
1706 Bug 555293: append library_paths to LPATH env variable to work
1707 around a bug in find_library when using ldconfig.
1709 * tools/g-ir-scanner (main): ditto.
1711 2008-10-09 Lucas Rocha <lucasr@gnome.org>
1713 * girepository/girepository.c (register_internal): fix regression on
1714 invoke test case by making sure we load the global module in the
1715 typelib when dealing with inline typelibs.
1716 * girepository/gtypelib.c: a couple of coding style fixes.
1718 2008-10-06 Lucas Rocha <lucasr@gnome.org>
1720 Bug 555294: Add support for multiple shared libraries per typelib.
1722 * girepository/ginvoke.c (g_function_info_invoke),
1723 girepository/ginfo.c(g_registered_type_info_get_g_type): use
1724 g_typelib_symbol instead of g_module_symbol.
1725 * girepository/girepository.h: remove g_typelib_set_module and add
1727 * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
1728 g_typelib_new_from_memory, g_typelib_new_from_const_memory,
1729 g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
1730 modules instead of just one. The symbol lookup is now abstracted
1731 behind g_typelib_symbol which tries to find the passed symbol name in
1733 * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
1734 and write shared_library attribute as a comma-separated list of libs.
1736 2008-10-06 Colin Walters <walters@verbum.org>
1738 * giscanner/transformer.py: Parse length= annotation as
1739 a parameter name, not a raw int.
1742 2008-10-03 Colin Walters <walters@verbum.org>
1744 Bug 551744: Non-GObject types aren't aggregating ctors and methods
1746 * girepository/gtypelib.c: Allow ctors/methods on struct,union,
1748 * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
1752 2008-10-03 Colin Walters <walters@verbum.org>
1754 Bug 554576: scan problem with ev_selection_render_selection()
1756 * giscanner/transformer.py: Only do type resolution once we've
1757 scanned all types. What could happen before is that we'd strip
1758 the namespace from local type "EvSelection" => Selection, and
1759 then later pull a "Selection" from some other namespace because
1760 we hadn't yet seen the local EvSelection. This could come
1761 down to hash table ordering and other things so not easy
1762 to write a test for.
1764 2008-10-03 Lucas Rocha <lucasr@gnome.org>
1766 * giscanner/girwriter.py (_parser_member): fix the last parameter of
1767 GLibEnumMember constructor as it should be the enum member nick.
1769 2008-10-02 Colin Walters <walters@verbum.org>
1771 Bug 552961: remove this parameter for methods
1773 * giscanner/glibtransformer.py: Delete this parameter; it is
1775 * girepository/ginvoke.c: Insert this parameter for methods.
1776 * girepository/gtypelib.c: Remove no longer needed verification of
1777 method this parameter.
1780 2008-09-30 Dan Winship <danw@gnome.org>
1782 Bug 554490: g-ir-scanner gets confused by '\\'
1784 * giscanner/scannerlexer.l (chartext, stringtext): fix use of
1785 backslashes so it will correctly parse '\\' and "\\"
1787 * tests/scanner/annotation.c: add a use of '\\' to make sure that
1790 * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
1792 2008-10-02 Colin Walters <walters@verbum.org>
1794 bug 552393: Note variadic functions
1796 * giscanner/scannerparser.y: Parse ellipsis. Refactor grammar
1797 to use parameter_list directly.
1798 * giscanner/sourcescanner.h: Add ellipsis csymbol type.
1799 * giscanner/ast.py: Add Varargs type.
1800 * giscanner/transformer.py: Check for ellipsis symbol, transform
1802 * girepository/girnode.h: Add varargs flag to in-memory nodes.
1803 Parse varargs functions, but filter them out before we start
1804 compiling the typelib.
1806 2008-10-02 Colin Walters <walters@verbum.org>
1808 Bug 554632: type tag for GType
1810 * girepository/girepository.h, girepository/girepository.c:
1811 Add type tag for GType - it's a special type we don't want
1812 to resolve to just "long".
1813 * docs/typelib-format.txt: Update.
1814 * girepository/girparser.c: Parse it.
1815 * giscanner/glibtransformer.py: Ensure we don't put GType in
1817 * tools/generate.c: Remove hardcoded type list.
1820 2008-09-30 Dan Winship <danw@gnome.org>
1822 Bug 554521: scanner generates wrong names for enum members with
1823 full type name prefix
1825 * giscanner/utils.py (strip_common_prefix): Fix this to strip the
1826 right amount when the entire "first" string is a prefix of
1829 * tests/scanner/foo.h (FooEnumFullname):
1830 * tests/scanner/foo-expected.gir: test that
1832 2008-09-29 Colin Walters <walters@verbum.org>
1834 Bug 552380: Array parameters should be marked in the gir
1836 * giscanner/ast.py: Default char** to utf8[], and guchar* to
1837 uint8[]. Add Array, List, and Map subclasses of Type;
1838 these types can be generic. Return transfer defaults
1839 to true if return value is string or container type.
1840 Delete Sequence type.
1841 * giscanner/scannerlexer.l: Syntax change for annotations;
1842 use <> since it's more readable.
1843 * giscanner/girwriter.py: Write out these changes.
1844 * giscanner/girparser.py: Parse them.
1845 * giscanner/transformer.py: Have a defined set of
1846 both list and map types. When creating a type,
1847 check if the ctype we've parsed is one of them,
1848 if so create a container type subclass as appropriate.
1849 * girepository/girparser.c: Parse in generic types.
1852 2008-09-27 Colin Walters <walters@verbum.org>
1854 * tools/g-ir-scanner: Add --inject option.
1856 2008-09-25 Colin Walters <walters@verbum.org>
1858 Remove non-repository types from GIR
1860 * giscanner/ast.py: The canonical name is 'utf8', not
1862 * giscanner/glibast.py: A few more glib type mappings.
1863 * girepository/girparser.c: We only parse repository types.
1864 * tests/*.gir: Update.
1866 2008-09-23 Colin Walters <walters@verbum.org>
1868 Bug 552566: Add time_t type
1870 We need a type for time_t since it's special in C, and just
1871 mapping it to long precluded bindings from handling it
1874 2008-09-19 Colin Walters <walters@verbum.org>
1876 Bug 552390: Handle capitialization like "DBus" more robustly
1878 The to_underscores function was designed for use against prefixed
1879 names; we need a separate function which will convert names like
1880 DBusFoo into dbus_foo, not d_bus_foo.
1882 2008-09-19 Colin Walters <walters@verbum.org>
1884 Add check to make sure we're not hitting out unresolved types
1886 Validate the "this" argument for methods
1888 Remove heuristic matching of methods to classes based on prefix
1890 It was a broken hack that dated from when we handled underscoring
1891 and capitalization conventions less well.
1893 2008-09-18 Colin Walters <walters@verbum.org>
1895 Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
1897 On Darwin, the suffix for installed shared libraries (.dylib) is
1898 different from loadable modules (.so). We use a bit of magic shell
1899 script from Behdad Esfahbod to figure out the right suffix.
1901 2008-09-15 Johan Dahlin <johan@gnome.org>
1903 * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
1904 a wrapper for type_qualifier as well.
1906 2008-09-15 Colin Walters <walters@verbum.org>
1908 http://bugzilla.gnome.org/show_bug.cgi?id=552065
1910 * giscanner/ast.py: Add deprecation attributes.
1911 * giscanner/girwriter.py: Write out deprecation data.
1912 * girepository/girparser.c: Relax parsing; deprecated
1913 attribute now includes freeform string.
1914 * giscanner/scannerlexer.l: Parse Deprecated.
1915 * giscanner/transformer.py: Look for deprecated attribute
1917 * tests/scanner/*: Add a Deprecated test.
1919 2008-09-14 Tor Lillqvist <tml@novell.com>
1921 * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
1923 2008-09-14 Colin Walters <walters@verbum.org>
1925 * giscanner/glibtransformer.py: Ignore functions with
1928 2008-09-12 Colin Walters <walters@verbum.org>
1930 * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
1932 2008-09-12 Colin Walters <walters@verbum.org>
1934 * giscanner/ast.py: Bind pid_t to INT for vte.
1936 2008-09-12 Colin Walters <walters@verbum.org>
1938 * giscanner/girparser.py: Parse c:type for boxed records/unions.
1939 * giscanner/glibast.py: Avoid overwriting ctype.
1940 * giscsanner/transformer.py: Try resolving types using the GType names.
1942 2008-09-12 Colin Walters <walters@verbum.org>
1944 * giscanner/minixpath.py: Code to run an "XPath"
1945 assertion against an XML tree, taken from
1946 gir-repository/gir/tests.py.
1947 * giscanner/Makefile.am: Ship it.
1948 * tools/g-ir-scanner: Add --xpath-assertions option.
1949 * gir/GLib-assertions.txt: Add a few assertions.
1950 * gir/Makefile.am: Run them.
1952 2008-09-11 Colin Walters <walters@verbum.org>
1954 http://bugzilla.gnome.org/show_bug.cgi?id=551737
1956 * giscanner/transformer.py: Fix strip_namespace_func to only strip
1957 prefix if it ends with _. Tweak callback stripping to determine
1958 based on presence of _ whether we need to use strip_namespace_func
1959 or strip_namespace_object.
1961 2008-09-09 Owen Taylor <otaylor@redhat.com>
1963 * docs/typelib-format.txt: Wether => Whether
1965 2008-09-08 Colin Walters <walters@verbum.org>
1967 * girepository/girparser.c: Default to "readable" for properties.
1968 * giscanner/ast.py: Add readable, writable etc.
1969 * giscanner/girwriter.py: Writ them.
1970 * giscanner/glibtransformer.py: Inspect them.
1973 2008-09-07 Colin Walters <walters@verbum.org>
1975 * giscanner/cgobject.py: Add comment.
1977 2008-09-07 Colin Walters <walters@verbum.org>
1979 * giscanner/cgobject.py: Also call g_thread_init.
1981 2008-09-07 Colin Walters <walters@verbum.org>
1983 * giscanner/transformer.py: Fix regression by not
1984 stripping prefix before stripping namespace for unions
1987 2008-09-06 Colin Walters <walters@verbum.org>
1989 * giscanner/transformer.py: If a namespace contains
1990 multiple caps, try stripping both gnomekeyring_ and
1993 2008-09-07 Johan Dahlin <johan@gnome.org>
1995 Bug 551162 – giscanner does not recognize asm and __asm__
1996 * giscanner/scannerlexer.l:
1997 Patch by Jani Monoses.
1999 2008-09-06 Colin Walters <walters@verbum.org>
2001 * girepository/girnode.c: Allow gtype_name
2002 and gtype_init in struct and union.
2003 * girepository/girparser.c: Parse glib:
2004 boxed bits for both structure and union.
2005 * girepository/gtypelib.c: Don't barf
2006 if structure is boxed.
2007 * giscanner/girparser.py: Parse new XML
2009 * giscanner/girwriter.py: Write out new
2011 * giscanner/glibast.py: Define new classes
2012 which are both Boxed and Struct/Union, as
2013 well as an "Other" for everything else.
2014 * giscanner/glibtransformer.py: Handle
2015 boxed types specially; we try to merge
2016 them with a struct/union if one exists,
2017 otherwise fall back to generic boxed.
2019 * tools/generate.c: Write out new format.
2021 2008-09-06 Johan Dahlin <johan@gnome.org>
2023 * giscanner/grealpath.h: Include stdlib.h
2025 * docs/g-ir-generate.1: Remove leading %
2027 2008-09-01 Colin Walters <walters@verbum.org>
2029 * girepository/girparser.c: Look at c:type to determine
2030 whether or not an item is a pointer.
2032 2008-09-01 Johan Dahlin <johan@gnome.org>
2034 * tests/scanner/Makefile.am:
2035 Set PYTHONPATH so the scanner can run
2036 even if you didn't install anything.
2038 2008-09-01 Johan Dahlin <johan@gnome.org>
2041 Post-release version bump
2044 2008-09-01 Johan Dahlin <johan@gnome.org>
2048 2008-08-31 Colin Walters <walters@verbum.org>
2050 * giscanner/glibtransformer.py: Quiet info
2053 2008-08-31 Johan Dahlin <johan@gnome.org>
2056 Bump version to 0.5.0
2058 2008-08-31 Colin Walters <walters@verbum.org>
2060 * giscanner/glibtransformer.py: Follow aliases to ensure
2061 we don't get a constructor returning a basic type.
2062 * giscanner/transformer.py: Add function to follow aliases.
2065 2008-08-31 Johan Dahlin <johan@gnome.org>
2067 * giscanner/scannerlexer.l:
2068 * giscanner/scannerparser.y:
2069 * giscanner/sourcescanner.h:
2070 * giscanner/sourcescanner.py:
2071 Parse GCC extensions in the parser instead of just undeffing them
2072 in the pre-processor.
2074 2008-08-31 Johan Dahlin <johan@gnome.org>
2076 * giscanner/glibtransformer.py:
2077 Clean up a huge if. Do not add methods or constructors
2079 * giscanner/utils.py:
2080 second might be longer than first, check that.
2082 2008-08-31 Johan Dahlin <johan@gnome.org>
2087 2008-08-31 Colin Walters <walters@verbum.org>
2089 * girepository/girparser.c: Don't lose if we
2092 2008-08-31 Colin Walters <walters@verbum.org>
2094 * giscanner/glibtransformer.py: Look for libtool
2095 library in current directory
2096 * tests/scanner - Update.
2098 2008-08-30 Colin Walters <walters@verbum.org>
2100 * docs/typelib-format.txt: Add a guint32
2102 * gir/Makefile.am: Dep on Makefile
2103 * girepository/ginfo.c:
2104 * girepository/girepository.c: Clean up
2105 default typelib handling; remove global
2106 default_typelib variable. Ensure we handle
2107 NULL repository in more places.
2108 Support dependency resolution.
2109 Support lazy loading.
2110 * girepository/girepository.h: Remove
2111 g_irepository_unregister; we don't support
2112 unloading typelibs since really they're
2113 process-global. Update for lazy loading
2115 * girepository/girmodule.c: Use g_new0.
2116 Add dependencies to GirModule.
2117 * girepository/girparser.c: Parse dependencies.
2118 * girepository/gtypelib.c: Add 4 bytes for
2120 * tests/Makefile.am: Kill off gobject.gir,
2121 it conflicts with the real one.
2122 * tests/object.gir: Dep on GObject.
2123 * tools/generate.c: Take --includedir
2124 argument to say which directories to search
2125 for typelibs. Print out dependencies.
2127 2008-08-30 Colin Walters <walters@verbum.org>
2129 * giscanner/glibtransformer.py: Reduce warning noise.
2131 2008-08-29 Colin Walters <walters@verbum.org>
2133 * girepository/ginfo.c: Add some assertions regarding
2134 refcounts, just to be sure.
2135 * giscanner/glibtransformer.py: Blacklist a few more
2138 2008-08-29 Colin Walters <walters@verbum.org>
2140 * giscanner/glibtransformer.py: Blacklist a few
2141 functions that use GError oddly
2143 2008-08-29 Colin Walters <walters@verbum.org>
2145 * girepository/gtypelib.c: Don't crash if no
2148 2008-08-29 Colin Walters <walters@verbum.org>
2150 * girepository/girparser.c: Handle chains of aliases
2151 across modules by ensuring we fully qualify aliases
2154 2008-08-29 Colin Walters <walters@verbum.org>
2156 * girepository/girparser.c: Don't search aliases
2159 2008-08-29 Colin Walters <walters@verbum.org>
2161 * girepository/girparser.c: Rewrite type parsing
2162 to handle both GLib parsing case as well as correctly
2163 handling GLib.List and friends. Don't try to treat
2164 e.g. ListStore as a List.
2166 2008-08-29 Colin Walters <walters@verbum.org>
2168 * girepository/gtypelib.c: Add more context
2171 2008-08-29 Colin Walters <walters@verbum.org>
2173 * giscanner/glibtransformer.py: Add some informative
2174 logging messages in corner cases. Be sure we use
2175 the most recent node set instead of a cache
2176 when generating result set.
2177 * tests/: Remove duplicated bits in expected girs
2178 * girepository/girparser.c: Accept both List (for
2179 compiling GLib) and GLib.List (what the scanner
2182 * tools/generate.c: Generate canonical form.
2184 2008-08-29 Johan Dahlin <johan@gnome.org>
2186 * giscanner/config.py.in:
2187 Use datarootdir instead of datadir to avoid
2188 an autoconf warning.
2190 2008-08-29 Johan Dahlin <johan@gnome.org>
2194 * examples/gdk-pixbuf.gidl:
2196 Update and remove old cruft.
2198 2008-08-29 Johan Dahlin <johan@gnome.org>
2201 * docs/g-ir-compiler.1:
2202 * docs/g-ir-generate.1:
2203 * docs/g-ir-scanner.1:
2204 Add man pages for the generator and compiler.
2206 2008-08-29 Johan Dahlin <johan@gnome.org>
2208 * docs/g-ir-scanner.1: Document
2210 * giscanner/Makefile.am:
2211 * giscanner/gidlparser.py:
2212 * giscanner/gidlwriter.py:
2213 * tools/g-ir-scanner:
2214 Remove gidl support.
2216 2008-08-28 Colin Walters <walters@verbum.org>
2218 * tests/scanner/Makefile.am: Pass the right
2219 --includedir args. Add a Makefile dep.
2220 * tools/compiler.c: Pass includedirs down.
2221 * girepository/girparser.c: Actually put
2222 includedirs in context, pass down. Fix
2225 2008-08-28 Colin Walters <walters@verbum.org>
2227 * gir/Makefile.am: Use --includedir
2228 * girepository/girparser.c: Recursively parse
2229 includes to pull in aliases and expand them.
2230 We need this to avoid putting unknown names in
2232 * tools/compiler.c: Add --includedir option.
2233 * giscanner/ast.py: Map size/ssize to types
2236 2008-08-28 Tor Lillqvist <tml@novell.com>
2238 Make check now runs successfully on Windows.
2240 * tools/compiler.c (write_out_typelib): Use binary mode for output
2243 * girepository/girnode.c: Don't print NULL strings.
2245 * tests/invoke/Makefile.am
2246 * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2247 convince libtool to build shared libraries.
2249 * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2250 g_assert() instead of printing out expected errors.
2252 2008-08-28 Tor Lillqvist <tml@novell.com>
2254 * girepository/gtypelib.h: Change type of bitfield fields from
2255 guint to the most suitable smaller type. This makes the struct
2256 sizes match the ones on Linux that the sanity check expects when
2257 using gcc -mms-bitfields on Windows.
2259 2008-08-28 Johan Dahlin <johan@gnome.org>
2264 * giscanner/Makefile.am:
2265 * tests/Makefile.am:
2266 * tests/scanner/Makefile.am:
2267 Make distcheck pass.
2269 2008-08-27 Johan Dahlin <johan@gnome.org>
2271 * giscanner/Makefile.am:
2272 Only send in -no-undefined on Win32 as it breaks on MacOS X.
2274 2008-08-27 Tor Lillqvist <tml@novell.com>
2276 Make g-ir-scanner work on Windows. Still problems with the typelib
2277 code. Changes okayed by jdahlin.
2279 * configure.ac: Check for Windows, set Automake conditional
2280 OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2281 avoid shell quoting issues
2283 * girepository/Makefile.am: Use -no-undefined so that libtool
2284 agrees to build a shared library on Windows.
2286 * girepository/girparser.c (backtrace_stderr): No backtrace() on
2287 Windows. Empty implementation on Windows so far.
2289 * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2290 informative error message for the assertion failures. Tell also
2291 what the expected size of the struct is. Check all sizes first and
2292 fail afterwards if at least one size was different from expected.
2294 * tools/Makefile.am: Reorder libraries into proper logical
2297 * tools/generate.c: Don't include <dlfcn.h>, not used.
2299 * giscanner/Makefile.am: On Windows, link with the Python library,
2300 and install the module DLL as _giscanner.pyd. Remove the
2301 unnecessary import library and libtool library that libtool has
2304 * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2305 and just skip it. Recognize also two "l" suffixes for long long
2306 constants. Recognize also __inline__.
2308 * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2309 GetFullPathName(). As such, GetFullPathName() does more than the
2310 UNIX realpath(). It also changes relative paths into absolute
2311 paths. But for our purposes that shouldn't matter.
2313 * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2314 Windows the file descriptor passed to us is from Python. Python
2315 Python2.5 uses the msvcr71.dll C library, while mingw-built code
2316 uses msvcrt.dll. On Windows, file descriptors are specific to
2317 which C library is used. So we must find out what underlying OS
2318 handle corresponds to the file descriptor Python passes us, and
2319 then make that into a file descriptor valid for the C library this
2322 * giscanner/sourcescanner.py (_parse): Don't need to bypass
2323 __attribute__ as the lexer now handles it. The definition as empty
2324 was ineffective for mingw anyway, as mingw's _mingw.h undefines
2325 __attribute__. Close the temp file before unlinking it.
2327 * giscanner/cgobject.py: Use correct library name for the gobject
2330 * gir/Makefile.am: Must pass the full basename of the DLLs on
2331 Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2332 that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2333 reality they won't change, until there is a GLib 3, and then also
2334 the Unix code here needs changing.
2336 Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2339 2008-08-26 Colin Walters <walters@verbum.org>
2341 * girepository/girepository.c: Search
2342 $DATADIR/girepository instead of
2343 $DATADIR/gitypelibs; this naming makes
2344 it clearer that e.g. jgir can install
2346 * gir/Makefile.am: Install there.
2348 2008-08-26 Colin Walters <walters@verbum.org>
2350 * girepository/gtypelib.c (_g_typelib_init): Also
2351 use G_MODULE_SUFFIX instead of hardcoding .so.
2353 2008-08-26 Colin Walters <walters@verbum.org>
2355 * girepository/gtypelib.c (_g_typelib_init): Free
2356 string in the right place.
2358 2008-08-26 Colin Walters <walters@verbum.org>
2360 * girepository/gtypelib.c (_g_typelib_init): Handle
2361 both .la and .so names; this works better in the
2362 uninstalled library case.
2364 2008-08-26 Johan Dahlin <johan@gnome.org>
2367 * giscanner/Makefile.am:
2368 * giscanner/cgobject.py:
2369 * giscanner/config.py.in:
2370 * giscanner/sourcescanner.py:
2371 Avoid undeffing __GNUC__, instead define
2372 __attribute__ & friends. Remove glibconfig.h hack.
2373 This makes gobject-introspection work better on
2374 MacOS X, Thanks to Richard Hult for kind help.
2376 2008-08-25 Colin Walters <walters@verbum.org>
2378 * giscanner/glibtransformer.py: Always print
2381 2008-08-25 Colin Walters <walters@verbum.org>
2383 * giscanner/glibtransformer.py: Skip over
2384 interfaces we don't know.
2386 2008-08-25 Colin Walters <walters@verbum.org>
2388 * girepository/girparser.c: Parse new implements
2389 syntax, drop gapi one.
2390 * tests/object.gir: Update.
2391 * tools/generate.c: Generate new syntax.
2393 2008-08-25 Colin Walters <walters@verbum.org>
2395 * giscanner/ast.py: Add interfaces property
2397 * giscanner/girwriter.py: Write out implemented
2399 * giscanner/glibtransformer.py: Introspect
2400 implemented interfaces.
2401 * tests/scanner/*: Make FooObject implement
2404 2008-08-25 Colin Walters <walters@verbum.org>
2406 * giscanner/glibtransformer.py: More correctly pair
2407 methods; if we have a symbol that starts with
2408 e.g. hippo_canvas look for a matching HippoCanvas
2409 class before accepting e.g. HippoCanvasImage.
2411 2008-08-24 Colin Walters <walters@verbum.org>
2413 * tools/g-ir-scanner: Filter out unknown options from
2416 2008-08-24 Colin Walters <walters@verbum.org>
2418 * giscanner/glibtransformer.py: Fail with better
2419 error if we can't find library.
2421 2008-08-24 Colin Walters <walters@verbum.org>
2423 * tools/g-ir-scanner: Use subprocess instead of
2424 commands, works on Windows and avoids the evil
2427 2008-08-24 Colin Walters <walters@verbum.org>
2429 * giscanner/glibtransformer.py: Skip over
2430 g_object_get_type from GLib trunk.
2432 2008-08-24 Colin Walters <walters@verbum.org>
2434 * girepository/girepository.c (g_irepository_require):
2435 Don't open shared library here; we already do it
2438 2008-08-24 Colin Walters <walters@verbum.org>
2440 * girepository/gtypelib.c: Add context stack so
2441 when we get an error we can print out nicely
2444 2008-08-24 Johan Dahlin <johan@gnome.org>
2446 * girepository/girparser.c (start_glib_boxed), (start_function),
2447 (start_field), (start_alias):
2448 Refactor a couple of parsing functions to be simpler to follow.
2451 2008-08-24 Johan Dahlin <johan@gnome.org>
2453 * girepository/girparser.c (start_function):
2454 Remove left-over code, checking type of function.
2456 2008-08-23 Colin Walters <walters@verbum.org>
2458 * giscanner/config.py: Define DATADIR.
2459 * giscanner/transformer.py: Look in DATADIR.
2461 2008-08-23 Colin Walters <walters@verbum.org>
2463 * girepository/gtypelib.c: Check constructor
2465 * girepository/girnode.c: Small tweaks.
2466 * girepository/ginfo.c: Calculate signature offsets
2468 * girepository/girparser.c: Remove duplicate
2470 * giscanner/glibtransformer.py: Avoid marking
2471 functions which return a basic type as
2474 2008-08-23 Colin Walters <walters@verbum.org>
2476 * girepository/girparser.c: Ignore <include>.
2477 * giscanner/girparser.py: Parse them.
2478 * giscanner/girwriter.py: Generate them.
2479 * giscanner/transformer.py: Process <include>
2480 recursively. Don't require full path for
2481 includes, look in {$XDG_DATA_DIRS}/gir.
2482 * tools/g-ir-scanner: Pass through includes.
2483 * Makefile.am: Remove extra --include
2485 * *-expected.gir: Add expected includes.
2487 2008-08-23 Johan Dahlin <johan@gnome.org>
2489 * tests/scanner/Makefile.am:
2490 * tests/scanner/annotation-expected.gir:
2491 * tests/scanner/drawable-expected.gir:
2492 Avoid duplication in the Makefile, regenerate with new
2493 namespaces (same as the filename)
2495 2008-08-22 Colin Walters <walters@verbum.org>
2497 * girepository/girnode.c: Don't hardcode integers,
2500 2008-08-22 Johan Dahlin <johan@gnome.org>
2502 * giscanner/sourcescanner.py:
2503 Check for ../gobject-introspection-1.0.pc.in to determine
2504 if we run installed or uninstalled.
2506 2008-08-22 Johan Dahlin <johan@gnome.org>
2509 * giscanner/sourcescanner.py:
2510 Send in undefs/defines via writing it directly to stdin
2511 of cpp instead of via arguments.
2513 2008-08-22 Colin Walters <walters@verbum.org>
2515 * tools/generate.c, tools/compiler.c: Default
2517 * all Makefile.am: Update.
2519 2008-08-22 Colin Walters <walters@verbum.org>
2521 * girepository/girparser.c: Pass through
2522 recursive types. Avoid overwriting errors.
2523 * giscanner/xmlwriter.py: Always write the
2525 * tests/*.gir: Adjust.
2526 * tests/scanner/Makefile.am: Build typelibs,
2527 and generate XML from those. Once we
2528 have a good diff mechanism...
2529 * tests/scanner/*-expected.gir: Add XML
2531 * tools/g-ir-scanner: Accept --typelib-xml
2533 * tools/generate.c: Better defaults for transfer.
2535 2008-08-22 Johan Dahlin <johan@gnome.org>
2539 * giscanner/Makefile.am:
2540 * giscanner/config.py.in:
2541 * giscanner/sourcescanner.py:
2542 Use the generated glibconfig.h for all scanner invokations.
2543 Rename it to glibconfig-scanner.h and install it.
2544 Add a config.py which so far contains the include dir.
2546 2008-08-22 Johan Dahlin <johan@gnome.org>
2549 Replace glibconfig.h with our own, do some replacement
2550 for CPP/C features we do not support
2552 2008-08-22 Colin Walters <walters@verbum.org>
2554 * tools/generate.c (write_callable_info): Fix unref
2557 2008-08-22 Colin Walters <walters@verbum.org>
2559 * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2560 * tests/Makefile.am: Support $(DEBUG)
2561 * tools/generate.c: Do immediate close tags if no
2564 2008-08-21 Colin Walters <walters@verbum.org>
2566 * tests/scanner/drawable-expected.gir,
2567 * tests/scanner/drawable.c,
2568 * tests/scanner/drawable.h:
2571 2008-08-21 Colin Walters <walters@verbum.org>
2573 * giscanner/glibtransformer.py: Compute prefix
2574 by searching through the symbol for bits
2575 rather than going directly from ctype; this fixes
2578 2008-08-21 Colin Walters <walters@verbum.org>
2580 * giscanner/glibtransformer.py: Also try squashing
2581 underscores from namespace, fixes webkit_web_view_new.
2583 2008-08-21 Colin Walters <walters@verbum.org>
2585 * giscanner/glibtransformer.py: More ctor work,
2586 avoid having gtk_window_group_new end up under
2589 2008-08-21 Colin Walters <walters@verbum.org>
2591 * giscanner/glibtransformer.py: Much simpler approach
2592 of mapping uscored names to classes.
2593 * giscanner/utils.py: Remove unnecessary function.
2595 2008-08-21 Johan Dahlin <johan@gnome.org>
2597 * girepository/girepository.c (g_irepository_require):
2598 Plug memory leak and avoid using freed memory.
2599 Resolve the whole module path, here as well.
2601 2008-08-21 Colin Walters <walters@verbum.org>
2603 * giscanner/glibtransformer.py: Look up all permutations
2604 of class names when scanning methods/ctors based on
2605 the prefix instead of using the return value. This
2606 associates gtk_window_new with the right class.
2608 2008-08-21 Colin Walters <walters@verbum.org>
2610 * girepository/girmodule.c (g_ir_module_build_typelib):
2611 Revert change to increment header_size; we do that in
2614 2008-08-21 Colin Walters <walters@verbum.org>
2616 * girepository/girnode.c (write_string): Tweak to
2617 use UINT instead of INT. Not likely to matter.
2618 * girepository/girmodule.c (g_ir_module_build_typelib):
2619 Add to header_offset as well for header strings
2620 to match what write_string does.
2621 * girepository/gtypelib.c: Replace is_name with
2622 validate_name, which more strongly validates and
2623 handles errors in a better way. Update all callers.
2624 * giscanner/glibtransformer.py: Handle constructors
2627 2008-08-21 Johan Dahlin <johan@gnome.org>
2629 * gir/Makefile.am (typelibs_DATA): Build and
2630 install the Gio.typelib too
2632 * girepository/gtypelib.c (_g_typelib_init):
2633 Use g_module_build_path to resolve the shlib name
2635 2008-08-21 Colin Walters <walters@verbum.org>
2637 * gir/Makefile.am: CLEANFILES typelibs too.
2639 2008-08-21 Johan Dahlin <johan@gnome.org>
2641 * giscanner/glibtransformer.py:
2642 Do not send .la files through find_library.
2644 2008-08-21 Colin Walters <walters@verbum.org>
2646 * girepository/girparser.c (g_irepository_require):
2647 Fix one small leak in error case.
2649 2008-08-21 Johan Dahlin <johan@gnome.org>
2652 Parse glibconfig.h as well and install the compiled
2655 2008-08-21 Johan Dahlin <johan@gnome.org>
2658 * giscanner/glibtransformer.py:
2659 * tools/g-ir-scanner:
2660 Do not hard-core library names in the Makefile, reuse
2661 ctypes find_library instead.
2663 2008-08-21 Johan Dahlin <johan@gnome.org>
2665 * girepository/girparser.c (resolve_aliases):
2666 Remove compilation warnings
2668 2008-08-21 Johan Dahlin <johan@gnome.org>
2670 * girepository/girepository.c (g_irepository_require):
2671 Rewrap and fix double free bug by leaking a bit.
2673 2008-08-20 Colin Walters <walters@verbum.org>
2675 * girepository/girepository.c: Add new function
2676 g_irepository_get_typelib_path which tells
2677 us from where we loaded a namespace.
2679 2008-08-20 Colin Walters <walters@verbum.org>
2681 * tests/scanner/*-expected.gir: Adjust for
2682 added shared-library.
2683 * giscanner/giwriter.py: Make pylint happy.
2685 2008-08-20 Colin Walters <walters@verbum.org>
2687 * girepository/girmodule.c (g_ir_module_build_typelib):
2688 Calculate size correctly, avoid use-after-free.
2690 2008-08-20 Colin Walters <walters@verbum.org>
2692 * girepository/girepository.c: Remove
2693 g_irepository_register_file in favor of
2694 g_irepository_require. There are two
2695 possible deployment scenarios for typelibs:
2696 First, separate in $DATADIR/gitypelibs/. Second,
2697 they may be embedded in shlibs. However since
2698 the first is now the normal case, the API is
2699 optimized around it.
2701 Refactor internals to look up typelibs for
2702 namespaces just-in-time, but we expect
2703 consumers to call g_irepository_require.
2705 Also, add some docs. No one has died from that
2707 * gir/Makefile.am: Need --library for glib.
2708 * giscanner/girwriter.py: Write out shared-library.
2709 * tools/g-ir-writer: Take the first --library
2710 argument as the target of shared-library. In
2711 the future we should make this nicer with pkg-config
2714 2008-08-20 Colin Walters <walters@verbum.org>
2716 * girepository/girparser.py: And parse them.
2718 2008-08-20 Johan Dahlin <johan@gnome.org>
2720 * giscanner/glibast.py: Add gshort/gushort types
2722 2008-08-20 Colin Walters <walters@verbum.org>
2724 * gir/Makefile.am: Rename .gir files using GI namespace.
2725 * girepository/girepository.c: Use XDG_DATA_DIRS for
2726 looking up typelibs. Also typelibs are now suffixed
2728 * tests/invoke/Makefile.am: Only use metadata.
2729 * girepository/Makefile.am: Remove unnecessary include.
2730 * tests/scanner/Makefile.am: Update using GI namespaces
2731 for scanner includes.
2733 2008-08-20 Colin Walters <walters@verbum.org>
2735 * girepository/transformer.py: Suppress aliases whose
2737 * girepository/ast.py: Define some more aliases.
2739 2008-08-20 Colin Walters <walters@verbum.org>
2741 * girepository/girparser.c: Avoid alias infloops.
2743 2008-08-20 Colin Walters <walters@verbum.org>
2745 * tests/scanner/foo-expected.gir: Fix expected list type.
2747 2008-08-20 Johan Dahlin <johan@gnome.org>
2749 * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
2750 Add a workaround for #548689.
2751 We can now compile gtk!
2753 2008-08-20 Colin Walters <walters@verbum.org>
2755 * giscanner/glibtransformer.py: Try to look up
2756 aliases using the c:type too.
2758 2008-08-20 Colin Walters <walters@verbum.org>
2760 * girepository/girparser.c: Parse union fields.
2762 2008-08-20 Johan Dahlin <johan@gnome.org>
2764 * giscanner/ast.py: Make time_t an alias for long
2766 * gir/gio-2.0-good.gir:
2767 * gir/glib-2.0-good.gir:
2768 * gir/gobject-2.0-good.gir:
2770 * giscanner/glibtransformer.py:
2771 Do not delete Class structures, we need them in gdk/gtk.
2772 * tests/scanner/drawable-expected.gir:
2773 * tests/scanner/foo-expected.gir:
2774 * tests/scanner/utility-expected.gir:
2777 2008-08-20 Johan Dahlin <johan@gnome.org>
2779 * tests/scanner/Makefile.am:
2780 * tests/scanner/annotation-expected.gir:
2781 * tests/scanner/annotation.c (annotation_object_class_init),
2782 (annotation_object_init), (annotation_object_method),
2783 (annotation_object_in), (annotation_object_out),
2784 (annotation_object_inout), (annotation_object_inout2),
2785 (annotation_object_inout3), (annotation_object_calleeowns),
2786 (annotation_object_calleesowns), (annotation_object_get_strings),
2787 (annotation_object_with_voidp), (annotation_object_get_objects),
2788 (annotation_object_create_object), (annotation_object_allow_none):
2789 * tests/scanner/annotation.h:
2790 * tests/scanner/foo-expected.gir:
2791 * tests/scanner/foo.c:
2792 * tests/scanner/foo.h:
2793 Split out annotation tests out of foo
2795 2008-08-20 Johan Dahlin <johan@gnome.org>
2797 * tests/scanner/Foo-expected.gir:
2798 * tests/scanner/Makefile.am:
2799 * tests/scanner/foo-expected.gir:
2800 * tests/scanner/foo-object.h:
2801 * tests/scanner/foo.c:
2802 Foo->foo, foo-object.h -> foo.h
2804 2008-08-20 Johan Dahlin <johan@gnome.org>
2806 * tests/scanner/Foo-expected.gir:
2807 * tests/scanner/Makefile.am:
2808 * tests/scanner/drawable-expected.gir:
2809 * tests/scanner/drawable.c (test_drawable_class_init),
2810 (test_drawable_init):
2811 * tests/scanner/drawable.h:
2812 * tests/scanner/foo-object.h:
2813 * tests/scanner/foo.c (foo_boxed_method):
2814 Move the drawable parts out of Foo to its own test.
2816 2008-08-20 Johan Dahlin <johan@gnome.org>
2818 * tests/scanner/Foo-expected.gir:
2819 * tests/scanner/foo-object.h:
2820 * tests/scanner/foo.c (foo_drawable_class_init),
2821 (foo_drawable_init):
2822 Add a based on GdkDrawable which generates
2825 2008-08-19 Colin Walters <walters@verbum.org>
2827 * giscanner/transformer.py: Don't try
2828 to strip prefix before namespace.
2830 2008-08-19 Johan Dahlin <johan@gnome.org>
2832 * giscanner/transformer.py:
2833 * tests/scanner/Foo-expected.gir:
2834 * tests/scanner/foo-object.h:
2835 Add support for typedef void foo type of
2838 2008-08-19 Johan Dahlin <johan@gnome.org>
2841 * giscanner/girwriter.py:
2842 * giscanner/glibtransformer.py:
2843 * giscanner/transformer.py:
2844 * tests/scanner/Foo-expected.gir:
2845 Add basic support for union, base the code much
2846 on Struct. Add a testcase.
2848 2008-08-19 Johan Dahlin <johan@gnome.org>
2850 * tests/scanner/Foo-expected.gir:
2851 * tests/scanner/foo-object.h:
2852 Add a union testcase which the compiler currently
2855 2008-08-19 Johan Dahlin <johan@gnome.org>
2857 * gobject-introspection-1.0.pc.in:
2858 Add a g_ir_compiler variable
2860 2008-08-19 Colin Walters <walters@verbum.org>
2862 * giscanner/ast.py: Rework types to be more closely
2864 * giscanner/girparser.py: Parse more bits.
2865 * giscanner/girwriter.py: Write sequences in a new
2866 way that specifies container type.
2867 * giscanner/glibast.py: Adjust for ast.py changes,
2868 add 'ctype' property to GLibObject and GLibInterface
2869 so we can look things up by it later.
2870 * gicanner/transformer.py: Names is new class holding
2871 the various namespaces we manage. Do not confuse
2872 with Namespace which is toplevel XML node effectively.
2873 Rework all type resolution to go through
2874 _resolve_type_name_1.
2875 * giscanner/glibtransformer.py: Raise UnknownTypeError
2876 instead of ValueError for cleanliness. Add Unresolved
2877 class to mark types whose parent we haven't seen yet.
2878 Use new Names object from transformer.py.
2879 Correctly look up parent=.
2880 Fix type validation to handle sequences.
2881 * tests/scanner/Foo-expected.gir: Update for sequence
2882 work, int instead of int32.
2883 * tools/g-ir-scanner: Add --noclosure option
2884 * gir/Makefile.am: Use --noclosure by default for
2887 2008-08-18 Johan Dahlin <johan@gnome.org>
2889 * gir/gio-2.0-good.gir:
2890 * gir/glib-2.0-good.gir:
2891 * gir/gobject-2.0-good.gir:
2894 2008-08-18 Johan Dahlin <johan@gnome.org>
2897 * giscanner/girparser.py:
2898 * giscanner/girwriter.py:
2899 * giscanner/glibast.py:
2900 * giscanner/glibtransformer.py:
2901 * giscanner/transformer.py:
2902 * tests/scanner/Foo-expected.gir:
2903 * tests/scanner/foo-object.h:
2904 * tests/scanner/utility-expected.gir:
2905 * tests/scanner/utility.h:
2906 Redo type resolving and validation.
2907 Add a couple of new tests.
2908 Patch mostly written by Colin.
2910 2008-08-18 Johan Dahlin <johan@gnome.org>
2913 * giscanner/girparser.py:
2915 * giscanner/transformer.py:
2916 Improve enum parsing for enums without a GType.
2917 Make flags/enum references to other girs work
2918 * giscanner/utils.py:
2920 * tests/scanner/Makefile.am:
2921 * tests/scanner/foo-object.h:
2922 * tests/scanner/utility-expected.gir:
2923 * tests/scanner/utility.h:
2924 Add a new test for external enum references
2926 2008-08-18 Johan Dahlin <johan@gnome.org>
2928 * docs/global-module-registry.txt: Update
2930 * tests/array.gir: Update with new type proposal
2932 * girepository/girepository.c (g_type_tag_to_string):
2933 * girepository/girepository.h:
2934 * girepository/girnode.c (g_ir_node_get_full_size_internal),
2936 * girepository/girnode.h:
2937 Make enum serializing functions public. Clean up some whitespace.
2939 2008-08-17 Johan Dahlin <johan@gnome.org>
2941 * docs/global-module-registry.txt:
2942 Add a document for an on disk module registry format
2944 2008-08-17 Johan Dahlin <johan@gnome.org>
2947 * gir/gio-2.0-good.gir:
2950 2008-08-17 Johan Dahlin <johan@gnome.org>
2953 * gir/glib-2.0-good.gir:
2954 * gir/gobject-2.0-good.gir:
2955 * giscanner/cgobject.py:
2956 * giscanner/glibtransformer.py:
2957 Regenerate GObject & GType.
2958 Avoid warnings when generating gobject-2.0.gir.
2959 Introspect a little more, and skip *_get_type functions.
2961 2008-08-17 Colin Walters <walters@verbum.org>
2963 * gir/glib-2.0.gir, gir/gobject-2.0.gir:
2964 Rename to -good, always generate during build.
2965 * gir/Makefile.am: Ensure .gir files dep on
2966 all scanner sources.
2967 * Makefile.am: Switch build order to ensure
2968 the scanner is ready before we do gir/.
2969 * tools/g-ir-scanner: Look for .git too.
2971 2008-08-17 Johan Dahlin <johan@gnome.org>
2973 * girepository/gtypelib.c (validate_enum_blob):
2974 * giscanner/glibtransformer.py:
2975 * giscanner/transformer.py:
2976 Remove resolve_possible_typedefs, it was unused.
2977 Allow multiple enum values of the sample value in an enum,
2978 since it's actually pretty common.
2979 Register enums so they can be resolved too.
2981 2008-08-16 Johan Dahlin <johan@gnome.org>
2983 * giscanner/girparser.py:
2984 Parse enumeration/bitfield.
2986 2008-08-16 Johan Dahlin <johan@gnome.org>
2988 * giscanner/girparser.py:
2991 2008-08-16 Johan Dahlin <johan@gnome.org>
2993 * giscanner/glibtransformer.py:
2994 Resolve type names for alias targets
2995 * giscanner/transformer.py:
2996 Skip FILE* parameters fow now
2998 2008-08-16 Johan Dahlin <johan@gnome.org>
3001 * gir/gobject-2.0.gir:
3004 * tests/scanner/Makefile.am:
3007 2008-08-15 Colin Walters <walters@verbum.org>
3009 * giscanner/glibtransformer.py: Explicitly construct
3010 new list, since we're deleting as we iterate.
3011 Don't delete all structures which end in Class; just
3012 ones which have a paired GObject.
3013 Fix printing of type warning.
3014 * giscanner/transformer.py: Make strip_namespace_object
3015 be the identity function if it doesn't match the
3018 2008-08-15 Colin Walters <walters@verbum.org>
3020 * giscanner/cgobject.py: Define yet more argument
3021 prototypes; fix prototype for g_type_fundamental.
3023 2008-08-14 Johan Dahlin <johan@gnome.org>
3025 * tests/Makefile.am:
3026 * tests/constant.gir:
3027 * tests/gobject.gir:
3029 * tools/generate.c (write_struct_info):
3030 Fix generator for constant/gobject/struct
3032 2008-08-14 Johan Dahlin <johan@gnome.org>
3034 * tests/Makefile.am:
3036 * tools/generate.c (write_enum_info):
3037 Fix generation of enum/bitfields
3039 2008-08-14 Johan Dahlin <johan@gnome.org>
3041 * girepository/girparser.c (start_field), (start_constant),
3042 (start_type), (end_element_handler):
3043 Clear up constant parsing
3048 * tools/generate.c (write_callable_info), (write_function_info),
3049 (write_callback_info), (write_constant_info), (write_signal_info),
3050 (write_vfunc_info), (write_property_info), (write_object_info),
3051 (write_interface_info):
3052 Constants/Signals are handled now.
3054 2008-08-14 Johan Dahlin <johan@gnome.org>
3056 * girepository/girparser.c (start_type):
3057 Don't require c:type.
3058 * tests/Makefile.am:
3061 Update, remove parts we don't support yet
3062 * tests/roundtrips.sh:
3064 * tools/generate.c (write_type_info), (write_field_info),
3065 (write_callable_info), (write_struct_info):
3066 Make it emit proper gir.
3068 2008-08-14 Johan Dahlin <johan@gnome.org>
3070 * giscanner/transformer.py:
3071 New internal function for adding a new node.
3073 2008-08-14 Johan Dahlin <johan@gnome.org>
3076 Define an internal _H_ variable so we skip parsing both
3077 i18n headers, only one is needed.
3079 Add the glib-2.0.gir too.
3080 * giscanner/glibast.py:
3081 Add gconstpointer as an alias for ANY
3082 * giscanner/transformer.py:
3083 Do not lower case enumeration names per se.
3084 Skip functions which has parameters called 'va_list'
3086 2008-08-14 Colin Walters <walters@verbum.org>
3088 * giscanner/transformer.py: Comment data structures.
3089 Also squash pointers in resolve_type_name to correspond
3090 with what we do for params.
3091 * giscanner/glibtransformer.py: Print warnings in more
3092 situations. Rework checks for method/constructor to
3093 look up in our GType database instead of just checking
3094 for *. Avoid generating <record> for GObject which
3095 duplicate the <class>.
3096 * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3099 2008-08-14 Johan Dahlin <johan@gnome.org>
3101 * giscanner/girwriter.py:
3102 * giscanner/glibast.py:
3103 * giscanner/glibtransformer.py:
3104 * giscanner/transformer.py:
3106 * tests/Makefile.am:
3107 Add pyflakes.py and run it in make check.
3108 Update the source code to fix the errors reported by
3111 2008-08-14 Johan Dahlin <johan@gnome.org>
3114 * giscanner/girparser.py:
3115 * giscanner/glibast.py:
3116 * giscanner/glibtransformer.py:
3117 Refactor the parser a bit.
3118 Add parent type to interfaces and update callsites.
3120 2008-08-14 Johan Dahlin <johan@gnome.org>
3122 * giscanner/glibtransformer.py:
3123 * giscanner/utils.py:
3124 Refactor a bit, avoid isinstance and add a method
3125 for each type we parse.
3127 2008-08-14 Johan Dahlin <johan@gnome.org>
3130 * giscanner/girparser.py:
3131 * giscanner/glibtransformer.py:
3132 * tests/Makefile.am:
3133 Run pep8.py in make check, fix old errors.
3135 2008-08-13 Colin Walters <walters@verbum.org>
3137 * giscanner/girparser.py: Parse records.
3139 2008-08-13 Colin Walters <walters@verbum.org>
3141 * gir/Makefile.am: Install again.
3142 * gir/gobject-2.0.gir: Add some more bits.
3144 2008-08-13 Colin Walters <walters@verbum.org>
3146 * gir/gobject-2.0.gir: Use correct namespace, add GType.
3147 * giscanner/girparser.py: Handle aliases.
3148 * giscanner/transformer.py: Record aliases. Make resolver
3149 functions public; we now call into these explicitly from
3150 glibtransformer. Handle resolving aliases.
3151 * giscanner/glibtransformer.py: Separate our internal namespace
3152 from included ones. Call up into transformer's resolver functions.
3154 2008-08-13 Johan Dahlin <johan@gnome.org>
3156 * girepository/girnode.c (g_ir_node_get_full_size_internal):
3157 * girepository/girparser.c (start_class):
3158 * giscanner/glibtransformer.py:
3159 Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3161 2008-08-13 Johan Dahlin <johan@gnome.org>
3163 * giscanner/cgobject.py:
3164 Register GInitiallyUnowned
3165 * giscanner/girwriter.py:
3166 * giscanner/glibtransformer.py:
3167 Special case GObject/GInitially owned as they are a bit special to use.
3169 2008-08-13 Colin Walters <walters@verbum.org>
3171 * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3172 Object is in GObject namespace.
3174 2008-08-13 Colin Walters <walters@verbum.org>
3176 * giscanner/girparser.py: Fix processing of functions
3179 2008-08-13 Colin Walters <walters@verbum.org>
3181 * giscanner/girparser.py: Parse more than just <class.
3182 * giscanner/glibtransformer.py: Put aliases in a separate
3183 data structure since their name is not canonicall.
3184 * giscanner/transformer.py: Handle resolving type names
3187 2008-08-13 Johan Dahlin <johan@gnome.org>
3189 * tools/g-ir-scanner:
3190 Allow multiple libraries
3191 * giscanner/glibtransformer.py:
3192 Rename load_library to add_library, traverse over all libraries
3193 when trying to resolve a function
3195 2008-08-12 Colin Walters <walters@verbum.org>
3197 * giscanner/transformer.py: Record typedefs as <alias> elements.
3198 Also attempt to look up types in external namespaces.
3199 * giscanner/girwriter.py: Write them.
3200 * giscanner/glibtransformer.py: Rework resolver using real instanceof
3201 checks. Resolve interface methods and properties.
3202 * tests/scanner/foo-object.h: Add a method with typedef.
3203 * tests/scanner/Foo-expected.gir: Update.
3204 * girepository/girnode.c: Debug tweaks.
3205 * girepository/girparser.c: Make a first pass through the XML where we
3206 record all the aliases. This lets us resolve them as we go through the
3208 * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3209 from gir-repository.
3211 2008-08-12 Colin Walters <walters@verbum.org>
3213 * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3214 Correctly do subclasseing in 2nd pass resolution. Handle callbacks in structure
3216 * giscanner/transformer.py: Record typedefs and expose public API for resolving
3218 * tests/scanner/Foo-expected.gir: Fix expected callback types.
3220 2008-08-12 Colin Walters <walters@verbum.org>
3222 * giscanner/glibtransformer.py: Also transform object properties.
3224 2008-08-12 Colin Walters <walters@verbum.org>
3226 * giscanner/glibtransformer.py: Also transform callbacks
3227 and structure field types.
3228 * tests/scanner/Fooe-expected.gir: Update to expect correct
3229 names for callbacks and structs.
3231 2008-08-12 Colin Walters <walters@verbum.org>
3233 * girepository/girparser.c: Handle 'any'.
3234 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3235 Add test for void *.
3237 2008-08-12 Colin Walters <walters@verbum.org>
3239 * giscanner/glibtransformer.py: We need to do type
3240 resolution in a second pass after we've seen all the
3241 enums, records, etc.
3243 2008-08-12 Colin Walters <walters@verbum.org>
3245 * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3246 Add enum return value.
3247 * giscanner/glibtransformer.py: Transform function return types
3250 2008-08-12 Colin Walters <walters@verbum.org>
3252 * tests/scanner/Makefile.am: Dep .gir files on scanner
3253 sources too. Also remove @ so we see scanner invocations.
3255 2008-08-12 Colin Walters <walters@verbum.org>
3257 * girepository/girparser.c, girepository/gtypelib.c,
3258 girepository/gtypelib.h, girepository/girnode.c:
3259 Remove usage of (GAPI-oriented) TypeTag in favor of
3260 GITypeTag from girepository.h.
3262 2008-08-10 Colin Walters <walters@verbum.org>
3264 * tests/roundtrips.sh: Use the correct tests.
3266 2008-08-10 Colin Walters <walters@verbum.org>
3268 * giscanner/cgobject.py: Declare/wrap a few more functions.
3269 Fix parameter types for g_object_new and g_type_fundamental.
3271 2008-08-10 Colin Walters <walters@verbum.org>
3273 * giscanner/cgobject.py: Add new decorator @gwrap which forces
3274 us to declare types for both return value and parameters. The
3275 ctypes default of 'int' is bad because it hides 32/64 bit
3276 problems. Convert all existing functions to use it.
3278 2008-08-09 Johan Dahlin <johan@gnome.org>
3280 * giscanner/__init__.py:
3282 * giscanner/cgobject.py:
3283 * giscanner/gidlparser.py:
3284 * giscanner/gidlwriter.py:
3285 * giscanner/girparser.py:
3286 * giscanner/girwriter.py:
3287 * giscanner/glibast.py:
3288 * giscanner/glibtransformer.py:
3289 * giscanner/odict.py:
3290 * giscanner/sourcescanner.py:
3291 * giscanner/transformer.py:
3292 * giscanner/utils.py:
3293 * giscanner/xmlwriter.py:
3294 * tools/g-ir-scanner:
3298 2008-08-09 Johan Dahlin <johan@gnome.org>
3301 * relaxng/c-types.xml:
3302 * relaxng/g-types.xml:
3303 * relaxng/relaxng.rng:
3305 Remove outdated relaxng schemas.
3307 2008-08-09 Johan Dahlin <johan@gnome.org>
3310 Rename metadata to typelib in variable names,
3313 2008-08-09 Johan Dahlin <johan@gnome.org>
3317 Remove old C scanner, which got rewritten in python.
3319 2008-08-09 Johan Dahlin <johan@gnome.org>
3321 * girepository/Makefile.am:
3322 * tools/Makefile.am:
3323 * tools/girmodule.c:
3324 * tools/girmodule.h:
3327 * tools/girparser.c:
3328 * tools/girparser.h:
3329 * tools/girwriter.c:
3330 * tools/girwriter.h:
3331 Move shared *.[ch] files to girepository from tools
3333 2008-08-09 Johan Dahlin <johan@gnome.org>
3335 * tests/Makefile.am:
3338 * tests/constant.test:
3340 * tests/errors.test:
3341 * tests/function.test:
3342 * tests/gobject.test:
3343 * tests/interface.test:
3344 * tests/object.test:
3345 * tests/struct.test:
3350 Rename *.test to *.gir
3352 2008-08-09 Johan Dahlin <johan@gnome.org>
3355 * tests/Makefile.am:
3356 * tests/parser/Foo-expected.gir:
3357 * tests/parser/Makefile.am:
3358 * tests/parser/foo-object.h:
3359 * tests/parser/foo.c:
3360 * tests/parser/utility-expected.gir:
3361 * tests/parser/utility.c:
3362 * tests/parser/utility.h:
3363 * tests/scanner/Makefile.am:
3364 Rename tests/parser to test/scanner
3366 2008-08-08 Colin Walters <walters@verbum.org>
3368 * tests/roundtrips.sh: Use local .gir files again.
3370 2008-08-08 Colin Walters <walters@verbum.org>
3372 * tests/invoke/Makefile.am: .gir file depends on libtool
3375 2008-08-08 Colin Walters <walters@verbum.org>
3377 * tools/girnode.c: Pass through parent node so we can
3378 print the node whose child is NULL, if that occurs.
3380 2008-08-08 Johan Dahlin <johan@gnome.org>
3382 * tests/Makefile.am:
3383 Disable roundtrip tests which are not yet working
3384 * tests/invoke/testfns.gir:
3387 2008-08-08 Johan Dahlin <johan@gnome.org>
3389 * giscanner/girwriter.py:
3391 * giscanner/glibast.py:
3392 * giscanner/glibtransformer.py:
3393 Swap order of members, to keep it consistent with
3396 2008-08-08 Johan Dahlin <johan@gnome.org>
3398 * girepository/gtypelib.c (validate_header):
3399 * girepository/gtypelib.h:
3401 * giscanner/girwriter.py:
3402 * giscanner/sourcescanner.c (gi_source_symbol_ref),
3403 (gi_source_symbol_unref):
3406 * tests/constant.test:
3408 * tests/errors.test:
3409 * tests/function.test:
3410 * tests/gobject.test:
3411 * tests/interface.test:
3412 * tests/invoke/Makefile.am:
3413 * tests/invoke/testfns.xml:
3414 * tests/object.test:
3415 * tests/parser/Makefile.am:
3416 * tests/roundtrips.sh:
3417 * tests/struct.test:
3422 * tools/Makefile.am:
3423 * tools/compiler.c (main):
3424 * tools/generate.c (write_callable_info), (write_function_info),
3426 * tools/gidlmodule.c:
3427 * tools/gidlmodule.h:
3430 * tools/gidlparser.c:
3431 * tools/gidlparser.h:
3432 * tools/gidlwriter.c:
3433 * tools/gidlwriter.h:
3434 * tools/scanner.c (create_node_from_gtype),
3435 (create_node_from_ctype), (g_igenerator_process_properties),
3436 (g_igenerator_process_signals), (g_igenerator_create_object),
3437 (g_igenerator_create_interface), (g_igenerator_create_boxed),
3438 (g_igenerator_create_enum), (g_igenerator_create_flags),
3439 (g_igenerator_process_function_symbol),
3440 (g_igenerator_process_unregistered_struct_typedef),
3441 (g_igenerator_process_struct_typedef),
3442 (g_igenerator_process_union_typedef),
3443 (g_igenerator_process_enum_typedef),
3444 (g_igenerator_process_function_typedef),
3445 (g_igenerator_process_constant), (g_igenerator_process_symbols),
3446 (g_igenerator_add_module), (g_igenerator_add_include_idl):
3447 Merge in the gir-compiler branch.
3448 Thanks to Philip and Colin for their help.
3450 2008-07-26 Colin Walters <walters@verbum.org>
3452 * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3453 and g-idl-generate to go along with how we're changing this
3454 module to be installed.
3455 * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3457 2008-07-24 Colin Walters <walters@verbum.org>
3459 * girepository/girepository.c (g_irepository_register): Add
3460 environment variable G_IREPOSITORY_VERBOSE so we can print
3461 out what we're doing.
3462 * girepository/girepository.c (g_irepository_register_file):
3463 Add GError error message to g_debug call.
3465 2008-07-08 Jürg Billeter <j@bitron.ch>
3467 * giscanner/glibast.py:
3471 2008-06-21 Johan Dahlin <jdahlin@async.com.br>
3473 * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3476 2008-06-20 Johan Dahlin <jdahlin@async.com.br>
3479 * giscanner/girwriter.py:
3480 * giscanner/transformer.py:
3481 * tests/parser/Foo-expected.gir:
3482 * tests/parser/foo-object.h:
3483 * tests/parser/foo.c (foo_object_allow_none):
3484 Add support for gtk-doc annotations for allow-none.
3487 2008-06-19 Johan Dahlin <jdahlin@async.com.br>
3490 * giscanner/girwriter.py:
3491 * giscanner/glibast.py:
3492 * giscanner/glibtransformer.py:
3493 * giscanner/transformer.py:
3494 * tests/parser/Foo-expected.gir:
3495 Start using abstract type instead of the raw C types.
3496 Register a bunch of glib types we care about.
3498 2008-06-19 Rob Taylor <rob.taylor@codethink.co.uk>
3503 2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
3505 * girepository/girepository.c:
3506 * girepository/gtypelib.c:
3507 * girepository/ginfo.c:
3508 * girepository/ginvoke.c:
3509 * girepository/girepository.h:
3510 * girepository/gtypelib.h:
3511 * girepository/gmetadata.c:
3512 * girepository/Makefile.am:
3513 * girepository/gmetadata.h:
3515 * tools/gidlmodule.c:
3518 * tools/gidlmodule.h:
3519 * tools/gidlparser.c:
3521 Renamed GMetadata to GTypelib
3523 2008-06-07 Johan Dahlin <jdahlin@async.com.br>
3525 * giscanner/xmlwriter.py:
3526 Improve line wrapping when > 79 charaters
3528 2008-06-05 Jürg Billeter <j@bitron.ch>
3531 * giscanner/girwriter.py:
3532 * giscanner/transformer.py:
3533 Use <type> element for field types
3534 * tests/parser/Foo-expected.gir:
3537 2008-06-04 Johan Dahlin <jdahlin@async.com.br>
3539 * giscanner/glibtransformer.py:
3540 Fix a bug which prevented GdkEvent from being generated
3542 2008-06-03 Johan Dahlin <jdahlin@async.com.br>
3544 * giscanner/Makefile.am:
3546 * giscanner/girwriter.py:
3547 * giscanner/glibast.py:
3548 * giscanner/glibtransformer.py:
3549 * giscanner/transformer.py:
3550 * giscanner/utils.py:
3551 * tests/parser/Foo-expected.gir:
3552 Improve enum member parsing and introspection
3554 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3556 * giscanner/scannerparser.y:
3557 * giscanner/sourcescanner.h:
3558 * giscanner/sourcescanner.py:
3559 Add a new source type enum for member.
3560 Use __repr__ for improved debugging
3561 * giscanner/girparser.py:
3563 * giscanner/transformer.py:
3564 Improve parsing of struct members.
3565 * tests/parser/foo-object.h:
3568 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3570 * giscanner/xmlwriter.py:
3571 Improve error reporting when trying to quote None.
3572 * giscanner/girparser.py:
3573 Do not print warnings when including more complete .gir files
3574 * giscanner/girwriter.py:
3575 Do not require a name for parameters, add a todo for singletons
3576 * giscanner/glibtransformer.py:
3577 Refactor the way structs are done, add a couple of hacks to allow
3579 * giscanner/transformer.py:
3580 Add enough hacks so cairo, atk and pango.gir can be parsed properly
3581 * gobject-introspection-1.0.pc.in:
3582 Export girdir, so we can access gobject-2.0.gir from outside
3584 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3586 * tools/g-ir-scanner:
3587 * tests/parser/Makefile.am:
3588 Update sys.path before running the parser so we don't have
3589 to setup PYTHONPATH ourselves.
3593 * girepository/Makefile.am:
3594 * giscanner/transformer.py:
3595 * gobject-introspection-1.0.pc.in:
3596 * gobject-introspection.pc.in:
3597 * tools/Makefile.am:
3599 Rename pkg-config name to gobject-introspection-1.0,
3600 Do not installed anything which is not using the gir format.
3601 Disable compililation the old C scanner, but still keep the source
3602 until all the remaning functionallity has been ported.
3604 2008-05-31 Johan Dahlin <jdahlin@async.com.br>
3606 * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3607 a crash when symbol->indent is NULL.
3609 * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3610 a function to convert a CTYPE symbol to a string
3612 2008-05-24 Johan Dahlin <jdahlin@async.com.br>
3615 * giscanner/girwriter.py:
3616 * giscanner/giscannermodule.c
3617 (pygi_source_scanner_append_filename),
3618 (pygi_source_scanner_parse_file):
3619 * giscanner/glibtransformer.py:
3620 * giscanner/sourcescanner.py:
3621 Revert back to using temporary files to send in headers.
3622 Allow Functions to be passed in as callbacks, add a couple
3623 of try/excepts missing features.
3624 We can now scan pango
3626 2008-05-08 Johan Dahlin <johan@gnome.org>
3628 * giscanner/glibtransformer.py:
3629 * giscanner/transformer.py:
3630 Move namespace stripping glibtransformer->transformer
3632 2008-05-08 Johan Dahlin <johan@gnome.org>
3635 * giscanner/girwriter.py:
3636 * giscanner/glibtransformer.py:
3637 * giscanner/transformer.py:
3638 * tools/g-ir-scanner:
3639 Introduce a namespace ast node
3641 2008-05-05 Johan Dahlin <johan@gnome.org>
3643 * giscanner/__init__.py:
3644 * giscanner/sourcescanner.py:
3645 * giscanner/transformer.py:
3646 Move sourcescanner symbols to the sourcescanner module, instead
3647 of in the global __init__ namespace.
3649 2008-05-03 Johan Dahlin <johan@gnome.org>
3651 * giscanner/glibtransformer.py:
3652 * tools/g-ir-scanner:
3653 Handle missing parameters better, allow - and + in .la dlname
3656 2008-05-03 Johan Dahlin <johan@gnome.org>
3658 * giscanner/__init__.py:
3660 * giscanner/girwriter.py:
3661 * giscanner/glibtransformer.py:
3662 * giscanner/transformer.py:
3663 Parse struct fields properly, improve debugging.
3665 2008-04-29 Johan Dahlin <johan@gnome.org>
3668 * giscanner/girwriter.py:
3669 * giscanner/transformer.py:
3670 * tests/parser/Foo-expected.gir:
3672 Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
3674 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3677 * docs/g-ir-scanner.1:
3678 * metadata-annotations-proposal.txt:
3679 * metadata-format.txt:
3680 Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
3682 2008-04-29 Johan Dahlin <jdahlin@async.com.br>
3684 * giscanner/girwriter.py:
3685 * giscanner/glibtransformer.py:
3686 * giscanner/transformer.py:
3687 * giscanner/xmlwriter.py:
3688 * tests/parser/Foo-expected.gir:
3689 * tests/parser/foo-object.h:
3690 Write record/structs to gir file too. Add a couple of tests,
3691 fix an off by one error in xmlwriter.py.
3693 2008-04-28 Johan Dahlin <johan@gnome.org>
3695 * giscanner/xmlwriter.py: Calculate the line length properly,
3696 include the provided extra indentation in the calculation, really.
3698 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3701 * giscanner/glibast.py:
3702 * giscanner/glibtransformer.py:
3703 * giscanner/transformer.py:
3704 * tools/g-ir-scanner:
3705 Add a --strip-prefix and sort out confusion between names and symbols
3706 for functions and struct + derivaties.
3707 Refactor bootstrap of g-ir-scanner, so we can set options on
3708 Transformer() before parsing everything.
3710 2008-04-28 Johan Dahlin <johan@gnome.org>
3712 * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
3713 when scanning girepository.h
3715 * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
3716 a __GI_SCANNER__ when we run.
3718 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3721 * giscanner/girwriter.py:
3722 * giscanner/glibast.py:
3723 * giscanner/glibtransformer.py:
3724 * tests/parser/Foo-expected.gir:
3725 * tests/parser/utility-expected.gir:
3726 Rename most c:identifier to c:type. Add new ones to
3727 class/interface/enum/boxed.
3729 2008-04-28 Johan Dahlin <jdahlin@async.com.br>
3732 * giscanner/girwriter.py:
3733 * giscanner/glibtransformer.py:
3734 * tests/parser/Foo-expected.gidl:
3735 * tests/parser/Makefile.am:
3736 Move c:identifier from return-value to subchild type,
3737 as per Jürgs suggestion
3739 2008-04-28 Johan Dahlin <johan@gnome.org>
3741 * giscanner/girwriter.py:
3742 * tests/parser/Foo-expected.gir:
3743 Write property.type as a child node.
3745 2008-04-27 Johan Dahlin <johan@gnome.org>
3750 * gidl/gobject-2.0.gidl:
3752 * gir/gobject-2.0.gir:
3753 * tests/parser/Makefile.am:
3754 Replace the GObject gidl with a GObject gir.
3756 2008-04-27 Johan Dahlin <johan@gnome.org>
3758 * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
3761 * giscanner/xmlwriter.py:
3762 * tests/parser/Foo-expected.gir:
3763 Include indentation in line length calculation
3765 2008-04-27 Johan Dahlin <johan@gnome.org>
3767 * giscanner/girparser.py:
3768 Prettify NS parsing using elementtree.
3770 2008-04-27 Johan Dahlin <johan@gnome.org>
3773 * giscanner/Makefile.am:
3774 * giscanner/girparser.py:
3775 * giscanner/glibtransformer.py:
3776 * tests/parser/Foo-expected.gidl:
3777 * tests/parser/Foo-expected.gir:
3778 * tests/parser/Makefile.am:
3779 * tests/parser/utility-expected.gidl:
3780 * tests/parser/utility-expected.gir:
3781 * tools/g-ir-scanner:
3782 Switch over to GIR as the default format. Add a simple GIDL
3784 Update tests and fix simplify makefiles by depending
3785 on GNU make extensions.
3787 2008-04-27 Johan Dahlin <johan@gnome.org>
3789 * giscanner/xmlwriter.py:
3790 Wrap attributes for lines which are wider than 79 characters
3792 * giscanner/scannerlexer.l:
3793 Allow parenthesis in annotations
3796 * giscanner/gidlwriter.py:
3797 * giscanner/girwriter.py:
3798 * giscanner/glibtransformer.py:
3799 * giscanner/transformer.py:
3800 Add initial sequence support, including annotation.
3801 Refactor type handling a bit.
3803 2008-04-27 Johan Dahlin <johan@gnome.org>
3805 * tests/parser/Foo-expected.gidl:
3806 * tests/parser/foo-object.h:
3807 * tests/parser/foo.c (foo_object_class_init),
3808 (foo_object_get_strings), (foo_object_get_objects):
3809 Add two new functions to check sequence return values.
3810 Also fixes a compilation warning.
3812 2008-04-27 Johan Dahlin <johan@gnome.org>
3814 * giscanner/giscannermodule.c (]): Cast the getter, avoids
3815 a compilation warning.
3817 * tools/Makefile.am (g_ir_scanner_SOURCES):
3818 g-ir-scanner has no sources.
3820 2008-04-25 Johan Dahlin <johan@gnome.org>
3822 * giscanner/Makefile.am:
3824 * giscanner/gidlparser.py:
3825 * giscanner/gidlwriter.py:
3826 * giscanner/girwriter.py:
3827 * giscanner/glibast.py:
3828 * giscanner/glibtransformer.py:
3829 * giscanner/transformer.py:
3830 Split out nodes to ast.py and glibast.py
3832 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3834 * giscanner/Makefile.am:
3835 * giscanner/gidlparser.py:
3836 * giscanner/gidlwriter.py:
3837 * giscanner/girwriter.py:
3838 * giscanner/glibtransformer.py:
3839 * giscanner/gobjecttreebuilder.py:
3840 * giscanner/transformer.py:
3841 * giscanner/treebuilder.py:
3842 * tools/g-ir-scanner:
3843 Rename treebuilder to transformer and
3844 gobjectreebuilder to glibtransformer.
3846 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3848 * giscanner/Makefile.am:
3849 * giscanner/__init__.py:
3850 * giscanner/cgobject.py:
3851 * giscanner/gidlparser.py:
3852 * giscanner/gidlwriter.py:
3853 * giscanner/girwriter.py:
3854 * giscanner/gobjecttreebuilder.py:
3855 * giscanner/odict.py:
3856 * giscanner/sourcescanner.py:
3857 * giscanner/treebuilder.py:
3858 * giscanner/xmlwriter.py:
3859 * tools/Makefile.am:
3860 * tools/g-ir-scanner:
3861 Add LGPLv2 license header and install all python files
3863 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3866 * giscanner/gidlwriter.py:
3867 * giscanner/giscannermodule.c (pygi_source_directive_new),
3868 (directive_get_options), (pygi_source_symbol_new),
3869 (symbol_get_base_type), (pygi_source_type_new),
3870 (type_get_base_type), (type_get_child_list),
3871 (pygi_source_scanner_get_symbols),
3872 (pygi_source_scanner_get_directives):
3873 * giscanner/gobjecttreebuilder.py:
3874 * giscanner/sourcescanner.py:
3875 * giscanner/treebuilder.py:
3876 * tests/parser/foo-object.h:
3877 Add support for virtual methods.
3878 Pair struct FooClass with struct Foo.
3879 Clean up the SourceScanner bindings a bit.
3880 Add a testcase for virtual methods.
3882 2008-04-25 Johan Dahlin <jdahlin@async.com.br>
3884 * giscanner/cgobject.py:
3885 * giscanner/gidlwriter.py:
3886 * giscanner/gobjecttreebuilder.py:
3887 Add support for signals
3889 * tests/parser/foo.c (foo_object_class_init):
3890 * Foo-expected.gidl:
3891 Add a signal and update the expected output.
3893 2008-04-24 Johan Dahlin <jdahlin@async.com.br>
3895 * giscanner/gidlwriter.py:
3896 * giscanner/girwriter.py:
3897 * giscanner/giscannermodule.c (directive_get_name),
3898 (directive_get_value), (directive_get_options),
3899 (symbol_get_directives), (symbol_set_directives),
3900 (pygi_source_scanner_parse_file),
3901 (pygi_source_scanner_lex_filename),
3902 (pygi_source_scanner_get_directives), (init_giscanner):
3903 * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
3904 * giscanner/sourcescanner.h:
3905 * giscanner/sourcescanner.py:
3906 * giscanner/treebuilder.py:
3907 * tools/g-ir-scanner:
3908 Add support for source/header annotations.
3910 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3912 * giscanner/gidlwriter.py:
3913 * giscanner/girwriter.py:
3914 * giscanner/gobjecttreebuilder.py:
3915 * giscanner/treebuilder.py:
3916 Add support for Callbacks
3918 2008-04-22 Havoc Pennington <hp@pobox.com>
3920 * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
3921 not in metadata->module, look for it in the global module, in case
3922 some other object or the app itself provides the symbol.
3924 2008-04-22 Havoc Pennington <hp@pobox.com>
3926 * girepository/gmetadata.c (_g_metadata_init): hack to avoid
3927 dlopening a library that is already in the main app, by checking
3928 whether one of the lib's symbols is already loaded.
3930 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
3932 * tests/parser/Foo-expected.gidl:
3933 * tests/parser/foo-object.h:
3936 2008-04-22 Havoc Pennington <hp@pobox.com>
3938 * girepository/ginfo.c (g_interface_info_find_method):
3939 Use interface_blob_size not object_blob_size to compute offset.
3941 2008-04-22 Havoc Pennington <hp@pobox.com>
3943 * girepository/gmetadata.c (_g_metadata_init): remove
3944 G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
3945 (Glade and Clutter for example) rely on being loaded globally.
3947 2008-04-22 Havoc Pennington <hp@pobox.com>
3949 * girepository/ginfo.c (g_registered_type_info_get_g_type): new
3950 function to get the GType given a RegisteredTypeInfo
3952 2008-04-22 Johan Dahlin <johan@gnome.org>
3954 * COPYING: Add a LGPL license, to prevent automake to
3955 put in a copy of GPL here. Pointed out by Havoc.
3957 * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
3958 (g_type_info_is_pointer), (g_type_info_get_tag),
3959 (g_type_info_get_param_type), (g_type_info_get_interface),
3960 (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
3961 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
3962 (g_error_domain_info_get_codes), (g_enum_info_get_value),
3963 (g_object_info_get_interface), (g_object_info_get_field),
3964 (g_interface_info_get_prerequisite),
3965 (g_signal_info_get_class_closure), (g_constant_info_get_value):
3966 * girepository/ginvoke.c (get_ffi_type):
3967 * girepository/girepository.h:
3968 * girepository/gmetadata.c (g_metadata_get_dir_entry),
3969 (g_metadata_check_sanity), (validate_header),
3970 (validate_array_type_blob), (validate_iface_type_blob),
3971 (validate_param_type_blob), (validate_error_type_blob),
3972 (validate_type_blob), (validate_constant_blob),
3973 (validate_struct_blob), (validate_enum_blob):
3974 * girepository/gmetadata.h:
3975 * tests/Makefile.am:
3976 * tests/invoke/Makefile.am:
3977 * tests/invoke/invoke.c (main):
3978 * tests/roundtrips.sh:
3979 * tools/Makefile.am:
3980 * tools/compiler.c (format_output), (write_out_metadata), (main):
3981 * tools/generate.c (write_type_name), (write_type_info),
3982 (write_constant_value), (write_enum_info), (load_metadata), (main):
3983 * tools/gidlcompilercontext.c:
3984 * tools/gidlcompilercontext.h:
3985 * tools/gidlcompilerentrynode.c:
3986 * tools/gidlcompilerentrynode.h:
3987 * tools/gidlcompilertypenode.c:
3988 * tools/gidlcompilertypenode.h:
3989 * tools/gidlmodule.c (g_idl_module_build_metadata):
3990 * tools/gidlmodule.h:
3991 * tools/gidlnode.c (init_stats), (dump_stats),
3992 (g_idl_node_get_size), (g_idl_node_get_full_size),
3993 (g_idl_node_cmp), (g_idl_node_can_have_member),
3994 (g_idl_node_add_member), (g_idl_node_param_direction_string),
3995 (parse_int_value), (parse_uint_value), (parse_float_value),
3996 (parse_boolean_value), (find_entry_node), (find_entry),
3997 (serialize_type), (g_idl_node_build_metadata), (write_string):
3999 * tools/gidlparser.c (parse_type_internal):
4000 * tools/quote-file.sh:
4001 Revert revisions 157,149-148,136-129 and 120.
4002 Move back to using g-idl-generate to generate the metadata and
4003 avoids dependency on a c compiler.
4005 2008-04-22 Johan Dahlin <jdahlin@async.com.br>
4007 * giscanner/girwriter.py:
4008 * tools/g-ir-scanner:
4009 Add an initial GIR writer and a --format option to g-ir-scanner
4011 2008-04-21 Johan Dahlin <johan@gnome.org>
4013 * giscanner/cgobject.py: Use ctypes.util.find_library to locate
4014 gobject-2.0 and raise ImportError if not found.
4016 * giscanner/gidlparser.py:
4017 * giscanner/gidlwriter.py:
4018 * giscanner/gobjecttreebuilder.py:
4019 * tools/g-ir-scanner:
4020 Add a --include argument to include types from other idls.
4021 Add a minimalistic GIDL parser (just objects for now)
4022 Implement resolving of external type references and use it to
4023 resolve parent types, argument types and return types.
4025 2008-04-21 Johan Dahlin <johan@gnome.org>
4027 * giscanner/gidlwriter.py:
4028 * giscanner/gobjecttreebuilder.py:
4029 * giscanner/treebuilder.py:
4030 Add support for properties.
4031 Refactor Class/Interface support a bit, to share more code and
4032 always initialize their method attribute to an empty list.
4034 2008-04-21 Johan Dahlin <johan@gnome.org>
4036 * giscanner/cgobject.py:
4037 Add a workaround for a glib bug interface introspection bug
4038 (object_interface_list_properties, object_class_list_properties):
4039 Cast the return value to GParamSpec.
4041 * tests/parser/Foo-expected.gidl: Update
4042 * tests/parser/foo.c: Add a string property
4044 * giscanner/gobjecttreebuilder.py:
4045 After stripping namespaces, remove the original
4046 item to avoid duplication (GtkButton struct and Button object)
4048 2008-04-21 Johan Dahlin <johan@gnome.org>
4050 * giscanner/gobjecttreebuilder.py:
4051 * giscanner/treebuilder.py:
4052 Strip namespaces before objects, so we'll export
4053 GtkButton as Button in the gtk namespace
4055 2008-04-21 Johan Dahlin <johan@gnome.org>
4057 * giscanner/gidlwriter.py:
4058 * giscanner/gobjecttreebuilder.py:
4059 * giscanner/treebuilder.py:
4060 Add constructors for object/boxed types.
4062 2008-04-21 Johan Dahlin <johan@gnome.org>
4064 * giscanner/gidlwriter.py:
4065 * giscanner/gobjecttreebuilder.py:
4066 Add support for boxed types
4068 2008-04-21 Johan Dahlin <johan@gnome.org>
4070 * giscanner/giscannermodule.c: Mark structures as const,
4071 wrap SourceType.const_string.
4073 * tests/parser/foo-object.h: Add a couple of constants.
4075 * giscanner/gidlwriter.py:
4076 * giscanner/gobjecttreebuilder.py:
4077 * giscanner/treebuilder.py:
4078 Add basic support for interfaces
4080 * tools/g-ir-scanner:
4081 Add -o/--output for writing to a file
4083 2008-04-21 Havoc Pennington <hp@redhat.com>
4085 * TODO: add some C API wishlist items I could think of quickly
4087 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4089 * giscanner/gidlwriter.py:
4090 * giscanner/xmlwriter.py:
4091 Add a simple api for writing tags which can be used
4092 with the new 'with statement' in python 2.5
4094 2008-04-21 Johan Dahlin <johan@gnome.org>
4096 * giscanner/gobjecttreebuilder.py:
4097 Strip namespace and object prefix from method names.
4099 2008-04-21 Johan Dahlin <johan@gnome.org>
4101 * tools/g-ir-scanner (main): Add --pkg option to pass in
4102 pkg-config modules to get cflags from.
4104 * giscanner/gidlwriter.py (GIDLWriter._write_method):
4105 Avoid duplication, reuse function writer for methods.
4107 2008-04-21 Johan Dahlin <jdahlin@async.com.br>
4109 * giscanner/gidlwriter.py:
4110 * giscanner/gobjecttreebuilder.py:
4111 * giscanner/treebuilder.py:
4112 * tools/g-ir-scanner:
4113 Resolve libtool .la files.
4114 Strip name spaces for methods.
4115 Add function symbols
4117 2008-04-20 Johan Dahlin <jdahlin@async.com.br>
4119 * giscanner/cgobject.py:
4120 * giscanner/gidlwriter.py:
4121 * giscanner/gobjecttreebuilder.py:
4122 * giscanner/treebuilder.py:
4123 Add support for classes and methods
4125 2008-04-20 Johan Dahlin <johan@gnome.org>
4127 * giscanner/gidlwriter.py:
4128 * giscanner/gobjecttreebuilder.py:
4129 * giscanner/odict.py:
4130 Avoid conflicts, keep the output ordered similar to
4131 the order of the input.
4132 Add a simple ordered dictionary implemenation
4134 2008-04-19 Johan Dahlin <johan@gnome.org>
4136 * giscanner/cgobject.py:
4137 * giscanner/gidlwriter.py:
4138 * giscanner/gobjecttreebuilder.py:
4139 * tools/g-ir-scanner:
4140 Start introspecting get-type functions.
4141 Implement support for GLib/GFlags GTypes.
4142 Add a ctype based GObject binding.
4144 2008-04-18 Johan Dahlin <jdahlin@async.com.br>
4146 * giscanner/gidlwriter.py:
4147 * giscanner/xmlwriter.py:
4148 * tools/g-ir-scanner:
4149 Add a simplistic gidl writer, which can't do too much.
4151 2008-04-18 Johan Dahlin <johan@gnome.org>
4153 * giscanner/sourcescanner.py:
4154 * giscanner/treebuilder.py:
4155 * tools/g-ir-scanner:
4156 split tree building and source scanning interface to separate files.
4158 2008-04-18 Johan Dahlin <johan@gnome.org>
4160 * tools/g-ir-scanner (Parameter.__init__): Start constructing
4162 - Add support for struct/parameter/return, start parsing of ctypes
4164 * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4167 2008-03-31 Johan Dahlin <johan@gnome.org>
4169 * tools/g-ir-scanner:
4170 Start to build abstract syntax node of scanned sources.
4171 Add support for cpp options.
4173 2008-03-27 Johan Dahlin <johan@gnome.org>
4175 * giscanner/giscannermodule.c:
4176 * giscanner/scannerlexer.l:
4177 * giscanner/sourcescanner.c:
4178 * tools/g-ir-scanner:
4180 Add simple pre-processor using subprocess and a PIPE.
4181 Change the parse_file apis to accept a file descriptor.
4183 2008-03-25 Johan Dahlin <johan@gnome.org>
4185 * giscanner/__init__.py:
4186 * tools/g-ir-scanner:
4187 Fix a typo and add an example python test program.
4189 2008-03-25 Johan Dahlin <johan@gnome.org>
4191 * giscanner/__init__.py:
4192 * giscanner/giscannermodule.c:
4193 * giscanner/sourcescanner.c:
4194 * giscanner/sourcescanner.h:
4195 Add constants and wrap a few more SymbolType fields
4197 2008-03-25 Johan Dahlin <johan@gnome.org>
4201 * giscanner/__init__.py:
4202 * giscanner/giscannermodule.c:
4203 * giscanner/Makefile.am:
4205 Add initial python bindings for the scanner and
4206 depend on python 2.5.
4208 2008-03-25 Johan Dahlin <johan@gnome.org>
4212 * giscanner/Makefile.am:
4213 * giscanner/sourcescanner.c:
4214 * giscanner/sourcescanner.h:
4215 * tools/Makefile.am:
4216 * tools/grealpath.h:
4217 * tools/sourcescanner.c:
4218 * tools/sourcescanner.h:
4220 Move the scanner to a separate library.
4222 2008-03-23 Johan Dahlin <johan@gnome.org>
4224 * tools/Makefile.am:
4227 * tools/scannerlexer.l:
4228 * tools/scannerparser.y:
4229 * tools/sourcescanner.c:
4230 * tools/sourcescanner.h:
4231 Split out the source scanner from the generator.
4232 Rename the symbols used in the scanner to use the gi_ prefix.
4233 This should make it possible to use the raw C parser from
4236 2008-03-23 Johan Dahlin <johan@gnome.org>
4238 * tests/parser/Makefile.am (utility.gidl):
4239 * tests/parser/utility-expected.gidl:
4240 Pass in the gobject.gidl since we're defining a GObject.
4242 2008-03-12 Johan Dahlin <johan@gnome.org>
4244 * relaxng/relaxng.rng:
4245 Add a releaxng in relaxng we can use to validate the relaxngs
4248 2008-03-12 Jürg Billeter <j@bitron.ch>
4250 * tools/scanner.c: (g_igenerator_new):
4251 * tools/scannerparser.y:
4252 Fix compiler warnings.
4254 2008-03-12 Jürg Billeter <j@bitron.ch>
4258 * tools/scannerparser.y:
4259 Start fixing memory management in g-idl-scanner.
4261 2008-03-12 Rob Taylor <rob.taylor@codethink.co.uk>
4263 * tools/gidlcompilercontext.c: (write_compiled):
4264 Fix critical warning when no shlib passed to g-idl-compiler.
4266 2008-03-12 Johan Dahlin <johan@gnome.org>
4268 * tests/parser/utility-expected.gidl:
4269 * tests/parser/utility.h:
4270 Add a get_type-function, so the scanner actually
4271 parses it as an object.
4273 2008-03-12 Johan Dahlin <johan@gnome.org>
4275 * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4278 * tests/parser/Foo-expected.gidl:
4279 * tests/parser/Makefile.am:
4280 * tests/parser/foo-object.h:
4281 * tests/parser/foo.c:
4282 * tests/parser/utility-expected.gidl:
4283 * tests/parser/utility.c:
4284 * tests/parser/utility.h:
4286 Add a new gidl test. 'utility.gidl', which is used to be able
4287 to test external type references. Add a reference to UtilityObject*
4290 2008-03-11 Johan Dahlin <johan@gnome.org>
4294 Remove most global variables
4296 2008-03-11 Philip Van Hoof <me@pvanhoof.be>
4298 * tools/scannerlexer.l:
4300 * tests/parser/Foo-expected.gidl:
4301 * tests/parser/foo.c:
4302 * tests/parser/Makefile.am:
4303 * tests/parser/foo-object.h:
4305 Added a few extra tests. Which resulted in finding a few
4306 bugs. Which resulted in me fixing those bugs
4308 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4310 * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4311 (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4312 Add some comments for strings into generated output for
4315 2008-03-11 Rob Taylor <rob.taylor@codethink.co.uk>
4317 * tools/gidlcompilercontext.c: (write_compiled):
4318 Write out the shlibs variable before writing out the strings
4319 length. Fixes compiler warning when using '-l' flag with
4322 2008-03-11 Johan Dahlin <johan@gnome.org>
4324 * tests/parser/Foo-expected.gidl:
4325 * tests/parser/foo-object.h:
4328 * tools/scannerlexer.l:
4329 Add support for parsing return arguments. Add support for
4330 caller-owns return types.
4331 Patch by Philip Van Hoof.
4333 * tools/scannerparser.y:
4334 Remove parsing of the @deprecated syntax used in headers.
4335 We will support gtk-doc deprecation in the future instead.
4337 2008-03-11 Johan Dahlin <johan@gnome.org>
4339 * tools/compiler.c (main): Coding style fixes
4341 2008-03-10 Johan Dahlin <johan@gnome.org>
4344 Add GCOV_LIBS to GILIBS
4346 2008-03-10 Johan Dahlin <johan@gnome.org>
4348 * tests/parser/Foo-expected.gidl:
4349 * tests/parser/foo.c:
4350 Rename null-ok to direction=out
4352 2008-03-10 Philip Van Hoof <me@pvanhoof.be>
4354 reviewed and extensively tested by Johan
4356 * tests/parser/Foo-expected.gidl:
4357 * tests/parser/foo-object.h:
4358 * tests/parser/foo.c:
4361 * tools/gidlwriter.c:
4364 * tools/scannerlexer.l:
4365 * tools/scannerparser.y:
4367 Add support for scanning for gtk-doc comments inside
4368 C source files. Add tests
4370 2008-03-10 Johan Dahlin <johan@gnome.org>
4372 * tests/parser/Makefile.am:
4373 * tests/parser/foo.c:
4376 * tools/scannerparser.y:
4377 Add an api to lex filenames.
4378 Lex all source .c files passed in on the command line.
4379 Scan sources in a test and a couple of private structures
4380 which should not be included in the generated gidl
4382 2008-03-10 Johan Dahlin <johan@gnome.org>
4384 * tests/invoke/Makefile.am: Make the generated metadata
4385 depend on the g-idl-compiler
4387 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4389 * tools/gidlmodule.c
4390 * tools/gidlmodule.h
4393 Remove the old g-idl-compiler code.
4396 2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
4398 * tools/quote-file.sh
4401 Move to using the 'C' struct compiler code.
4403 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4405 * girepository/ginfo.c
4407 Change the way that external references with no namespace
4408 are dealt with. External references with no namespace
4409 are placed into the XML as-if they are a local reference.
4410 This is temporary, but helps with roundtrip tests.
4412 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4414 * girepository/ginfo.c
4415 Add the ability to get the value of a constant of
4416 type TYPE_TAG_SYMBOL. In the case of a symbol the value
4417 is provided as a string.
4419 This would deal properly with:
4420 typedef char* random;
4421 const random = "A string";
4423 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4425 * girepository/ginfo.c
4426 * girepository/girepository.h
4428 Add a function to check if an enum is registered or not.
4429 Previously anything testing this relied on the g-type
4430 string offset having a value of 0.
4432 * girepository/gmetadata.c
4433 * girepository/gmetadata.h
4435 Remove unneccesary or erroneous checks. There were two
4436 metadata validation checks which made sure that the blob
4437 sizes were the same as some magic numbers compiled into the code.
4438 This is wrong as it breaks any forwards compatibility that may
4441 Checks were also present that made sure that unregistered type
4442 blobs had a value of 0 in the g-type offset field. This is
4443 unneccessary. If a type blob is unregistered then any value
4444 in its g-type field is simply invalid.
4446 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4448 * girepository/ginfo.c
4449 * girepository/gmetadata.c
4450 * girepository/gmetadata.h
4452 Change the metadata format to have a standard header
4453 for all the type blobs. Merge the SimpleTypeBlob
4454 and InterfaceTypeBlob into a union. A union of these
4455 two blobs existed previously but was not explicit
4456 in the metadata format.
4458 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4460 * tools/gidlcompilercontext.c
4461 * tools/gidlcompilercontext.h
4462 * tools/gidlcompilerentrynode.c
4463 * tools/gidlcompilerentrynode.h
4464 * tools/gidlcompilertypenode.c
4465 * tools/gidlcompilertypenode.h
4467 Add code to compile a tree of GIdlNodes to
4468 a 'C' struct representing the metadata.
4469 This is to aid cross-compiling. Previously
4470 the g-idl-compiler created a binary blob with
4471 data written in the byte order and alignment
4472 of the tool rather than the intended target.
4474 Cleaned up and improved by Johan and Robert :-)
4476 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4478 * girepository/ginvoke.c
4479 * girepository/girepository.h
4480 * girepository/gmetadata.c
4481 * girepository/gmetadata.h
4483 * tools/gidlparser.c
4484 Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4485 to avoid confusion with the interface blob.
4488 * tools/gidlparser.c
4489 Remove magic numbers and replace with type-tag
4490 enumeration symbols.
4492 * girepository/gmetadata.c
4493 Add validate declaration.
4495 2008-03-10 Jürg Billeter <j@bitron.ch>
4497 * tools/gidlparser.c: (parse_type_internal):
4498 * tools/scannerlexer.l:
4499 * tools/scannerparser.y:
4500 Support C99 _Bool type in scanner.
4502 2008-03-10 Jürg Billeter <j@bitron.ch>
4504 * tests/parser/Foo-expected.gidl:
4505 * tests/parser/foo-object.h:
4506 * tests/parser/foo.c: (foo_enum_method):
4507 * tools/scanner.c: (g_igenerator_process_function_symbol):
4508 Don't skip functions that are defined in the namespace of a type
4509 that doesn't support methods, as for example enums.
4511 2008-03-10 Johan Dahlin <johan@gnome.org>
4513 * gidl.dtd: Remove, we're using relaxng for now
4515 * tests/parser/Foo-expected.gidl:
4516 * tests/parser/foo-object.h:
4517 * tests/parser/foo.c:
4518 Rename the enum/flags get_type functions to include the whole type.
4520 2008-03-08 Marc-Andre Lureau <marcandre.lureau@gmail.com>
4522 * tools/gidlwriter.c (enum_generate): added "type-name",
4523 "get-type" and "deprecated" missing arguments.
4524 * tests/parser/Foo-expected.gidl:
4525 * tests/parser/foo-object.h: test enum type, and no type.
4527 2008-03-06 Johan Dahlin <jdahlin@async.com.br>
4530 Consistent checks, add missing 'test'
4532 2008-03-05 Havoc Pennington <hp@redhat.com>
4534 * configure.ac: Take advantage of a libffi.pc if one exists, as it
4535 does on Fedora 8. Make libffi a hard requirement, since it was in
4536 practice anyway (was not really conditional in the code or
4537 makefile, only in configure).
4539 2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
4541 reviewed by: Rob Taylor <rob.taylor@codethink.co.uk>
4542 reviewed by: Johan Dahlin <johan@gnome.org>
4544 * tests/Makefile.am:
4545 * tests/roundtrips.sh:
4546 Modify the roundtrips test so that they do not use the
4547 --raw option of the gidl compiler but instead compile a
4548 shared library to use with g_module.
4550 * tests/invoke/Makefile.am:
4551 * tests/invoke/invoke.c:
4552 Modify the invoke tests to build a shared library rather
4553 than use the --raw option.
4555 * tests/invoke/invoke-namespace-find.sh: Removed:
4556 Noone knows why this was here, so removed.
4558 2008-02-19 Rob Taylor <rob.taylor@codethink.co.uk>
4560 * tools/scanner.c: (g_igenerator_process_function_symbol):
4561 Move g_idl_node_can_have_member test later, as it broke spotting
4562 get_type's for nodes that can't have members.
4564 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4567 * tools/gidlnode.c: (g_idl_node_can_have_member):
4568 Add g_idl_node_can_have_member.
4570 * tools/scanner.c: (g_igenerator_process_function_symbol):
4571 Use g_idl_node_can_have_member to test if we should add a function
4572 as a member of the type node.
4574 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4576 * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4578 * tests/parser/Makefile.am:
4579 Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4581 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4583 * tools/scanner.c: (main):
4584 Ignore -pthread when passed to g-idl-scanner.
4586 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4588 * tools/grealpath.h: Added:
4589 * tools/scanner.c: (main):
4590 * tools/scannerlexer.l:
4591 * tools/Makefile.am:
4592 Always use absolute paths with symbolic links resolved when
4593 comparing filenames.
4595 2008-02-18 Rob Taylor <rob.taylor@codethink.co.uk>
4597 * gobject-introspection.pc.in:
4598 Provide variables for g-idl-parser, scanner and compiler in the
4601 2008-02-13 Rob Taylor <rob.taylor@codethink.co.uk>
4604 * girepository/Makefile.am:
4605 * tools/Makefile.am:
4606 Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4608 2008-02-10 Johan Dahlin <johan@gnome.org>
4610 * tests/parser/Foo-expected.gidl:
4611 * tests/parser/foo-object.h:
4612 * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4613 (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4616 2008-02-10 Johan Dahlin <johan@gnome.org>
4618 * tests/parser/Foo-expected.gidl:
4619 * tests/parser/foo-object.h:
4620 * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4621 Add enum and flags test.
4623 2008-02-10 Johan Dahlin <johan@gnome.org>
4627 * girepository/Makefile.am:
4628 Make 'make distcheck' work again.
4630 2008-02-10 Johan Dahlin <johan@gnome.org>
4632 * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
4635 * tests/parser/Makefile.am: Only create Foo.gidl when running make
4636 check, eg exclude it from BUILT_SOURCES.
4638 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4643 * girepository/Makefile.am:
4644 * m4/Makefile.am: Added:
4645 * m4/as-compiler-flag.m4: Added:
4646 * m4/gcov.m4: Added:
4647 * tools/Makefile.am:
4648 Add ability to generate a coverage report.
4649 Adds configure option --enable-gcov and make rule 'check-coverage'.
4651 2008-02-08 Rob Taylor <rob.taylor@codethink.co.uk>
4655 * gidl/Makefile.am: Added:
4656 * girepository/Makefile.am: Added:
4657 * src/Makefile.am: Renamed to tools/Makefile.am:
4658 * src/compiler.c: Renamed to tools/compiler.c:
4659 * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
4660 * src/generate.c: Renamed to tools/generate.c:
4661 * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
4662 * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
4663 * src/gidlnode.c: Renamed to tools/gidlnode.c:
4664 * src/gidlnode.h: Renamed to tools/gidlnode.h:
4665 * src/gidlparser.c: Renamed to tools/gidlparser.c:
4666 * src/gidlparser.h: Renamed to tools/gidlparser.h:
4667 * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
4668 * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
4669 * src/ginfo.c: Renamed to girepository/ginfo.c:
4670 * src/ginvoke.c: Renamed to girepository/ginvoke.c:
4671 * src/girepository.c: Renamed to girepository/girepository.c:
4672 * src/girepository.h: Renamed to girepository/girepository.h:
4673 * src/gmetadata.c: Renamed to girepository/gmetadata.c:
4674 * src/gmetadata.h: Renamed to girepository/gmetadata.h:
4675 * src/scanner.c: Renamed to tools/scanner.c:
4676 * src/scanner.h: Renamed to tools/scanner.h:
4677 * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
4678 * src/scannerparser.y: Renamed to tools/scannerparser.y:
4679 * tests/invoke/Makefile.am:
4680 Split src/ into girepository/ and tools/
4684 * girepository/Makefile.am:
4685 * tests/Makefile.am:
4686 * tests/invoke/Makefile.am:
4687 * tests/parser/Makefile.am:
4688 * tests/roundtrips.sh:
4689 * tools/Makefile.am:
4690 Make distcheck work.
4692 2008-02-04 Rob Taylor <rob.taylor@codethink.co.uk>
4694 * tests/invoke/invoke.c: (main):
4695 * tests/invoke/testfns.c: (test6), (test7):
4696 * tests/invoke/testfns.xml:
4697 Add tests for invokation with a GList argument.
4698 Also tests caller-owns return values.
4700 2008-02-04 Rob Taylor <robtaylor@floopily.org>
4703 Add some documentation for GICallableInfo
4705 2008-02-01 Mark Doffman <mark.doffman@codethink.co.uk>
4708 Correct syntax errors in the DTD file.
4710 * relaxng/c-types.xml:
4711 * relaxng/g-types.xml:
4713 Add a RelaxNG specification for the GObject Introspection XML data.
4714 The Specification has validated all of the test files.
4716 2008-01-25 Rob Taylor <robtaylor@floopily.org>
4718 * tests/roundtrips.sh:
4719 * tests/struct.test:
4720 Add roundtrip tests for structs.
4722 2008-01-11 Johan Dahlin <johan@gnome.org>
4724 * src/scanner.c (g_igenerator_process_function_symbol):
4725 Refactor out g_idle_node_add_member.
4726 (create_node_from_gtype, create_node_from_ctype):
4727 Use case instead of if...else
4728 (get_type_from_type_id):
4729 Rename to create_node_from_gtype
4730 (get_type_from_ctype):
4731 Rename to create_node_from_ctype
4733 Rename ginode -> node, gitype -> type, gifunc -> func.
4735 * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
4736 Two new functions, refactor out of scanner.c
4738 * src/scanner.c: (g_igenerator_process_function_symbol):
4739 * src/scannerlexer.l:
4740 Do not save the content of the deprecated variable, only
4743 2008-01-11 Johan Dahlin <johan@gnome.org>
4745 * tests/parser/foo-object.h: Add a couple of comment parser tests.
4747 2008-01-11 Jürg Billeter <j@bitron.ch>
4749 * src/scannerlexer.l:
4750 Fix GTK-Doc parsing.
4752 2008-01-11 Jürg Billeter <j@bitron.ch>
4754 * src/scannerlexer.l:
4755 Fix GTK-Doc parsing.
4757 2008-01-11 Jürg Billeter <j@bitron.ch>
4759 * src/scanner.c: (lookup_symbol):
4760 Return unresolved name if we find unknown symbol.
4762 2008-01-11 Jürg Billeter <j@bitron.ch>
4764 * src/scanner.c: (g_igenerator_generate):
4765 Initialize GObject to fix scanning interface properties.
4767 * tests/parser/Foo-expected.gidl:
4768 * tests/parser/foo-object.h:
4769 * tests/parser/foo.c: (foo_interface_get_type):
4770 Test interfaces with GObject prerequisite.
4772 * tests/parser/Makefile.am:
4773 Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
4775 2007-12-27 Johan Dahlin <johan@gnome.org>
4777 * src/scannerlexer.l:
4778 Parse gtk-doc comments.
4780 * src/gidlwriter.c: (function_generate):
4781 Reorganize, avoid duplication and add support for
4782 writing deprecated functions.
4784 * src/scannerparser.y:
4786 Add new structure CDirective and functions to create/free them.
4788 * src/scanner.c: (g_igenerator_process_function_symbol),
4789 (g_igenerator_process_unregistered_struct_typedef),
4790 (g_igenerator_process_struct_typedef),
4791 (g_igenerator_process_union_typedef),
4792 (g_igenerator_process_enum_typedef),
4793 (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
4794 (g_igenerator_start_preprocessor):
4795 Parse @deprecated directive for functions.
4796 Remove some more C99isms.
4797 Send in -C to cpp to avoid stripping comments.
4799 * tests/parser/foo-object.h:
4800 * tests/parser/Foo-expected.gidl:
4801 Add deprecated directive
4803 2007-12-27 Johan Dahlin <johan@gnome.org>
4805 * src/scannerlexer.l (intsuffix): Add emacs mode line and
4806 escape ' and " so it looks more like C.
4809 Unlink temporary file used.
4811 2007-12-27 Johan Dahlin <johan@gnome.org>
4813 * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
4814 (g_igenerator_start_preprocessor), (main):
4816 * src/scannerparser.y:
4817 Plug a couple of simple memory leaks.
4819 2007-12-27 Johan Dahlin <johan@gnome.org>
4821 * src/scanner.c: (g_igenerator_parse_macros),
4822 (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
4825 * src/scannerparser.y:
4826 * tests/parser/Makefile.am:
4828 Improve error reporting, return when the preprocessor fails.
4829 Add a verbose parameter, to aid debugging.
4830 Revert to using a temporary file to communicate between the
4831 preprocessor and the parser, because we need to wait for
4832 the exit code from the pre-processor before starting to parse.
4834 2007-12-16 Johan Dahlin <jdahlin@async.com.br>
4836 * src/Makefile.am: Rename clexer.l to scannerlexer.l and
4837 cparser.y to scannerparser.y
4839 2007-12-11 Johan Dahlin <johan@gnome.org>
4843 * src/scanner.c: (g_igenerator_new):
4845 Get rid of the global the_generator variable.
4847 2007-12-10 Johan Dahlin <johan@gnome.org>
4849 * src/scanner.c (main): Add an output option,
4850 add checks for required parameters
4853 set BUILD_SOURCES and CLEANFILES properly
4855 * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
4856 (g_writer_write_indent), (g_writer_write_unindent),
4857 (field_generate), (value_generate), (constant_generate),
4858 (property_generate), (function_generate), (vfunc_generate),
4859 (signal_generate), (interface_generate), (struct_generate),
4860 (union_generate), (boxed_generate), (enum_generate),
4861 (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
4863 * src/scanner.c: (g_igenerator_generate):
4865 * src/scannerwriter.c:
4867 Refactor scannerwriter to only be tied to a GIdlModule and move
4868 it (again!) to gidlwriter.c. Change the writer function to take
4871 2007-12-10 Johan Dahlin <johan@gnome.org>
4874 * src/scanner.c: (g_igenerator_generate):
4876 * src/scannerwriter.c: (g_igenerator_write_inline),
4877 (g_igenerator_write), (g_igenerator_write_indent),
4878 (g_igenerator_write_unindent), (field_generate), (value_generate),
4879 (constant_generate), (property_generate), (function_generate),
4880 (vfunc_generate), (signal_generate), (interface_generate),
4881 (struct_generate), (union_generate), (boxed_generate),
4882 (enum_generate), (node_generate), (module_generate),
4883 (g_scanner_write_file):
4885 Move the scanner gidl writing to a separate source file.
4887 2007-12-10 Johan Dahlin <johan@gnome.org>
4892 Move over all CType construction functions.
4894 * tests/parser/Makefile.am:
4895 Be verbose when printing parsing tests results.
4897 2007-12-10 Johan Dahlin <johan@gnome.org>
4899 * src/scanner.c (g_igenerator_start_preprocessor): Refactor
4900 preprocessor handling to here. Start cpp insteado of cc -E,
4901 always include -U__GNUC__, since it's specific to the preprocessor
4904 * tests/parser/Makefile.am (check-local): Silent diff and skip
4905 -U__GNUC__ which is always defined now
4907 2007-12-10 Johan Dahlin,,, <jdahlin@plasttroll>
4909 reviewed by: <delete if not using a buddy>
4911 * src/scanner.c: (g_igenerator_start_preprocessor), (main):
4912 * tests/parser/Makefile.am:
4914 2007-12-09 Johan Dahlin <johan@gnome.org>
4917 Use GOption for command line options.
4918 (g_igenerator_new, main): Simplify constructor and they way
4919 parameters are passed into it.
4925 * src/gen-introspect.c:
4926 * src/gen-introspect.h:
4928 Rename gen-introspect.[ch] to scanner.[ch]
4930 2007-12-09 Johan Dahlin <johan@gnome.org>
4934 * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
4935 don't make the repository library and the other utilites link against
4938 * src/gen-introspect.c: (g_igenerator_create_object),
4939 (g_igenerator_create_interface), (g_igenerator_create_boxed),
4940 (g_igenerator_create_enum), (g_igenerator_create_flags),
4941 (g_igenerator_process_module_symbol),
4942 (g_igenerator_process_module), (g_igenerator_generate), (main):
4943 * src/gen-introspect.h:
4944 Refactor g_igenerator_process_types into smaller pieces.
4946 * tests/parser/Makefile.am:
4947 Depend on the gen-introspect binary
4949 2007-12-09 Johan Dahlin <johan@gnome.org>
4951 * src/gen-introspect.c (g_igenerator_process_types):
4952 Break into smaller pieces, one for each generated node type.
4954 2007-12-08 Johan Dahlin <johan@gnome.org>
4956 * src/gen-introspect.c: (g_igenerator_process_types),
4957 (g_igenerator_add_module):
4958 * tests/parser/Foo-expected.gidl:
4959 * tests/parser/foo-object.h:
4960 * tests/parser/foo.c: (foo_subobject_class_init),
4961 (foo_subobject_init):
4963 Add a subobject test and make sure to register defined classes
4964 in the lookup symbol hash table.
4966 2007-12-08 Johan Dahlin <johan@gnome.org>
4970 * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
4971 (g_igenerator_process_types), (g_igenerator_add_module),
4972 (g_igenerator_add_include_idl), (main):
4973 * src/gen-introspect.h:
4974 * tests/parser/Makefile.am:
4975 * tests/parser/Foo-expected.gidl:
4977 Change the gen-introspect to generate namespaced module names,
4978 such as GLib.Object instead of GObject.
4979 Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
4980 add a --include-idl parameter to gen-introspect,
4981 and update the parser test.
4983 2007-12-08 Johan Dahlin <johan@gnome.org>
4985 * src/gen-introspect.c:
4986 Move main to the end of the file and attempt to make it valid
4989 * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
4990 we're not quite ready to generate metadata yet.
4995 Add a simple gen-introspect parser test
4997 2007-12-06 Gustavo J. A. M. Carneiro <gjc@gnome.org>
4999 reviewed by: Johan Dahlin <johan@gnome.org>
5002 * gobject-introspection.pc.in:
5004 * src/compiler.c: (format_output), (write_out_metadata), (main):
5005 * src/gen-introspect.c: (main):
5006 * src/gen-introspect.h:
5007 * src/generate.c: (write_callable_info), (write_repository),
5008 (load_metadata), (main):
5009 * src/gidlmodule.c: (g_idl_module_new),
5010 (g_idl_module_build_metadata):
5012 * src/gidlparser.c: (start_element_handler):
5013 * src/ginfo.c: (g_info_new), (g_info_from_entry),
5014 (g_base_info_get_name), (g_base_info_get_namespace),
5015 (g_base_info_is_deprecated), (g_base_info_get_annotation),
5016 (g_base_info_get_metadata), (g_function_info_get_symbol),
5017 (g_function_info_get_flags), (g_function_info_get_property),
5018 (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
5019 (g_callable_info_may_return_null),
5020 (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
5021 (g_callable_info_get_arg), (g_arg_info_get_direction),
5022 (g_arg_info_is_return_value), (g_arg_info_is_dipper),
5023 (g_arg_info_is_optional), (g_arg_info_may_be_null),
5024 (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
5025 (g_type_info_get_tag), (g_type_info_get_param_type),
5026 (g_type_info_get_interface), (g_type_info_get_array_length),
5027 (g_type_info_is_zero_terminated),
5028 (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
5029 (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
5030 (g_value_info_get_value), (g_field_info_get_flags),
5031 (g_field_info_get_size), (g_field_info_get_offset),
5032 (g_registered_type_info_get_type_name),
5033 (g_registered_type_info_get_type_init),
5034 (g_struct_info_get_n_fields), (g_struct_info_get_field),
5035 (g_struct_info_get_n_methods), (g_struct_info_get_method),
5036 (find_method), (g_struct_info_find_method),
5037 (g_enum_info_get_n_values), (g_enum_info_get_value),
5038 (g_object_info_get_parent), (g_object_info_get_type_name),
5039 (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
5040 (g_object_info_get_interface), (g_object_info_get_n_fields),
5041 (g_object_info_get_field), (g_object_info_get_n_properties),
5042 (g_object_info_get_property), (g_object_info_get_n_methods),
5043 (g_object_info_get_method), (g_object_info_find_method),
5044 (g_object_info_get_n_signals), (g_object_info_get_signal),
5045 (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
5046 (g_object_info_get_n_constants), (g_object_info_get_constant),
5047 (g_interface_info_get_n_prerequisites),
5048 (g_interface_info_get_prerequisite),
5049 (g_interface_info_get_n_properties),
5050 (g_interface_info_get_property), (g_interface_info_get_n_methods),
5051 (g_interface_info_get_method), (g_interface_info_find_method),
5052 (g_interface_info_get_n_signals), (g_interface_info_get_signal),
5053 (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
5054 (g_interface_info_get_n_constants),
5055 (g_interface_info_get_constant), (g_property_info_get_flags),
5056 (g_signal_info_get_flags), (g_signal_info_get_class_closure),
5057 (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
5058 (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
5059 (g_constant_info_get_value), (g_union_info_get_n_fields),
5060 (g_union_info_get_field), (g_union_info_get_n_methods),
5061 (g_union_info_get_method), (g_union_info_is_discriminated),
5062 (g_union_info_get_discriminator_offset),
5063 (g_union_info_get_discriminator):
5064 * src/ginvoke.c: (g_function_info_invoke):
5065 * src/girepository.c: (g_irepository_register),
5066 (g_irepository_unregister), (g_irepository_get_default),
5067 (count_interfaces), (g_irepository_get_n_infos), (find_interface),
5068 (g_irepository_get_info), (g_irepository_find_by_name),
5069 (g_irepository_get_shared_library),
5070 (g_irepository_build_search_path), (g_irepository_register_file),
5071 (g_irepository_error_quark):
5072 * src/girepository.h:
5073 * src/gmetadata.c: (g_metadata_get_dir_entry),
5074 (g_metadata_check_sanity), (validate_header),
5075 (validate_array_type_blob), (validate_iface_type_blob),
5076 (validate_param_type_blob), (validate_error_type_blob),
5077 (validate_type_blob), (validate_arg_blob),
5078 (validate_signature_blob), (validate_function_blob),
5079 (validate_callback_blob), (validate_constant_blob),
5080 (validate_value_blob), (validate_field_blob),
5081 (validate_property_blob), (validate_signal_blob),
5082 (validate_vfunc_blob), (validate_struct_blob),
5083 (validate_enum_blob), (validate_object_blob),
5084 (validate_interface_blob), (validate_errordomain_blob),
5085 (validate_union_blob), (validate_blob), (validate_directory),
5086 (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5087 (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5088 (g_metadata_new_from_mapped_file), (g_metadata_free),
5089 (g_metadata_set_module), (g_metadata_get_namespace):
5091 * tests/Makefile.am:
5092 * tests/invoke/Makefile.am:
5093 * tests/invoke/invoke-namespace-find.sh:
5094 * tests/invoke/invoke.c: (main):
5096 Add a namespace/shared library mapping. fixes #313268.
5098 2007-12-03 Johan Dahlin <johan@gnome.org>
5100 * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5103 2007-11-30 Jürg Billeter <j@bitron.ch>
5109 * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5110 (g_igenerator_write_inline), (g_igenerator_write),
5111 (g_igenerator_write_indent), (g_igenerator_write_unindent),
5112 (field_generate), (value_generate), (constant_generate),
5113 (property_generate), (function_generate), (vfunc_generate),
5114 (signal_generate), (interface_generate), (struct_generate),
5115 (union_generate), (boxed_generate), (enum_generate),
5116 (node_generate), (module_generate), (get_type_from_type_id),
5117 (str_replace), (g_igenerator_process_properties),
5118 (g_igenerator_process_signals), (g_igenerator_process_types),
5119 (get_type_from_ctype), (g_igenerator_process_function_symbol),
5120 (g_igenerator_process_unregistered_struct_typedef),
5121 (g_igenerator_process_struct_typedef),
5122 (g_igenerator_process_union_typedef),
5123 (g_igenerator_process_enum_typedef),
5124 (g_igenerator_process_function_typedef),
5125 (g_igenerator_process_constant), (g_igenerator_process_symbols),
5126 (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5127 (g_igenerator_generate), (main), (csymbol_new),
5128 (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5129 (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5130 (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5131 (eat_hspace), (eat_line), (read_identifier),
5132 (g_igenerator_parse_macros):
5133 * src/gen-introspect.h:
5135 Import gen-introspect to generate introspection information by
5138 2007-11-30 Jürg Billeter <j@bitron.ch>
5140 * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5142 2007-11-30 Jürg Billeter <j@bitron.ch>
5144 * src/gidlparser.c: (end_element_handler): Don't leave requires
5147 2007-11-29 Johan Dahlin <johan@gnome.org>
5149 * src/gidlparser.c (parse_type_internal): Add char,
5150 gchar and guchar to the builtin types.
5152 2007-11-26 Johan Dahlin <johan@gnome.org>
5154 * src/ginfo.c: (g_object_info_get_type_name),
5155 (g_object_info_get_type_init):
5156 * src/girepository.c: (g_irepository_is_registered):
5157 * src/girepository.h:
5159 Add g_object_info_get_type_name, g_object_info_get_type_init and
5160 g_irepository_is_registered.
5162 2006-08-14 Jürg Billeter <j@bitron.ch>
5164 * src/gidlparser.c: (end_element_handler): Don't leave
5165 namespace and implements states too early.
5168 2007-11-26 Johan Dahlin <johan@gnome.org>
5170 * src/gmetadata.c (validate_struct_blob):
5171 pass blob_type to validate_function_blob instead of
5172 hard-coding BLOB_TYPE_STRUCT.
5174 Patch by Torsten Schoenfeld, fixes #314190
5176 2006-10-03 Torsten Schoenfeld <tsch@cvs.gnome.org>
5178 * src/compiler.c, src/generate.c, src/gidlnode.c,
5179 src/gidlparser.c, src/ginfo.c, src/girepository.c,
5180 tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5181 warnings about return values, signedness mismatches, unused
5182 variables, and unhandles enum values in switch statements.
5184 * tests/invoke/Makefile.am: Don't install the invoke test program.
5185 Add -I ../../src to the cflags used for the test functions files.
5187 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5189 * src/girepository.h: Export g_invoke_error_quark.
5191 2005-08-31 Torsten Schoenfeld <tsch@cvs.gnome.org>
5193 * src/ginvoke.c: Remove the fallback implementation of
5194 g_function_info_invoke since we now formally depend on libffi.
5196 2005-07-25 Matthias Clasen <mclasen@redhat.com>
5198 * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5199 Remove these files from cvs, as they are now generated.
5201 * src/gmetadata.c (validate_iface_type_blob): Don't
5202 complain if blob->pointer is not set, since that
5203 happens for enum and flag types. (#308935, Gustavo
5206 * Commit an autoconf-conversion patch by
5207 Gustavo Carneiro (#308708)
5209 2005-05-24 Matthias Clasen <mclasen@redhat.com>
5211 * src/compiler.c (main): Use it here to validate
5212 the generated metadata.
5214 * src/gmetadata.[hc]: Add code to validate a
5217 * metadata-format.txt: Updates
5219 2005-05-22 Matthias Clasen <mclasen@redhat.com>
5221 * tests/*: Add struct offsets to field and vfunc
5224 * src/generate.c (write_vfunc_info): Write offset
5225 information for vfuncs.
5227 * src/gidlnode.c (g_idl_node_build_metadata): Write
5228 the struct offsets into the metadata.
5230 * src/gidlparser.c: Parse the offset attributes of
5231 field and vfunc elements.
5233 * src/gidlnode.h: Add offset members to field and
5236 2005-05-21 Matthias Clasen <mclasen@redhat.com>
5240 * gidl.dtd: Updates.
5242 * src/g-idl-offsets.pl: A perl script which reads a .gidl
5243 file, creates, compiles and runs a C file, and folds the
5244 resulting struct offsets back into the .gidl file.
5246 2005-05-20 Matthias Clasen <mclasen@redhat.com>
5248 * src/gidlparser.c (start_field): Make fields in objects
5251 * src/gidlmodule.c: Include string.h
5256 * metadata-format.txt: Cleanup basic types.
5257 * src/*: Adapt to the changes.
5258 * tests/*: Adapt to the changes.
5259 * examples/gdk-pixbuf.gidl: Adapt to the changes.
5261 * src/gidlnode.c (g_idl_node_get_size): Report the correct
5262 size for enum blobs.
5263 (g_idl_node_get_full_size): Report the correct size for
5266 * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5267 error checking for blob sizes.
5269 2005-05-19 Matthias Clasen <mclasen@redhat.com>
5271 * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5272 interface types for which is_pointer is FALSE, e.g. enums.
5274 * src/gidlnode.c (g_idl_node_get_full_size)
5275 * src/gidlparser.c (parse_type_internal):
5276 * src/generate.c (write_type_info): Support unspecialized
5277 lists, hashtables and errors. Also emit a '*' after these.
5281 2005-05-17 Matthias Clasen <mclasen@redhat.com>
5285 * metadata-format.txt: Cleanups by Maciej Katafiasz.
5287 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5289 * src/*.c: Change the directory to be addressed by
5290 1-based indexes, and use an index of zero to mean
5293 2005-05-15 Matthias Clasen <mclasen@redhat.com>
5295 * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5297 * tests/union.test: Add a union test.
5299 * src/generate.c: Handle unions.
5301 * src/girepository.h:
5302 * src/ginfo.c: Add GIUnionInfo and functions to access it.
5304 * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5306 * src/gidlparser.c (start_union): Parse <union> elements.
5308 * src/gidlnode.h: Add a GIdlNodeUnion.
5310 * gidl.dtd: Add a <union> element.
5312 * src/gmetadata.c (g_metadata_check_sanity): Check
5315 * src/gmetadata.h: Add union_blob_size to Header,
5318 * metadata-format.txt: Add a UnionBlob.
5320 2005-05-13 Matthias Clasen <mclasen@redhat.com>
5322 * tests/*: Update testcases.
5324 * src/generate.c (write_callable_info): Don't forget to
5325 write transfer and null-ok attributes for return types
5328 * src/girepository.h:
5329 * src/ginfo.c (g_callable_info_may_return_null):
5330 New function to find out if a function may return NULL.
5332 * src/compiler.c (format_output): Make the generated
5335 * README: Point to a recent libffi snapshot.
5337 * tests/invoke/*: Some invoke tests.
5339 * src/Makefile: Add ginvoke.c and the necessary
5342 * src/girepository.h (g_function_info_invoke): Add
5345 * src/ginvoke.c (g_function_info_invoke): Initial
5346 implementation of invoke functionality based on libffi.
5348 * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5349 strings and types hash tables in the right order when
5351 (find_entry_node): Free the name parts.
5353 2005-05-12 Johan Dahlin <johan@gnome.org>
5355 * src/generate.c: Generate consistent end tags.
5359 2005-05-12 Matthias Clasen <mclasen@redhat.com>
5363 * src/gidlparser.c (start_function): Actually add
5364 methods to objects. (Steven Walter)
5366 * src/girepository.h:
5367 * src/ginfo.c: Rename Transfer and Direction to
5368 GITransfer and GIDirection. (Torsten Schoenfeld)
5370 * tests/*: Make tests work with the changes in name
5373 * src/gidlnode.c (find_entry_node): Parse qualified
5374 names and generate xref nodes for them if needed. Don't
5375 require all modules to be loaded any more.
5377 * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5380 * src/ginfo.c (g_object_info_get_parent): Return NULL
5381 if blob->parent is 0. Still need to make sure index
5384 * src/generate.c: Generate qualified names when
5385 referring to non-local types. Emit transfer attribute
5388 * src/compiler.c (format_output): Put the function
5389 attributes where gcc accepts them.
5391 2005-05-11 Matthias Clasen <mclasen@redhat.com>
5393 * src/compiler.c (main): Add a --verbose cmdline option
5394 and only log messages if it is specified.
5397 * src/gidlnode.c (init_stats, dump_stats): Collect some
5398 statistics on string and type sharing.
5400 * src/gidlmodule.c (g_idl_module_build_metadata): Use
5401 g_message() instead of fprintf().
5403 * src/gidlnode.c (g_idl_node_free): Make this more robust.
5404 (g_idl_node_get_size): Implement for structs.
5405 (g_idl_node_get_full_size): Handle parent being NULL.
5406 (serialize_type): Handle lookup failures more gracefully.
5408 2005-05-10 Matthias Clasen <mclasen@redhat.com>
5410 * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5411 size calculation for 2-parameter types and for objects.
5413 * src/compiler.c: Add a cmdline option for debug output
5414 and install a log handler to implement it.
5415 * src/gidlnode.c: Add some debug spew.
5419 * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5420 forget to count the module name when calculating the
5421 required size for the metadata.
5424 * src/gidlparser.c: Fix compiler warnings.
5426 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5428 * src/compiler.c (main): Free the option context.
5430 * gidl.dtd: Clean up handling of names. All elements
5431 have a "name", only the elements corresponding to
5432 actual callable functions (function, method, constructor),
5433 have an additional "symbol" attribute holding the
5434 dlsym()-able function name.
5436 * src/generate.c: Adapt to generate xml matching the
5440 * src/gidlnode.c: Adapt to parse the new dtd.
5442 * tests/*.test: Adjust to the new dtd.
5444 * metadata-format.txt:
5445 * src/gmetadata.h: Remove the short_name field
5447 * src/gmetadata.c: Shrink size of ValueBlob to 12.
5448 * src/girepository.h:
5449 * src/ginfo.c (g_value_info_get_short_name): Removed
5451 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5453 * gidl.dtd: Allow constructors for boxed types,
5454 patch by Jonathan Blandford.
5457 2005-05-09 Matthias Clasen <mclasen@redhat.com>
5459 * --- Initial import ---