Catch BadPickleGet exceptions as well.
[platform/upstream/gobject-introspection.git] / ChangeLog
1 2008-11-18  Johan Dahlin  <jdahlin@async.com.br>
2
3         * giscanner/cachestore.py:
4         Catch BadPickleGet exceptions as well.  
5
6 2008-11-17  Owen Taylor  <otaylor@redhat.com>
7
8         * tests/everything/everything.c: Fix doc comment annotations
9         for test_struct_b_clone() to refer to the right function.
10
11 2008-11-17  Dan Winship  <danw@gnome.org>
12
13         * giscanner/glibtransformer.py (GLibTransformer.__init__): fix
14         spelling of GHashTable. #561135
15
16         * tests/scanner/annotation.c (annotation_object_get_hash):
17         * tests/scanner/annotation-1.0-expected.gir:
18         * tests/scanner/annotation-1.0-expected.tgir: add a test of
19         GHashTable annotations
20
21 2008-11-17  Andreas Rottmann  <a.rottmann@gmx.at>
22
23         * giscanner/ast.py: Change string array match type to be in terms
24         of canonicalized type.
25         * giscanner/transformer.py: Add canonicalize_ctype which gives us
26         a version of a c:type without aliases, so we can deep canonicalize
27         char** to utf8*.  Update parse_ctype to use it.
28         * tests/*: Add gtk_init like int*/char*** arg functions for testing.
29
30 2008-11-16  Colin Walters  <walters@verbum.org>
31
32         * girepository/girepository.c: Ensure we always call init_globals,
33         even if passed a non-default repository.
34
35 2008-11-16  Colin Walters  <walters@verbum.org>
36
37         Bug 559706 - Interface prerequisites
38
39         * common.mk: Dep on libgirepository.la for scanner libs so that
40         we rebuild things even if just gdump.c changes.
41         * girepository/gdump.c: Dump prerequisites.
42         * giscanner/ast.py: Add prerequisite list.
43         * giscanner/girparser.py: Parse them from gdump.
44         * giscanner/girwriter.py: Write them.
45         * giscanner/glibtransformer.py: Resolve them.
46         * tests/*: Test.
47
48 2008-11-16  Owen Taylor  <otaylor@redhat.com>
49
50         Bug 561087 - Respect is_pointer in serialize_type()
51
52         Add a '*' to the serialization for the cases where we set is_pointer
53         in the type blob we write out depending on node->is_pointer. Don't
54         add the '*' in the cases where is_pointer is set or not set in a
55         fixed fashion.
56
57         http://bugzilla.gnome.org/show_bug.cgi?id=561087
58
59 2008-11-16  Owen Taylor  <otaylor@redhat.com>
60
61         Bug 560825 – Add size and alignment to typelib
62
63         Include the size and alignment of structures and unions in the typelib,
64         and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.
65
66         * docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
67         girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
68         to StructBlob and UnionBlob.
69
70         * girepository/ginfo.c girepository/girepository.h:
71         Add g_[struct|union]_get[size|alignment]().
72
73         * test/offsets/gen-gitestoffsets: Test overall structure size and alignment.
74
75 2008-11-16  Owen Taylor  <otaylor@redhat.com>
76
77         Bug 552371 – implement struct field get/set
78
79         * girepository/gfield.c girepository/girepository.h: Add
80         convenience functions g_field_info_set_field() and
81         g_field_info_get_field() to set and get fields based on the
82         offsets in GIFieldInfo.
83
84 2008-11-16  Andreas Rottmann  <a.rottmann@gmx.at>
85
86         Bug 560241 - Out-arguments should not be marked as being pointers
87         in all cases
88
89         * girepository/girparser.c: Improved logic for out arguments.
90
91 2008-11-16  Andreas Rottmann  <a.rottmann@gmx.at>
92
93         Bug 559601 - Pointers in structs/unions unduly treated as arrays
94
95         * giscanner/transformer.py: Differentiate type creation logic
96         between parameters and struct components.
97
98 2008-11-15  Colin Walters  <walters@verbum.org>
99
100         * giscanner/dumper.py: Check return code from pkg-config
101         invocations.
102
103 2008-11-14  Johan Dahlin  <jdahlin@async.com.br>
104
105         * tests/everything/everything.c (test_array_int_in),
106         (test_array_gtype_in):
107         * tests/everything/everything.h:
108         Rename the int/gtype array tests. Make the return value
109         useful, an aggregation of the array input values.
110
111 2008-11-14  Johan Dahlin  <jdahlin@async.com.br>
112
113         * tests/everything/Makefile.am:
114         * tests/everything/everything.c:
115         * tests/everything/everything.h:
116         * tests/everything/gitesttypes.c:
117         * tests/everything/gitesttypes.h:
118         Rename gitesttypes.[ch] to everything.[ch]
119
120 2008-11-13  Andreas Rottmann  <a.rottmann@gmx.at>
121
122         Bug 560708 – Don't treat arrays that have a length specified as
123         zero-terminated by default
124
125         * giscanner/transformer.py: Default to non zero terminated for
126         arrays with length.
127         * tests/*: Update, add test for zero vs not.
128
129 2008-11-13  Andreas Rottmann  <a.rottmann@gmx.at>
130
131         Bug 557788 - Return types for constructors in generated typelib bogus
132
133         * girepository/girnode.c: Namespace-qualify XREFs; not doing so is
134         obviously broken in the face of duplicate names in different
135         namespaces.
136         * tests/scanner/*expected.gir: Fix up.
137
138 2008-11-13  Owen Taylor  <otaylor@redhat.com>
139
140         * girepository/girffi.c: Fix  "Unexpected time for time_t"
141         message.
142
143 2008-11-13  Colin Walters  <walters@verbum.org>
144
145         Bug 558436 - avoid having scanner load app code
146
147         * giscanner/cgobject.py: Delete; we no longer load shared
148         libraries directly.
149         * giscanner/dumper.py: Support for linking a library to
150         a stub binary for introspection.
151         * giscanner/glibtransformer.py: Rewrite to use gdump XML
152         from invocation of child binary.
153         * giscanner/transformer.py: Fix up to use fully qualified
154         name in parse tree.  Make parse_ctype public so we can use
155         it inside glibtransformer.
156         * tests/scanner/barapp.c: New test, using --program arg
157         for g-ir-scanner.
158         * tests/*: Update to use common.mk for invoking scanner.
159         * tools/g-ir-scanner: Add options --program, --program-arg,
160         and --no-libtool.
161         * docs/g-ir-scanner.1: Update.
162
163 2008-11-13  Colin Walters  <walters@verbum.org>
164
165         * configure.ac: Depend on Gio, we use it in gdump.c.
166         * girepository/gdump.c: Code to dump GType data to XML.
167         * girepository/girepository.c: Add option group for dumping.
168         * girepository/girepository.h: Define API for the above.
169
170 2008-11-13  Colin Walters  <walters@verbum.org>
171
172         * common.mk: Add a file to include with Makefile fragments
173         useful for scanner invocation.
174
175 2008-11-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
176
177         * tests/everything/gitesttypes.c (test_filename_return): Return
178         strings in filename encoding.
179
180 2008-11-13  Owen Taylor  <otaylor@redhat.com>
181
182         Bug 560253 – Add structure and boxed types to Everything test module
183
184         * tests/everything/gitesttypes.[ch]: Add examples of:
185
186           Plain old data structs
187           Plain old data structs with nested fields
188           Plain old data boxed
189           Plain old data boxed with nested fields
190           More complicated boxed types with internal state
191
192 2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
193
194         * tests/everything/gitesttypes.c (test_gtype_in):
195         * tests/everything/gitesttypes.h:
196         Add a test of GType arrays, a la gtk_list_store_set_columns.
197
198 2008-11-12  Owen Taylor  <otaylor@redhat.com>
199
200         Bug 560419 – Cache includes when parsing
201
202         Keep track of all modules parsed within a GIrParser, and when a
203         module is referenced a second time, use the existing parsed copy
204         instead of reparsing.
205
206 2008-11-12  Owen Taylor  <otaylor@redhat.com>
207
208         Fix management of ParseContext.includes_modules (#560419)
209
210         * girepository/girparser.c: Fix some trivial bugs in managing the
211         list of include modules. (Add to module's list twice, not
212         initialized to NULL, not freed.)
213
214 2008-11-12  Owen Taylor  <otaylor@redhat.com>
215
216         Keep aliases and disguised_structures local to each module (#560419)
217
218         * girepository/girmodule.[ch]: When parsing, keep keep a separate
219         hash tables of aliases and 'disguised' flags for each module, and
220         store that on the module.
221
222         After parsing an include merge the aliases/disguised flags to the
223         including module.
224
225         * girepository/girparser.c: Remove 'prefix_aliases' flag and
226         always prefix aliases/disguised structure types when parsing; this
227         simplifies the code considerably.
228
229 2008-11-12  Owen Taylor  <otaylor@redhat.com>
230
231         Fix mismatches between .gir name and 'name' attribute (#560419)
232
233         * tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
234         tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
235         where the 'name' element of <namespace/> didn't match the filename of the
236         gir, an assumption that the compiler has always expected and now enforces.
237
238 2008-11-12  Owen Taylor  <otaylor@redhat.com>
239
240         Only allow one <namespace/> element per <repository/> (#560419)
241
242         * girepository/girparser.c: The logic in girparser.c didn't work
243         very well if there were multiple <namespace/> nodes within a
244         single <repository/> (context->namespace was always the overall
245         filename and not the the name specified in the <namespace/>
246         element for one thing; this would cause aliases to be mis-prefixed
247         in include modules.) Also check that the "name" in the
248         <namespace/> node matches the filename.
249
250 2008-11-12  Owen Taylor  <otaylor@redhat.com>
251
252         Add a GirParser object to hold the state of a compilation
253
254         * girepository/girparser.[ch] tools/compiler.c: Add a toplevel
255         GirParser object to hold state that is global across a
256         compilation. Currently just holds the include path, but will
257         eventually also keep a cached list of parsed modules.
258
259 2008-11-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
260
261         * girepository/girepository.c (find_namespace_latest): Fix
262         minor memory leak.
263
264 2008-11-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
265
266         * configure.ac: use 'introspection' component for bugs
267
268 2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
269
270         * tests/everything/gitesttypes.c (test_filename_return):
271         * tests/everything/gitesttypes.h:
272         Add a filename return test.
273
274 2008-11-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
275
276         * tests/offsets/Makefile.am (gitestoffsets.c): fix
277         gen-gitestoffsets invocation with builddir != srcdir
278
279 2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
280
281         * girepository/girepository.c:
282         Change the element type from utf8 to filename
283         * girepository/girnode.c (g_ir_node_build_typelib):
284         Special case filename equally to utf8 here.
285
286 2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
287
288         * gir/Makefile.am:
289         Remove unused variables, add a dependency of girepository.ch, so when
290         they change we rebuild the gir automatically.
291
292 2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
293
294         * girepository/girepository.c (g_irepository_get_search_path):
295         * girepository/girepository.h:
296         Add a g_irepository_get_search_path, so we can access the search
297         paths from runtime.
298
299 2008-11-12  Johan Bilien  <jobi@via.ecp.fr>
300
301         Bug 560474 – g-ir-compiler crashes when compiling the glib gir
302
303         * girepository/girparser.c: avoid freeing an uninitialized pointer
304
305 2008-11-12  Johan Dahlin  <jdahlin@async.com.br>
306
307         * gir/Makefile.am:
308         * giscanner/glibtransformer.py:
309         * tools/g-ir-scanner:
310         Add a GIRepository-2.0.gir. Change the libtool lookup slightly
311         so we can just pass in --library=foo/bar/baz.la and the scanner
312         does the right thing.
313         Don't warn for _get_type() functions if they don't take any
314         parameters
315
316 2008-11-11  Owen Taylor  <otaylor@redhat.com>
317
318         Bug 560404 – Prefix types when resolving aliases in included modules
319
320         * girepository/girparser.c: When resolving aliases in an included
321         module, prefix types before looking them up.
322
323 2008-11-11  Owen Taylor  <otaylor@redhat.com>
324
325         Compute field offsets and overall size for object structures
326
327         Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
328         field of type object in structure"
329
330         Do basic computation of field offsets for objects and interfaces;
331         this doesn't attempt to address all of the "mess" for virtual
332         functions described in Bug 560281.
333
334 2008-11-11  Tommi Komulainen  <tommi.komulainen@iki.fi>
335
336         Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
337
338         Based on patch by Johan Bilien.
339
340         * giscanner/transformer.py (_create_member, _create_parameter):
341         Resolve types here as well.
342         (_resolve_type_name_1): Try resolving using 'ctype' first since
343         it's least ambiguous. Fixes struct member type resolution with
344         similarly named types, e.g. Gdk.PangoRendererClass and
345         Pango.RendererClass
346         * tests/scanner/foo*: Add test.
347
348 2008-11-11  Owen Taylor  <otaylor@redhat.com>
349
350         * girepository/girparser.c: Search provided include dirs before
351         the default directories.
352
353 2008-11-11  Owen Taylor  <otaylor@redhat.com>
354
355         * girepository/giroffsets.c: Include fully-qualified names in
356         all error messages.
357
358 2008-11-11  Owen Taylor  <otaylor@redhat.com>
359
360         * girepository/giroffsets.c: Fail gracefully with an informative
361         error message when recursion is encountered when computing a 
362         structure size.
363
364 2008-11-11  Owen Taylor  <otaylor@redhat.com>
365
366         * girepository/girparser.c: Remove an unused variable.
367
368 2008-11-10  Owen Taylor <otaylor@redhat.com>
369
370         Add tests for field offset computations
371
372         * tests/offsets/offsets.h: Header file with structure definitions to test
373
374         * tests/offsets/gen-gitestoffsets: Generate a C program that computes
375         field offsets for the structures in offsets.h two ways: using
376         the information from a generated typelib, and as computed by the
377         compiler.
378
379         We diff these two versions to test that everything is OK.
380
381 2008-11-10  Owen Taylor <otaylor@redhat.com>
382
383         Remove field offsets from g-ir-generate output and test inputs
384
385         Field offsets are a) architecture dependent so they shouldn't be part
386         of the architecture-independent gir format which is installed in
387         datadir. b) Are architecture-dependent so they shouldn't be in test
388         expected output.
389
390         * girepository/girparser.c: Don't parse offset for fields
391         * tools/generate.c: Don't parse offset for fields
392         * tests/*.gir test/scanner/*.tgir: Remove offsets
393
394         (Virtual function and discriminator offsets are not removed, as they
395         aren't fully hooked up to the field-offset computation machinery yet.)
396
397 2008-11-10  Owen Taylor <otaylor@redhat.com>
398
399         Bug 560252 - Compute field offsets before writing typelib
400
401         * girepository/girnode.h: Store the total size and alignment for
402         GIrNodeStruct/Boxed/Union.
403
404         * girepository/giroffset.c: New file implementing computation of
405         structure field offsets.
406
407         * girepository/girnode.c: Compute structure field offsets before
408         writing types into the typelib.
409
410         * docs/typelib-format.txt: Document that a field offset of 0xFFFF
411         means "unknown". Also fix description of the discriminator_offset
412         field for unions.
413
414 2008-11-10  Owen Taylor <otaylor@redhat.com>
415
416         Bug 560250 - Fully parse included modules
417
418         For some things, like computing structure offsets to put into the typelib
419         we need more than just the aliases from included modules. Do a completel
420         parse of included modules and store in module->included_modules.
421
422         Also add g_ir_find_node() to find node information from within the
423         active set of modules and their includes.
424
425 2008-11-10  Owen Taylor <otaylor@redhat.com>
426
427         Split g_ir_ffi_get_ffi_type() out from ginvoke.c
428
429         Extract a function to convert GITypeTag to ffi_type from the internals
430         of ginvoke.c. This will be useful in figure out structure alignment.
431
432         Also fix handling of gsize and time_t to be portable. (Add a check
433         to configure.ac to figure out the width of time_t.)
434
435 2008-11-10  Owen Taylor <otaylor@redhat.com>
436
437         Bug 560248 – "disguised structures"
438
439         Certain types like GIConv and GdkAtom are pointers internally but don't
440         look like pointers when referenced. They have the form.
441
442           typedef struct _X *X;
443
444         Parse these as structures/records but mark them in the gir with a 'disguised'
445         attribute so that we know that they need special handling.
446
447         In the typelib treat them like any other structure.
448
449 2008-11-09  Jürg Billeter  <j@bitron.ch>
450
451         * giscanner/ast.py:
452         * giscanner/girwriter.py:
453
454         Write throws attribute for virtual functions, fixes bug 559703
455
456 2008-11-07  Johan Dahlin  <jdahlin@async.com.br>
457
458         * giscanner/libtoolimporter.py (LibtoolImporter.find_module): Clear
459         up some confusion about the second argument to find_module, it's
460         actually the packages __path__ attribute which we can safely ignore
461         for our purposes.
462         (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
463
464 2008-11-07  Owen Taylor  <otaylor@redhat.com>
465
466         Bug 559737 – Deal with continuations in macros
467
468         * giscanner/giscannerlexer.l: Treat continuation lines the same
469         as regular newlines. This makes the scanner not complain about
470         #define foo(x) \ <stuff> inside a C file. There's no attempt
471         however to handle parsing macro definitions split across lines.
472
473 2008-11-07  Johan Dahlin  <jdahlin@async.com.br>
474
475         * giscanner/cachestore.py:
476         Handle broken cache entries, write only filesystems and
477         running out of diskspace.
478
479 2008-11-07  Owen Taylor  <otaylor@redhat.com>
480
481         * giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
482         Set current_filename before lexing the file so error messages
483         are reported in the right file.
484
485 2008-11-06  Colin Walters  <walters@verbum.org>
486
487         * tests/everything/*: Add some tests for strv.
488
489 2008-11-05  Colin Walters  <walters@verbum.org>
490
491         * girepository/ginvoke.c (g_function_info_invoke): Don't use
492         nested scope local variable for error which may go away after
493         conditional is complete.
494
495 2008-11-05  Colin Walters  <walters@verbum.org>
496
497         * giscanner/scannerlexer.l: Avoid static 256 char buf which we
498         manipulate hackily; just use GString.  This avoids an
499         uninitialized memory read pointed out by Havoc.
500
501 2008-11-04  Johan Dahlin  <jdahlin@async.com.br>
502
503         * giscanner/__init__.py:
504         * giscanner/ast.py:
505         * giscanner/cachestore.py:
506         * giscanner/cgobject.py:
507         * giscanner/girparser.py:
508         * giscanner/girwriter.py:
509         * giscanner/giscannermodule.c:
510         * giscanner/glibast.py:
511         * giscanner/glibtransformer.py:
512         * giscanner/libtoolimporter.py:
513         * giscanner/minixpath.py:
514         * giscanner/odict.py:
515         * giscanner/sourcescanner.c:
516         * giscanner/sourcescanner.h:
517         * giscanner/sourcescanner.py:
518         * giscanner/transformer.py:
519         * giscanner/utils.py:
520         * giscanner/xmlwriter.py:
521         * COPYING:
522         Relicense the giscanner library under LGPLv2+.
523         This has been approved by all contributors.
524
525 2008-11-01  Owen Taylor  <otaylor@redhat.com>
526
527         Bug 558848 giparser.py: shared library should be optional
528
529         When parsing a .gir, allow the shared-library attribute
530         of <namespace/> to be missing: this corresponds to the handling
531         in libgirepository and elsewhere.
532
533 2008-11-01  Tommi Komulainen  <tommi.komulainen@iki.fi>
534
535         Bug 557898 – Fails to build on OSX 10.4
536
537         * configure.ac: Check for $shrext_cmds that should be implicitly
538         available if you're using libtool >= 2.0. If undefined, call
539         libtool --config explicitly to get its value.
540         * girepository/gtypelib.c: Remove special case for (non-)Darwin
541         systems as unneeded.
542
543 2008-10-31  Colin Walters  <walters@verbum.org>
544
545         * COPYING, COPYING.lib, COPYING.tools: Clarify licensing status.
546
547 2008-10-31  Johan Dahlin  <jdahlin@async.com.br>
548
549         * configure.ac: Post release version bump
550
551 === 0.6.0 ===
552 2008-10-31  Johan Dahlin  <jdahlin@async.com.br>
553
554         * NEWS:
555         * configure.ac:
556         * docs/release-checklist.txt:
557         0.6.0
558
559 2008-10-31  Johan Dahlin  <jdahlin@async.com.br>
560
561         * Makefile.am: add an upload-release target
562         * docs/release-checklist.txt:
563         Release process documentation
564
565 2008-10-31  Colin Walters  <walters@verbum.org>
566
567         Bug 558109 – _g_typelib_init fails to find shared libraries
568
569         * transformer/glibtransformer.py: Use ctypes' find_library
570         on passed libraries and write that for the shared-library
571         entry.  We want to avoid depending on -devel packages.
572
573 2008-10-31  Johan Dahlin  <jdahlin@async.com.br>
574
575         * docs/g-ir-scanner.1:
576         Document the renaming options.
577
578 2008-10-31  Tommi Komulainen  <tommi.komulainen@iki.fi>
579
580         * giscanner/Makefile.am:
581         * tests/invoke/Makefile.am:
582         * tests/repository/Makefile.am: List in-tree libraries first in
583         LDADD / LIBADD. If installed library is listed first, the
584         resulting binary will prefer installed version to one in .libs,
585         possibly making 'make check' behave strangely.
586
587 2008-10-30  Tommi Komulainen  <tommi.komulainen@iki.fi>
588
589         * giscanner/ast.py: map 'id' (ObjC) to 'any' type to stop
590         gir-repository from choking with gdk/quartz
591
592 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
593
594         * giscanner/giscannermodule.c (calc_attrs_length),
595         (pygi_collect_attributes):
596         * giscanner/xmlwriter.py:
597         Write a C version of the xml namespace formatter.
598         Saves 15% of the time it takes to create a gtk gir.
599
600 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
601
602         * giscanner/xmlwriter.py: Abstract attribute formatting
603         to a function external to the XMLWriter class.
604
605         * giscanner/scannerlexer.l:
606         Parse and discard __typeof and __attribute.
607
608 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
609
610         * giscanner/girparser.py:
611         Remove arguments from the constructor, move them to
612         separate accessors. Add a new parse_tree method
613         which takes an element tree instance.
614         * tools/g-ir-scanner:
615         Update callsite for this
616
617         * giscanner/Makefile.am:
618         * giscanner/cachestore.py:
619         * giscanner/transformer.py:
620         Cache the include parsing. Saves ~25% time when
621         creating vte (which includes everything up to gtk+).
622
623 2008-10-30  Colin Walters  <walters@verbum.org>
624
625         * giscanner/transformer.py: Don't reparse includes
626         we've already processed.
627
628 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
629
630         * giscanner/girparser.py:
631         * giscanner/transformer.py:
632         Avoid parsing parameters, types etc when parsing
633         includes. Should speed up include parsing a bit.
634
635 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
636
637         * giscanner/girparser.py:
638         Avoid big if/else and use a dispatch table like
639         approach.
640
641 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
642
643         * giscanner/transformer.py:
644         Clean up include parsing and registration.
645
646 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
647
648         * giscanner/transformer.py:
649         Clean up imports
650
651 2008-10-30  Johan Dahlin  <jdahlin@async.com.br>
652
653         Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
654
655         * gir/Makefile.am:
656         construct PYTHONPATH just once
657
658         * tests/everything/Makefile.am:
659         * tests/scanner/Makefile.am:
660         add $(top_srcdir) to PYTHONPATH to
661         handle builddir != srcdir
662
663         * giscanner/libtoolimporter.py:
664         * giscanner/sourcescanner.py:
665         Make the libtoolimporter work when distchecking too.
666
667         Mostly based on patch by Tommi Komulainen
668
669 2008-10-29  Owen Taylor  <otaylor@redhat.com>
670
671         * giscanner/glibtransformer.py: If a filename of an existing
672         file is passed to --library, hunt for it directly, rather than
673         searching for a corresponding library.
674
675 2008-10-29  Johan Dahlin  <jdahlin@async.com.br>
676
677         * giscanner/libtoolimporter.py:
678         * giscanner/sourcescanner.py:
679         Clean up the libtool importer a bit. Add a context so we
680         can use it through a with statement.
681         Don't just look in the current directory, look in the whole
682         sys.path.
683
684 2008-10-29  Tommi Komulainen  <tommi.komulainen@iki.fi>
685
686         Bug 558065 – gitesttypes should be installed
687
688         * configure.ac:
689         * tests/Makefile.am:
690         * tests/types/Makefile.am   -> tests/everything/Makefile.am
691         * tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
692         * tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
693         move tests/types to tests/everything
694
695         * tests/everything/Makefile.am: build normal shared library
696         libgirepository-everything.so.1.0.0 and corresponding typelib
697         Everything-1.0.typelib
698
699         * tests/everything/Makefile.am: explicitly link libtool
700         versioning with typelib versioning with variables
701
702 2008-10-28  Johan Bilien  <jobi@via.ecp.fr>
703
704         * tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
705
706 2008-10-27  Johan Bilien  <jobi@via.ecp.fr>
707
708         * gio/gio-2.0.c: add allow-none annotations, based on the pygobject
709         .defs file
710
711 2008-10-27  Johan Bilien  <jobi@via.ecp.fr>
712
713         Bug 558068 – when invoking a method, offset the in arguments by one,
714         not the out
715
716         * tests/invoke/invoke.c, tests/invoke/testfns.c,
717         tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
718         * girepository/ginvoke.c: do not offset the index of given out
719         arguments by one for methods, "this" is provided as in argument only.
720
721 2008-10-27  Johan Bilien  <jobi@via.ecp.fr>
722
723         * gir/gio-2.0.c: add annotation for g_file_delete
724
725 2008-10-27  Tommi Komulainen  <tommi.komulainen@iki.fi>
726
727         Bug 558062 – provide and use paths in the .pc file
728
729         * gobject-introspection-1.0.pc.in: provide typelibdir variable
730         for where .typelibs should be installed (callers shouldn't need
731         to construct paths from bits and pieces)
732
733 2008-10-25  Andreas Rottmann  <a.rottmann@gmx.at>
734
735         Bug 557791 – g_irepository_require() could return a GTypelib *
736
737         * girepository/girepository.c: Return GTypelib; this is useful
738         for low level manipulation.
739
740 2008-10-25  Colin Walters  <walters@verbum.org>
741
742         Bug 557788 – Return types for constructors in generated typelib bogus
743
744         * giscanner/glibtransformer.py: Don't resolve ctors incrementally,
745         rely on end pass resolution.
746
747 2008-10-25  Andreas Rottmann  <a.rottmann@gmx.at>
748
749         Bug 557786 - support fixed size arrays
750
751         * girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
752         * giscanner/scannerparser.y: Retain fixed array size.
753         * giscanner/ast.py: Add to note.
754         * giscanner/girwriter.py: Write to gir.
755         * girepository/girnode.c: Write it to typelib.
756         * tools/generate.c: Generate.
757         * tests/*: Add tests.
758
759 2008-10-25  Colin Walters  <walters@verbum.org>
760
761         Bug 557076 - move typelibs to $libdir
762
763         * configure.ac: Steal some configury bits from dbus to expand
764         libdir.
765         * gir/Makefile.am: Move to libdir.
766         * girepository/girepository.c: Stop searching XDG_DATA_DIRS;
767         instead just look at one hardcoded path in libdir.
768         * acinclude.m4: Bits from dbus.
769
770 2008-10-24  Johan Dahlin  <johan@gnome.org>
771
772         * girepository/girnode.c (g_ir_node_check_unhandled_members):
773         Be quiet, do not warn about unhandled members.
774
775 2008-10-24  Johan Dahlin  <johan@gnome.org>
776
777         * girepository/gtypelib.c:
778         Only use SHLIB_SUFFIX on darwin, otherwise use
779         G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
780
781 2008-10-24  Lucas Rocha  <lucasr@gnome.org>
782
783         Bug 557623 - Constructors shouldn't be flagged as methods.
784
785         * girepository/ginfo.c (g_function_info_get_flags): ditto.
786
787 2008-10-24  Johan Dahlin  <johan@gnome.org>
788
789         * giscanner/scannerparser.y:
790         Check against division by zero for the modula operator.
791         This fixes header parsing of OSX system headers included
792         by libsoup.
793
794 2008-10-24  Johan Dahlin  <johan@gnome.org>
795
796         * CONTRIBUTORS:
797         * Makefile.am:
798         Add a CONTRIBUTORS file and dist it.
799
800 2008-10-23  Tommi Komulainen  <tommi.komulainen@iki.fi>
801
802         Bug 556739 – transfer-ownership attribute should be mandatory in .gir
803
804         * girepository/girparser.c (parse_param_transfer):
805         * giscanner/transformer.py (_create_parameter, _create_return):
806         * giscanner/girwriter.py (_write_return, _write_parameter):
807         * tools/generate.c (write_callable_info): always write and
808         require "transfer-ownership" for return-values and parameters
809
810         * tests/boxed.gir:
811         * tests/invoke/testfns-1.0.gir:
812         * tests/object.gir:
813         * tests/scanner/DrawableAdditions.xml:
814         * tests/scanner/GtkFrob-1.0-expected.tgir:
815         * tests/scanner/annotation-1.0-expected.tgir:
816         * tests/scanner/drawable-1.0-expected.tgir:
817         * tests/scanner/drawable-injected-1.0-expected.gir:
818         * tests/scanner/drawable-injected-1.0-expected.tgir:
819         * tests/scanner/foo-1.0-expected.tgir: Updated
820
821 2008-10-23  Tommi Komulainen  <tommi.komulainen@iki.fi>
822
823         * giscanner/cgobject.py: build fundamental types same way as glib
824
825         * giscanner/glibtransformer.py (_type_from_gtype): record GType
826         when constructing the Type from it
827
828         * giscanner/glibtransformer.py (_adjust_transfer): Check whether
829         the parameter is a GObject from its GType, if available.
830
831         * giscanner/glibtransformer.py (_adjust_transfer):
832         * tests/scanner/foo-1.0-expected.gir:
833         * tests/scanner/foo-1.0-expected.tgir: deduce
834         transfer-ownership from GTypes
835
836 2008-10-23  Tommi Komulainen  <tommi.komulainen@iki.fi>
837
838         * giscanner/transformer.py (_create_parameter):
839         * tests/scanner/foo-1.0-expected.gir: make varargs
840         transfer-ownership="none"
841
842 2008-10-23  Colin Walters  <walters@verbum.org>
843
844         Bug 556739 - transfer ownership
845
846         * giscanner/ast.py: Refactor Parameter/Return to share
847         common attributes.  Add transfer_inferred attribute
848         which says whether or not we made a guess.
849         * giscanner/transformer.py: Add much more extensive
850         heuristics around parameter and return transfer.
851         * giscanner/glibtransformer.py: Adjust to inspect
852         transfer_inferred.
853         * tests/*: Adjust.
854
855 2008-10-22  Tommi Komulainen  <tommi.komulainen@iki.fi>
856
857         Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
858
859         * tests/scanner/Makefile.am:
860         * tests/scanner/annotation-1.0-expected.tgir:
861         * tests/scanner/drawable-1.0-expected.tgir:
862         * tests/scanner/drawable-injected-1.0-expected.tgir:
863         * tests/scanner/foo-1.0-expected.tgir:
864         * tests/scanner/GtkFrob-1.0-expected.tgir:
865         * tests/scanner/utility-1.0-expected.tgir: Add test to ensure
866         annotations survive the roundtrip via typelib
867
868         The expectations are as currently produced by g-ir-generate,
869         comparison with the .gir files shows there are differences.
870
871 2008-10-23  Johan Bilien  <jobi@via.ecp.fr>
872
873         Bug 557468 – Support for GI_TYPELIB_PATH
874
875         * girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
876         provided paths to the global search path.
877
878 2008-10-22  Tommi Komulainen  <tommi.komulainen@iki.fi>
879
880         Bug 557379 – g-ir-generate not writing the 'abstract' attribute
881
882         * tests/scanner/drawable-1.0-expected.tgir:
883         * tests/scanner/drawable-injected-1.0-expected.tgir:
884         * tests/scanner/foo-1.0-expected.tgir:
885         * tools/generate.c (write_object_info): write 'abstract'
886         attribute for classes
887
888 2008-10-22  Lucas Rocha  <lucasr@gnome.org>
889
890         * girepository/girmodule.c, girepository/gtypelib.c,
891         girepository/girparser.[ch]: fix some build warnings.
892
893 2008-10-22  Tommi Komulainen  <tommi.komulainen@iki.fi>
894
895         Bug 557405 – Use 'allow-none' consistently
896
897         * docs/typelib-format.txt:
898         * girepository/ginfo.c (g_arg_info_may_be_null):
899         * girepository/girnode.c (g_ir_node_build_typelib):
900         * girepository/girnode.h (struct _GIrNodeParam):
901         * girepository/girparser.c (start_parameter):
902         * girepository/girwriter.c (function_generate):
903         * girepository/gtypelib.h (ArgBlob):
904         * tests/errors.gir:
905         * tests/function.gir:
906         * tools/generate.c (write_callable_info): Use 'allow-none'
907         consistently throughout
908
909 2008-10-22  Tommi Komulainen  <tommi.komulainen@iki.fi>
910
911         Bug 557092 – Callback annotations not used
912
913         * giscanner/transformer.py (_create_callback): use annotations
914         for callbacks
915         * tests/scanner/annotation.h
916         * tests/scanner/annotation-1.0-expected.gir: add tests
917
918 2008-10-21  Colin Walters  <walters@verbum.org>
919
920         * giscanner/scannerlexer.l: Don't require trailing whitespace after
921         uncommented parameters.
922         * tests/*: Test it.
923
924 2008-10-21  Colin Walters  <walters@verbum.org>
925
926         * girepository/girepository.c: Ensure that when doing an unversioned
927         require, we prefer items earlier in the search path to later ones.
928
929 2008-10-21  Owen Taylor  <otaylor@redhat.com>
930
931         * giscanner/transformer.py: For string parameters allow transfer annotation
932         to override the standard automatic guessing based on 'const'.
933
934 2008-10-21  Johan Bilien  <jobi@via.ecp.fr>
935
936         Bug 557241 – "throws" flag for functions
937
938         * tests/scanner/drawable-1.0-expected.gir,
939         tests/scanner/drawable-injected-1.0-expected.gir,
940         tests/scanner/drawable.[ch]: add simple test for throwing
941         function (has GError ** as last argument)
942
943         * giscanner/ast.py: add a 'throws' flag to Function
944         * giscanner/glibtransformer.py: if a function's last paramerter is
945         a GError, set the 'throws' flag and remove that parameter
946         * giscanner/girwriter.py: write out the 'throws' attribute
947         * giscanner/girparser.py: support parsing the 'throws' attribute
948
949         * tests/repository/gitestthrows.c: add a simple test to check the
950         throws flag in a typelib and invoke the function
951
952         * girepository/ginfo.c, girepository/girnode.[ch],
953         girepository/girnode.h, girepository/girparser.c,
954         girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
955
956         * girepository/ginvoke.c: if a function throws, add a GError as last
957         arguments, and propagate the error to the invoker.
958
959 2008-10-21  Tommi Komulainen  <tommi.komulainen@iki.fi>
960
961         * giscanner/transformer.py (_create_parameters): Warn if we see
962         annotations for unknown parameters. If .h and .c files name
963         parameters differently, the annotations may be lost.
964
965 2008-10-21  Johan Dahlin  <johan@gnome.org>
966
967         Bug 556358 - don't use libtool internals
968
969         * giscanner/Makefile.am:
970         * giscanner/libtoolimporter.py:
971         * giscanner/sourcescanner.py:
972         * giscanner/utils.py:
973         Add a python meta importer and remove a libtool symlink hack.
974
975 2008-10-20  Andreas Rottmann  <a.rottmann@gmx.at>
976
977         * tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
978         and --add-include-path appropriately when invoking the scanner.
979         * tests/types/Makefile.am (%typelib): Likewise.
980
981 2008-10-20  Colin Walters  <walters@verbum.org>
982
983         Bug 556777 - validate properties
984
985         * giscanner/transformer.py: Add option to throw on unknown types.
986         * giscanner/glibtransformer.py: Use it on properties.
987         * tests/*: Add a test.
988
989 2008-10-20  Colin Walters  <walters@verbum.org>
990
991         * giscanner/glibast.py: Also register g variants of
992         default_array_types.  This is not beautiful, but
993         good alternatives aren't easy to come by.
994         This fixes gchar ** parsing.
995
996 2008-10-20  Colin Walters  <walters@verbum.org>
997
998         * docs/typelib-format.txt, girepository/gtypelib.h:
999         Take a bit from ObjectInfo to represent abstract flag.
1000         * giscanner/cgobject.py: Expose g_type_get_flags.
1001         * girepository/girepository.h: Add accessor.
1002         * girepository/ginfo.c: Implement it.
1003         * giscanner/ast.py: Add is_abstract flag to generic
1004         class object.
1005         * giscanner/glibast.py: Use it.
1006         * giscanner/girwriter.py: Write it.
1007         * girepository/girparser.c: Parse it.
1008         * tests/*: Test it.
1009
1010 2008-10-20  Tommi Komulainen  <tommi.komulainen@iki.fi>
1011
1012         * giscanner/girparser.py (_parse_function): don't lose
1013         'transfer-ownership' attributes when injecting, check for the
1014         correct attribute
1015
1016 2008-10-19  Johan Dahlin  <johan@gnome.org>
1017
1018         * giscanner/scannerlexer.l: Parse and ignore __asm.
1019
1020 2008-10-19  Colin Walters  <walters@verbum.org>
1021
1022         * giscanner/girparser.py: Parse array length= to ensure
1023         it doesn't get lost from --inject.
1024
1025 2008-10-17  Colin Walters  <walters@verbum.org>
1026
1027         Bug 556795 - char ** regression
1028
1029         * giscanner/transformer.py: Fix parsing of ctypes, add some
1030         comments about what's going on.
1031         * tests/*: Add a test for char **.
1032
1033 2008-10-17  Colin Walters  <walters@verbum.org>
1034
1035         Bug 556783 - change namespace handling to be more consistent
1036
1037         * giscanner/transformer.py: Eliminate usage of
1038         strip_namespace_object.  We now treat --namespace as the default
1039         --strip-prefix; however, if --strip-prefix is specified it
1040         overrides --namespace.  This applies to everything except function
1041         names, where we do also strip the namespace.
1042         * giscanner/glibtransformer.py: Remove usage of
1043         strip_namespace_object.
1044         * tests/*: Update.
1045         * tests/*: Add skeletal GtkFrob-1.0 test which has different
1046         --namespace and --strip-prefix.
1047
1048 2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>
1049
1050         Bug 556732 – generate gir files consistently
1051
1052         * girepository/girparser.c (start_parameter):
1053         * tests/boxed.gir:
1054         * tests/invoke/testfns-1.0.gir:
1055         * tools/generate.c (write_callable_info): write
1056         'transfer-ownership' attribute consistently with both
1057         return-value and parameter elements
1058
1059 2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>
1060
1061         Bug 556732 – generate gir files consistently
1062
1063         * tools/generate.c (write_callable_info): write 'direction'
1064         attribute only if other than 'in' to be consistent with
1065         girwriter.py
1066         * tests/boxed.gir:
1067         * tests/object.gir: remove direction="in" which is the default
1068
1069 2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>
1070
1071         Bug 556732 – generate gir files consistently
1072
1073         * giscanner/ast.py (Field): add readable and writable properties
1074         * giscanner/girparser.py (_parse_field): copy 'readable' and
1075         'writable' attributes
1076         * giscanner/transformer.py (_create_member): create fields as
1077         read-write
1078         * giscanner/glibtransformer.py (_introspect_object,
1079         _pair_class_struct): make object instance and class fields
1080         read-only
1081         * giscanner/girwriter.py (_write_field):
1082         * tools/generate.c (write_field_info): write field 'readable'
1083         and 'writable' attributes only if non-default (read-only)
1084         * girepository/girparser.c (start_field): in the absence of
1085         attributes assume fields are read-only
1086         * tests/boxed.gir:
1087         * tests/struct.gir: remove redundant readable="1" from fields
1088         * tests/scanner/foo-1.0-expected.gir:
1089         * tests/scanner/utility-1.0-expected.gir: add writable="1" to
1090         all record and union fields
1091
1092 2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>
1093
1094         Bug 556732 – generate gir files consistently
1095
1096         * giscanner/girwriter.py (_write_property): write properties
1097         'construct' attribute if set
1098         * tools/generate.c (write_property_info): write properties
1099         'readable' and 'writable' attributes only if non-default
1100         * tests/object.gir: add writable="0"
1101         * tests/scanner/foo-1.0-expected.gir: add construct="1"
1102
1103 2008-10-17  Johan Bilien  <jobi@via.ecp.fr>
1104
1105         * gir/glib-2.0.c: added annotations
1106
1107 2008-10-16  Johan Bilien  <jobi@via.ecp.fr>
1108
1109         * giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
1110         arguments
1111
1112 2008-10-16  Johan Bilien  <jobi@via.ecp.fr>
1113
1114         Bug 556610 – giscanner/girparser.py drops parameter options
1115
1116         * tests/scanner/drawable-injected-1.0-expected.gir,
1117         tests/scanner/DrawableAdditions.xml: added simple test for injection.
1118         * giscanner/ast.py: allow Parameter to take options in the constructor
1119         * giscanner/girparser.py: parse parameter options (transfer,
1120         direction, allow-none)
1121
1122 2008-10-16  Colin Walters  <walters@verbum.org>
1123
1124         Bug 556185 - segfault on g_callable_info_get_return_type
1125
1126         Initial patch from John Ehresman.
1127
1128         * tests/repository/*: Add a test using
1129         g_callable_info_get_return_type.  Instead of casting a
1130         GITypeInfo directly to a GIRegisteredTypeInfo, we need
1131         to call g_type_info_get_interface.
1132
1133 2008-10-16  Colin Walters  <walters@verbum.org>
1134
1135         Bug 556579 - union and struct name misresolved
1136
1137         * giscanner/transformer.py: The calls to _resolve_type_name
1138         for struct/union names was a legacy holdover from when type
1139         resolution had multiple phases.  Now it's actively harmful
1140         since we might pull in an identical name from another
1141         namespace.
1142         * tests/*: Update.
1143
1144 2008-10-16  Colin Walters  <walters@verbum.org>
1145
1146         Bug 556432 - transfer annotations and defaults
1147
1148         * giscanner/transformer.py: Canonicalize type
1149         after removing *, not before.  This ensures that
1150         guchar* is transformed to 'uint8'.
1151         Add some comments here.
1152         * giscanner/glibtransformer.py: Add _adjust_transfer
1153         phase for tweaking GObject transfers.
1154         * tests/*: test it.
1155
1156 2008-10-16  Tommi Komulainen  <tommi.komulainen@iki.fi>
1157
1158         * configure.ac: enable bunch of gcc warning CFLAGS
1159
1160 2008-10-16  Tommi Komulainen  <tommi.komulainen@iki.fi>
1161
1162         Bug 556543 – reduce compiler warnings
1163
1164         * girepository/ginfo.c:
1165         * girepository/girepository.c (register_internal,
1166         count_interfaces, find_interface, find_namespace_version,
1167         parse_version, g_irepository_require):
1168         * girepository/girmodule.c (g_ir_module_build_typelib):
1169         * girepository/girnode.c (init_stats, dump_stats,
1170         _g_irnode_init_stats, _g_irnode_dump_stats,
1171         g_ir_node_can_have_member):
1172         * girepository/girparser.c (firstpass_end_element_handler,
1173         locate_gir, parse_basic, parse_type_internal, resolve_aliases,
1174         start_alias, start_type, end_type_top, parse_include, cleanup,
1175         post_filter):
1176         * girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
1177         * giscanner/giscannermodule.c (directive_get_options,
1178         type_get_child_list):
1179         * giscanner/scannerlexer.l (parse_gtkdoc):
1180         * giscanner/scannerparser.y (ctype_free):
1181         * giscanner/sourcescanner.c:
1182         * giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
1183         * tests/types/gitesttypes.c:
1184         * tools/compiler.c (main):
1185         * tools/generate.c (write_repository): Remove unused variables
1186         and code, add missing includes, declarations and case
1187         statements.
1188
1189 2008-10-16  Tommi Komulainen  <tommi.komulainen@iki.fi>
1190
1191         Bug 556541 – access union members through UnionBlob rather than
1192         StructBlob
1193
1194         * girepository/ginfo.c (g_union_info_find_method): access union
1195         members through UnionBlob rather than StructBlob
1196
1197 2008-10-15  Colin Walters  <walters@verbum.org>
1198
1199         Bug 556331 - clean up includes handling
1200
1201         * tools/g-ir-scanner: Rework command line arguments; now we take
1202         --add-include-path and --include separately.
1203         * giscanner/girwriter.py: Separate name= and version= in include
1204         directives.
1205         * giscanner/ast.py: Add Include type.
1206         * giscanner/transformer.py: Cleanups to register_include now that
1207         we don't need to handle mixed filenames and relative arguments.
1208         * girepository/girparser.c: Parse name and version separately;
1209         this fixes a bug as a side effect where we weren't resolving
1210         through aliases for basic types.
1211         * girepository/girepository.c: Fix format string args.
1212         * gir/Makefile.am: Update.
1213         * tests/*: Update.
1214
1215 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1216
1217         Bug 556434 – unhandled interface/object/... member types
1218
1219         * girepository/girnode.c (g_ir_node_check_unhandled_members,
1220         g_ir_node_build_typelib): Check all
1221         interface/object/boxed/struct/union members are processed and
1222         abort if they are not. (Mostly callbacks in structs, but also
1223         fields in interfaces.)
1224
1225 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1226
1227         * a/girepository/girnode.c (g_ir_node_build_members,
1228         g_ir_node_build_typelib): refactor common code for processing
1229         members to a function
1230
1231 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1232
1233         * gir/Makefile.am (check-local): check that typelib -> gir -> typelib
1234         transformation is lossless (it's not)
1235
1236 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1237
1238         * tests/Makefile.am: fix tests to compare xml to xml instead of
1239         typelib to xml, and stop on error
1240
1241 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1242
1243         * tools/generate.c (write_type_name, write_type_info,
1244         write_type_info, write_object_info, write_object_info,
1245         write_interface_info, write_error_domain_info): reduce code
1246         duplication
1247
1248 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1249
1250         Bug 556174 – parse types for lists etc.
1251
1252         * girepository/girparser.c (end_type_recurse):
1253         * tests/boxed.gir:
1254         * tools/generate.c (write_type_info, write_field_info,
1255         write_callable_info, write_callable_info, write_constant_info,
1256         write_property_info): use nested <type>s for lists and hashes
1257
1258 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1259
1260         * tests/enum.gir:
1261         * tests/object.gir: remove trailing whitespace from inside
1262         elements to match g-ir-generate output
1263
1264 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1265
1266         * tools/generate.c (xml_printf): quote printf arguments so that
1267         we don't generate invalid XML by writing unescaped double quotes
1268         and such in attributes
1269
1270 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1271
1272         * tools/generate.c (write_field_info, write_callable_info,
1273         write_function_info, write_callback_info, write_struct_info,
1274         write_constant_value, write_signal_info, write_vfunc_info,
1275         write_object_info, write_interface_info, write_union_info,
1276         write_repository): remove unused indent parameters, xmlwriter
1277         keeps track of necessary indentation
1278
1279 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1280
1281         * tools/generate.c (xml_element_new, xml_element_free,
1282         xml_start_element, xml_end_element, xml_end_element_unchecked,
1283         xml_open, xml_close): Keep track of generated XML tree and
1284         handle indentation and closing tags properly.
1285         (write_field_info, write_callable_info, write_function_info,
1286         write_callback_info, write_struct_info, write_value_info,
1287         write_constant_info, write_enum_info, write_signal_info,
1288         write_vfunc_info, write_property_info, write_object_info,
1289         write_interface_info, write_error_domain_info, write_union_info,
1290         write_repository): Use xml_start_element and xml_end_element to
1291         open/close tags.
1292
1293 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1294
1295         * tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
1296         (write_type_name, write_type_info, write_field_info,
1297         write_callable_info, write_function_info, write_callback_info,
1298         write_struct_info, write_value_info, write_constant_value,
1299         write_constant_info, write_enum_info, write_signal_info,
1300         write_vfunc_info, write_property_info, write_object_info,
1301         write_interface_info, write_error_domain_info, write_union_info,
1302         write_repository): wrap all FILE access to go through simple xmlwriter
1303
1304 2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>
1305
1306         Bug 556400 – Fails to build on OS X 10.4
1307
1308         * configure.ac: check for functions backtrace and backtrace_symbols
1309         * girepository/girparser.c (backtrace_stderr): Comment out
1310         implementation if the functions are not available.
1311         * gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
1312         directory for better portability
1313
1314 2008-10-15  Johan Bilien  <jobi@via.ecp.fr>
1315
1316         Bug 556433 – assume direction = out for int * parameters
1317
1318         * giscanner/ast.py: define a list of types for which, if passed as
1319         reference, we assume a default direction of 'out'
1320         * giscanner/transformer.py: if a type has type pointer to one of the
1321         previously defined types, and no direction is set, assume out.
1322         * tests/scanner/drawable.[ch]: added tests for guessed direction=out
1323
1324 2008-10-15  Johan Bilien  <jobi@via.ecp.fr>
1325
1326         * tests/scanner/annotation.c: fixed a few copy-paste errors
1327
1328 2008-10-14  Johan Bilien  <jobi@via.ecp.fr>
1329
1330         Bug 556323 – transfer-ownership is wrong for functions returning const
1331         char *
1332
1333         * giscanner/transformer.py: check for a const string as return value,
1334         not just const char*. Suggested by Colin Walters
1335         * tests/scanner/annotation-1.0-expected.gir: updated expected output
1336
1337 2008-10-14  Johan Bilien  <jobi@via.ecp.fr>
1338
1339         * girepository/ginfo.c, girepository/girepository.h: add
1340         g_union_info_find_method
1341
1342 2008-10-14  Colin Walters  <walters@verbum.org>
1343
1344         * tests/repository/Makefile.am: Reenable repo test.
1345         * tests/repository/gitestrepo.c: Prepend search
1346         path for $(top_builddir)/gir dir so that we don't
1347         require installation for "make check" to pass.
1348
1349 2008-10-13  Jürg Billeter  <j@bitron.ch>
1350
1351         * giscanner/glibtransformer.py:
1352         * tests/scanner/annotation-1.0-expected.gir:
1353         * tests/scanner/drawable-1.0-expected.gir:
1354         * tests/scanner/foo-1.0-expected.gir:
1355         * tests/scanner/utility-1.0-expected.gir:
1356
1357         Support fields in GObject structs
1358
1359 2008-10-13  Jürg Billeter  <j@bitron.ch>
1360
1361         * giscanner/ast.py: add signed integer and off_t to type_names
1362
1363 2008-10-12  Jürg Billeter  <j@bitron.ch>
1364
1365         * giscanner/girparser.py: Parse bits attribute of fields
1366
1367 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1368
1369         * tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
1370         * tests/repository/gitestrepo.c (main): instantiate
1371         'GCancellable' to ensure the GType is registered before using
1372         g_type_from_name()
1373
1374 2008-10-12  Johan Bilien  <jobi@via.ecp.fr>
1375
1376         * giscanner/girparser.py: actually add the parsed constant nodes
1377
1378 2008-10-12  Colin Walters  <walters@verbum.org>
1379
1380         * girepository/girepository.c: Don't cast DirEntry to Blob,
1381         actually look it up by offset.
1382
1383 2008-10-12  Johan Bilien  <jobi@via.ecp.fr>
1384
1385         * giscanner/girparser.py: parse constant nodes in gir files
1386
1387 2008-10-12  Johan Bilien  <jobi@via.ecp.fr>
1388
1389         * giscanner/transformer.py: prefix for constants have an underscore,
1390         so remove them as if they were functions, not objects.
1391
1392 2008-10-12  Johan Bilien  <jobi@via.ecp.fr>
1393
1394         * tests/scanner/foo-1.0-expected.gir: add constants to expected gir
1395         file
1396
1397 2008-10-12  Colin Walters  <walters@verbum.org>
1398
1399         Initial patch from Jani Monoses.
1400
1401         * girepository/gtypelib.c: Fix inverted test for success
1402         in version parsing.
1403
1404 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1405
1406         * tools/generate.c (write_callable_info): use "transfer-ownership"
1407         attribute for return values
1408
1409 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1410
1411         * tools/generate.c (write_callable_info): move "transfer" and
1412         "null-ok" attributes from <function> to <return-value> element
1413
1414 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1415
1416         * girepository/girparser.c (start_return_value): handle
1417         "transfer-ownership" attribute
1418
1419 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1420
1421         * girepository/girparser.c (parse_param_transfer):
1422         * tools/generate.c (write_callable_info): use "container" for
1423         container/shallow ownership transfer (not "shallow")
1424
1425 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1426
1427         * girepository/girparser.c (parse_param_transfer,
1428         start_parameter): Refactor handling of transfer=none/shallow/full
1429         to separate function
1430
1431 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1432
1433         Bug 556048 – Crash in g_irepository_find_by_gtype
1434
1435         * girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
1436         * girepository/girepository.c (find_interface): Fix
1437         find_by_gtype case to get the type name from right offset
1438
1439 2008-10-12  Jürg Billeter  <j@bitron.ch>
1440
1441         * giscanner/girparser.py: Fix parsing transfer-ownership attribute
1442         of <return-value>
1443
1444 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1445
1446         * girepository/gtypelib.h (RegisteredTypeBlob): make
1447         'unregistered' one bit wide as everywhere else
1448
1449 2008-10-12  Jürg Billeter  <j@bitron.ch>
1450
1451         * giscanner/glibtransformer.py:
1452         * tests/scanner/annotation-1.0-expected.gir:
1453         * tests/scanner/drawable-1.0-expected.gir:
1454         * tests/scanner/drawable.h:
1455         * tests/scanner/foo-1.0-expected.gir:
1456         * tests/scanner/utility-1.0-expected.gir:
1457
1458         Readd class records as workaround to not break Gtk typelib
1459
1460 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
1461
1462         * tests/types/Makefile.am: fix typo in gitesttypes namespace
1463
1464 2008-10-12  Jürg Billeter  <j@bitron.ch>
1465
1466         * giscanner/glibtransformer.py: Don't generate <record> elements
1467         for class structs.
1468         * tests/scanner/*: Update test cases
1469
1470 2008-10-11  Colin Walters  <walters@verbum.org>
1471
1472         Bug 552858: versioning
1473
1474         This is a big patch.  You should probably remove your installation
1475         tree to be cleaner.
1476
1477         * docs/typelib-format.txt: Add nsversion entry which holds
1478         version of namespace.
1479         * girepository/girepository.h: Add 'version' parameter to
1480         g_irepository_require.  This may be NULL.  Normally
1481         bindings should pass an explicit version though.
1482         * girepository/girepository.c: Lots of infrastructure to
1483         support versioning.  Add some more documentation.  Disallow
1484         some usage of NULL namespaces.
1485         * girepository/girmodule.c: Add version parameter.
1486         * girepository/gtypelib.c: Update header size.
1487         * giscanner/ast.py: Add version to Namespace.
1488         * giscanner/girparser.py: Parse version attribute from
1489         XML, pass to Namespace.
1490         * giscanner/girwriter.py: Write out version parameter.
1491         * giscanner/transformer.py: Clean up include registration.
1492         * tests/*: Add version attribute.
1493         * tests/invoke/invoke.c: Don't try looking up test before
1494         it's loaded in repository.
1495         * tools/generate.c: Output version parameter.
1496         * gir/Makefile.am: Add 2.0 version to .gir files.
1497
1498 2008-10-11  Colin Walters  <walters@verbum.org>
1499
1500         * giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
1501         if we have mismatched parens.
1502
1503 2008-10-11  Lucas Rocha  <lucasr@gnome.org>
1504
1505         * giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
1506         on 'members' variable.
1507
1508 2008-10-11  Colin Walters  <walters@verbum.org>
1509
1510         Bug 555947 - update annotations syntax
1511
1512         * giscanner/ast.py: Default to None for transfer.  Remove
1513         default transfers for container types; we require this to
1514         be specified now.
1515         * giscanner/girwriter.py: Transfer is now 'none', 'container',
1516         'full' to match repository.
1517         * giscanner/scannerlexer.l: Annotations now are parenthesized.
1518         * giscanner/transformer.py: Update for new annotations syntax.
1519         * tests/*: Update.
1520
1521 2008-10-11  Johan Bilien  <jobi@litl.com>
1522
1523         * giscanner/scannerparser.y: ignore non-UTF-8 string constants
1524
1525 2008-10-11  Johan Bilien  <jobi@litl.com>
1526
1527         Bug 552347: Parse #defines constants
1528
1529         * girepository/gtypelib.c: update the list of value_size
1530         with recently defined type tags
1531         * giscanner/scannerparser.y: brought back parsing of #defined, as
1532         present in older version
1533         * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
1534         * giscanner/girwriter.py: write out constant tags in the gir
1535         * giscanner/sourcescanner.py: add accessor for const_string
1536         * giscanner/transformer.py, giscanner/glibtransformer.py: handle
1537         constant
1538
1539 2008-10-11  Tommi Komulainen  <tommi.komulainen@iki.fi>
1540
1541         Bug 555946: Install a test module exercising all types, transfer
1542         rules, etc.
1543
1544         * configure.ac
1545         * tests/Makefile.am
1546         * tests/types/*: Add and install a test module that has functions
1547         accepting and returning most of the basic types to enable bindings
1548         implementors to more easily test their type conversion routines.
1549
1550 2008-10-11  Jürg Billeter  <j@bitron.ch>
1551
1552         Bug 552374: Const strings should be identified in the gir.
1553
1554         * giscanner/transformer.py: support string memory management
1555         * tests/scanner/foo.h: use char * and const char *
1556         * tests/scanner/foo-expected.gir: test that
1557
1558 2008-10-11  Johan Dahlin  <johan@gnome.org>
1559
1560         * giscanner/girparser.py:
1561         Also parse enums which are not glib types.
1562
1563 2008-10-11  Lucas Rocha  <lucasr@gnome.org>
1564
1565         Bug 552370: add one more test for unsigned as a type, not as
1566         a type qualifier.
1567
1568         * giscanner/ast.py: add 'uint' type name for 'unsigned'.
1569         * test/scanner/foo.h: add function which uses unsigned as a type.
1570         * test/scanner/foo-expected.gir: test that.
1571
1572 2008-10-11  Andreas Rottmann  <a.rottmann@gmx.at>
1573
1574         Bug 555712: Struct and union issues
1575
1576         * giscanner/scannerparser.y (struct_declarator): Use information
1577         provided about the bit width of a field.
1578         * giscanner/transformer.py (Transformer._create_member): Pass the
1579         symbol's const_int member to the created field (it represents the
1580         bit width).
1581         * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
1582         field attribute, if present.
1583         * giscanner/ast.py (Field): Add 'bits' member, specifying the
1584         width in bits of the field (only relevant for bitfields).
1585         * tests/*: Updated.
1586
1587         * giscanner/transformer.py (Transformer._create_typedef_struct)
1588         (Transformer._create_typedef_union): Add calls to _create_struct()
1589         and _create_union(), respectively. This causes the scanner to
1590         generate output for fields of struct and union typedefs.
1591         * tests/*: Updated.
1592
1593 2008-10-11  Jürg Billeter  <j@bitron.ch>
1594
1595         Bug 552370: unsigned not scanned properly
1596
1597         * giscanner/scannerparser.y: combine basic types such as unsigned
1598         int and long long when scanning
1599         * tests/scanner/foo-expected.gir:
1600         * tests/scanner/foo.c: (foo_test_unsigned):
1601         * tests/scanner/foo.h: test that
1602
1603 2008-10-11  Lucas Rocha  <lucasr@gnome.org>
1604
1605         Bug 554854: The --typelib-xml and --inject options should reuse
1606         giscanner parser/writer.
1607
1608         * giscanner/ast.py: add constructor list to Struct and Union.
1609         Add new param in Return's contructor to define transfer.
1610         * giscanner/girparser.py: several additions to the parser in order
1611         to have parsing all nodes of the gir xml files.
1612         * tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
1613         and writer in --inject and --typelib-xml options.
1614         * giscanner/xmlwriter.py: ignore empty attributes instead of
1615         raising an error as this basically exposes a bug in GIRParser.
1616         This should be reverted as soon as the parser is fixed.
1617
1618 2008-10-11  Lucas Rocha  <lucasr@gnome.org>
1619
1620         Bug 552376: scanner generates wrong names for enum members when
1621         there's no defined gtype.
1622
1623         * giscanner/utils.py (strip_common_prefix): Always strip common
1624         prefix exactly up to the last "_", and not beyond.
1625         * tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
1626         here is that the first character after the last '_' should should be
1627         the same as the character in the same position on the type name.
1628         * tests/scanner/foo-expected.gir: test that
1629
1630 2008-10-10  Lucas Rocha  <lucasr@gnome.org>
1631
1632         Bug 555293: append library_paths to LPATH env variable to work
1633         around a bug in find_library when using ldconfig.
1634
1635         * tools/g-ir-scanner (main): ditto.
1636
1637 2008-10-09  Lucas Rocha  <lucasr@gnome.org>
1638
1639         * girepository/girepository.c (register_internal): fix regression on
1640         invoke test case by making sure we load the global module in the
1641         typelib when dealing with inline typelibs.
1642         * girepository/gtypelib.c: a couple of coding style fixes.
1643
1644 2008-10-06  Lucas Rocha  <lucasr@gnome.org>
1645
1646         Bug 555294: Add support for multiple shared libraries per typelib.
1647
1648         * girepository/ginvoke.c (g_function_info_invoke),
1649         girepository/ginfo.c(g_registered_type_info_get_g_type): use
1650         g_typelib_symbol instead of g_module_symbol.
1651         * girepository/girepository.h: remove g_typelib_set_module and add
1652         g_typelib_symbol.
1653         * girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
1654         g_typelib_new_from_memory, g_typelib_new_from_const_memory,
1655         g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
1656         modules instead of just one. The symbol lookup is now abstracted
1657         behind g_typelib_symbol which tries to find the passed symbol name in
1658         one of its modules.
1659         * giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
1660         and write shared_library attribute as a comma-separated list of libs.
1661
1662 2008-10-06  Colin Walters  <walters@verbum.org>
1663
1664         * giscanner/transformer.py: Parse length= annotation as
1665         a parameter name, not a raw int.
1666         * tests/*: Update.
1667
1668 2008-10-03  Colin Walters  <walters@verbum.org>
1669
1670         Bug 551744: Non-GObject types aren't aggregating ctors and methods
1671
1672         * girepository/gtypelib.c: Allow ctors/methods on struct,union,
1673         and boxed.
1674         * giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
1675         registered type.
1676         * tests/*: Extend.
1677
1678 2008-10-03  Colin Walters  <walters@verbum.org>
1679
1680         Bug 554576: scan problem with ev_selection_render_selection()
1681
1682         * giscanner/transformer.py: Only do type resolution once we've
1683         scanned all types.  What could happen before is that we'd strip
1684         the namespace from local type "EvSelection" => Selection, and
1685         then later pull a "Selection" from some other namespace because
1686         we hadn't yet seen the local EvSelection.  This could come
1687         down to hash table ordering and other things so not easy
1688         to write a test for.
1689
1690 2008-10-03  Lucas Rocha  <lucasr@gnome.org>
1691
1692         * giscanner/girwriter.py (_parser_member): fix the last parameter of
1693         GLibEnumMember constructor as it should be the enum member nick.
1694
1695 2008-10-02  Colin Walters  <walters@verbum.org>
1696
1697         Bug 552961: remove this parameter for methods
1698
1699         * giscanner/glibtransformer.py: Delete this parameter; it is
1700         redundant.
1701         * girepository/ginvoke.c: Insert this parameter for methods.
1702         * girepository/gtypelib.c: Remove no longer needed verification of
1703         method this parameter.
1704         * tests/*: Update.
1705
1706 2008-09-30  Dan Winship  <danw@gnome.org>
1707
1708         Bug 554490: g-ir-scanner gets confused by '\\'
1709
1710         * giscanner/scannerlexer.l (chartext, stringtext): fix use of
1711         backslashes so it will correctly parse '\\' and "\\"
1712
1713         * tests/scanner/annotation.c: add a use of '\\' to make sure that
1714         this stays fixed
1715
1716         * giscanner/glibtransformer.py (GLibTransformer.count_type): typo
1717
1718 2008-10-02  Colin Walters  <walters@verbum.org>
1719
1720         bug 552393: Note variadic functions
1721
1722         * giscanner/scannerparser.y: Parse ellipsis.  Refactor grammar
1723         to use parameter_list directly.
1724         * giscanner/sourcescanner.h: Add ellipsis csymbol type.
1725         * giscanner/ast.py: Add Varargs type.
1726         * giscanner/transformer.py: Check for ellipsis symbol, transform
1727         to varargs type.
1728         * girepository/girnode.h: Add varargs flag to in-memory nodes.
1729         Parse varargs functions, but filter them out before we start
1730         compiling the typelib.
1731
1732 2008-10-02  Colin Walters  <walters@verbum.org>
1733
1734         Bug 554632: type tag for GType
1735
1736         * girepository/girepository.h, girepository/girepository.c:
1737         Add type tag for GType - it's a special type we don't want
1738         to resolve to just "long".
1739         * docs/typelib-format.txt: Update.
1740         * girepository/girparser.c: Parse it.
1741         * giscanner/glibtransformer.py: Ensure we don't put GType in
1742         the GObject.gir.
1743         * tools/generate.c: Remove hardcoded type list.
1744         * test/* update.
1745
1746 2008-09-30  Dan Winship  <danw@gnome.org>
1747
1748         Bug 554521: scanner generates wrong names for enum members with
1749         full type name prefix
1750
1751         * giscanner/utils.py (strip_common_prefix): Fix this to strip the
1752         right amount when the entire "first" string is a prefix of
1753         "second"
1754
1755         * tests/scanner/foo.h (FooEnumFullname):
1756         * tests/scanner/foo-expected.gir: test that
1757
1758 2008-09-29  Colin Walters  <walters@verbum.org>
1759
1760         Bug 552380: Array parameters should be marked in the gir
1761
1762         * giscanner/ast.py: Default char** to utf8[], and guchar* to
1763         uint8[].  Add Array, List, and Map subclasses of Type;
1764         these types can be generic.  Return transfer defaults
1765         to true if return value is string or container type.
1766         Delete Sequence type.
1767         * giscanner/scannerlexer.l: Syntax change for annotations;
1768         use <> since it's more readable.
1769         * giscanner/girwriter.py: Write out these changes.
1770         * giscanner/girparser.py: Parse them.
1771         * giscanner/transformer.py: Have a defined set of
1772         both list and map types.  When creating a type,
1773         check if the ctype we've parsed is one of them,
1774         if so create a container type subclass as appropriate.
1775         * girepository/girparser.c: Parse in generic types.
1776         * tests/*: Update.
1777
1778 2008-09-27  Colin Walters  <walters@verbum.org>
1779
1780         * tools/g-ir-scanner: Add --inject option.
1781
1782 2008-09-25  Colin Walters  <walters@verbum.org>
1783
1784         Remove non-repository types from GIR
1785
1786         * giscanner/ast.py: The canonical name is 'utf8', not
1787         'string'.
1788         * giscanner/glibast.py: A few more glib type mappings.
1789         * girepository/girparser.c: We only parse repository types.
1790         * tests/*.gir: Update.
1791
1792 2008-09-23  Colin Walters  <walters@verbum.org>
1793
1794         Bug 552566: Add time_t type
1795
1796         We need a type for time_t since it's special in C, and just
1797         mapping it to long precluded bindings from handling it
1798         in a nice way.
1799
1800 2008-09-19  Colin Walters  <walters@verbum.org>
1801
1802     Bug 552390: Handle capitialization like "DBus" more robustly
1803
1804     The to_underscores function was designed for use against prefixed
1805     names; we need a separate function which will convert names like
1806     DBusFoo into dbus_foo, not d_bus_foo.
1807
1808 2008-09-19  Colin Walters  <walters@verbum.org>
1809
1810     Add check to make sure we're not hitting out unresolved types
1811
1812     Validate the "this" argument for methods
1813
1814     Remove heuristic matching of methods to classes based on prefix
1815
1816     It was a broken hack that dated from when we handled underscoring
1817     and capitalization conventions less well.
1818
1819 2008-09-18  Colin Walters  <walters@verbum.org>
1820
1821     Bug 552384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
1822
1823     On Darwin, the suffix for installed shared libraries (.dylib) is
1824     different from loadable modules (.so).  We use a bit of magic shell
1825     script from Behdad Esfahbod to figure out the right suffix.
1826
1827 2008-09-15  Johan Dahlin  <johan@gnome.org>
1828
1829         * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
1830         a wrapper for type_qualifier as well.
1831
1832 2008-09-15  Colin Walters  <walters@verbum.org>
1833
1834         http://bugzilla.gnome.org/show_bug.cgi?id=552065
1835
1836         * giscanner/ast.py: Add deprecation attributes.
1837         * giscanner/girwriter.py: Write out deprecation data.
1838         * girepository/girparser.c: Relax parsing; deprecated
1839         attribute now includes freeform string.
1840         * giscanner/scannerlexer.l: Parse Deprecated.
1841         * giscanner/transformer.py: Look for deprecated attribute
1842         on functions.
1843         * tests/scanner/*: Add a Deprecated test.
1844
1845 2008-09-14  Tor Lillqvist  <tml@novell.com>
1846
1847         * tests/scanner/Makefile.am (%.typelib): Use $(EXEEXT).
1848
1849 2008-09-14  Colin Walters  <walters@verbum.org>
1850
1851         * giscanner/glibtransformer.py: Ignore functions with
1852         leading _.
1853
1854 2008-09-12  Colin Walters  <walters@verbum.org>
1855
1856         * giscanner/glibtransformer.py: Accept Gtk.Type as GType.
1857
1858 2008-09-12  Colin Walters  <walters@verbum.org>
1859
1860         * giscanner/ast.py: Bind pid_t to INT for vte.
1861
1862 2008-09-12  Colin Walters  <walters@verbum.org>
1863
1864         * giscanner/girparser.py: Parse c:type for boxed records/unions.
1865         * giscanner/glibast.py: Avoid overwriting ctype.
1866         * giscsanner/transformer.py: Try resolving types using the GType names.
1867
1868 2008-09-12  Colin Walters  <walters@verbum.org>
1869
1870         * giscanner/minixpath.py: Code to run an "XPath"
1871         assertion against an XML tree, taken from
1872         gir-repository/gir/tests.py.
1873         * giscanner/Makefile.am: Ship it.
1874         * tools/g-ir-scanner: Add --xpath-assertions option.
1875         * gir/GLib-assertions.txt: Add a few assertions.
1876         * gir/Makefile.am: Run them.
1877
1878 2008-09-11  Colin Walters  <walters@verbum.org>
1879
1880         http://bugzilla.gnome.org/show_bug.cgi?id=551737
1881
1882         * giscanner/transformer.py: Fix strip_namespace_func to only strip
1883         prefix if it ends with _.  Tweak callback stripping to determine
1884         based on presence of _ whether we need to use strip_namespace_func
1885         or strip_namespace_object.
1886
1887 2008-09-09  Owen Taylor  <otaylor@redhat.com>
1888
1889         * docs/typelib-format.txt: Wether => Whether
1890
1891 2008-09-08  Colin Walters  <walters@verbum.org>
1892
1893         * girepository/girparser.c: Default to "readable" for properties.
1894         * giscanner/ast.py: Add readable, writable etc.
1895         * giscanner/girwriter.py: Writ them.
1896         * giscanner/glibtransformer.py: Inspect them.
1897         * tests/*: Update.
1898
1899 2008-09-07  Colin Walters  <walters@verbum.org>
1900
1901         * giscanner/cgobject.py: Add comment.
1902
1903 2008-09-07  Colin Walters  <walters@verbum.org>
1904
1905         * giscanner/cgobject.py: Also call g_thread_init.
1906
1907 2008-09-07  Colin Walters  <walters@verbum.org>
1908
1909         * giscanner/transformer.py: Fix regression by not
1910         stripping prefix before stripping namespace for unions
1911         either.
1912
1913 2008-09-06  Colin Walters  <walters@verbum.org>
1914
1915         * giscanner/transformer.py: If a namespace contains
1916         multiple caps, try stripping both gnomekeyring_ and
1917         gnome_keyring_.
1918
1919 2008-09-07  Johan Dahlin  <johan@gnome.org>
1920
1921         Bug 551162 – giscanner does not recognize asm and __asm__
1922         * giscanner/scannerlexer.l:
1923         Patch by Jani Monoses.
1924
1925 2008-09-06  Colin Walters  <walters@verbum.org>
1926
1927         * girepository/girnode.c: Allow gtype_name
1928         and gtype_init in struct and union.
1929         * girepository/girparser.c: Parse glib:
1930         boxed bits for both structure and union.
1931         * girepository/gtypelib.c: Don't barf
1932         if structure is boxed.
1933         * giscanner/girparser.py: Parse new XML
1934         format.
1935         * giscanner/girwriter.py: Write out new
1936         XML format.
1937         * giscanner/glibast.py: Define new classes
1938         which are both Boxed and Struct/Union, as
1939         well as an "Other" for everything else.
1940         * giscanner/glibtransformer.py: Handle
1941         boxed types specially; we try to merge
1942         them with a struct/union if one exists,
1943         otherwise fall back to generic boxed.
1944         * tests/*: Update.
1945         * tools/generate.c: Write out new format.
1946
1947 2008-09-06  Johan Dahlin  <johan@gnome.org>
1948
1949         * giscanner/grealpath.h: Include stdlib.h
1950
1951         * docs/g-ir-generate.1: Remove leading %
1952
1953 2008-09-01  Colin Walters  <walters@verbum.org>
1954
1955         * girepository/girparser.c: Look at c:type to determine
1956         whether or not an item is a pointer.
1957
1958 2008-09-01  Johan Dahlin  <johan@gnome.org>
1959
1960         * tests/scanner/Makefile.am:
1961         Set PYTHONPATH so the scanner can run
1962         even if you didn't install anything.
1963
1964 2008-09-01  Johan Dahlin  <johan@gnome.org>
1965
1966         * configure.ac:
1967         Post-release version bump
1968
1969 === 0.5.0 ===
1970 2008-09-01  Johan Dahlin  <johan@gnome.org>
1971
1972         * NEWS: Update
1973
1974 2008-08-31  Colin Walters  <walters@verbum.org>
1975
1976         * giscanner/glibtransformer.py: Quiet info
1977         prints for now.
1978
1979 2008-08-31  Johan Dahlin  <johan@gnome.org>
1980
1981         * configure.ac:
1982         Bump version to 0.5.0
1983
1984 2008-08-31  Colin Walters  <walters@verbum.org>
1985
1986         * giscanner/glibtransformer.py: Follow aliases to ensure
1987         we don't get a constructor returning a basic type.
1988         * giscanner/transformer.py: Add function to follow aliases.
1989         * tests/ Update.
1990
1991 2008-08-31  Johan Dahlin  <johan@gnome.org>
1992
1993         * giscanner/scannerlexer.l:
1994         * giscanner/scannerparser.y:
1995         * giscanner/sourcescanner.h:
1996         * giscanner/sourcescanner.py:
1997         Parse GCC extensions in the parser instead of just undeffing them
1998         in the pre-processor.
1999
2000 2008-08-31  Johan Dahlin  <johan@gnome.org>
2001
2002         * giscanner/glibtransformer.py:
2003         Clean up a huge if. Do not add methods or constructors
2004         to enums/flags.
2005         * giscanner/utils.py:
2006         second might be longer than first, check that.
2007
2008 2008-08-31  Johan Dahlin  <johan@gnome.org>
2009
2010         * gir/Makefile.am:
2011         Add a GModule.gir
2012
2013 2008-08-31  Colin Walters  <walters@verbum.org>
2014
2015         * girepository/girparser.c: Don't lose if we
2016         have no includedirs
2017
2018 2008-08-31  Colin Walters  <walters@verbum.org>
2019
2020         * giscanner/glibtransformer.py: Look for libtool
2021         library in current directory
2022         * tests/scanner - Update.
2023
2024 2008-08-30  Colin Walters  <walters@verbum.org>
2025
2026         * docs/typelib-format.txt: Add a guint32
2027         for dependencies.
2028         * gir/Makefile.am: Dep on Makefile
2029         * girepository/ginfo.c:
2030         * girepository/girepository.c: Clean up
2031         default typelib handling; remove global
2032         default_typelib variable.  Ensure we handle
2033         NULL repository in more places.
2034         Support dependency resolution.
2035         Support lazy loading.
2036         * girepository/girepository.h: Remove
2037         g_irepository_unregister; we don't support
2038         unloading typelibs since really they're
2039         process-global.  Update for lazy loading
2040         API.
2041         * girepository/girmodule.c: Use g_new0.
2042         Add dependencies to GirModule.
2043         * girepository/girparser.c: Parse dependencies.
2044         * girepository/gtypelib.c: Add 4 bytes for
2045         dependencies.
2046         * tests/Makefile.am: Kill off gobject.gir,
2047         it conflicts with the real one.
2048         * tests/object.gir: Dep on GObject.
2049         * tools/generate.c: Take --includedir
2050         argument to say which directories to search
2051         for typelibs.  Print out dependencies.
2052
2053 2008-08-30  Colin Walters  <walters@verbum.org>
2054
2055         * giscanner/glibtransformer.py: Reduce warning noise.
2056
2057 2008-08-29  Colin Walters  <walters@verbum.org>
2058
2059         * girepository/ginfo.c: Add some assertions regarding
2060         refcounts, just to be sure.
2061         * giscanner/glibtransformer.py: Blacklist a few more
2062         odd Gio methods.
2063
2064 2008-08-29  Colin Walters  <walters@verbum.org>
2065
2066         * giscanner/glibtransformer.py: Blacklist a few
2067         functions that use GError oddly
2068
2069 2008-08-29  Colin Walters  <walters@verbum.org>
2070
2071         * girepository/gtypelib.c: Don't crash if no
2072         shlib is embedded
2073
2074 2008-08-29  Colin Walters  <walters@verbum.org>
2075
2076         * girepository/girparser.c: Handle chains of aliases
2077         across modules by ensuring we fully qualify aliases
2078         from includes.
2079
2080 2008-08-29  Colin Walters  <walters@verbum.org>
2081
2082         * girepository/girparser.c: Don't search aliases
2083         for basic types.
2084
2085 2008-08-29  Colin Walters  <walters@verbum.org>
2086
2087         * girepository/girparser.c: Rewrite type parsing
2088         to handle both GLib parsing case as well as correctly
2089         handling GLib.List and friends.  Don't try to treat
2090         e.g. ListStore as a List.
2091
2092 2008-08-29  Colin Walters  <walters@verbum.org>
2093
2094         * girepository/gtypelib.c: Add more context
2095         during validate.
2096
2097 2008-08-29  Colin Walters  <walters@verbum.org>
2098
2099         * giscanner/glibtransformer.py: Add some informative
2100         logging messages in corner cases.  Be sure we use
2101         the most recent node set instead of a cache
2102         when generating result set.
2103         * tests/: Remove duplicated bits in expected girs
2104         * girepository/girparser.c: Accept both List (for
2105         compiling GLib) and GLib.List (what the scanner
2106         generates).
2107         * tests/ - Update.
2108         * tools/generate.c: Generate canonical form.
2109
2110 2008-08-29  Johan Dahlin  <johan@gnome.org>
2111
2112         * giscanner/config.py.in:
2113         Use datarootdir instead of datadir to avoid
2114         an autoconf warning.
2115
2116 2008-08-29  Johan Dahlin  <johan@gnome.org>
2117
2118         * README:
2119         * TODO:
2120         * examples/gdk-pixbuf.gidl:
2121         * libffi.pc.in:
2122         Update and remove old cruft.
2123
2124 2008-08-29  Johan Dahlin  <johan@gnome.org>
2125
2126         * Makefile.am:
2127         * docs/g-ir-compiler.1:
2128         * docs/g-ir-generate.1:
2129         * docs/g-ir-scanner.1:
2130         Add man pages for the generator and compiler.
2131
2132 2008-08-29  Johan Dahlin  <johan@gnome.org>
2133
2134         * docs/g-ir-scanner.1: Document
2135
2136         * giscanner/Makefile.am:
2137         * giscanner/gidlparser.py:
2138         * giscanner/gidlwriter.py:
2139         * tools/g-ir-scanner:
2140         Remove gidl support.
2141
2142 2008-08-28  Colin Walters  <walters@verbum.org>
2143
2144         * tests/scanner/Makefile.am: Pass the right
2145         --includedir args.  Add a Makefile dep.
2146         * tools/compiler.c: Pass includedirs down.
2147         * girepository/girparser.c: Actually put
2148         includedirs in context, pass down.  Fix
2149         locate_gir.
2150
2151 2008-08-28  Colin Walters  <walters@verbum.org>
2152
2153         * gir/Makefile.am: Use --includedir
2154         * girepository/girparser.c: Recursively parse
2155         includes to pull in aliases and expand them.
2156         We need this to avoid putting unknown names in
2157         the typelibs.
2158         * tools/compiler.c: Add --includedir option.
2159         * giscanner/ast.py: Map size/ssize to types
2160         too.
2161
2162 2008-08-28  Tor Lillqvist  <tml@novell.com>
2163
2164         Make check now runs successfully on Windows.
2165
2166         * tools/compiler.c (write_out_typelib): Use binary mode for output
2167         file on Windows.
2168
2169         * girepository/girnode.c: Don't print NULL strings.
2170
2171         * tests/invoke/Makefile.am
2172         * tests/scanner/Makefile.am: Use -no-undefined on Windows to
2173         convince libtool to build shared libraries.
2174
2175         * tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
2176         g_assert() instead of printing out expected errors.
2177
2178 2008-08-28  Tor Lillqvist  <tml@novell.com>
2179
2180         * girepository/gtypelib.h: Change type of bitfield fields from
2181         guint to the most suitable smaller type. This makes the struct
2182         sizes match the ones on Linux that the sanity check expects when
2183         using gcc -mms-bitfields on Windows.
2184
2185 2008-08-28  Johan Dahlin  <johan@gnome.org>
2186
2187         * Makefile.am:
2188         * configure.ac:
2189         * gir/Makefile.am:
2190         * giscanner/Makefile.am:
2191         * tests/Makefile.am:
2192         * tests/scanner/Makefile.am:
2193         Make distcheck pass.
2194
2195 2008-08-27  Johan Dahlin  <johan@gnome.org>
2196
2197         * giscanner/Makefile.am:
2198         Only send in -no-undefined on Win32 as it breaks on MacOS X.
2199
2200 2008-08-27  Tor Lillqvist  <tml@novell.com>
2201
2202         Make g-ir-scanner work on Windows. Still problems with the typelib
2203         code. Changes okayed by jdahlin.
2204
2205         * configure.ac: Check for Windows, set Automake conditional
2206         OS_WIN32. Change backslashes to forward slashes in pyexecdir to
2207         avoid shell quoting issues
2208         
2209         * girepository/Makefile.am: Use -no-undefined so that libtool
2210         agrees to build a shared library on Windows.
2211
2212         * girepository/girparser.c (backtrace_stderr): No backtrace() on
2213         Windows. Empty implementation on Windows so far.
2214
2215         * girepository/gtypelib.c (g_typelib_check_sanity): Give more
2216         informative error message for the assertion failures. Tell also
2217         what the expected size of the struct is. Check all sizes first and
2218         fail afterwards if at least one size was different from expected.
2219
2220         * tools/Makefile.am: Reorder libraries into proper logical
2221         dependency order.
2222
2223         * tools/generate.c: Don't include <dlfcn.h>, not used.
2224
2225         * giscanner/Makefile.am: On Windows, link with the Python library,
2226         and install the module DLL as _giscanner.pyd. Remove the
2227         unnecessary import library and libtool library that libtool has
2228         installed.
2229
2230         * giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
2231         and just skip it. Recognize also two "l" suffixes for long long
2232         constants. Recognize also __inline__.
2233
2234         * giscanner/grealpath.h (g_realpath): Implement on Windows, using
2235         GetFullPathName(). As such, GetFullPathName() does more than the
2236         UNIX realpath(). It also changes relative paths into absolute
2237         paths. But for our purposes that shouldn't matter.
2238
2239         * giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
2240         Windows the file descriptor passed to us is from Python. Python
2241         Python2.5 uses the msvcr71.dll C library, while mingw-built code
2242         uses msvcrt.dll. On Windows, file descriptors are specific to
2243         which C library is used. So we must find out what underlying OS
2244         handle corresponds to the file descriptor Python passes us, and
2245         then make that into a file descriptor valid for the C library this
2246         code uses.
2247
2248         * giscanner/sourcescanner.py (_parse): Don't need to bypass
2249         __attribute__ as the lexer now handles it. The definition as empty
2250         was ineffective for mingw anyway, as mingw's _mingw.h undefines
2251         __attribute__. Close the temp file before unlinking it.
2252
2253         * giscanner/cgobject.py: Use correct library name for the gobject
2254         DLL on Windows.
2255
2256         * gir/Makefile.am: Must pass the full basename of the DLLs on
2257         Windows to g-ir-scanner. It's a bit ugly that we have to "know"
2258         that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
2259         reality they won't change, until there is a GLib 3, and then also
2260         the Unix code here needs changing.
2261
2262         Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
2263         libintl.h is found.
2264
2265 2008-08-26  Colin Walters  <walters@verbum.org>
2266
2267         * girepository/girepository.c: Search
2268         $DATADIR/girepository instead of
2269         $DATADIR/gitypelibs; this naming makes
2270         it clearer that e.g. jgir can install
2271         .jars there.
2272         * gir/Makefile.am: Install there.
2273
2274 2008-08-26  Colin Walters  <walters@verbum.org>
2275
2276         * girepository/gtypelib.c (_g_typelib_init): Also
2277         use G_MODULE_SUFFIX instead of hardcoding .so.
2278
2279 2008-08-26  Colin Walters  <walters@verbum.org>
2280
2281         * girepository/gtypelib.c (_g_typelib_init): Free
2282         string in the right place.
2283
2284 2008-08-26  Colin Walters  <walters@verbum.org>
2285
2286         * girepository/gtypelib.c (_g_typelib_init): Handle
2287         both .la and .so names; this works better in the
2288         uninstalled library case.
2289
2290 2008-08-26  Johan Dahlin  <johan@gnome.org>
2291
2292         * gir/Makefile.am:
2293         * giscanner/Makefile.am:
2294         * giscanner/cgobject.py:
2295         * giscanner/config.py.in:
2296         * giscanner/sourcescanner.py:
2297         Avoid undeffing __GNUC__, instead define
2298         __attribute__ & friends. Remove glibconfig.h hack.
2299         This makes gobject-introspection work better on
2300         MacOS X, Thanks to Richard Hult for kind help.
2301
2302 2008-08-25  Colin Walters  <walters@verbum.org>
2303
2304         * giscanner/glibtransformer.py: Always print
2305         statistics.
2306
2307 2008-08-25  Colin Walters  <walters@verbum.org>
2308
2309         * giscanner/glibtransformer.py: Skip over
2310         interfaces we don't know.
2311
2312 2008-08-25  Colin Walters  <walters@verbum.org>
2313
2314         * girepository/girparser.c: Parse new implements
2315         syntax, drop gapi one.
2316         * tests/object.gir: Update.
2317         * tools/generate.c: Generate new syntax.
2318
2319 2008-08-25  Colin Walters  <walters@verbum.org>
2320
2321         * giscanner/ast.py: Add interfaces property
2322         to class.
2323         * giscanner/girwriter.py: Write out implemented
2324         interfaces.
2325         * giscanner/glibtransformer.py: Introspect
2326         implemented interfaces.
2327         * tests/scanner/*: Make FooObject implement
2328         FooInterface.
2329
2330 2008-08-25  Colin Walters  <walters@verbum.org>
2331
2332         * giscanner/glibtransformer.py: More correctly pair
2333         methods; if we have a symbol that starts with
2334         e.g. hippo_canvas look for a matching HippoCanvas
2335         class before accepting e.g. HippoCanvasImage.
2336
2337 2008-08-24  Colin Walters  <walters@verbum.org>
2338
2339         * tools/g-ir-scanner: Filter out unknown options from
2340         pkg-config files.
2341
2342 2008-08-24  Colin Walters  <walters@verbum.org>
2343
2344         * giscanner/glibtransformer.py: Fail with better
2345         error if we can't find library.
2346
2347 2008-08-24  Colin Walters  <walters@verbum.org>
2348
2349         * tools/g-ir-scanner: Use subprocess instead of
2350         commands, works on Windows and avoids the evil
2351         shell on Unix.
2352
2353 2008-08-24  Colin Walters  <walters@verbum.org>
2354
2355         * giscanner/glibtransformer.py: Skip over
2356         g_object_get_type from GLib trunk.
2357
2358 2008-08-24  Colin Walters  <walters@verbum.org>
2359
2360         * girepository/girepository.c (g_irepository_require): 
2361         Don't open shared library here; we already do it
2362         in gtypelib.c.
2363
2364 2008-08-24  Colin Walters  <walters@verbum.org>
2365
2366         * girepository/gtypelib.c: Add context stack so
2367         when we get an error we can print out nicely
2368         where it is.
2369
2370 2008-08-24  Johan Dahlin  <johan@gnome.org>
2371
2372         * girepository/girparser.c (start_glib_boxed), (start_function),
2373         (start_field), (start_alias):
2374         Refactor a couple of parsing functions to be simpler to follow.
2375         Avoid huge ifs.
2376
2377 2008-08-24  Johan Dahlin  <johan@gnome.org>
2378
2379         * girepository/girparser.c (start_function):
2380         Remove left-over code, checking type of function.
2381
2382 2008-08-23  Colin Walters  <walters@verbum.org>
2383
2384         * giscanner/config.py: Define DATADIR.
2385         * giscanner/transformer.py: Look in DATADIR.
2386
2387 2008-08-23  Colin Walters  <walters@verbum.org>
2388
2389         * girepository/gtypelib.c: Check constructor
2390         returns.
2391         * girepository/girnode.c: Small tweaks.
2392         * girepository/ginfo.c: Calculate signature offsets
2393         more robustly.
2394         * girepository/girparser.c: Remove duplicate
2395         start_boxed.
2396         * giscanner/glibtransformer.py: Avoid marking
2397         functions which return a basic type as
2398         constructors.
2399
2400 2008-08-23  Colin Walters  <walters@verbum.org>
2401
2402         * girepository/girparser.c: Ignore <include>.
2403         * giscanner/girparser.py: Parse them.
2404         * giscanner/girwriter.py: Generate them.
2405         * giscanner/transformer.py: Process <include>
2406         recursively.  Don't require full path for
2407         includes, look in {$XDG_DATA_DIRS}/gir.
2408         * tools/g-ir-scanner: Pass through includes.
2409         * Makefile.am: Remove extra --include
2410         args for scanner.
2411         * *-expected.gir: Add expected includes.
2412
2413 2008-08-23  Johan Dahlin  <johan@gnome.org>
2414
2415         * tests/scanner/Makefile.am:
2416         * tests/scanner/annotation-expected.gir:
2417         * tests/scanner/drawable-expected.gir:
2418         Avoid duplication in the Makefile, regenerate with new
2419         namespaces (same as the filename)
2420
2421 2008-08-22  Colin Walters  <walters@verbum.org>
2422
2423         * girepository/girnode.c: Don't hardcode integers,
2424         use GITypeTag.
2425
2426 2008-08-22  Johan Dahlin  <johan@gnome.org>
2427
2428         * giscanner/sourcescanner.py:
2429         Check for ../gobject-introspection-1.0.pc.in to determine
2430         if we run installed or uninstalled.
2431
2432 2008-08-22  Johan Dahlin  <johan@gnome.org>
2433
2434         * gir/Makefile.am:
2435         * giscanner/sourcescanner.py:
2436         Send in undefs/defines via writing it directly to stdin
2437         of cpp instead of via arguments.
2438
2439 2008-08-22  Colin Walters  <walters@verbum.org>
2440
2441         * tools/generate.c, tools/compiler.c: Default
2442         to --raw.
2443         * all Makefile.am: Update.
2444
2445 2008-08-22  Colin Walters  <walters@verbum.org>
2446
2447         * girepository/girparser.c: Pass through
2448         recursive types.  Avoid overwriting errors.
2449         * giscanner/xmlwriter.py: Always write the
2450         XML header.
2451         * tests/*.gir: Adjust.
2452         * tests/scanner/Makefile.am: Build typelibs,
2453         and generate XML from those.  Once we
2454         have a good diff mechanism...
2455         * tests/scanner/*-expected.gir: Add XML
2456         header.
2457         * tools/g-ir-scanner: Accept --typelib-xml
2458         option.
2459         * tools/generate.c: Better defaults for transfer.
2460
2461 2008-08-22  Johan Dahlin  <johan@gnome.org>
2462
2463         * configure.ac:
2464         * gir/Makefile.am:
2465         * giscanner/Makefile.am:
2466         * giscanner/config.py.in:
2467         * giscanner/sourcescanner.py:
2468         Use the generated glibconfig.h for all scanner invokations.
2469         Rename it to glibconfig-scanner.h and install it.
2470         Add a config.py which so far contains the include dir.
2471
2472 2008-08-22  Johan Dahlin  <johan@gnome.org>
2473
2474         * gir/Makefile.am:
2475         Replace glibconfig.h with our own, do some replacement
2476         for CPP/C features we do not support
2477
2478 2008-08-22  Colin Walters  <walters@verbum.org>
2479
2480         * tools/generate.c (write_callable_info): Fix unref
2481         sequence.
2482
2483 2008-08-22  Colin Walters  <walters@verbum.org>
2484
2485         * gobject-introspection-1.0.pc.in: Add g-ir-generate.
2486         * tests/Makefile.am: Support $(DEBUG)
2487         * tools/generate.c: Do immediate close tags if no
2488         sub-elements.
2489
2490 2008-08-21  Colin Walters  <walters@verbum.org>
2491
2492         * tests/scanner/drawable-expected.gir,
2493         * tests/scanner/drawable.c,
2494         * tests/scanner/drawable.h:
2495         Add a method.
2496
2497 2008-08-21  Colin Walters  <walters@verbum.org>
2498
2499         * giscanner/glibtransformer.py: Compute prefix
2500         by searching through the symbol for bits
2501         rather than going directly from ctype; this fixes
2502         webkit_ namespace.
2503
2504 2008-08-21  Colin Walters  <walters@verbum.org>
2505
2506         * giscanner/glibtransformer.py: Also try squashing
2507         underscores from namespace, fixes webkit_web_view_new.
2508
2509 2008-08-21  Colin Walters  <walters@verbum.org>
2510
2511         * giscanner/glibtransformer.py: More ctor work,
2512         avoid having gtk_window_group_new end up under
2513         GtkWindow.
2514
2515 2008-08-21  Colin Walters  <walters@verbum.org>
2516
2517         * giscanner/glibtransformer.py: Much simpler approach
2518         of mapping uscored names to classes.
2519         * giscanner/utils.py: Remove unnecessary function.
2520
2521 2008-08-21  Johan Dahlin  <johan@gnome.org>
2522
2523         * girepository/girepository.c (g_irepository_require):
2524         Plug memory leak and avoid using freed memory.
2525         Resolve the whole module path, here as well.
2526
2527 2008-08-21  Colin Walters  <walters@verbum.org>
2528
2529         * giscanner/glibtransformer.py: Look up all permutations
2530         of class names when scanning methods/ctors based on
2531         the prefix instead of using the return value.  This
2532         associates gtk_window_new with the right class.
2533
2534 2008-08-21  Colin Walters  <walters@verbum.org>
2535
2536         * girepository/girmodule.c (g_ir_module_build_typelib): 
2537         Revert change to increment header_size; we do that in
2538         write_string.
2539
2540 2008-08-21  Colin Walters  <walters@verbum.org>
2541
2542         * girepository/girnode.c (write_string): Tweak to
2543         use UINT instead of INT.  Not likely to matter.
2544         * girepository/girmodule.c (g_ir_module_build_typelib):
2545         Add to header_offset as well for header strings
2546         to match what write_string does.
2547         * girepository/gtypelib.c: Replace is_name with
2548         validate_name, which more strongly validates and
2549         handles errors in a better way.  Update all callers.
2550         * giscanner/glibtransformer.py: Handle constructors
2551         better.
2552
2553 2008-08-21  Johan Dahlin  <johan@gnome.org>
2554
2555         * gir/Makefile.am (typelibs_DATA): Build and 
2556         install the Gio.typelib too
2557
2558         * girepository/gtypelib.c (_g_typelib_init):
2559         Use g_module_build_path to resolve the shlib name
2560
2561 2008-08-21  Colin Walters  <walters@verbum.org>
2562
2563         * gir/Makefile.am: CLEANFILES typelibs too.
2564
2565 2008-08-21  Johan Dahlin  <johan@gnome.org>
2566
2567         * giscanner/glibtransformer.py:
2568         Do not send .la files through find_library.
2569
2570 2008-08-21  Colin Walters  <walters@verbum.org>
2571
2572         * girepository/girparser.c (g_irepository_require):
2573         Fix one small leak in error case.
2574
2575 2008-08-21  Johan Dahlin  <johan@gnome.org>
2576
2577         * gir/Makefile.am:
2578         Parse glibconfig.h as well and install the compiled
2579         typelib
2580
2581 2008-08-21  Johan Dahlin  <johan@gnome.org>
2582
2583         * gir/Makefile.am:
2584         * giscanner/glibtransformer.py:
2585         * tools/g-ir-scanner:
2586         Do not hard-core library names in the Makefile, reuse
2587         ctypes find_library instead.
2588
2589 2008-08-21  Johan Dahlin  <johan@gnome.org>
2590
2591         * girepository/girparser.c (resolve_aliases):
2592         Remove compilation warnings
2593
2594 2008-08-21  Johan Dahlin  <johan@gnome.org>
2595
2596         * girepository/girepository.c (g_irepository_require):
2597         Rewrap and fix double free bug by leaking a bit.
2598
2599 2008-08-20  Colin Walters  <walters@verbum.org>
2600
2601         * girepository/girepository.c: Add new function
2602         g_irepository_get_typelib_path which tells
2603         us from where we loaded a namespace.
2604
2605 2008-08-20  Colin Walters  <walters@verbum.org>
2606
2607         * tests/scanner/*-expected.gir: Adjust for
2608         added shared-library.
2609         * giscanner/giwriter.py: Make pylint happy.
2610
2611 2008-08-20  Colin Walters  <walters@verbum.org>
2612
2613         * girepository/girmodule.c (g_ir_module_build_typelib):
2614         Calculate size correctly, avoid use-after-free.
2615
2616 2008-08-20  Colin Walters  <walters@verbum.org>
2617
2618         * girepository/girepository.c: Remove
2619         g_irepository_register_file in favor of
2620         g_irepository_require.  There are two
2621         possible deployment scenarios for typelibs:
2622         First, separate in $DATADIR/gitypelibs/.  Second,
2623         they may be embedded in shlibs.  However since
2624         the first is now the normal case, the API is
2625         optimized around it.
2626
2627         Refactor internals to look up typelibs for
2628         namespaces just-in-time, but we expect
2629         consumers to call g_irepository_require.
2630
2631         Also, add some docs.  No one has died from that
2632         before.
2633         * gir/Makefile.am: Need --library for glib.
2634         * giscanner/girwriter.py: Write out shared-library.
2635         * tools/g-ir-writer: Take the first --library
2636         argument as the target of shared-library.  In
2637         the future we should make this nicer with pkg-config
2638         probably.
2639
2640 2008-08-20  Colin Walters  <walters@verbum.org>
2641
2642         * girepository/girparser.py: And parse them.
2643
2644 2008-08-20  Johan Dahlin  <johan@gnome.org>
2645
2646         * giscanner/glibast.py: Add gshort/gushort types
2647
2648 2008-08-20  Colin Walters  <walters@verbum.org>
2649
2650         * gir/Makefile.am: Rename .gir files using GI namespace.
2651         * girepository/girepository.c: Use XDG_DATA_DIRS for
2652         looking up typelibs.  Also typelibs are now suffixed
2653         with .typelib.
2654         * tests/invoke/Makefile.am: Only use metadata.
2655         * girepository/Makefile.am: Remove unnecessary include.
2656         * tests/scanner/Makefile.am: Update using GI namespaces
2657         for scanner includes.
2658
2659 2008-08-20  Colin Walters  <walters@verbum.org>
2660
2661         * girepository/transformer.py: Suppress aliases whose
2662         name is a builtin.
2663         * girepository/ast.py: Define some more aliases.
2664
2665 2008-08-20  Colin Walters  <walters@verbum.org>
2666
2667         * girepository/girparser.c: Avoid alias infloops.
2668
2669 2008-08-20  Colin Walters  <walters@verbum.org>
2670
2671         * tests/scanner/foo-expected.gir: Fix expected list type.
2672
2673 2008-08-20  Johan Dahlin  <johan@gnome.org>
2674
2675         * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name): 
2676         Add a workaround for #548689.
2677         We can now compile gtk!
2678
2679 2008-08-20  Colin Walters  <walters@verbum.org>
2680
2681         * giscanner/glibtransformer.py: Try to look up
2682         aliases using the c:type too.
2683
2684 2008-08-20  Colin Walters  <walters@verbum.org>
2685
2686         * girepository/girparser.c: Parse union fields.
2687
2688 2008-08-20  Johan Dahlin  <johan@gnome.org>
2689
2690         * giscanner/ast.py: Make time_t an alias for long
2691
2692         * gir/gio-2.0-good.gir:
2693         * gir/glib-2.0-good.gir:
2694         * gir/gobject-2.0-good.gir:
2695         Regnerate
2696         * giscanner/glibtransformer.py:
2697         Do not delete Class structures, we need them in gdk/gtk.
2698         * tests/scanner/drawable-expected.gir:
2699         * tests/scanner/foo-expected.gir:
2700         * tests/scanner/utility-expected.gir:
2701         Update tests.
2702
2703 2008-08-20  Johan Dahlin  <johan@gnome.org>
2704
2705         * tests/scanner/Makefile.am:
2706         * tests/scanner/annotation-expected.gir:
2707         * tests/scanner/annotation.c (annotation_object_class_init),
2708         (annotation_object_init), (annotation_object_method),
2709         (annotation_object_in), (annotation_object_out),
2710         (annotation_object_inout), (annotation_object_inout2),
2711         (annotation_object_inout3), (annotation_object_calleeowns),
2712         (annotation_object_calleesowns), (annotation_object_get_strings),
2713         (annotation_object_with_voidp), (annotation_object_get_objects),
2714         (annotation_object_create_object), (annotation_object_allow_none):
2715         * tests/scanner/annotation.h:
2716         * tests/scanner/foo-expected.gir:
2717         * tests/scanner/foo.c:
2718         * tests/scanner/foo.h:
2719         Split out annotation tests out of foo
2720
2721 2008-08-20  Johan Dahlin  <johan@gnome.org>
2722
2723         * tests/scanner/Foo-expected.gir:
2724         * tests/scanner/Makefile.am:
2725         * tests/scanner/foo-expected.gir:
2726         * tests/scanner/foo-object.h:
2727         * tests/scanner/foo.c:
2728         Foo->foo, foo-object.h -> foo.h
2729
2730 2008-08-20  Johan Dahlin  <johan@gnome.org>
2731
2732         * tests/scanner/Foo-expected.gir:
2733         * tests/scanner/Makefile.am:
2734         * tests/scanner/drawable-expected.gir:
2735         * tests/scanner/drawable.c (test_drawable_class_init),
2736         (test_drawable_init):
2737         * tests/scanner/drawable.h:
2738         * tests/scanner/foo-object.h:
2739         * tests/scanner/foo.c (foo_boxed_method):
2740         Move the drawable parts out of Foo to its own test.
2741
2742 2008-08-20  Johan Dahlin  <johan@gnome.org>
2743
2744         * tests/scanner/Foo-expected.gir:
2745         * tests/scanner/foo-object.h:
2746         * tests/scanner/foo.c (foo_drawable_class_init),
2747         (foo_drawable_init):
2748         Add a based on GdkDrawable which generates
2749         a broken gir.
2750
2751 2008-08-19  Colin Walters  <walters@verbum.org>
2752
2753         * giscanner/transformer.py: Don't try
2754         to strip prefix before namespace.
2755
2756 2008-08-19  Johan Dahlin  <johan@gnome.org>
2757
2758         * giscanner/transformer.py:
2759         * tests/scanner/Foo-expected.gir:
2760         * tests/scanner/foo-object.h:
2761         Add support for typedef void foo type of
2762         aliases.
2763
2764 2008-08-19  Johan Dahlin  <johan@gnome.org>
2765
2766         * giscanner/ast.py:
2767         * giscanner/girwriter.py:
2768         * giscanner/glibtransformer.py:
2769         * giscanner/transformer.py:
2770         * tests/scanner/Foo-expected.gir:
2771         Add basic support for union, base the code much
2772         on Struct. Add a testcase.
2773
2774 2008-08-19  Johan Dahlin  <johan@gnome.org>
2775
2776         * tests/scanner/Foo-expected.gir:
2777         * tests/scanner/foo-object.h:
2778         Add a union testcase which the compiler currently
2779         barfs at.
2780
2781 2008-08-19  Johan Dahlin  <johan@gnome.org>
2782
2783         * gobject-introspection-1.0.pc.in:
2784         Add a g_ir_compiler variable
2785
2786 2008-08-19  Colin Walters  <walters@verbum.org>
2787
2788         * giscanner/ast.py: Rework types to be more closely
2789         based on GITypeTag.
2790         * giscanner/girparser.py: Parse more bits.
2791         * giscanner/girwriter.py: Write sequences in a new
2792         way that specifies container type.
2793         * giscanner/glibast.py: Adjust for ast.py changes,
2794         add 'ctype' property to GLibObject and GLibInterface
2795         so we can look things up by it later.
2796         * gicanner/transformer.py: Names is new class holding
2797         the various namespaces we manage.  Do not confuse
2798         with Namespace which is toplevel XML node effectively.
2799         Rework all type resolution to go through
2800         _resolve_type_name_1.
2801         * giscanner/glibtransformer.py: Raise UnknownTypeError
2802         instead of ValueError for cleanliness.  Add Unresolved
2803         class to mark types whose parent we haven't seen yet.
2804         Use new Names object from transformer.py.
2805         Correctly look up parent=.
2806         Fix type validation to handle sequences.
2807         * tests/scanner/Foo-expected.gir: Update for sequence
2808         work, int instead of int32.
2809         * tools/g-ir-scanner: Add --noclosure option
2810         * gir/Makefile.am: Use --noclosure by default for
2811         GLib/GObject.
2812
2813 2008-08-18  Johan Dahlin  <johan@gnome.org>
2814
2815         * gir/gio-2.0-good.gir:
2816         * gir/glib-2.0-good.gir:
2817         * gir/gobject-2.0-good.gir:
2818         Regenerate.
2819
2820 2008-08-18  Johan Dahlin  <johan@gnome.org>
2821
2822         * giscanner/ast.py:
2823         * giscanner/girparser.py:
2824         * giscanner/girwriter.py:
2825         * giscanner/glibast.py:
2826         * giscanner/glibtransformer.py:
2827         * giscanner/transformer.py:
2828         * tests/scanner/Foo-expected.gir:
2829         * tests/scanner/foo-object.h:
2830         * tests/scanner/utility-expected.gir:
2831         * tests/scanner/utility.h:
2832         Redo type resolving and validation.
2833         Add a couple of new tests.
2834         Patch mostly written by Colin.
2835
2836 2008-08-18  Johan Dahlin  <johan@gnome.org>
2837
2838         * gir/Makefile.am:
2839         * giscanner/girparser.py:
2840         Set ctype of enums
2841         * giscanner/transformer.py:
2842         Improve enum parsing for enums without a GType.
2843         Make flags/enum references to other girs work
2844         * giscanner/utils.py:
2845         Simplify this a bit
2846         * tests/scanner/Makefile.am:
2847         * tests/scanner/foo-object.h:
2848         * tests/scanner/utility-expected.gir:
2849         * tests/scanner/utility.h:
2850         Add a new test for external enum references
2851
2852 2008-08-18  Johan Dahlin  <johan@gnome.org>
2853
2854         * docs/global-module-registry.txt: Update
2855
2856         * tests/array.gir: Update with new type proposal
2857
2858         * girepository/girepository.c (g_type_tag_to_string):
2859         * girepository/girepository.h:
2860         * girepository/girnode.c (g_ir_node_get_full_size_internal),
2861         (find_entry_node):
2862         * girepository/girnode.h:
2863         Make enum serializing functions public. Clean up some whitespace.
2864
2865 2008-08-17  Johan Dahlin  <johan@gnome.org>
2866
2867         * docs/global-module-registry.txt:
2868         Add a document for an on disk module registry format
2869
2870 2008-08-17  Johan Dahlin  <johan@gnome.org>
2871
2872         * gir/Makefile.am:
2873         * gir/gio-2.0-good.gir:
2874         Add a gio gir.
2875
2876 2008-08-17  Johan Dahlin  <johan@gnome.org>
2877
2878         * gir/Makefile.am:
2879         * gir/glib-2.0-good.gir:
2880         * gir/gobject-2.0-good.gir:
2881         * giscanner/cgobject.py:
2882         * giscanner/glibtransformer.py:
2883         Regenerate GObject & GType.
2884         Avoid warnings when generating gobject-2.0.gir.
2885         Introspect a little more, and skip *_get_type functions.
2886
2887 2008-08-17  Colin Walters  <walters@verbum.org>
2888
2889         * gir/glib-2.0.gir, gir/gobject-2.0.gir:
2890         Rename to -good, always generate during build.
2891         * gir/Makefile.am: Ensure .gir files dep on
2892         all scanner sources.
2893         * Makefile.am: Switch build order to ensure
2894         the scanner is ready before we do gir/.
2895         * tools/g-ir-scanner: Look for .git too.
2896
2897 2008-08-17  Johan Dahlin  <johan@gnome.org>
2898
2899         * girepository/gtypelib.c (validate_enum_blob):
2900         * giscanner/glibtransformer.py:
2901         * giscanner/transformer.py:
2902         Remove resolve_possible_typedefs, it was unused.
2903         Allow multiple enum values of the sample value in an enum,
2904         since it's actually pretty common.
2905         Register enums so they can be resolved too.
2906
2907 2008-08-16  Johan Dahlin  <johan@gnome.org>
2908
2909         * giscanner/girparser.py:
2910         Parse enumeration/bitfield.
2911
2912 2008-08-16  Johan Dahlin  <johan@gnome.org>
2913
2914         * giscanner/girparser.py:
2915         Parse boxed types.
2916
2917 2008-08-16  Johan Dahlin  <johan@gnome.org>
2918
2919         * giscanner/glibtransformer.py:
2920         Resolve type names for alias targets
2921         * giscanner/transformer.py:
2922         Skip FILE* parameters fow now
2923
2924 2008-08-16  Johan Dahlin  <johan@gnome.org>
2925
2926         * gir/glib-2.0.gir:
2927         * gir/gobject-2.0.gir:
2928         Regenerate
2929
2930         * tests/scanner/Makefile.am:
2931         parser -> scanner
2932
2933 2008-08-15  Colin Walters  <walters@verbum.org>
2934
2935         * giscanner/glibtransformer.py: Explicitly construct
2936         new list, since we're deleting as we iterate.
2937         Don't delete all structures which end in Class; just
2938         ones which have a paired GObject.
2939         Fix printing of type warning.
2940         * giscanner/transformer.py: Make strip_namespace_object
2941         be the identity function if it doesn't match the 
2942         namespace.
2943
2944 2008-08-15  Colin Walters  <walters@verbum.org>
2945
2946         * giscanner/cgobject.py: Define yet more argument
2947         prototypes; fix prototype for g_type_fundamental.
2948
2949 2008-08-14  Johan Dahlin  <johan@gnome.org>
2950
2951         * tests/Makefile.am:
2952         * tests/constant.gir:
2953         * tests/gobject.gir:
2954         * tests/struct.gir:
2955         * tools/generate.c (write_struct_info):
2956         Fix generator for constant/gobject/struct
2957
2958 2008-08-14  Johan Dahlin  <johan@gnome.org>
2959
2960         * tests/Makefile.am:
2961         * tests/enum.gir:
2962         * tools/generate.c (write_enum_info):
2963         Fix generation of enum/bitfields
2964
2965 2008-08-14  Johan Dahlin  <johan@gnome.org>
2966
2967         * girepository/girparser.c (start_field), (start_constant),
2968         (start_type), (end_element_handler):
2969         Clear up constant parsing
2970
2971         * tests/object.gir:
2972         Update
2973
2974         * tools/generate.c (write_callable_info), (write_function_info),
2975         (write_callback_info), (write_constant_info), (write_signal_info),
2976         (write_vfunc_info), (write_property_info), (write_object_info),
2977         (write_interface_info):
2978         Constants/Signals are handled now.
2979
2980 2008-08-14  Johan Dahlin  <johan@gnome.org>
2981
2982         * girepository/girparser.c (start_type):
2983         Don't require c:type.
2984         * tests/Makefile.am:
2985         Test boxed.gir
2986         * tests/boxed.gir:
2987         Update, remove parts we don't support yet
2988         * tests/roundtrips.sh:
2989         Remove
2990         * tools/generate.c (write_type_info), (write_field_info),
2991         (write_callable_info), (write_struct_info):
2992         Make it emit proper gir.
2993
2994 2008-08-14  Johan Dahlin  <johan@gnome.org>
2995
2996         * giscanner/transformer.py:
2997         New internal function for adding a new node.
2998
2999 2008-08-14  Johan Dahlin  <johan@gnome.org>
3000
3001         * gir/Makefile.am:
3002         Define an internal _H_ variable so we skip parsing both
3003         i18n headers, only one is needed.
3004         * gir/glib-2.0.gir:
3005         Add the glib-2.0.gir too.
3006         * giscanner/glibast.py:
3007         Add gconstpointer as an alias for ANY
3008         * giscanner/transformer.py:
3009         Do not lower case enumeration names per se.
3010         Skip functions which has parameters called 'va_list'
3011
3012 2008-08-14  Colin Walters  <walters@verbum.org>
3013
3014         * giscanner/transformer.py: Comment data structures.
3015         Also squash pointers in resolve_type_name to correspond
3016         with what we do for params.
3017         * giscanner/glibtransformer.py: Print warnings in more
3018         situations.  Rework checks for method/constructor to
3019         look up in our GType database instead of just checking
3020         for *.   Avoid generating <record> for GObject which
3021         duplicate the <class>.
3022         * gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
3023         in here.
3024
3025 2008-08-14  Johan Dahlin  <johan@gnome.org>
3026
3027         * giscanner/girwriter.py:
3028         * giscanner/glibast.py:
3029         * giscanner/glibtransformer.py:
3030         * giscanner/transformer.py:
3031         * misc/pyflakes.py:
3032         * tests/Makefile.am:
3033         Add pyflakes.py and run it in make check.
3034         Update the source code to fix the errors reported by
3035         pyflakes.
3036
3037 2008-08-14  Johan Dahlin  <johan@gnome.org>
3038
3039         * giscanner/ast.py:
3040         * giscanner/girparser.py:
3041         * giscanner/glibast.py:
3042         * giscanner/glibtransformer.py:
3043         Refactor the parser a bit.
3044         Add parent type to interfaces and update callsites.
3045
3046 2008-08-14  Johan Dahlin  <johan@gnome.org>
3047
3048         * giscanner/glibtransformer.py:
3049         * giscanner/utils.py:
3050         Refactor a bit, avoid isinstance and add a method
3051         for each type we parse.
3052
3053 2008-08-14  Johan Dahlin  <johan@gnome.org>
3054
3055         * giscanner/ast.py:
3056         * giscanner/girparser.py:
3057         * giscanner/glibtransformer.py:
3058         * tests/Makefile.am:
3059         Run pep8.py in make check, fix old errors.
3060
3061 2008-08-13  Colin Walters  <walters@verbum.org>
3062
3063         * giscanner/girparser.py: Parse records.
3064
3065 2008-08-13  Colin Walters  <walters@verbum.org>
3066
3067         * gir/Makefile.am: Install again.
3068         * gir/gobject-2.0.gir: Add some more bits.
3069
3070 2008-08-13  Colin Walters  <walters@verbum.org>
3071
3072         * gir/gobject-2.0.gir: Use correct namespace, add GType.
3073         * giscanner/girparser.py: Handle aliases.
3074         * giscanner/transformer.py: Record aliases.  Make resolver
3075         functions public; we now call into these explicitly from
3076         glibtransformer.  Handle resolving aliases.
3077         * giscanner/glibtransformer.py: Separate our internal namespace
3078         from included ones.  Call up into transformer's resolver functions.
3079
3080 2008-08-13  Johan Dahlin  <johan@gnome.org>
3081
3082         * girepository/girnode.c (g_ir_node_get_full_size_internal):
3083         * girepository/girparser.c (start_class):
3084         * giscanner/glibtransformer.py:
3085         Allow get_type to be None, set a get_type for GInitiallyUnowned too.
3086
3087 2008-08-13  Johan Dahlin  <johan@gnome.org>
3088
3089         * giscanner/cgobject.py:
3090         Register GInitiallyUnowned
3091         * giscanner/girwriter.py:
3092         * giscanner/glibtransformer.py:
3093         Special case GObject/GInitially owned as they are a bit special to use.
3094
3095 2008-08-13  Colin Walters  <walters@verbum.org>
3096
3097         * tests/scanner/Foo-expected.gir, tests/scanner/utility-expected.gir:
3098         Object is in GObject namespace.
3099
3100 2008-08-13  Colin Walters  <walters@verbum.org>
3101
3102         * giscanner/girparser.py: Fix processing of functions
3103         from last commit.
3104
3105 2008-08-13  Colin Walters  <walters@verbum.org>
3106
3107         * giscanner/girparser.py: Parse more than just <class.
3108         * giscanner/glibtransformer.py: Put aliases in a separate
3109         data structure since their name is not canonicall.
3110         * giscanner/transformer.py: Handle resolving type names
3111         from includes.
3112
3113 2008-08-13  Johan Dahlin  <johan@gnome.org>
3114
3115         * tools/g-ir-scanner:
3116         Allow multiple libraries
3117         * giscanner/glibtransformer.py:
3118         Rename load_library to add_library, traverse over all libraries
3119         when trying to resolve a function
3120
3121 2008-08-12  Colin Walters  <walters@verbum.org>
3122
3123         * giscanner/transformer.py: Record typedefs as <alias> elements.
3124           Also attempt to look up types in external namespaces.
3125         * giscanner/girwriter.py: Write them.
3126         * giscanner/glibtransformer.py: Rework resolver using real instanceof
3127         checks.  Resolve interface methods and properties.
3128         * tests/scanner/foo-object.h: Add a method with typedef.
3129         * tests/scanner/Foo-expected.gir: Update.
3130         * girepository/girnode.c: Debug tweaks.
3131         * girepository/girparser.c: Make a first pass through the XML where we
3132         record all the aliases.  This lets us resolve them as we go through the
3133         second pass.
3134         * gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
3135         from gir-repository.
3136
3137 2008-08-12  Colin Walters  <walters@verbum.org>
3138
3139         * giscanner/glibtransformer.py: Resolve typedefs (e.g. AtkAttributeSet -> GSList).
3140         Correctly do subclasseing in 2nd pass resolution.  Handle callbacks in structure
3141         fields.
3142         * giscanner/transformer.py: Record typedefs and expose public API for resolving
3143         them.
3144         * tests/scanner/Foo-expected.gir: Fix expected callback types.
3145
3146 2008-08-12  Colin Walters  <walters@verbum.org>
3147
3148         * giscanner/glibtransformer.py: Also transform object properties.
3149
3150 2008-08-12  Colin Walters  <walters@verbum.org>
3151
3152         * giscanner/glibtransformer.py: Also transform callbacks
3153         and structure field types.
3154         * tests/scanner/Fooe-expected.gir: Update to expect correct
3155         names for callbacks and structs.
3156
3157 2008-08-12  Colin Walters  <walters@verbum.org>
3158
3159         * girepository/girparser.c: Handle 'any'.
3160         * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3161         Add test for void *.
3162
3163 2008-08-12  Colin Walters  <walters@verbum.org>
3164
3165         * giscanner/glibtransformer.py: We need to do type
3166         resolution in a second pass after we've seen all the
3167         enums, records, etc.
3168
3169 2008-08-12  Colin Walters  <walters@verbum.org>
3170
3171         * tests/scanner/Foo-expected.gir, tests/scanner/foo-object.h:
3172         Add enum return value.
3173         * giscanner/glibtransformer.py: Transform function return types
3174         too.
3175
3176 2008-08-12  Colin Walters  <walters@verbum.org>
3177
3178         * tests/scanner/Makefile.am: Dep .gir files on scanner
3179         sources too.  Also remove @ so we see scanner invocations.
3180
3181 2008-08-12  Colin Walters  <walters@verbum.org>
3182
3183         * girepository/girparser.c, girepository/gtypelib.c,
3184         girepository/gtypelib.h, girepository/girnode.c:
3185         Remove usage of (GAPI-oriented) TypeTag in favor of
3186         GITypeTag from girepository.h.
3187
3188 2008-08-10  Colin Walters  <walters@verbum.org>
3189
3190         * tests/roundtrips.sh: Use the correct tests.
3191
3192 2008-08-10  Colin Walters  <walters@verbum.org>
3193
3194         * giscanner/cgobject.py: Declare/wrap a few more functions.
3195         Fix parameter types for g_object_new and g_type_fundamental.
3196
3197 2008-08-10  Colin Walters  <walters@verbum.org>
3198
3199         * giscanner/cgobject.py: Add new decorator @gwrap which forces
3200         us to declare types for both return value and parameters.  The
3201         ctypes default of 'int' is bad because it hides 32/64 bit
3202         problems.  Convert all existing functions to use it.
3203
3204 2008-08-09  Johan Dahlin  <johan@gnome.org>
3205
3206         * giscanner/__init__.py:
3207         * giscanner/ast.py:
3208         * giscanner/cgobject.py:
3209         * giscanner/gidlparser.py:
3210         * giscanner/gidlwriter.py:
3211         * giscanner/girparser.py:
3212         * giscanner/girwriter.py:
3213         * giscanner/glibast.py:
3214         * giscanner/glibtransformer.py:
3215         * giscanner/odict.py:
3216         * giscanner/sourcescanner.py:
3217         * giscanner/transformer.py:
3218         * giscanner/utils.py:
3219         * giscanner/xmlwriter.py:
3220         * tools/g-ir-scanner:
3221
3222         PEP8ify
3223
3224 2008-08-09  Johan Dahlin  <johan@gnome.org>
3225
3226         * relaxng/api.xml:
3227         * relaxng/c-types.xml:
3228         * relaxng/g-types.xml:
3229         * relaxng/relaxng.rng:
3230         * relaxng/util.xml:
3231         Remove outdated relaxng schemas.
3232
3233 2008-08-09  Johan Dahlin  <johan@gnome.org>
3234
3235         * *.[ch]:
3236         Rename metadata to typelib in variable names,
3237         comments and apis.
3238
3239 2008-08-09  Johan Dahlin  <johan@gnome.org>
3240
3241         * tools/scanner.c:
3242         * tools/scanner.h:
3243         Remove old C scanner, which got rewritten in python.
3244
3245 2008-08-09  Johan Dahlin  <johan@gnome.org>
3246
3247         * girepository/Makefile.am:
3248         * tools/Makefile.am:
3249         * tools/girmodule.c:
3250         * tools/girmodule.h:
3251         * tools/girnode.c:
3252         * tools/girnode.h:
3253         * tools/girparser.c:
3254         * tools/girparser.h:
3255         * tools/girwriter.c:
3256         * tools/girwriter.h:
3257         Move shared *.[ch] files to girepository from tools
3258
3259 2008-08-09  Johan Dahlin  <johan@gnome.org>
3260
3261         * tests/Makefile.am:
3262         * tests/array.test:
3263         * tests/boxed.test:
3264         * tests/constant.test:
3265         * tests/enum.test:
3266         * tests/errors.test:
3267         * tests/function.test:
3268         * tests/gobject.test:
3269         * tests/interface.test:
3270         * tests/object.test:
3271         * tests/struct.test:
3272         * tests/types.test:
3273         * tests/union.test:
3274         * tests/xref1.test:
3275         * tests/xref2.test:
3276         Rename *.test to *.gir
3277
3278 2008-08-09  Johan Dahlin  <johan@gnome.org>
3279
3280         * configure.ac:
3281         * tests/Makefile.am:
3282         * tests/parser/Foo-expected.gir:
3283         * tests/parser/Makefile.am:
3284         * tests/parser/foo-object.h:
3285         * tests/parser/foo.c:
3286         * tests/parser/utility-expected.gir:
3287         * tests/parser/utility.c:
3288         * tests/parser/utility.h:
3289         * tests/scanner/Makefile.am:
3290         Rename tests/parser to test/scanner
3291
3292 2008-08-08  Colin Walters  <walters@verbum.org>
3293
3294         * tests/roundtrips.sh: Use local .gir files again.
3295
3296 2008-08-08  Colin Walters  <walters@verbum.org>
3297
3298         * tests/invoke/Makefile.am: .gir file depends on libtool
3299         library.
3300
3301 2008-08-08  Colin Walters  <walters@verbum.org>
3302
3303         * tools/girnode.c: Pass through parent node so we can
3304         print the node whose child is NULL, if that occurs.
3305
3306 2008-08-08  Johan Dahlin  <johan@gnome.org>
3307
3308         * tests/Makefile.am:
3309         Disable roundtrip tests which are not yet working
3310         * tests/invoke/testfns.gir:
3311         Rewrite as gir.
3312
3313 2008-08-08  Johan Dahlin  <johan@gnome.org>
3314
3315         * giscanner/girwriter.py:
3316         type -> ntype
3317         * giscanner/glibast.py:
3318         * giscanner/glibtransformer.py:
3319         Swap order of members, to keep it consistent with
3320         base enum class
3321
3322 2008-08-08  Johan Dahlin  <johan@gnome.org>
3323
3324         * girepository/gtypelib.c (validate_header):
3325         * girepository/gtypelib.h:
3326         * giscanner/ast.py:
3327         * giscanner/girwriter.py:
3328         * giscanner/sourcescanner.c (gi_source_symbol_ref),
3329         (gi_source_symbol_unref):
3330         * tests/array.test:
3331         * tests/boxed.test:
3332         * tests/constant.test:
3333         * tests/enum.test:
3334         * tests/errors.test:
3335         * tests/function.test:
3336         * tests/gobject.test:
3337         * tests/interface.test:
3338         * tests/invoke/Makefile.am:
3339         * tests/invoke/testfns.xml:
3340         * tests/object.test:
3341         * tests/parser/Makefile.am:
3342         * tests/roundtrips.sh:
3343         * tests/struct.test:
3344         * tests/types.test:
3345         * tests/union.test:
3346         * tests/xref1.test:
3347         * tests/xref2.test:
3348         * tools/Makefile.am:
3349         * tools/compiler.c (main):
3350         * tools/generate.c (write_callable_info), (write_function_info),
3351         (write_repository):
3352         * tools/gidlmodule.c:
3353         * tools/gidlmodule.h:
3354         * tools/gidlnode.c:
3355         * tools/gidlnode.h:
3356         * tools/gidlparser.c:
3357         * tools/gidlparser.h:
3358         * tools/gidlwriter.c:
3359         * tools/gidlwriter.h:
3360         * tools/scanner.c (create_node_from_gtype),
3361         (create_node_from_ctype), (g_igenerator_process_properties),
3362         (g_igenerator_process_signals), (g_igenerator_create_object),
3363         (g_igenerator_create_interface), (g_igenerator_create_boxed),
3364         (g_igenerator_create_enum), (g_igenerator_create_flags),
3365         (g_igenerator_process_function_symbol),
3366         (g_igenerator_process_unregistered_struct_typedef),
3367         (g_igenerator_process_struct_typedef),
3368         (g_igenerator_process_union_typedef),
3369         (g_igenerator_process_enum_typedef),
3370         (g_igenerator_process_function_typedef),
3371         (g_igenerator_process_constant), (g_igenerator_process_symbols),
3372         (g_igenerator_add_module), (g_igenerator_add_include_idl):
3373         Merge in the gir-compiler branch.
3374         Thanks to Philip and Colin for their help.
3375
3376 2008-07-26  Colin Walters  <walters@verbum.org>
3377
3378         * tools/Makefile.am (bin_PROGRAMS): Install g-idl-compiler
3379         and g-idl-generate to go along with how we're changing this
3380         module to be installed.
3381         * gobject-introspection-1.0.pc.in: Set up Cflags and Libs.
3382
3383 2008-07-24  Colin Walters  <walters@verbum.org>
3384
3385         * girepository/girepository.c (g_irepository_register): Add
3386         environment variable G_IREPOSITORY_VERBOSE so we can print
3387         out what we're doing.
3388         * girepository/girepository.c (g_irepository_register_file): 
3389         Add GError error message to g_debug call.
3390
3391 2008-07-08  Jürg Billeter  <j@bitron.ch>
3392
3393         * giscanner/glibast.py:
3394
3395         Fix typo
3396
3397 2008-06-21  Johan Dahlin  <jdahlin@async.com.br>
3398
3399         * giscanner/girparser.py (GIRParser._parse_api): Ignore a few
3400         more tags
3401
3402 2008-06-20  Johan Dahlin  <jdahlin@async.com.br>
3403
3404         * giscanner/ast.py:
3405         * giscanner/girwriter.py:
3406         * giscanner/transformer.py:
3407         * tests/parser/Foo-expected.gir:
3408         * tests/parser/foo-object.h:
3409         * tests/parser/foo.c (foo_object_allow_none):
3410         Add support for gtk-doc annotations for allow-none.
3411         Add test case.
3412
3413 2008-06-19  Johan Dahlin  <jdahlin@async.com.br>
3414
3415         * giscanner/ast.py:
3416         * giscanner/girwriter.py:
3417         * giscanner/glibast.py:
3418         * giscanner/glibtransformer.py:
3419         * giscanner/transformer.py:
3420         * tests/parser/Foo-expected.gir:
3421         Start using abstract type instead of the raw C types.
3422         Register a bunch of glib types we care about.
3423
3424 2008-06-19  Rob Taylor  <rob.taylor@codethink.co.uk>
3425
3426         * AUTHORS:
3427         Update authors
3428
3429 2008-06-08  Philip Van Hoof  <pvanhoof@gnome.org>
3430
3431         * girepository/girepository.c:
3432         * girepository/gtypelib.c:
3433         * girepository/ginfo.c:
3434         * girepository/ginvoke.c:
3435         * girepository/girepository.h:
3436         * girepository/gtypelib.h:
3437         * girepository/gmetadata.c:
3438         * girepository/Makefile.am:
3439         * girepository/gmetadata.h:
3440         * tools/compiler.c:
3441         * tools/gidlmodule.c:
3442         * tools/gidlnode.c
3443         * tools/generate.c:
3444         * tools/gidlmodule.h:
3445         * tools/gidlparser.c:
3446
3447         Renamed GMetadata to GTypelib
3448
3449 2008-06-07  Johan Dahlin  <jdahlin@async.com.br>
3450
3451         * giscanner/xmlwriter.py:
3452         Improve line wrapping when > 79 charaters
3453
3454 2008-06-05  Jürg Billeter  <j@bitron.ch>
3455
3456         * giscanner/ast.py:
3457         * giscanner/girwriter.py:
3458         * giscanner/transformer.py:
3459         Use <type> element for field types
3460         * tests/parser/Foo-expected.gir:
3461         Update testcase
3462
3463 2008-06-04  Johan Dahlin  <jdahlin@async.com.br>
3464
3465         * giscanner/glibtransformer.py:
3466         Fix a bug which prevented GdkEvent from being generated
3467
3468 2008-06-03  Johan Dahlin  <jdahlin@async.com.br>
3469
3470         * giscanner/Makefile.am:
3471         * giscanner/ast.py:
3472         * giscanner/girwriter.py:
3473         * giscanner/glibast.py:
3474         * giscanner/glibtransformer.py:
3475         * giscanner/transformer.py:
3476         * giscanner/utils.py:
3477         * tests/parser/Foo-expected.gir:
3478         Improve enum member parsing and introspection
3479
3480 2008-05-31  Johan Dahlin  <jdahlin@async.com.br>
3481
3482         * giscanner/scannerparser.y:
3483         * giscanner/sourcescanner.h:
3484         * giscanner/sourcescanner.py:
3485         Add a new source type enum for member.
3486         Use __repr__ for improved debugging
3487         * giscanner/girparser.py:
3488         Ignore some more
3489         * giscanner/transformer.py:
3490         Improve parsing of struct members.
3491         * tests/parser/foo-object.h:
3492         Add a new testcase
3493
3494 2008-05-31  Johan Dahlin  <jdahlin@async.com.br>
3495
3496         * giscanner/xmlwriter.py:
3497         Improve error reporting when trying to quote None.
3498         * giscanner/girparser.py:
3499         Do not print warnings when including more complete .gir files
3500         * giscanner/girwriter.py:
3501         Do not require a name for parameters, add a todo for singletons
3502         * giscanner/glibtransformer.py:
3503         Refactor the way structs are done, add a couple of hacks to allow
3504         us to get further.
3505         * giscanner/transformer.py:
3506         Add enough hacks so cairo, atk and pango.gir can be parsed properly
3507         * gobject-introspection-1.0.pc.in:
3508         Export girdir, so we can access gobject-2.0.gir from outside
3509
3510 2008-05-31  Johan Dahlin  <jdahlin@async.com.br>
3511
3512         * tools/g-ir-scanner:
3513         * tests/parser/Makefile.am:
3514         Update sys.path before running the parser so we don't have
3515         to setup PYTHONPATH ourselves.
3516
3517         * Makefile.am:
3518         * configure.ac:
3519         * girepository/Makefile.am:
3520         * giscanner/transformer.py:
3521         * gobject-introspection-1.0.pc.in:
3522         * gobject-introspection.pc.in:
3523         * tools/Makefile.am:
3524
3525         Rename pkg-config name to gobject-introspection-1.0,
3526         Do not installed anything which is not using the gir format.
3527         Disable compililation the old C scanner, but still keep the source
3528         until all the remaning functionallity has been ported.
3529
3530 2008-05-31  Johan Dahlin  <jdahlin@async.com.br>
3531
3532         * giscanner/giscannermodule.c (symbol_get_ident): Prevent
3533         a crash when symbol->indent is NULL.
3534
3535         * giscanner/sourcescanner.py (ctype_name): Add ctype_name,
3536         a function to convert a CTYPE symbol to a string
3537
3538 2008-05-24  Johan Dahlin  <jdahlin@async.com.br>
3539
3540         * giscanner/ast.py:
3541         * giscanner/girwriter.py:
3542         * giscanner/giscannermodule.c
3543         (pygi_source_scanner_append_filename),
3544         (pygi_source_scanner_parse_file):
3545         * giscanner/glibtransformer.py:
3546         * giscanner/sourcescanner.py:
3547         Revert back to using temporary files to send in headers.
3548         Allow Functions to be passed in as callbacks, add a couple
3549         of try/excepts missing features.
3550         We can now scan pango
3551
3552 2008-05-08  Johan Dahlin  <johan@gnome.org>
3553
3554         * giscanner/glibtransformer.py:
3555         * giscanner/transformer.py:
3556         Move namespace stripping glibtransformer->transformer
3557
3558 2008-05-08  Johan Dahlin  <johan@gnome.org>
3559
3560         * giscanner/ast.py:
3561         * giscanner/girwriter.py:
3562         * giscanner/glibtransformer.py:
3563         * giscanner/transformer.py:
3564         * tools/g-ir-scanner:
3565         Introduce a namespace ast node
3566
3567 2008-05-05  Johan Dahlin  <johan@gnome.org>
3568
3569         * giscanner/__init__.py:
3570         * giscanner/sourcescanner.py:
3571         * giscanner/transformer.py:
3572         Move sourcescanner symbols to the sourcescanner module, instead
3573         of in the global __init__ namespace.
3574
3575 2008-05-03  Johan Dahlin  <johan@gnome.org>
3576
3577         * giscanner/glibtransformer.py:
3578         * tools/g-ir-scanner:
3579         Handle missing parameters better, allow - and + in .la dlname
3580         filenames.
3581
3582 2008-05-03  Johan Dahlin  <johan@gnome.org>
3583
3584         * giscanner/__init__.py:
3585         * giscanner/ast.py:
3586         * giscanner/girwriter.py:
3587         * giscanner/glibtransformer.py:
3588         * giscanner/transformer.py:
3589         Parse struct fields properly, improve debugging.
3590
3591 2008-04-29  Johan Dahlin  <johan@gnome.org>
3592
3593         * giscanner/ast.py:
3594         * giscanner/girwriter.py:
3595         * giscanner/transformer.py:
3596         * tests/parser/Foo-expected.gir:
3597         * TODO:
3598         Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
3599
3600 2008-04-29  Johan Dahlin  <jdahlin@async.com.br>
3601
3602         * Makefile.am:
3603         * docs/g-ir-scanner.1:
3604         * metadata-annotations-proposal.txt:
3605         * metadata-format.txt:
3606         Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
3607
3608 2008-04-29  Johan Dahlin  <jdahlin@async.com.br>
3609
3610         * giscanner/girwriter.py:
3611         * giscanner/glibtransformer.py:
3612         * giscanner/transformer.py:
3613         * giscanner/xmlwriter.py:
3614         * tests/parser/Foo-expected.gir:
3615         * tests/parser/foo-object.h:
3616         Write record/structs to gir file too. Add a couple of tests,
3617         fix an off by one error in xmlwriter.py.
3618
3619 2008-04-28  Johan Dahlin  <johan@gnome.org>
3620
3621         * giscanner/xmlwriter.py: Calculate the line length properly,
3622         include the provided extra indentation in the calculation, really.
3623
3624 2008-04-28  Johan Dahlin  <jdahlin@async.com.br>
3625
3626         * giscanner/ast.py:
3627         * giscanner/glibast.py:
3628         * giscanner/glibtransformer.py:
3629         * giscanner/transformer.py:
3630         * tools/g-ir-scanner:
3631         Add a --strip-prefix and sort out confusion between names and symbols
3632         for functions and struct + derivaties.
3633         Refactor bootstrap of g-ir-scanner, so we can set options on
3634         Transformer() before parsing everything.
3635
3636 2008-04-28  Johan Dahlin  <johan@gnome.org>
3637
3638         * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
3639         when scanning girepository.h
3640
3641         * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
3642         a __GI_SCANNER__ when we run.
3643
3644 2008-04-28  Johan Dahlin  <jdahlin@async.com.br>
3645
3646         * giscanner/ast.py:
3647         * giscanner/girwriter.py:
3648         * giscanner/glibast.py:
3649         * giscanner/glibtransformer.py:
3650         * tests/parser/Foo-expected.gir:
3651         * tests/parser/utility-expected.gir:
3652         Rename most c:identifier to c:type. Add new ones to
3653         class/interface/enum/boxed.
3654
3655 2008-04-28  Johan Dahlin  <jdahlin@async.com.br>
3656
3657         * giscanner/ast.py:
3658         * giscanner/girwriter.py:
3659         * giscanner/glibtransformer.py:
3660         * tests/parser/Foo-expected.gidl:
3661         * tests/parser/Makefile.am:
3662         Move c:identifier from return-value to subchild type,
3663         as per Jürgs suggestion
3664
3665 2008-04-28  Johan Dahlin  <johan@gnome.org>
3666
3667         * giscanner/girwriter.py:
3668         * tests/parser/Foo-expected.gir:
3669         Write property.type as a child node.
3670
3671 2008-04-27  Johan Dahlin  <johan@gnome.org>
3672
3673         * Makefile.am:
3674         * configure.ac:
3675         * gidl/Makefile.am:
3676         * gidl/gobject-2.0.gidl:
3677         * gir/Makefile.am:
3678         * gir/gobject-2.0.gir:
3679         * tests/parser/Makefile.am:
3680         Replace the GObject gidl with a GObject gir.
3681
3682 2008-04-27  Johan Dahlin  <johan@gnome.org>
3683
3684         * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
3685         not a program.
3686
3687         * giscanner/xmlwriter.py:
3688         * tests/parser/Foo-expected.gir:
3689         Include indentation in line length calculation
3690
3691 2008-04-27  Johan Dahlin  <johan@gnome.org>
3692
3693         * giscanner/girparser.py:
3694         Prettify NS parsing using elementtree.
3695
3696 2008-04-27  Johan Dahlin  <johan@gnome.org>
3697
3698         * configure.ac:
3699         * giscanner/Makefile.am:
3700         * giscanner/girparser.py:
3701         * giscanner/glibtransformer.py:
3702         * tests/parser/Foo-expected.gidl:
3703         * tests/parser/Foo-expected.gir:
3704         * tests/parser/Makefile.am:
3705         * tests/parser/utility-expected.gidl:
3706         * tests/parser/utility-expected.gir:
3707         * tools/g-ir-scanner:
3708         Switch over to GIR as the default format. Add a simple GIDL
3709         parser.
3710         Update tests and fix simplify makefiles by depending
3711         on GNU make extensions.
3712
3713 2008-04-27  Johan Dahlin  <johan@gnome.org>
3714
3715         * giscanner/xmlwriter.py:
3716         Wrap attributes for lines which are wider than 79 characters
3717
3718         * giscanner/scannerlexer.l:
3719         Allow parenthesis in annotations
3720
3721         * giscanner/ast.py:
3722         * giscanner/gidlwriter.py:
3723         * giscanner/girwriter.py:
3724         * giscanner/glibtransformer.py:
3725         * giscanner/transformer.py:
3726         Add initial sequence support, including annotation.
3727         Refactor type handling a bit.
3728
3729 2008-04-27  Johan Dahlin  <johan@gnome.org>
3730
3731         * tests/parser/Foo-expected.gidl:
3732         * tests/parser/foo-object.h:
3733         * tests/parser/foo.c (foo_object_class_init),
3734         (foo_object_get_strings), (foo_object_get_objects):
3735         Add two new functions to check sequence return values.
3736         Also fixes a compilation warning.
3737
3738 2008-04-27  Johan Dahlin  <johan@gnome.org>
3739
3740         * giscanner/giscannermodule.c (]): Cast the getter, avoids
3741         a compilation warning.
3742
3743         * tools/Makefile.am (g_ir_scanner_SOURCES):
3744         g-ir-scanner has no sources.
3745
3746 2008-04-25  Johan Dahlin  <johan@gnome.org>
3747
3748         * giscanner/Makefile.am:
3749         * giscanner/ast.py:
3750         * giscanner/gidlparser.py:
3751         * giscanner/gidlwriter.py:
3752         * giscanner/girwriter.py:
3753         * giscanner/glibast.py:
3754         * giscanner/glibtransformer.py:
3755         * giscanner/transformer.py:
3756         Split out nodes to ast.py and glibast.py
3757
3758 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
3759
3760         * giscanner/Makefile.am:
3761         * giscanner/gidlparser.py:
3762         * giscanner/gidlwriter.py:
3763         * giscanner/girwriter.py:
3764         * giscanner/glibtransformer.py:
3765         * giscanner/gobjecttreebuilder.py:
3766         * giscanner/transformer.py:
3767         * giscanner/treebuilder.py:
3768         * tools/g-ir-scanner:
3769         Rename treebuilder to transformer and
3770         gobjectreebuilder to glibtransformer.
3771
3772 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
3773
3774         * giscanner/Makefile.am:
3775         * giscanner/__init__.py:
3776         * giscanner/cgobject.py:
3777         * giscanner/gidlparser.py:
3778         * giscanner/gidlwriter.py:
3779         * giscanner/girwriter.py:
3780         * giscanner/gobjecttreebuilder.py:
3781         * giscanner/odict.py:
3782         * giscanner/sourcescanner.py:
3783         * giscanner/treebuilder.py:
3784         * giscanner/xmlwriter.py:
3785         * tools/Makefile.am:
3786         * tools/g-ir-scanner:
3787         Add LGPLv2 license header and install all python files
3788
3789 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
3790
3791         * TODO:
3792         * giscanner/gidlwriter.py:
3793         * giscanner/giscannermodule.c (pygi_source_directive_new),
3794         (directive_get_options), (pygi_source_symbol_new),
3795         (symbol_get_base_type), (pygi_source_type_new),
3796         (type_get_base_type), (type_get_child_list),
3797         (pygi_source_scanner_get_symbols),
3798         (pygi_source_scanner_get_directives):
3799         * giscanner/gobjecttreebuilder.py:
3800         * giscanner/sourcescanner.py:
3801         * giscanner/treebuilder.py:
3802         * tests/parser/foo-object.h:
3803         Add support for virtual methods.
3804         Pair struct FooClass with struct Foo.
3805         Clean up the SourceScanner bindings a bit.
3806         Add a testcase for virtual methods.
3807
3808 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
3809
3810         * giscanner/cgobject.py:
3811         * giscanner/gidlwriter.py:
3812         * giscanner/gobjecttreebuilder.py:
3813         Add support for signals
3814
3815         * tests/parser/foo.c (foo_object_class_init):
3816         * Foo-expected.gidl:
3817         Add a signal and update the expected output.
3818
3819 2008-04-24  Johan Dahlin  <jdahlin@async.com.br>
3820
3821         * giscanner/gidlwriter.py:
3822         * giscanner/girwriter.py:
3823         * giscanner/giscannermodule.c (directive_get_name),
3824         (directive_get_value), (directive_get_options),
3825         (symbol_get_directives), (symbol_set_directives),
3826         (pygi_source_scanner_parse_file),
3827         (pygi_source_scanner_lex_filename),
3828         (pygi_source_scanner_get_directives), (init_giscanner):
3829         * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
3830         * giscanner/sourcescanner.h:
3831         * giscanner/sourcescanner.py:
3832         * giscanner/treebuilder.py:
3833         * tools/g-ir-scanner:
3834         Add support for source/header annotations.
3835
3836 2008-04-22  Johan Dahlin  <jdahlin@async.com.br>
3837
3838         * giscanner/gidlwriter.py:
3839         * giscanner/girwriter.py:
3840         * giscanner/gobjecttreebuilder.py:
3841         * giscanner/treebuilder.py:
3842         Add support for Callbacks
3843
3844 2008-04-22  Havoc Pennington  <hp@pobox.com>
3845
3846         * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
3847         not in metadata->module, look for it in the global module, in case
3848         some other object or the app itself provides the symbol.
3849
3850 2008-04-22  Havoc Pennington  <hp@pobox.com>
3851
3852         * girepository/gmetadata.c (_g_metadata_init): hack to avoid
3853         dlopening a library that is already in the main app, by checking
3854         whether one of the lib's symbols is already loaded.
3855
3856 2008-04-22  Johan Dahlin  <jdahlin@async.com.br>
3857
3858         * tests/parser/Foo-expected.gidl:
3859         * tests/parser/foo-object.h:
3860         Add a callback test
3861
3862 2008-04-22  Havoc Pennington  <hp@pobox.com>
3863
3864         * girepository/ginfo.c (g_interface_info_find_method):
3865         Use interface_blob_size not object_blob_size to compute offset.
3866
3867 2008-04-22  Havoc Pennington  <hp@pobox.com>
3868
3869         * girepository/gmetadata.c (_g_metadata_init): remove
3870         G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
3871         (Glade and Clutter for example) rely on being loaded globally.
3872
3873 2008-04-22  Havoc Pennington  <hp@pobox.com>
3874
3875         * girepository/ginfo.c (g_registered_type_info_get_g_type): new
3876         function to get the GType given a RegisteredTypeInfo
3877
3878 2008-04-22  Johan Dahlin  <johan@gnome.org>
3879
3880         * COPYING: Add a LGPL license, to prevent automake to
3881         put in a copy of GPL here. Pointed out by Havoc.
3882
3883         * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
3884         (g_type_info_is_pointer), (g_type_info_get_tag),
3885         (g_type_info_get_param_type), (g_type_info_get_interface),
3886         (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
3887         (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
3888         (g_error_domain_info_get_codes), (g_enum_info_get_value),
3889         (g_object_info_get_interface), (g_object_info_get_field),
3890         (g_interface_info_get_prerequisite),
3891         (g_signal_info_get_class_closure), (g_constant_info_get_value):
3892         * girepository/ginvoke.c (get_ffi_type):
3893         * girepository/girepository.h:
3894         * girepository/gmetadata.c (g_metadata_get_dir_entry),
3895         (g_metadata_check_sanity), (validate_header),
3896         (validate_array_type_blob), (validate_iface_type_blob),
3897         (validate_param_type_blob), (validate_error_type_blob),
3898         (validate_type_blob), (validate_constant_blob),
3899         (validate_struct_blob), (validate_enum_blob):
3900         * girepository/gmetadata.h:
3901         * tests/Makefile.am:
3902         * tests/invoke/Makefile.am:
3903         * tests/invoke/invoke.c (main):
3904         * tests/roundtrips.sh:
3905         * tools/Makefile.am:
3906         * tools/compiler.c (format_output), (write_out_metadata), (main):
3907         * tools/generate.c (write_type_name), (write_type_info),
3908         (write_constant_value), (write_enum_info), (load_metadata), (main):
3909         * tools/gidlcompilercontext.c:
3910         * tools/gidlcompilercontext.h:
3911         * tools/gidlcompilerentrynode.c:
3912         * tools/gidlcompilerentrynode.h:
3913         * tools/gidlcompilertypenode.c:
3914         * tools/gidlcompilertypenode.h:
3915         * tools/gidlmodule.c (g_idl_module_build_metadata):
3916         * tools/gidlmodule.h:
3917         * tools/gidlnode.c (init_stats), (dump_stats),
3918         (g_idl_node_get_size), (g_idl_node_get_full_size),
3919         (g_idl_node_cmp), (g_idl_node_can_have_member),
3920         (g_idl_node_add_member), (g_idl_node_param_direction_string),
3921         (parse_int_value), (parse_uint_value), (parse_float_value),
3922         (parse_boolean_value), (find_entry_node), (find_entry),
3923         (serialize_type), (g_idl_node_build_metadata), (write_string):
3924         * tools/gidlnode.h:
3925         * tools/gidlparser.c (parse_type_internal):
3926         * tools/quote-file.sh:
3927         Revert revisions 157,149-148,136-129 and 120.
3928         Move back to using g-idl-generate to generate the metadata and
3929         avoids dependency on a c compiler.
3930
3931 2008-04-22  Johan Dahlin  <jdahlin@async.com.br>
3932
3933         * giscanner/girwriter.py:
3934         * tools/g-ir-scanner:
3935         Add an initial GIR writer and a --format option to g-ir-scanner
3936
3937 2008-04-21  Johan Dahlin  <johan@gnome.org>
3938
3939         * giscanner/cgobject.py: Use ctypes.util.find_library to locate
3940         gobject-2.0 and raise ImportError if not found.
3941
3942         * giscanner/gidlparser.py:
3943         * giscanner/gidlwriter.py:
3944         * giscanner/gobjecttreebuilder.py:
3945         * tools/g-ir-scanner:
3946         Add a --include argument to include types from other idls.
3947         Add a minimalistic GIDL parser (just objects for now)
3948         Implement resolving of external type references and use it to
3949         resolve parent types, argument types and return types.
3950
3951 2008-04-21  Johan Dahlin  <johan@gnome.org>
3952
3953         * giscanner/gidlwriter.py:
3954         * giscanner/gobjecttreebuilder.py:
3955         * giscanner/treebuilder.py:
3956         Add support for properties.
3957         Refactor Class/Interface support a bit, to share more code and
3958         always initialize their method attribute to an empty list.
3959
3960 2008-04-21  Johan Dahlin  <johan@gnome.org>
3961
3962         * giscanner/cgobject.py:
3963         Add a workaround for a glib bug interface introspection bug
3964         (object_interface_list_properties, object_class_list_properties):
3965         Cast the return value to GParamSpec.
3966
3967         * tests/parser/Foo-expected.gidl: Update
3968         * tests/parser/foo.c: Add a string property
3969
3970         * giscanner/gobjecttreebuilder.py:
3971         After stripping namespaces, remove the original
3972         item to avoid duplication (GtkButton struct and Button object)
3973
3974 2008-04-21  Johan Dahlin  <johan@gnome.org>
3975
3976         * giscanner/gobjecttreebuilder.py:
3977         * giscanner/treebuilder.py:
3978         Strip namespaces before objects, so we'll export
3979         GtkButton as Button in the gtk namespace
3980
3981 2008-04-21  Johan Dahlin  <johan@gnome.org>
3982
3983         * giscanner/gidlwriter.py:
3984         * giscanner/gobjecttreebuilder.py:
3985         * giscanner/treebuilder.py:
3986         Add constructors for object/boxed types.
3987
3988 2008-04-21  Johan Dahlin  <johan@gnome.org>
3989
3990         * giscanner/gidlwriter.py:
3991         * giscanner/gobjecttreebuilder.py:
3992         Add support for boxed types
3993
3994 2008-04-21  Johan Dahlin  <johan@gnome.org>
3995
3996         * giscanner/giscannermodule.c: Mark structures as const,
3997         wrap SourceType.const_string.
3998
3999         * tests/parser/foo-object.h: Add a couple of constants.
4000
4001         * giscanner/gidlwriter.py:
4002         * giscanner/gobjecttreebuilder.py:
4003         * giscanner/treebuilder.py:
4004         Add basic support for interfaces
4005
4006         * tools/g-ir-scanner:
4007         Add -o/--output for writing to a file
4008
4009 2008-04-21  Havoc Pennington  <hp@redhat.com>
4010
4011         * TODO: add some C API wishlist items I could think of quickly
4012
4013 2008-04-21  Johan Dahlin  <jdahlin@async.com.br>
4014
4015         * giscanner/gidlwriter.py:
4016         * giscanner/xmlwriter.py:
4017         Add a simple api for writing tags which can be used 
4018         with the new 'with statement' in python 2.5
4019
4020 2008-04-21  Johan Dahlin  <johan@gnome.org>
4021
4022         * giscanner/gobjecttreebuilder.py:
4023         Strip namespace and object prefix from method names.
4024
4025 2008-04-21  Johan Dahlin  <johan@gnome.org>
4026
4027         * tools/g-ir-scanner (main): Add --pkg option to pass in
4028         pkg-config modules to get cflags from.
4029
4030         * giscanner/gidlwriter.py (GIDLWriter._write_method): 
4031         Avoid duplication, reuse function writer for methods.
4032
4033 2008-04-21  Johan Dahlin  <jdahlin@async.com.br>
4034
4035         * giscanner/gidlwriter.py:
4036         * giscanner/gobjecttreebuilder.py:
4037         * giscanner/treebuilder.py:
4038         * tools/g-ir-scanner:
4039         Resolve libtool .la files.
4040         Strip name spaces for methods.
4041         Add function symbols
4042
4043 2008-04-20  Johan Dahlin  <jdahlin@async.com.br>
4044
4045         * giscanner/cgobject.py:
4046         * giscanner/gidlwriter.py:
4047         * giscanner/gobjecttreebuilder.py:
4048         * giscanner/treebuilder.py:
4049         Add support for classes and methods
4050
4051 2008-04-20  Johan Dahlin  <johan@gnome.org>
4052
4053         * giscanner/gidlwriter.py:
4054         * giscanner/gobjecttreebuilder.py:
4055         * giscanner/odict.py:
4056         Avoid conflicts, keep the output ordered similar to
4057         the order of the input.
4058         Add a simple ordered dictionary implemenation
4059
4060 2008-04-19  Johan Dahlin  <johan@gnome.org>
4061
4062         * giscanner/cgobject.py:
4063         * giscanner/gidlwriter.py:
4064         * giscanner/gobjecttreebuilder.py:
4065         * tools/g-ir-scanner:
4066         Start introspecting get-type functions.
4067         Implement support for GLib/GFlags GTypes.
4068         Add a ctype based GObject binding.
4069
4070 2008-04-18  Johan Dahlin  <jdahlin@async.com.br>
4071
4072         * giscanner/gidlwriter.py:
4073         * giscanner/xmlwriter.py:
4074         * tools/g-ir-scanner:
4075         Add a simplistic gidl writer, which can't do too much.
4076
4077 2008-04-18  Johan Dahlin  <johan@gnome.org>
4078
4079         * giscanner/sourcescanner.py:
4080         * giscanner/treebuilder.py:
4081         * tools/g-ir-scanner:
4082         split tree building and source scanning interface to separate files.
4083
4084 2008-04-18  Johan Dahlin  <johan@gnome.org>
4085
4086         * tools/g-ir-scanner (Parameter.__init__): Start constructing
4087         a real node tree.
4088         - Add support for struct/parameter/return, start parsing of ctypes
4089
4090         * giscanner/giscannermodule.c: wrap GISourceType.child_list and
4091         fix the style
4092
4093 2008-03-31  Johan Dahlin  <johan@gnome.org>
4094
4095         * tools/g-ir-scanner:
4096         Start to build abstract syntax node of scanned sources.
4097         Add support for cpp options.
4098
4099 2008-03-27  Johan Dahlin  <johan@gnome.org>
4100
4101         * giscanner/giscannermodule.c:
4102         * giscanner/scannerlexer.l:
4103         * giscanner/sourcescanner.c:
4104         * tools/g-ir-scanner:
4105
4106         Add simple pre-processor using subprocess and a PIPE.
4107         Change the parse_file apis to accept a file descriptor.
4108
4109 2008-03-25  Johan Dahlin  <johan@gnome.org>
4110
4111         * giscanner/__init__.py:
4112         * tools/g-ir-scanner:
4113         Fix a typo and add an example python test program.
4114
4115 2008-03-25  Johan Dahlin  <johan@gnome.org>
4116         
4117         * giscanner/__init__.py:
4118         * giscanner/giscannermodule.c:
4119         * giscanner/sourcescanner.c:
4120         * giscanner/sourcescanner.h:
4121         Add constants and wrap a few more SymbolType fields
4122
4123 2008-03-25  Johan Dahlin  <johan@gnome.org>
4124         
4125         * configure.ac:
4126         * giscanner:
4127         * giscanner/__init__.py:
4128         * giscanner/giscannermodule.c:
4129         * giscanner/Makefile.am:
4130
4131         Add initial python bindings for the scanner and 
4132         depend on python 2.5.
4133
4134 2008-03-25  Johan Dahlin  <johan@gnome.org>
4135
4136         * Makefile.am:
4137         * configure.ac:
4138         * giscanner/Makefile.am:
4139         * giscanner/sourcescanner.c:
4140         * giscanner/sourcescanner.h:
4141         * tools/Makefile.am:
4142         * tools/grealpath.h:
4143         * tools/sourcescanner.c:
4144         * tools/sourcescanner.h:
4145
4146         Move the scanner to a separate library.
4147         
4148 2008-03-23  Johan Dahlin  <johan@gnome.org>
4149
4150         * tools/Makefile.am:
4151         * tools/scanner.c:
4152         * tools/scanner.h:
4153         * tools/scannerlexer.l:
4154         * tools/scannerparser.y:
4155         * tools/sourcescanner.c:
4156         * tools/sourcescanner.h:
4157         Split out the source scanner from the generator.
4158         Rename the symbols used in the scanner to use the gi_ prefix.
4159         This should make it possible to use the raw C parser from
4160         other programs.
4161
4162 2008-03-23  Johan Dahlin  <johan@gnome.org>
4163
4164         * tests/parser/Makefile.am (utility.gidl): 
4165         * tests/parser/utility-expected.gidl: 
4166         Pass in the gobject.gidl since we're defining a GObject.
4167
4168 2008-03-12  Johan Dahlin  <johan@gnome.org>
4169
4170         * relaxng/relaxng.rng:
4171         Add a releaxng in relaxng we can use to validate the relaxngs
4172         schemas
4173
4174 2008-03-12  Jürg Billeter  <j@bitron.ch>
4175
4176         * tools/scanner.c: (g_igenerator_new):
4177         * tools/scannerparser.y:
4178         Fix compiler warnings.
4179
4180 2008-03-12  Jürg Billeter  <j@bitron.ch>
4181
4182         * tools/scanner.c:
4183         * tools/scanner.h:
4184         * tools/scannerparser.y:
4185         Start fixing memory management in g-idl-scanner.
4186
4187 2008-03-12  Rob Taylor  <rob.taylor@codethink.co.uk>
4188
4189         * tools/gidlcompilercontext.c: (write_compiled):
4190         Fix critical warning when no shlib passed to g-idl-compiler.
4191
4192 2008-03-12  Johan Dahlin  <johan@gnome.org>
4193
4194         * tests/parser/utility-expected.gidl:
4195         * tests/parser/utility.h:
4196         Add a get_type-function, so the scanner actually
4197         parses it as an object.
4198         
4199 2008-03-12  Johan Dahlin  <johan@gnome.org>
4200
4201         * tools/gidlwriter.c (function_generate): Add missing trailing quote.
4202         Bad Philip!
4203
4204         * tests/parser/Foo-expected.gidl:
4205         * tests/parser/Makefile.am:
4206         * tests/parser/foo-object.h:
4207         * tests/parser/foo.c:
4208         * tests/parser/utility-expected.gidl:
4209         * tests/parser/utility.c:
4210         * tests/parser/utility.h:
4211
4212         Add a new gidl test. 'utility.gidl', which is used to be able
4213         to test external type references. Add a reference to UtilityObject*
4214         in the idl file.
4215
4216 2008-03-11  Johan Dahlin  <johan@gnome.org>
4217
4218         * tools/compiler.c:
4219         * tools/generate.c:
4220         Remove most global variables
4221
4222 2008-03-11  Philip Van Hoof  <me@pvanhoof.be>
4223  
4224         * tools/scannerlexer.l:
4225         * tools/scanner.c:
4226         * tests/parser/Foo-expected.gidl:
4227         * tests/parser/foo.c:
4228         * tests/parser/Makefile.am:
4229         * tests/parser/foo-object.h:
4230  
4231         Added a few extra tests. Which resulted in finding a few
4232         bugs. Which resulted in me fixing those bugs
4233
4234 2008-03-11  Rob Taylor  <rob.taylor@codethink.co.uk>
4235
4236         * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
4237         (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
4238         Add some comments for strings into generated output for
4239         easier debugging.
4240
4241 2008-03-11  Rob Taylor  <rob.taylor@codethink.co.uk>
4242
4243         * tools/gidlcompilercontext.c: (write_compiled):
4244         Write out the shlibs variable before writing out the strings
4245         length. Fixes compiler warning when using '-l' flag with
4246         g-idl-compiler
4247
4248 2008-03-11  Johan Dahlin  <johan@gnome.org>
4249
4250         * tests/parser/Foo-expected.gidl:
4251         * tests/parser/foo-object.h:
4252         * tools/scanner.c:
4253         * tools/scanner.h:
4254         * tools/scannerlexer.l:
4255         Add support for parsing return arguments. Add support for
4256         caller-owns return types.
4257         Patch by Philip Van Hoof.
4258         
4259         * tools/scannerparser.y:
4260         Remove parsing of the @deprecated syntax used in headers.
4261         We will support gtk-doc deprecation in the future instead.
4262
4263 2008-03-11  Johan Dahlin  <johan@gnome.org>
4264
4265         * tools/compiler.c (main): Coding style fixes
4266
4267 2008-03-10  Johan Dahlin  <johan@gnome.org>
4268
4269         * configure.ac:
4270         Add GCOV_LIBS to GILIBS
4271
4272 2008-03-10  Johan Dahlin  <johan@gnome.org>
4273
4274         * tests/parser/Foo-expected.gidl:
4275         * tests/parser/foo.c:
4276         Rename null-ok to direction=out
4277
4278 2008-03-10  Philip Van Hoof  <me@pvanhoof.be>
4279
4280         reviewed and extensively tested by Johan
4281
4282         * tests/parser/Foo-expected.gidl:
4283         * tests/parser/foo-object.h:
4284         * tests/parser/foo.c:
4285         * tools/gidlnode.c:
4286         * tools/gidlnode.h:
4287         * tools/gidlwriter.c:
4288         * tools/scanner.c:
4289         * tools/scanner.h:
4290         * tools/scannerlexer.l:
4291         * tools/scannerparser.y:
4292
4293         Add support for scanning for gtk-doc comments inside
4294         C source files. Add tests
4295
4296 2008-03-10  Johan Dahlin  <johan@gnome.org>
4297
4298         * tests/parser/Makefile.am:
4299         * tests/parser/foo.c:
4300         * tools/scanner.c:
4301         * tools/scanner.h:
4302         * tools/scannerparser.y:
4303         Add an api to lex filenames.
4304         Lex all source .c files passed in on the command line.
4305         Scan sources in a test and a couple of private structures
4306         which should not be included in the generated gidl
4307
4308 2008-03-10  Johan Dahlin  <johan@gnome.org>
4309
4310         * tests/invoke/Makefile.am: Make the generated metadata 
4311         depend on the g-idl-compiler
4312
4313 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4314
4315         * tools/gidlmodule.c
4316         * tools/gidlmodule.h
4317         * tools/gidlnode.c
4318         * tools/gidlnode.h
4319         Remove the old g-idl-compiler code.
4320
4321
4322 2008-02-22  Mark Doffman  <mark.doffman@codethink.co.uk>
4323
4324         * tools/quote-file.sh
4325         * tools/compiler.c
4326         * tools/generate.c
4327         Move to using the 'C' struct compiler code.
4328
4329 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4330
4331         * girepository/ginfo.c
4332         * tools/generate.c
4333         Change the way that external references with no namespace
4334         are dealt with. External references with no namespace
4335         are placed into the XML as-if they are a local reference.
4336         This is temporary, but helps with roundtrip tests.
4337
4338 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4339
4340         * girepository/ginfo.c
4341         Add the ability to get the value of a constant of
4342         type TYPE_TAG_SYMBOL. In the case of a symbol the value
4343         is provided as a string.
4344
4345         This would deal properly with:
4346         typedef char* random;
4347         const random = "A string";
4348
4349 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4350
4351         * girepository/ginfo.c
4352         * girepository/girepository.h
4353         * tools/generate.c
4354         Add a function to check if an enum is registered or not.
4355         Previously anything testing this relied on the g-type
4356         string offset having a value of 0.
4357
4358         * girepository/gmetadata.c
4359         * girepository/gmetadata.h
4360         * tools/generate.c
4361         Remove unneccesary or erroneous checks. There were two
4362         metadata validation checks which made sure that the blob
4363         sizes were the same as some magic numbers compiled into the code.
4364         This is wrong as it breaks any forwards compatibility that may
4365         be possible.
4366
4367         Checks were also present that made sure that unregistered type
4368         blobs had a value of 0 in the g-type offset field. This is
4369         unneccessary. If a type blob is unregistered then any value
4370         in its g-type field is simply invalid.
4371
4372 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4373
4374         * girepository/ginfo.c
4375         * girepository/gmetadata.c
4376         * girepository/gmetadata.h
4377
4378           Change the metadata format to have a standard header
4379           for all the type blobs. Merge the SimpleTypeBlob
4380           and InterfaceTypeBlob into a union. A union of these
4381           two blobs existed previously but was not explicit
4382           in the metadata format.
4383
4384 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4385
4386         * tools/gidlcompilercontext.c
4387         * tools/gidlcompilercontext.h
4388         * tools/gidlcompilerentrynode.c
4389         * tools/gidlcompilerentrynode.h
4390         * tools/gidlcompilertypenode.c
4391         * tools/gidlcompilertypenode.h
4392
4393         Add code to compile a tree of GIdlNodes to
4394         a 'C' struct representing the metadata.
4395         This is to aid cross-compiling. Previously
4396         the g-idl-compiler created a binary blob with
4397         data written in the byte order and alignment
4398         of the tool rather than the intended target.
4399
4400         Cleaned up and improved by Johan and Robert :-)
4401
4402 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4403
4404         * girepository/ginvoke.c
4405         * girepository/girepository.h
4406         * girepository/gmetadata.c
4407         * girepository/gmetadata.h
4408         * tools/generate.c
4409         * tools/gidlparser.c
4410         Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
4411         to avoid confusion with the interface blob.
4412
4413         * tools/generate.c
4414         * tools/gidlparser.c
4415         Remove magic numbers and replace with type-tag
4416         enumeration symbols.
4417
4418         * girepository/gmetadata.c
4419         Add validate declaration.
4420
4421 2008-03-10  Jürg Billeter  <j@bitron.ch>
4422
4423         * tools/gidlparser.c: (parse_type_internal):
4424         * tools/scannerlexer.l:
4425         * tools/scannerparser.y:
4426         Support C99 _Bool type in scanner.
4427
4428 2008-03-10  Jürg Billeter  <j@bitron.ch>
4429
4430         * tests/parser/Foo-expected.gidl:
4431         * tests/parser/foo-object.h:
4432         * tests/parser/foo.c: (foo_enum_method):
4433         * tools/scanner.c: (g_igenerator_process_function_symbol):
4434         Don't skip functions that are defined in the namespace of a type
4435         that doesn't support methods, as for example enums.
4436
4437 2008-03-10  Johan Dahlin  <johan@gnome.org>
4438
4439         * gidl.dtd: Remove, we're using relaxng for now
4440
4441         * tests/parser/Foo-expected.gidl:
4442         * tests/parser/foo-object.h:
4443         * tests/parser/foo.c:
4444         Rename the enum/flags get_type functions to include the whole type.
4445
4446 2008-03-08  Marc-Andre Lureau  <marcandre.lureau@gmail.com>
4447
4448         * tools/gidlwriter.c (enum_generate): added "type-name",
4449         "get-type" and "deprecated" missing arguments.
4450         * tests/parser/Foo-expected.gidl:
4451         * tests/parser/foo-object.h: test enum type, and no type.
4452
4453 2008-03-06  Johan Dahlin  <jdahlin@async.com.br>
4454
4455         * configure.ac:
4456         Consistent checks, add missing 'test'
4457
4458 2008-03-05  Havoc Pennington  <hp@redhat.com>
4459
4460         * configure.ac: Take advantage of a libffi.pc if one exists, as it
4461         does on Fedora 8. Make libffi a hard requirement, since it was in
4462         practice anyway (was not really conditional in the code or
4463         makefile, only in configure).
4464
4465 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
4466
4467         reviewed by: Rob Taylor  <rob.taylor@codethink.co.uk>
4468         reviewed by: Johan Dahlin  <johan@gnome.org>
4469
4470         * tests/Makefile.am:
4471         * tests/roundtrips.sh:
4472         Modify the roundtrips test so that they do not use the
4473         --raw option of the gidl compiler but instead compile a
4474         shared library to use with g_module.
4475
4476         * tests/invoke/Makefile.am:
4477         * tests/invoke/invoke.c:
4478         Modify the invoke tests to build a shared library rather
4479         than use the --raw option.
4480
4481         * tests/invoke/invoke-namespace-find.sh: Removed:
4482         Noone knows why this was here, so removed.
4483
4484 2008-02-19  Rob Taylor  <rob.taylor@codethink.co.uk>
4485
4486         * tools/scanner.c: (g_igenerator_process_function_symbol):
4487         Move g_idl_node_can_have_member test later, as it broke spotting
4488         get_type's for nodes that can't have members.
4489
4490 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
4491
4492         * tools/gidlnode.h:
4493         * tools/gidlnode.c: (g_idl_node_can_have_member):
4494         Add g_idl_node_can_have_member.
4495
4496         * tools/scanner.c: (g_igenerator_process_function_symbol):
4497         Use g_idl_node_can_have_member to test if we should add a function
4498         as a member of the type node.
4499
4500 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
4501
4502         * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
4503         * gidl/Makefile.am:
4504         * tests/parser/Makefile.am:
4505         Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
4506
4507 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
4508
4509         * tools/scanner.c: (main):
4510         Ignore -pthread when passed to g-idl-scanner.
4511
4512 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
4513
4514         * tools/grealpath.h: Added:
4515         * tools/scanner.c: (main):
4516         * tools/scannerlexer.l:
4517         * tools/Makefile.am:
4518         Always use absolute paths with symbolic links resolved when
4519         comparing filenames.
4520
4521 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
4522
4523         * gobject-introspection.pc.in:
4524         Provide variables for g-idl-parser, scanner and compiler in the
4525         pkgconfig file.
4526
4527 2008-02-13  Rob Taylor  <rob.taylor@codethink.co.uk>
4528
4529         * gcov.mak:
4530         * girepository/Makefile.am:
4531         * tools/Makefile.am:
4532         Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
4533
4534 2008-02-10  Johan Dahlin  <johan@gnome.org>
4535
4536         * tests/parser/Foo-expected.gidl:
4537         * tests/parser/foo-object.h:
4538         * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
4539         (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
4540         Add boxed test.
4541
4542 2008-02-10  Johan Dahlin  <johan@gnome.org>
4543
4544         * tests/parser/Foo-expected.gidl:
4545         * tests/parser/foo-object.h:
4546         * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
4547         Add enum and flags test.
4548
4549 2008-02-10  Johan Dahlin  <johan@gnome.org>
4550
4551         * Makefile.am:
4552         * configure.ac:
4553         * girepository/Makefile.am:
4554         Make 'make distcheck' work again.
4555
4556 2008-02-10  Johan Dahlin  <johan@gnome.org>
4557
4558         * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
4559         not as-compiler.m4.
4560
4561         * tests/parser/Makefile.am: Only create Foo.gidl when running make
4562         check, eg exclude it from BUILT_SOURCES.
4563
4564 2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>
4565
4566         * Makefile.am:
4567         * configure.ac:
4568         * gcov.mak: Added:
4569         * girepository/Makefile.am:
4570         * m4/Makefile.am: Added:
4571         * m4/as-compiler-flag.m4: Added:
4572         * m4/gcov.m4: Added:
4573         * tools/Makefile.am:
4574         Add ability to generate a coverage report.
4575         Adds configure option --enable-gcov and make rule 'check-coverage'.
4576
4577 2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>
4578
4579         * Makefile.am:
4580         * configure.ac:
4581         * gidl/Makefile.am: Added:
4582         * girepository/Makefile.am: Added:
4583         * src/Makefile.am: Renamed to tools/Makefile.am:
4584         * src/compiler.c: Renamed to tools/compiler.c:
4585         * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
4586         * src/generate.c: Renamed to tools/generate.c:
4587         * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
4588         * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
4589         * src/gidlnode.c: Renamed to tools/gidlnode.c:
4590         * src/gidlnode.h: Renamed to tools/gidlnode.h:
4591         * src/gidlparser.c: Renamed to tools/gidlparser.c:
4592         * src/gidlparser.h: Renamed to tools/gidlparser.h:
4593         * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
4594         * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
4595         * src/ginfo.c: Renamed to girepository/ginfo.c:
4596         * src/ginvoke.c: Renamed to girepository/ginvoke.c:
4597         * src/girepository.c: Renamed to girepository/girepository.c:
4598         * src/girepository.h: Renamed to girepository/girepository.h:
4599         * src/gmetadata.c: Renamed to girepository/gmetadata.c:
4600         * src/gmetadata.h: Renamed to girepository/gmetadata.h:
4601         * src/scanner.c: Renamed to tools/scanner.c:
4602         * src/scanner.h: Renamed to tools/scanner.h:
4603         * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
4604         * src/scannerparser.y: Renamed to tools/scannerparser.y:
4605         * tests/invoke/Makefile.am:
4606         Split src/ into girepository/ and tools/
4607
4608         * Makefile.am:
4609         * configure.ac:
4610         * girepository/Makefile.am:
4611         * tests/Makefile.am:
4612         * tests/invoke/Makefile.am:
4613         * tests/parser/Makefile.am:
4614         * tests/roundtrips.sh:
4615         * tools/Makefile.am:
4616         Make distcheck work.
4617
4618 2008-02-04  Rob Taylor  <rob.taylor@codethink.co.uk>
4619
4620         * tests/invoke/invoke.c: (main):
4621         * tests/invoke/testfns.c: (test6), (test7):
4622         * tests/invoke/testfns.xml:
4623         Add tests for invokation with a GList argument.
4624         Also tests caller-owns return values.
4625
4626 2008-02-04  Rob Taylor  <robtaylor@floopily.org>
4627
4628         * src/ginfo.c:
4629         Add some documentation for GICallableInfo
4630
4631 2008-02-01  Mark Doffman  <mark.doffman@codethink.co.uk>
4632
4633         * gidl.dtd:
4634         Correct syntax errors in the DTD file.
4635         * relaxng/api.xml:
4636         * relaxng/c-types.xml:
4637         * relaxng/g-types.xml:
4638         * relaxng/util.xml:
4639         Add a RelaxNG specification for the GObject Introspection XML data.
4640         The Specification has validated all of the test files.
4641
4642 2008-01-25  Rob Taylor  <robtaylor@floopily.org>
4643
4644         * tests/roundtrips.sh:
4645         * tests/struct.test:
4646         Add roundtrip tests for structs.
4647
4648 2008-01-11  Johan Dahlin  <johan@gnome.org>
4649
4650         * src/scanner.c (g_igenerator_process_function_symbol):
4651         Refactor out g_idle_node_add_member.
4652         (create_node_from_gtype, create_node_from_ctype):
4653         Use case instead of if...else
4654         (get_type_from_type_id):
4655         Rename to create_node_from_gtype
4656         (get_type_from_ctype):
4657         Rename to create_node_from_ctype
4658
4659         Rename ginode -> node, gitype -> type, gifunc -> func.
4660
4661         * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
4662         Two new functions, refactor out of scanner.c
4663
4664         * src/scanner.c: (g_igenerator_process_function_symbol):
4665         * src/scannerlexer.l:
4666         Do not save the content of the deprecated variable, only
4667         if it's set or not.
4668
4669 2008-01-11  Johan Dahlin  <johan@gnome.org>
4670
4671         * tests/parser/foo-object.h: Add a couple of comment parser tests.
4672
4673 2008-01-11  Jürg Billeter  <j@bitron.ch>
4674
4675         * src/scannerlexer.l:
4676         Fix GTK-Doc parsing.
4677
4678 2008-01-11  Jürg Billeter  <j@bitron.ch>
4679
4680         * src/scannerlexer.l:
4681         Fix GTK-Doc parsing.
4682
4683 2008-01-11  Jürg Billeter  <j@bitron.ch>
4684
4685         * src/scanner.c: (lookup_symbol):
4686         Return unresolved name if we find unknown symbol.
4687
4688 2008-01-11  Jürg Billeter  <j@bitron.ch>
4689
4690         * src/scanner.c: (g_igenerator_generate):
4691         Initialize GObject to fix scanning interface properties.
4692
4693         * tests/parser/Foo-expected.gidl:
4694         * tests/parser/foo-object.h:
4695         * tests/parser/foo.c: (foo_interface_get_type):
4696         Test interfaces with GObject prerequisite.
4697
4698         * tests/parser/Makefile.am:
4699         Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
4700
4701 2007-12-27  Johan Dahlin  <johan@gnome.org>
4702
4703         * src/scannerlexer.l:
4704         Parse gtk-doc comments.
4705
4706         * src/gidlwriter.c: (function_generate):
4707         Reorganize, avoid duplication and add support for
4708         writing deprecated functions.
4709
4710         * src/scannerparser.y:
4711         * src/scanner.h:
4712         Add new structure CDirective and functions to create/free them.
4713
4714         * src/scanner.c: (g_igenerator_process_function_symbol),
4715         (g_igenerator_process_unregistered_struct_typedef),
4716         (g_igenerator_process_struct_typedef),
4717         (g_igenerator_process_union_typedef),
4718         (g_igenerator_process_enum_typedef),
4719         (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
4720         (g_igenerator_start_preprocessor):
4721         Parse @deprecated directive for functions.
4722         Remove some more C99isms.
4723         Send in -C to cpp to avoid stripping comments.
4724
4725         * tests/parser/foo-object.h:
4726         * tests/parser/Foo-expected.gidl:
4727         Add deprecated directive
4728
4729 2007-12-27  Johan Dahlin  <johan@gnome.org>
4730
4731         * src/scannerlexer.l (intsuffix): Add emacs mode line and
4732         escape ' and " so it looks more like C.
4733
4734         * src/scanner.c:
4735         Unlink temporary file used.
4736
4737 2007-12-27  Johan Dahlin  <johan@gnome.org>
4738
4739         * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
4740         (g_igenerator_start_preprocessor), (main):
4741         * src/scanner.h:
4742         * src/scannerparser.y:
4743         Plug a couple of simple memory leaks.
4744
4745 2007-12-27  Johan Dahlin  <johan@gnome.org>
4746
4747         * src/scanner.c: (g_igenerator_parse_macros),
4748         (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
4749         (main):
4750         * src/scanner.h:
4751         * src/scannerparser.y:
4752         * tests/parser/Makefile.am:
4753
4754         Improve error reporting, return when the preprocessor fails.
4755         Add a verbose parameter, to aid debugging.
4756         Revert to using a temporary file to communicate between the
4757         preprocessor and the parser, because we need to wait for
4758         the exit code from the pre-processor before starting to parse.
4759
4760 2007-12-16  Johan Dahlin  <jdahlin@async.com.br>
4761
4762         * src/Makefile.am: Rename clexer.l to scannerlexer.l and
4763         cparser.y to scannerparser.y
4764
4765 2007-12-11  Johan Dahlin  <johan@gnome.org>
4766
4767         * src/clexer.l:
4768         * src/cparser.y:
4769         * src/scanner.c: (g_igenerator_new):
4770         * src/scanner.h:
4771         Get rid of the global the_generator variable.
4772
4773 2007-12-10  Johan Dahlin  <johan@gnome.org>
4774
4775         * src/scanner.c (main): Add an output option,
4776         add checks for required parameters
4777
4778         * src/Makefile.am:
4779         set BUILD_SOURCES and CLEANFILES properly
4780
4781         * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
4782         (g_writer_write_indent), (g_writer_write_unindent),
4783         (field_generate), (value_generate), (constant_generate),
4784         (property_generate), (function_generate), (vfunc_generate),
4785         (signal_generate), (interface_generate), (struct_generate),
4786         (union_generate), (boxed_generate), (enum_generate),
4787         (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
4788         * src/gidlwriter.h:
4789         * src/scanner.c: (g_igenerator_generate):
4790         * src/scanner.h:
4791         * src/scannerwriter.c:
4792
4793         Refactor scannerwriter to only be tied to a GIdlModule and move
4794         it (again!) to gidlwriter.c. Change the writer function to take
4795         a filename.
4796
4797 2007-12-10  Johan Dahlin  <johan@gnome.org>
4798
4799         * src/Makefile.am:
4800         * src/scanner.c: (g_igenerator_generate):
4801         * src/scanner.h:
4802         * src/scannerwriter.c: (g_igenerator_write_inline),
4803         (g_igenerator_write), (g_igenerator_write_indent),
4804         (g_igenerator_write_unindent), (field_generate), (value_generate),
4805         (constant_generate), (property_generate), (function_generate),
4806         (vfunc_generate), (signal_generate), (interface_generate),
4807         (struct_generate), (union_generate), (boxed_generate),
4808         (enum_generate), (node_generate), (module_generate),
4809         (g_scanner_write_file):
4810
4811         Move the scanner gidl writing to a separate source file.
4812
4813 2007-12-10  Johan Dahlin  <johan@gnome.org>
4814
4815         * src/cparser.y:
4816         * src/scanner.c:
4817         * src/scanner.h:
4818         Move over all CType construction functions.
4819
4820         * tests/parser/Makefile.am:
4821         Be verbose when printing parsing tests results.
4822
4823 2007-12-10  Johan Dahlin  <johan@gnome.org>
4824
4825         * src/scanner.c (g_igenerator_start_preprocessor): Refactor
4826         preprocessor handling to here. Start cpp insteado of cc -E,
4827         always include -U__GNUC__, since it's specific to the preprocessor
4828         we use.
4829
4830         * tests/parser/Makefile.am (check-local): Silent diff and skip
4831         -U__GNUC__ which is always defined now
4832
4833 2007-12-10  Johan Dahlin,,,  <jdahlin@plasttroll>
4834
4835         reviewed by: <delete if not using a buddy>
4836
4837         * src/scanner.c: (g_igenerator_start_preprocessor), (main):
4838         * tests/parser/Makefile.am:
4839
4840 2007-12-09  Johan Dahlin  <johan@gnome.org>
4841
4842         * src/scanner.c:
4843         Use GOption for command line options.
4844         (g_igenerator_new, main): Simplify constructor and they way
4845         parameters are passed into it.
4846
4847         * src/cparser.y:
4848         * src/Makefile.am:
4849         * src/clexer.l:
4850         * src/cparser.y:
4851         * src/gen-introspect.c:
4852         * src/gen-introspect.h:
4853         * src/scanner.c:
4854         Rename gen-introspect.[ch] to scanner.[ch]
4855
4856 2007-12-09  Johan Dahlin  <johan@gnome.org>
4857
4858         * TODO: Update
4859
4860         * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
4861         don't make the repository library and the other utilites link against
4862         gthread-2.0
4863
4864         * src/gen-introspect.c: (g_igenerator_create_object),
4865         (g_igenerator_create_interface), (g_igenerator_create_boxed),
4866         (g_igenerator_create_enum), (g_igenerator_create_flags),
4867         (g_igenerator_process_module_symbol),
4868         (g_igenerator_process_module), (g_igenerator_generate), (main):
4869         * src/gen-introspect.h:
4870         Refactor g_igenerator_process_types into smaller pieces.
4871
4872         * tests/parser/Makefile.am:
4873         Depend on the gen-introspect binary
4874
4875 2007-12-09  Johan Dahlin  <johan@gnome.org>
4876
4877         * src/gen-introspect.c (g_igenerator_process_types):
4878         Break into smaller pieces, one for each generated node type.
4879
4880 2007-12-08  Johan Dahlin  <johan@gnome.org>
4881
4882         * src/gen-introspect.c: (g_igenerator_process_types),
4883         (g_igenerator_add_module):
4884         * tests/parser/Foo-expected.gidl:
4885         * tests/parser/foo-object.h:
4886         * tests/parser/foo.c: (foo_subobject_class_init),
4887         (foo_subobject_init):
4888
4889         Add a subobject test and make sure to register defined classes
4890         in the lookup symbol hash table.
4891
4892 2007-12-08  Johan Dahlin  <johan@gnome.org>
4893
4894         * gidl/GLib.gidl:
4895         * src/Makefile.am:
4896         * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
4897         (g_igenerator_process_types), (g_igenerator_add_module),
4898         (g_igenerator_add_include_idl), (main):
4899         * src/gen-introspect.h:
4900         * tests/parser/Makefile.am:
4901         * tests/parser/Foo-expected.gidl:
4902
4903         Change the gen-introspect to generate namespaced module names,
4904         such as GLib.Object instead of GObject.
4905         Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
4906         add a --include-idl parameter to gen-introspect,
4907         and update the parser test.
4908
4909 2007-12-08  Johan Dahlin  <johan@gnome.org>
4910
4911         * src/gen-introspect.c:
4912         Move main to the end of the file and attempt to make it valid
4913         ansi c.
4914
4915         * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
4916         we're not quite ready to generate metadata yet.
4917
4918         * tests/parser/:
4919         * configure.ac:
4920
4921         Add a simple gen-introspect parser test
4922
4923 2007-12-06  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
4924
4925         reviewed by: Johan Dahlin  <johan@gnome.org>
4926
4927         * configure.ac:
4928         * gobject-introspection.pc.in:
4929         * src/Makefile.am:
4930         * src/compiler.c: (format_output), (write_out_metadata), (main):
4931         * src/gen-introspect.c: (main):
4932         * src/gen-introspect.h:
4933         * src/generate.c: (write_callable_info), (write_repository),
4934         (load_metadata), (main):
4935         * src/gidlmodule.c: (g_idl_module_new),
4936         (g_idl_module_build_metadata):
4937         * src/gidlmodule.h:
4938         * src/gidlparser.c: (start_element_handler):
4939         * src/ginfo.c: (g_info_new), (g_info_from_entry),
4940         (g_base_info_get_name), (g_base_info_get_namespace),
4941         (g_base_info_is_deprecated), (g_base_info_get_annotation),
4942         (g_base_info_get_metadata), (g_function_info_get_symbol),
4943         (g_function_info_get_flags), (g_function_info_get_property),
4944         (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
4945         (g_callable_info_may_return_null),
4946         (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
4947         (g_callable_info_get_arg), (g_arg_info_get_direction),
4948         (g_arg_info_is_return_value), (g_arg_info_is_dipper),
4949         (g_arg_info_is_optional), (g_arg_info_may_be_null),
4950         (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
4951         (g_type_info_get_tag), (g_type_info_get_param_type),
4952         (g_type_info_get_interface), (g_type_info_get_array_length),
4953         (g_type_info_is_zero_terminated),
4954         (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
4955         (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
4956         (g_value_info_get_value), (g_field_info_get_flags),
4957         (g_field_info_get_size), (g_field_info_get_offset),
4958         (g_registered_type_info_get_type_name),
4959         (g_registered_type_info_get_type_init),
4960         (g_struct_info_get_n_fields), (g_struct_info_get_field),
4961         (g_struct_info_get_n_methods), (g_struct_info_get_method),
4962         (find_method), (g_struct_info_find_method),
4963         (g_enum_info_get_n_values), (g_enum_info_get_value),
4964         (g_object_info_get_parent), (g_object_info_get_type_name),
4965         (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
4966         (g_object_info_get_interface), (g_object_info_get_n_fields),
4967         (g_object_info_get_field), (g_object_info_get_n_properties),
4968         (g_object_info_get_property), (g_object_info_get_n_methods),
4969         (g_object_info_get_method), (g_object_info_find_method),
4970         (g_object_info_get_n_signals), (g_object_info_get_signal),
4971         (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
4972         (g_object_info_get_n_constants), (g_object_info_get_constant),
4973         (g_interface_info_get_n_prerequisites),
4974         (g_interface_info_get_prerequisite),
4975         (g_interface_info_get_n_properties),
4976         (g_interface_info_get_property), (g_interface_info_get_n_methods),
4977         (g_interface_info_get_method), (g_interface_info_find_method),
4978         (g_interface_info_get_n_signals), (g_interface_info_get_signal),
4979         (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
4980         (g_interface_info_get_n_constants),
4981         (g_interface_info_get_constant), (g_property_info_get_flags),
4982         (g_signal_info_get_flags), (g_signal_info_get_class_closure),
4983         (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
4984         (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
4985         (g_constant_info_get_value), (g_union_info_get_n_fields),
4986         (g_union_info_get_field), (g_union_info_get_n_methods),
4987         (g_union_info_get_method), (g_union_info_is_discriminated),
4988         (g_union_info_get_discriminator_offset),
4989         (g_union_info_get_discriminator):
4990         * src/ginvoke.c: (g_function_info_invoke):
4991         * src/girepository.c: (g_irepository_register),
4992         (g_irepository_unregister), (g_irepository_get_default),
4993         (count_interfaces), (g_irepository_get_n_infos), (find_interface),
4994         (g_irepository_get_info), (g_irepository_find_by_name),
4995         (g_irepository_get_shared_library),
4996         (g_irepository_build_search_path), (g_irepository_register_file),
4997         (g_irepository_error_quark):
4998         * src/girepository.h:
4999         * src/gmetadata.c: (g_metadata_get_dir_entry),
5000         (g_metadata_check_sanity), (validate_header),
5001         (validate_array_type_blob), (validate_iface_type_blob),
5002         (validate_param_type_blob), (validate_error_type_blob),
5003         (validate_type_blob), (validate_arg_blob),
5004         (validate_signature_blob), (validate_function_blob),
5005         (validate_callback_blob), (validate_constant_blob),
5006         (validate_value_blob), (validate_field_blob),
5007         (validate_property_blob), (validate_signal_blob),
5008         (validate_vfunc_blob), (validate_struct_blob),
5009         (validate_enum_blob), (validate_object_blob),
5010         (validate_interface_blob), (validate_errordomain_blob),
5011         (validate_union_blob), (validate_blob), (validate_directory),
5012         (validate_annotations), (g_metadata_validate), (_g_metadata_init),
5013         (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
5014         (g_metadata_new_from_mapped_file), (g_metadata_free),
5015         (g_metadata_set_module), (g_metadata_get_namespace):
5016         * src/gmetadata.h:
5017         * tests/Makefile.am:
5018         * tests/invoke/Makefile.am:
5019         * tests/invoke/invoke-namespace-find.sh:
5020         * tests/invoke/invoke.c: (main):
5021
5022         Add a namespace/shared library mapping. fixes #313268.
5023
5024 2007-12-03  Johan Dahlin  <johan@gnome.org>
5025
5026         * src/gidlparser.c (parse_type_internal): Disable char/gchar and
5027         guchar for now.
5028
5029 2007-11-30  Jürg Billeter  <j@bitron.ch>
5030
5031         * configure.ac:
5032         * src/Makefile.am:
5033         * src/clexer.l:
5034         * src/cparser.y:
5035         * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
5036         (g_igenerator_write_inline), (g_igenerator_write),
5037         (g_igenerator_write_indent), (g_igenerator_write_unindent),
5038         (field_generate), (value_generate), (constant_generate),
5039         (property_generate), (function_generate), (vfunc_generate),
5040         (signal_generate), (interface_generate), (struct_generate),
5041         (union_generate), (boxed_generate), (enum_generate),
5042         (node_generate), (module_generate), (get_type_from_type_id),
5043         (str_replace), (g_igenerator_process_properties),
5044         (g_igenerator_process_signals), (g_igenerator_process_types),
5045         (get_type_from_ctype), (g_igenerator_process_function_symbol),
5046         (g_igenerator_process_unregistered_struct_typedef),
5047         (g_igenerator_process_struct_typedef),
5048         (g_igenerator_process_union_typedef),
5049         (g_igenerator_process_enum_typedef),
5050         (g_igenerator_process_function_typedef),
5051         (g_igenerator_process_constant), (g_igenerator_process_symbols),
5052         (g_igenerator_add_symbol), (g_igenerator_is_typedef),
5053         (g_igenerator_generate), (main), (csymbol_new),
5054         (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
5055         (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
5056         (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
5057         (eat_hspace), (eat_line), (read_identifier),
5058         (g_igenerator_parse_macros):
5059         * src/gen-introspect.h:
5060
5061         Import gen-introspect to generate introspection information by
5062         parsing C headers.
5063
5064 2007-11-30  Jürg Billeter  <j@bitron.ch>
5065
5066         * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
5067
5068 2007-11-30  Jürg Billeter  <j@bitron.ch>
5069
5070         * src/gidlparser.c: (end_element_handler): Don't leave requires
5071         state too early.
5072
5073 2007-11-29  Johan Dahlin  <johan@gnome.org>
5074
5075         * src/gidlparser.c (parse_type_internal): Add char,
5076         gchar and guchar to the builtin types.
5077
5078 2007-11-26  Johan Dahlin  <johan@gnome.org>
5079
5080         * src/ginfo.c: (g_object_info_get_type_name),
5081         (g_object_info_get_type_init):
5082         * src/girepository.c: (g_irepository_is_registered):
5083         * src/girepository.h:
5084
5085         Add g_object_info_get_type_name, g_object_info_get_type_init and
5086         g_irepository_is_registered.
5087
5088 2006-08-14  Jürg Billeter  <j@bitron.ch>
5089
5090       * src/gidlparser.c: (end_element_handler): Don't leave
5091         namespace and implements states too early.
5092         Fixes #351264
5093
5094 2007-11-26  Johan Dahlin  <johan@gnome.org>
5095
5096         * src/gmetadata.c (validate_struct_blob):
5097         pass blob_type to validate_function_blob instead of
5098         hard-coding BLOB_TYPE_STRUCT.
5099
5100         Patch by Torsten Schoenfeld, fixes #314190
5101
5102 2006-10-03  Torsten Schoenfeld  <tsch@cvs.gnome.org>
5103
5104         * src/compiler.c, src/generate.c, src/gidlnode.c,
5105         src/gidlparser.c, src/ginfo.c, src/girepository.c,
5106         tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
5107         warnings about return values, signedness mismatches, unused
5108         variables, and unhandles enum values in switch statements.
5109
5110         * tests/invoke/Makefile.am: Don't install the invoke test program.
5111         Add -I ../../src to the cflags used for the test functions files.
5112
5113 2005-08-31  Torsten Schoenfeld  <tsch@cvs.gnome.org>
5114
5115         * src/girepository.h: Export g_invoke_error_quark.
5116
5117 2005-08-31  Torsten Schoenfeld  <tsch@cvs.gnome.org>
5118
5119         * src/ginvoke.c: Remove the fallback implementation of
5120         g_function_info_invoke since we now formally depend on libffi.
5121
5122 2005-07-25  Matthias Clasen  <mclasen@redhat.com>
5123
5124         * src/Makefile, tests/Makefile, tests/invoke/Makefile:
5125         Remove these files from cvs, as they are now generated.
5126
5127         * src/gmetadata.c (validate_iface_type_blob): Don't
5128         complain if blob->pointer is not set, since that
5129         happens for enum and flag types.  (#308935, Gustavo
5130         Carneiro)
5131
5132         * Commit an autoconf-conversion patch by
5133         Gustavo Carneiro (#308708)
5134
5135 2005-05-24  Matthias Clasen  <mclasen@redhat.com>
5136
5137         * src/compiler.c (main): Use it here to validate
5138         the generated metadata.
5139
5140         * src/gmetadata.[hc]: Add code to validate a
5141         metadata blob.
5142
5143         * metadata-format.txt: Updates
5144
5145 2005-05-22  Matthias Clasen  <mclasen@redhat.com>
5146
5147         * tests/*: Add struct offsets to field and vfunc
5148         elements.
5149
5150         * src/generate.c (write_vfunc_info): Write offset
5151         information for vfuncs.
5152
5153         * src/gidlnode.c (g_idl_node_build_metadata): Write
5154         the struct offsets into the metadata.
5155
5156         * src/gidlparser.c: Parse the offset attributes of
5157         field and vfunc elements.
5158
5159         * src/gidlnode.h: Add offset members to field and
5160         vfunc nodes.
5161
5162 2005-05-21  Matthias Clasen  <mclasen@redhat.com>
5163
5164         * TODO: Updates.
5165
5166         * gidl.dtd: Updates.
5167
5168         * src/g-idl-offsets.pl: A perl script which reads a .gidl
5169         file, creates, compiles and runs a C file, and folds the
5170         resulting struct offsets back into the .gidl file.
5171
5172 2005-05-20  Matthias Clasen  <mclasen@redhat.com>
5173
5174         * src/gidlparser.c (start_field): Make fields in objects
5175         work.
5176
5177         * src/gidlmodule.c: Include string.h
5178
5179         * TODO: Updates.
5180         :
5181
5182         * metadata-format.txt: Cleanup basic types.
5183         * src/*: Adapt to the changes.
5184         * tests/*: Adapt to the changes.
5185         * examples/gdk-pixbuf.gidl: Adapt to the changes.
5186
5187         * src/gidlnode.c (g_idl_node_get_size): Report the correct
5188         size for enum blobs.
5189         (g_idl_node_get_full_size): Report the correct size for
5190         function blobs.
5191
5192         * src/gidlmodule.c (g_idl_module_build_metadata): Add some
5193         error checking for blob sizes.
5194
5195 2005-05-19  Matthias Clasen  <mclasen@redhat.com>
5196
5197         * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
5198         interface types for which is_pointer is FALSE, e.g. enums.
5199
5200         * src/gidlnode.c (g_idl_node_get_full_size)
5201         * src/gidlparser.c (parse_type_internal):
5202         * src/generate.c (write_type_info): Support unspecialized
5203         lists, hashtables and errors. Also emit a '*' after these.
5204
5205         * TODO: Updates
5206
5207 2005-05-17  Matthias Clasen  <mclasen@redhat.com>
5208
5209         * TODO: Updates
5210
5211         * metadata-format.txt: Cleanups by Maciej Katafiasz.
5212
5213 2005-05-15  Matthias Clasen  <mclasen@redhat.com>
5214
5215         * src/*.c: Change the directory to be addressed by
5216         1-based indexes, and use an index of zero to mean
5217         'no object'.
5218
5219 2005-05-15  Matthias Clasen  <mclasen@redhat.com>
5220
5221         * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
5222
5223         * tests/union.test: Add a union test.
5224
5225         * src/generate.c: Handle unions.
5226
5227         * src/girepository.h:
5228         * src/ginfo.c: Add GIUnionInfo and functions to access it.
5229
5230         * src/gidlnode.c: Handle GIdlNodeUnion nodes.
5231
5232         * src/gidlparser.c (start_union): Parse <union> elements.
5233
5234         * src/gidlnode.h: Add a GIdlNodeUnion.
5235
5236         * gidl.dtd: Add a <union> element.
5237
5238         * src/gmetadata.c (g_metadata_check_sanity): Check
5239         union_blob_size.
5240
5241         * src/gmetadata.h: Add union_blob_size to Header,
5242         add a UnionBlob.
5243
5244         * metadata-format.txt: Add a UnionBlob.
5245
5246 2005-05-13  Matthias Clasen  <mclasen@redhat.com>
5247
5248         * tests/*: Update testcases.
5249
5250         * src/generate.c (write_callable_info): Don't forget to
5251         write transfer and null-ok attributes for return types
5252         and parameters.
5253
5254         * src/girepository.h:
5255         * src/ginfo.c (g_callable_info_may_return_null):
5256         New function to find out if a function may return NULL.
5257
5258         * src/compiler.c (format_output): Make the generated
5259         C code compile.
5260
5261         * README: Point to a recent libffi snapshot.
5262
5263         * tests/invoke/*: Some invoke tests.
5264
5265         * src/Makefile: Add ginvoke.c and the necessary
5266         libffi information.
5267
5268         * src/girepository.h (g_function_info_invoke): Add
5269         a GError argument.
5270
5271         * src/ginvoke.c (g_function_info_invoke): Initial
5272         implementation of invoke functionality based on libffi.
5273
5274         * src/gidlnode.c (g_idl_node_build_metadata): Pass the
5275         strings and types hash tables in the right order when
5276         recursing.
5277         (find_entry_node): Free the name parts.
5278
5279 2005-05-12  Johan Dahlin  <johan@gnome.org>
5280
5281         * src/generate.c: Generate consistent end tags.
5282
5283         * tests/*: Update
5284
5285 2005-05-12  Matthias Clasen  <mclasen@redhat.com>
5286
5287         * TODO: Updates
5288
5289         * src/gidlparser.c (start_function): Actually add
5290         methods to objects.  (Steven Walter)
5291
5292         * src/girepository.h:
5293         * src/ginfo.c: Rename Transfer and Direction to
5294         GITransfer and GIDirection. (Torsten Schoenfeld)
5295
5296         * tests/*: Make tests work with the changes in name
5297         handling.
5298
5299         * src/gidlnode.c (find_entry_node): Parse qualified
5300         names and generate xref nodes for them if needed. Don't
5301         require all modules to be loaded any more.
5302
5303         * src/gidlmodule.c (g_idl_module_build_metadata): Choke
5304         on '.' in names.
5305
5306         * src/ginfo.c (g_object_info_get_parent): Return NULL
5307         if blob->parent is 0. Still need to make sure index
5308         0 is not used.
5309
5310         * src/generate.c: Generate qualified names when
5311         referring to non-local types. Emit transfer attribute
5312         for return types.
5313
5314         * src/compiler.c (format_output): Put the function
5315         attributes where gcc accepts them.
5316
5317 2005-05-11  Matthias Clasen  <mclasen@redhat.com>
5318
5319         * src/compiler.c (main): Add a --verbose cmdline option
5320         and only log messages if it is specified.
5321
5322         * src/gidlnode.h:
5323         * src/gidlnode.c (init_stats, dump_stats): Collect some
5324         statistics on string and type sharing.
5325
5326         * src/gidlmodule.c (g_idl_module_build_metadata): Use
5327         g_message() instead of fprintf().
5328
5329         * src/gidlnode.c (g_idl_node_free): Make this more robust.
5330         (g_idl_node_get_size): Implement for structs.
5331         (g_idl_node_get_full_size): Handle parent being NULL.
5332         (serialize_type): Handle lookup failures more gracefully.
5333
5334 2005-05-10  Matthias Clasen  <mclasen@redhat.com>
5335
5336         * src/gidlnode.c (g_idl_node_get_full_size): Correct the
5337         size calculation for 2-parameter types and for objects.
5338
5339         * src/compiler.c: Add a cmdline option for debug output
5340         and install a log handler to implement it.
5341         * src/gidlnode.c: Add some debug spew.
5342
5343         * TODO: Updates
5344
5345         * src/gidlmodule.c (g_idl_module_build_metadata): Don't
5346         forget to count the module name when calculating the
5347         required size for the metadata.
5348
5349         * src/gidlnode.c:
5350         * src/gidlparser.c: Fix compiler warnings.
5351
5352 2005-05-09  Matthias Clasen  <mclasen@redhat.com>
5353
5354         * src/compiler.c (main): Free the option context.
5355
5356         * gidl.dtd: Clean up handling of names. All elements
5357         have a "name", only the elements corresponding to
5358         actual callable functions (function, method, constructor),
5359         have an additional "symbol" attribute holding the
5360         dlsym()-able function name.
5361
5362         * src/generate.c: Adapt to generate xml matching the
5363         new dtd.
5364
5365         * src/gidlparser.c:
5366         * src/gidlnode.c: Adapt to parse the new dtd.
5367
5368         * tests/*.test: Adjust to the new dtd.
5369
5370         * metadata-format.txt:
5371         * src/gmetadata.h: Remove the short_name field
5372         from the ValueBlob.
5373         * src/gmetadata.c: Shrink size of ValueBlob to 12.
5374         * src/girepository.h:
5375         * src/ginfo.c (g_value_info_get_short_name): Removed
5376
5377 2005-05-09  Matthias Clasen  <mclasen@redhat.com>
5378
5379         * gidl.dtd: Allow constructors for boxed types,
5380         patch by Jonathan Blandford.
5381
5382
5383 2005-05-09  Matthias Clasen  <mclasen@redhat.com>
5384
5385         * --- Initial import ---