Add data type constants
[platform/upstream/gobject-introspection.git] / ChangeLog
1 2008-05-05  Johan Dahlin  <johan@gnome.org>
2
3         * giscanner/__init__.py:
4         * giscanner/sourcescanner.py:
5         * giscanner/transformer.py:
6         Move sourcescanner symbols to the sourcescanner module, instead
7         of in the global __init__ namespace.
8
9 2008-05-03  Johan Dahlin  <johan@gnome.org>
10
11         * giscanner/glibtransformer.py:
12         * tools/g-ir-scanner:
13         Handle missing parameters better, allow - and + in .la dlname
14         filenames.
15
16 2008-05-03  Johan Dahlin  <johan@gnome.org>
17
18         * giscanner/__init__.py:
19         * giscanner/ast.py:
20         * giscanner/girwriter.py:
21         * giscanner/glibtransformer.py:
22         * giscanner/transformer.py:
23         Parse struct fields properly, improve debugging.
24
25 2008-04-29  Johan Dahlin  <johan@gnome.org>
26
27         * giscanner/ast.py:
28         * giscanner/girwriter.py:
29         * giscanner/transformer.py:
30         * tests/parser/Foo-expected.gir:
31         * TODO:
32         Use transfer-ownership everywhere, to mark ownership/calle/caller etc.
33
34 2008-04-29  Johan Dahlin  <jdahlin@async.com.br>
35
36         * Makefile.am:
37         * docs/g-ir-scanner.1:
38         * metadata-annotations-proposal.txt:
39         * metadata-format.txt:
40         Add a basic, unfinshed man page for g-ir-scanner, move documents into .txt
41
42 2008-04-29  Johan Dahlin  <jdahlin@async.com.br>
43
44         * giscanner/girwriter.py:
45         * giscanner/glibtransformer.py:
46         * giscanner/transformer.py:
47         * giscanner/xmlwriter.py:
48         * tests/parser/Foo-expected.gir:
49         * tests/parser/foo-object.h:
50         Write record/structs to gir file too. Add a couple of tests,
51         fix an off by one error in xmlwriter.py.
52
53 2008-04-28  Johan Dahlin  <johan@gnome.org>
54
55         * giscanner/xmlwriter.py: Calculate the line length properly,
56         include the provided extra indentation in the calculation, really.
57
58 2008-04-28  Johan Dahlin  <jdahlin@async.com.br>
59
60         * giscanner/ast.py:
61         * giscanner/glibast.py:
62         * giscanner/glibtransformer.py:
63         * giscanner/transformer.py:
64         * tools/g-ir-scanner:
65         Add a --strip-prefix and sort out confusion between names and symbols
66         for functions and struct + derivaties.
67         Refactor bootstrap of g-ir-scanner, so we can set options on
68         Transformer() before parsing everything.
69
70 2008-04-28  Johan Dahlin  <johan@gnome.org>
71
72         * giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
73         when scanning girepository.h
74
75         * giscanner/sourcescanner.py (SourceScanner._preprocess): Define
76         a __GI_SCANNER__ when we run.
77
78 2008-04-28  Johan Dahlin  <jdahlin@async.com.br>
79
80         * giscanner/ast.py:
81         * giscanner/girwriter.py:
82         * giscanner/glibast.py:
83         * giscanner/glibtransformer.py:
84         * tests/parser/Foo-expected.gir:
85         * tests/parser/utility-expected.gir:
86         Rename most c:identifier to c:type. Add new ones to
87         class/interface/enum/boxed.
88
89 2008-04-28  Johan Dahlin  <jdahlin@async.com.br>
90
91         * giscanner/ast.py:
92         * giscanner/girwriter.py:
93         * giscanner/glibtransformer.py:
94         * tests/parser/Foo-expected.gidl:
95         * tests/parser/Makefile.am:
96         Move c:identifier from return-value to subchild type,
97         as per Jürgs suggestion
98
99 2008-04-28  Johan Dahlin  <johan@gnome.org>
100
101         * giscanner/girwriter.py:
102         * tests/parser/Foo-expected.gir:
103         Write property.type as a child node.
104
105 2008-04-27  Johan Dahlin  <johan@gnome.org>
106
107         * Makefile.am:
108         * configure.ac:
109         * gidl/Makefile.am:
110         * gidl/gobject-2.0.gidl:
111         * gir/Makefile.am:
112         * gir/gobject-2.0.gir:
113         * tests/parser/Makefile.am:
114         Replace the GObject gidl with a GObject gir.
115
116 2008-04-27  Johan Dahlin  <johan@gnome.org>
117
118         * tools/Makefile.am (bin_SCRIPTS): g-ir-scanner is a script,
119         not a program.
120
121         * giscanner/xmlwriter.py:
122         * tests/parser/Foo-expected.gir:
123         Include indentation in line length calculation
124
125 2008-04-27  Johan Dahlin  <johan@gnome.org>
126
127         * giscanner/girparser.py:
128         Prettify NS parsing using elementtree.
129
130 2008-04-27  Johan Dahlin  <johan@gnome.org>
131
132         * configure.ac:
133         * giscanner/Makefile.am:
134         * giscanner/girparser.py:
135         * giscanner/glibtransformer.py:
136         * tests/parser/Foo-expected.gidl:
137         * tests/parser/Foo-expected.gir:
138         * tests/parser/Makefile.am:
139         * tests/parser/utility-expected.gidl:
140         * tests/parser/utility-expected.gir:
141         * tools/g-ir-scanner:
142         Switch over to GIR as the default format. Add a simple GIDL
143         parser.
144         Update tests and fix simplify makefiles by depending
145         on GNU make extensions.
146
147 2008-04-27  Johan Dahlin  <johan@gnome.org>
148
149         * giscanner/xmlwriter.py:
150         Wrap attributes for lines which are wider than 79 characters
151
152         * giscanner/scannerlexer.l:
153         Allow parenthesis in annotations
154
155         * giscanner/ast.py:
156         * giscanner/gidlwriter.py:
157         * giscanner/girwriter.py:
158         * giscanner/glibtransformer.py:
159         * giscanner/transformer.py:
160         Add initial sequence support, including annotation.
161         Refactor type handling a bit.
162
163 2008-04-27  Johan Dahlin  <johan@gnome.org>
164
165         * tests/parser/Foo-expected.gidl:
166         * tests/parser/foo-object.h:
167         * tests/parser/foo.c (foo_object_class_init),
168         (foo_object_get_strings), (foo_object_get_objects):
169         Add two new functions to check sequence return values.
170         Also fixes a compilation warning.
171
172 2008-04-27  Johan Dahlin  <johan@gnome.org>
173
174         * giscanner/giscannermodule.c (]): Cast the getter, avoids
175         a compilation warning.
176
177         * tools/Makefile.am (g_ir_scanner_SOURCES):
178         g-ir-scanner has no sources.
179
180 2008-04-25  Johan Dahlin  <johan@gnome.org>
181
182         * giscanner/Makefile.am:
183         * giscanner/ast.py:
184         * giscanner/gidlparser.py:
185         * giscanner/gidlwriter.py:
186         * giscanner/girwriter.py:
187         * giscanner/glibast.py:
188         * giscanner/glibtransformer.py:
189         * giscanner/transformer.py:
190         Split out nodes to ast.py and glibast.py
191
192 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
193
194         * giscanner/Makefile.am:
195         * giscanner/gidlparser.py:
196         * giscanner/gidlwriter.py:
197         * giscanner/girwriter.py:
198         * giscanner/glibtransformer.py:
199         * giscanner/gobjecttreebuilder.py:
200         * giscanner/transformer.py:
201         * giscanner/treebuilder.py:
202         * tools/g-ir-scanner:
203         Rename treebuilder to transformer and
204         gobjectreebuilder to glibtransformer.
205
206 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
207
208         * giscanner/Makefile.am:
209         * giscanner/__init__.py:
210         * giscanner/cgobject.py:
211         * giscanner/gidlparser.py:
212         * giscanner/gidlwriter.py:
213         * giscanner/girwriter.py:
214         * giscanner/gobjecttreebuilder.py:
215         * giscanner/odict.py:
216         * giscanner/sourcescanner.py:
217         * giscanner/treebuilder.py:
218         * giscanner/xmlwriter.py:
219         * tools/Makefile.am:
220         * tools/g-ir-scanner:
221         Add LGPLv2 license header and install all python files
222
223 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
224
225         * TODO:
226         * giscanner/gidlwriter.py:
227         * giscanner/giscannermodule.c (pygi_source_directive_new),
228         (directive_get_options), (pygi_source_symbol_new),
229         (symbol_get_base_type), (pygi_source_type_new),
230         (type_get_base_type), (type_get_child_list),
231         (pygi_source_scanner_get_symbols),
232         (pygi_source_scanner_get_directives):
233         * giscanner/gobjecttreebuilder.py:
234         * giscanner/sourcescanner.py:
235         * giscanner/treebuilder.py:
236         * tests/parser/foo-object.h:
237         Add support for virtual methods.
238         Pair struct FooClass with struct Foo.
239         Clean up the SourceScanner bindings a bit.
240         Add a testcase for virtual methods.
241
242 2008-04-25  Johan Dahlin  <jdahlin@async.com.br>
243
244         * giscanner/cgobject.py:
245         * giscanner/gidlwriter.py:
246         * giscanner/gobjecttreebuilder.py:
247         Add support for signals
248
249         * tests/parser/foo.c (foo_object_class_init):
250         * Foo-expected.gidl:
251         Add a signal and update the expected output.
252
253 2008-04-24  Johan Dahlin  <jdahlin@async.com.br>
254
255         * giscanner/gidlwriter.py:
256         * giscanner/girwriter.py:
257         * giscanner/giscannermodule.c (directive_get_name),
258         (directive_get_value), (directive_get_options),
259         (symbol_get_directives), (symbol_set_directives),
260         (pygi_source_scanner_parse_file),
261         (pygi_source_scanner_lex_filename),
262         (pygi_source_scanner_get_directives), (init_giscanner):
263         * giscanner/sourcescanner.c (gi_source_scanner_get_directives):
264         * giscanner/sourcescanner.h:
265         * giscanner/sourcescanner.py:
266         * giscanner/treebuilder.py:
267         * tools/g-ir-scanner:
268         Add support for source/header annotations.
269
270 2008-04-22  Johan Dahlin  <jdahlin@async.com.br>
271
272         * giscanner/gidlwriter.py:
273         * giscanner/girwriter.py:
274         * giscanner/gobjecttreebuilder.py:
275         * giscanner/treebuilder.py:
276         Add support for Callbacks
277
278 2008-04-22  Havoc Pennington  <hp@pobox.com>
279
280         * girepository/ginvoke.c (g_function_info_invoke): If a symbol is
281         not in metadata->module, look for it in the global module, in case
282         some other object or the app itself provides the symbol.
283
284 2008-04-22  Havoc Pennington  <hp@pobox.com>
285
286         * girepository/gmetadata.c (_g_metadata_init): hack to avoid
287         dlopening a library that is already in the main app, by checking
288         whether one of the lib's symbols is already loaded.
289
290 2008-04-22  Johan Dahlin  <jdahlin@async.com.br>
291
292         * tests/parser/Foo-expected.gidl:
293         * tests/parser/foo-object.h:
294         Add a callback test
295
296 2008-04-22  Havoc Pennington  <hp@pobox.com>
297
298         * girepository/ginfo.c (g_interface_info_find_method):
299         Use interface_blob_size not object_blob_size to compute offset.
300
301 2008-04-22  Havoc Pennington  <hp@pobox.com>
302
303         * girepository/gmetadata.c (_g_metadata_init): remove
304         G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
305         (Glade and Clutter for example) rely on being loaded globally.
306
307 2008-04-22  Havoc Pennington  <hp@pobox.com>
308
309         * girepository/ginfo.c (g_registered_type_info_get_g_type): new
310         function to get the GType given a RegisteredTypeInfo
311
312 2008-04-22  Johan Dahlin  <johan@gnome.org>
313
314         * COPYING: Add a LGPL license, to prevent automake to
315         put in a copy of GPL here. Pointed out by Havoc.
316
317         * girepository/ginfo.c (g_info_from_entry), (g_type_info_new),
318         (g_type_info_is_pointer), (g_type_info_get_tag),
319         (g_type_info_get_param_type), (g_type_info_get_interface),
320         (g_type_info_get_array_length), (g_type_info_is_zero_terminated),
321         (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
322         (g_error_domain_info_get_codes), (g_enum_info_get_value),
323         (g_object_info_get_interface), (g_object_info_get_field),
324         (g_interface_info_get_prerequisite),
325         (g_signal_info_get_class_closure), (g_constant_info_get_value):
326         * girepository/ginvoke.c (get_ffi_type):
327         * girepository/girepository.h:
328         * girepository/gmetadata.c (g_metadata_get_dir_entry),
329         (g_metadata_check_sanity), (validate_header),
330         (validate_array_type_blob), (validate_iface_type_blob),
331         (validate_param_type_blob), (validate_error_type_blob),
332         (validate_type_blob), (validate_constant_blob),
333         (validate_struct_blob), (validate_enum_blob):
334         * girepository/gmetadata.h:
335         * tests/Makefile.am:
336         * tests/invoke/Makefile.am:
337         * tests/invoke/invoke.c (main):
338         * tests/roundtrips.sh:
339         * tools/Makefile.am:
340         * tools/compiler.c (format_output), (write_out_metadata), (main):
341         * tools/generate.c (write_type_name), (write_type_info),
342         (write_constant_value), (write_enum_info), (load_metadata), (main):
343         * tools/gidlcompilercontext.c:
344         * tools/gidlcompilercontext.h:
345         * tools/gidlcompilerentrynode.c:
346         * tools/gidlcompilerentrynode.h:
347         * tools/gidlcompilertypenode.c:
348         * tools/gidlcompilertypenode.h:
349         * tools/gidlmodule.c (g_idl_module_build_metadata):
350         * tools/gidlmodule.h:
351         * tools/gidlnode.c (init_stats), (dump_stats),
352         (g_idl_node_get_size), (g_idl_node_get_full_size),
353         (g_idl_node_cmp), (g_idl_node_can_have_member),
354         (g_idl_node_add_member), (g_idl_node_param_direction_string),
355         (parse_int_value), (parse_uint_value), (parse_float_value),
356         (parse_boolean_value), (find_entry_node), (find_entry),
357         (serialize_type), (g_idl_node_build_metadata), (write_string):
358         * tools/gidlnode.h:
359         * tools/gidlparser.c (parse_type_internal):
360         * tools/quote-file.sh:
361         Revert revisions 157,149-148,136-129 and 120.
362         Move back to using g-idl-generate to generate the metadata and
363         avoids dependency on a c compiler.
364
365 2008-04-22  Johan Dahlin  <jdahlin@async.com.br>
366
367         * giscanner/girwriter.py:
368         * tools/g-ir-scanner:
369         Add an initial GIR writer and a --format option to g-ir-scanner
370
371 2008-04-21  Johan Dahlin  <johan@gnome.org>
372
373         * giscanner/cgobject.py: Use ctypes.util.find_library to locate
374         gobject-2.0 and raise ImportError if not found.
375
376         * giscanner/gidlparser.py:
377         * giscanner/gidlwriter.py:
378         * giscanner/gobjecttreebuilder.py:
379         * tools/g-ir-scanner:
380         Add a --include argument to include types from other idls.
381         Add a minimalistic GIDL parser (just objects for now)
382         Implement resolving of external type references and use it to
383         resolve parent types, argument types and return types.
384
385 2008-04-21  Johan Dahlin  <johan@gnome.org>
386
387         * giscanner/gidlwriter.py:
388         * giscanner/gobjecttreebuilder.py:
389         * giscanner/treebuilder.py:
390         Add support for properties.
391         Refactor Class/Interface support a bit, to share more code and
392         always initialize their method attribute to an empty list.
393
394 2008-04-21  Johan Dahlin  <johan@gnome.org>
395
396         * giscanner/cgobject.py:
397         Add a workaround for a glib bug interface introspection bug
398         (object_interface_list_properties, object_class_list_properties):
399         Cast the return value to GParamSpec.
400
401         * tests/parser/Foo-expected.gidl: Update
402         * tests/parser/foo.c: Add a string property
403
404         * giscanner/gobjecttreebuilder.py:
405         After stripping namespaces, remove the original
406         item to avoid duplication (GtkButton struct and Button object)
407
408 2008-04-21  Johan Dahlin  <johan@gnome.org>
409
410         * giscanner/gobjecttreebuilder.py:
411         * giscanner/treebuilder.py:
412         Strip namespaces before objects, so we'll export
413         GtkButton as Button in the gtk namespace
414
415 2008-04-21  Johan Dahlin  <johan@gnome.org>
416
417         * giscanner/gidlwriter.py:
418         * giscanner/gobjecttreebuilder.py:
419         * giscanner/treebuilder.py:
420         Add constructors for object/boxed types.
421
422 2008-04-21  Johan Dahlin  <johan@gnome.org>
423
424         * giscanner/gidlwriter.py:
425         * giscanner/gobjecttreebuilder.py:
426         Add support for boxed types
427
428 2008-04-21  Johan Dahlin  <johan@gnome.org>
429
430         * giscanner/giscannermodule.c: Mark structures as const,
431         wrap SourceType.const_string.
432
433         * tests/parser/foo-object.h: Add a couple of constants.
434
435         * giscanner/gidlwriter.py:
436         * giscanner/gobjecttreebuilder.py:
437         * giscanner/treebuilder.py:
438         Add basic support for interfaces
439
440         * tools/g-ir-scanner:
441         Add -o/--output for writing to a file
442
443 2008-04-21  Havoc Pennington  <hp@redhat.com>
444
445         * TODO: add some C API wishlist items I could think of quickly
446
447 2008-04-21  Johan Dahlin  <jdahlin@async.com.br>
448
449         * giscanner/gidlwriter.py:
450         * giscanner/xmlwriter.py:
451         Add a simple api for writing tags which can be used 
452         with the new 'with statement' in python 2.5
453
454 2008-04-21  Johan Dahlin  <johan@gnome.org>
455
456         * giscanner/gobjecttreebuilder.py:
457         Strip namespace and object prefix from method names.
458
459 2008-04-21  Johan Dahlin  <johan@gnome.org>
460
461         * tools/g-ir-scanner (main): Add --pkg option to pass in
462         pkg-config modules to get cflags from.
463
464         * giscanner/gidlwriter.py (GIDLWriter._write_method): 
465         Avoid duplication, reuse function writer for methods.
466
467 2008-04-21  Johan Dahlin  <jdahlin@async.com.br>
468
469         * giscanner/gidlwriter.py:
470         * giscanner/gobjecttreebuilder.py:
471         * giscanner/treebuilder.py:
472         * tools/g-ir-scanner:
473         Resolve libtool .la files.
474         Strip name spaces for methods.
475         Add function symbols
476
477 2008-04-20  Johan Dahlin  <jdahlin@async.com.br>
478
479         * giscanner/cgobject.py:
480         * giscanner/gidlwriter.py:
481         * giscanner/gobjecttreebuilder.py:
482         * giscanner/treebuilder.py:
483         Add support for classes and methods
484
485 2008-04-20  Johan Dahlin  <johan@gnome.org>
486
487         * giscanner/gidlwriter.py:
488         * giscanner/gobjecttreebuilder.py:
489         * giscanner/odict.py:
490         Avoid conflicts, keep the output ordered similar to
491         the order of the input.
492         Add a simple ordered dictionary implemenation
493
494 2008-04-19  Johan Dahlin  <johan@gnome.org>
495
496         * giscanner/cgobject.py:
497         * giscanner/gidlwriter.py:
498         * giscanner/gobjecttreebuilder.py:
499         * tools/g-ir-scanner:
500         Start introspecting get-type functions.
501         Implement support for GLib/GFlags GTypes.
502         Add a ctype based GObject binding.
503
504 2008-04-18  Johan Dahlin  <jdahlin@async.com.br>
505
506         * giscanner/gidlwriter.py:
507         * giscanner/xmlwriter.py:
508         * tools/g-ir-scanner:
509         Add a simplistic gidl writer, which can't do too much.
510
511 2008-04-18  Johan Dahlin  <johan@gnome.org>
512
513         * giscanner/sourcescanner.py:
514         * giscanner/treebuilder.py:
515         * tools/g-ir-scanner:
516         split tree building and source scanning interface to separate files.
517
518 2008-04-18  Johan Dahlin  <johan@gnome.org>
519
520         * tools/g-ir-scanner (Parameter.__init__): Start constructing
521         a real node tree.
522         - Add support for struct/parameter/return, start parsing of ctypes
523
524         * giscanner/giscannermodule.c: wrap GISourceType.child_list and
525         fix the style
526
527 2008-03-31  Johan Dahlin  <johan@gnome.org>
528
529         * tools/g-ir-scanner:
530         Start to build abstract syntax node of scanned sources.
531         Add support for cpp options.
532
533 2008-03-27  Johan Dahlin  <johan@gnome.org>
534
535         * giscanner/giscannermodule.c:
536         * giscanner/scannerlexer.l:
537         * giscanner/sourcescanner.c:
538         * tools/g-ir-scanner:
539
540         Add simple pre-processor using subprocess and a PIPE.
541         Change the parse_file apis to accept a file descriptor.
542
543 2008-03-25  Johan Dahlin  <johan@gnome.org>
544
545         * giscanner/__init__.py:
546         * tools/g-ir-scanner:
547         Fix a typo and add an example python test program.
548
549 2008-03-25  Johan Dahlin  <johan@gnome.org>
550         
551         * giscanner/__init__.py:
552         * giscanner/giscannermodule.c:
553         * giscanner/sourcescanner.c:
554         * giscanner/sourcescanner.h:
555         Add constants and wrap a few more SymbolType fields
556
557 2008-03-25  Johan Dahlin  <johan@gnome.org>
558         
559         * configure.ac:
560         * giscanner:
561         * giscanner/__init__.py:
562         * giscanner/giscannermodule.c:
563         * giscanner/Makefile.am:
564
565         Add initial python bindings for the scanner and 
566         depend on python 2.5.
567
568 2008-03-25  Johan Dahlin  <johan@gnome.org>
569
570         * Makefile.am:
571         * configure.ac:
572         * giscanner/Makefile.am:
573         * giscanner/sourcescanner.c:
574         * giscanner/sourcescanner.h:
575         * tools/Makefile.am:
576         * tools/grealpath.h:
577         * tools/sourcescanner.c:
578         * tools/sourcescanner.h:
579
580         Move the scanner to a separate library.
581         
582 2008-03-23  Johan Dahlin  <johan@gnome.org>
583
584         * tools/Makefile.am:
585         * tools/scanner.c:
586         * tools/scanner.h:
587         * tools/scannerlexer.l:
588         * tools/scannerparser.y:
589         * tools/sourcescanner.c:
590         * tools/sourcescanner.h:
591         Split out the source scanner from the generator.
592         Rename the symbols used in the scanner to use the gi_ prefix.
593         This should make it possible to use the raw C parser from
594         other programs.
595
596 2008-03-23  Johan Dahlin  <johan@gnome.org>
597
598         * tests/parser/Makefile.am (utility.gidl): 
599         * tests/parser/utility-expected.gidl: 
600         Pass in the gobject.gidl since we're defining a GObject.
601
602 2008-03-12  Johan Dahlin  <johan@gnome.org>
603
604         * relaxng/relaxng.rng:
605         Add a releaxng in relaxng we can use to validate the relaxngs
606         schemas
607
608 2008-03-12  Jürg Billeter  <j@bitron.ch>
609
610         * tools/scanner.c: (g_igenerator_new):
611         * tools/scannerparser.y:
612         Fix compiler warnings.
613
614 2008-03-12  Jürg Billeter  <j@bitron.ch>
615
616         * tools/scanner.c:
617         * tools/scanner.h:
618         * tools/scannerparser.y:
619         Start fixing memory management in g-idl-scanner.
620
621 2008-03-12  Rob Taylor  <rob.taylor@codethink.co.uk>
622
623         * tools/gidlcompilercontext.c: (write_compiled):
624         Fix critical warning when no shlib passed to g-idl-compiler.
625
626 2008-03-12  Johan Dahlin  <johan@gnome.org>
627
628         * tests/parser/utility-expected.gidl:
629         * tests/parser/utility.h:
630         Add a get_type-function, so the scanner actually
631         parses it as an object.
632         
633 2008-03-12  Johan Dahlin  <johan@gnome.org>
634
635         * tools/gidlwriter.c (function_generate): Add missing trailing quote.
636         Bad Philip!
637
638         * tests/parser/Foo-expected.gidl:
639         * tests/parser/Makefile.am:
640         * tests/parser/foo-object.h:
641         * tests/parser/foo.c:
642         * tests/parser/utility-expected.gidl:
643         * tests/parser/utility.c:
644         * tests/parser/utility.h:
645
646         Add a new gidl test. 'utility.gidl', which is used to be able
647         to test external type references. Add a reference to UtilityObject*
648         in the idl file.
649
650 2008-03-11  Johan Dahlin  <johan@gnome.org>
651
652         * tools/compiler.c:
653         * tools/generate.c:
654         Remove most global variables
655
656 2008-03-11  Philip Van Hoof  <me@pvanhoof.be>
657  
658         * tools/scannerlexer.l:
659         * tools/scanner.c:
660         * tests/parser/Foo-expected.gidl:
661         * tests/parser/foo.c:
662         * tests/parser/Makefile.am:
663         * tests/parser/foo-object.h:
664  
665         Added a few extra tests. Which resulted in finding a few
666         bugs. Which resulted in me fixing those bugs
667
668 2008-03-11  Rob Taylor  <rob.taylor@codethink.co.uk>
669
670         * tools/gidlcompilercontext.c: (g_idl_compiler_write_dir_entry),
671         (g_idl_compiler_write_xref_entry), (g_idl_compiler_add_xref):
672         Add some comments for strings into generated output for
673         easier debugging.
674
675 2008-03-11  Rob Taylor  <rob.taylor@codethink.co.uk>
676
677         * tools/gidlcompilercontext.c: (write_compiled):
678         Write out the shlibs variable before writing out the strings
679         length. Fixes compiler warning when using '-l' flag with
680         g-idl-compiler
681
682 2008-03-11  Johan Dahlin  <johan@gnome.org>
683
684         * tests/parser/Foo-expected.gidl:
685         * tests/parser/foo-object.h:
686         * tools/scanner.c:
687         * tools/scanner.h:
688         * tools/scannerlexer.l:
689         Add support for parsing return arguments. Add support for
690         caller-owns return types.
691         Patch by Philip Van Hoof.
692         
693         * tools/scannerparser.y:
694         Remove parsing of the @deprecated syntax used in headers.
695         We will support gtk-doc deprecation in the future instead.
696
697 2008-03-11  Johan Dahlin  <johan@gnome.org>
698
699         * tools/compiler.c (main): Coding style fixes
700
701 2008-03-10  Johan Dahlin  <johan@gnome.org>
702
703         * configure.ac:
704         Add GCOV_LIBS to GILIBS
705
706 2008-03-10  Johan Dahlin  <johan@gnome.org>
707
708         * tests/parser/Foo-expected.gidl:
709         * tests/parser/foo.c:
710         Rename null-ok to direction=out
711
712 2008-03-10  Philip Van Hoof  <me@pvanhoof.be>
713
714         reviewed and extensively tested by Johan
715
716         * tests/parser/Foo-expected.gidl:
717         * tests/parser/foo-object.h:
718         * tests/parser/foo.c:
719         * tools/gidlnode.c:
720         * tools/gidlnode.h:
721         * tools/gidlwriter.c:
722         * tools/scanner.c:
723         * tools/scanner.h:
724         * tools/scannerlexer.l:
725         * tools/scannerparser.y:
726
727         Add support for scanning for gtk-doc comments inside
728         C source files. Add tests
729
730 2008-03-10  Johan Dahlin  <johan@gnome.org>
731
732         * tests/parser/Makefile.am:
733         * tests/parser/foo.c:
734         * tools/scanner.c:
735         * tools/scanner.h:
736         * tools/scannerparser.y:
737         Add an api to lex filenames.
738         Lex all source .c files passed in on the command line.
739         Scan sources in a test and a couple of private structures
740         which should not be included in the generated gidl
741
742 2008-03-10  Johan Dahlin  <johan@gnome.org>
743
744         * tests/invoke/Makefile.am: Make the generated metadata 
745         depend on the g-idl-compiler
746
747 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
748
749         * tools/gidlmodule.c
750         * tools/gidlmodule.h
751         * tools/gidlnode.c
752         * tools/gidlnode.h
753         Remove the old g-idl-compiler code.
754
755
756 2008-02-22  Mark Doffman  <mark.doffman@codethink.co.uk>
757
758         * tools/quote-file.sh
759         * tools/compiler.c
760         * tools/generate.c
761         Move to using the 'C' struct compiler code.
762
763 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
764
765         * girepository/ginfo.c
766         * tools/generate.c
767         Change the way that external references with no namespace
768         are dealt with. External references with no namespace
769         are placed into the XML as-if they are a local reference.
770         This is temporary, but helps with roundtrip tests.
771
772 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
773
774         * girepository/ginfo.c
775         Add the ability to get the value of a constant of
776         type TYPE_TAG_SYMBOL. In the case of a symbol the value
777         is provided as a string.
778
779         This would deal properly with:
780         typedef char* random;
781         const random = "A string";
782
783 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
784
785         * girepository/ginfo.c
786         * girepository/girepository.h
787         * tools/generate.c
788         Add a function to check if an enum is registered or not.
789         Previously anything testing this relied on the g-type
790         string offset having a value of 0.
791
792         * girepository/gmetadata.c
793         * girepository/gmetadata.h
794         * tools/generate.c
795         Remove unneccesary or erroneous checks. There were two
796         metadata validation checks which made sure that the blob
797         sizes were the same as some magic numbers compiled into the code.
798         This is wrong as it breaks any forwards compatibility that may
799         be possible.
800
801         Checks were also present that made sure that unregistered type
802         blobs had a value of 0 in the g-type offset field. This is
803         unneccessary. If a type blob is unregistered then any value
804         in its g-type field is simply invalid.
805
806 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
807
808         * girepository/ginfo.c
809         * girepository/gmetadata.c
810         * girepository/gmetadata.h
811
812           Change the metadata format to have a standard header
813           for all the type blobs. Merge the SimpleTypeBlob
814           and InterfaceTypeBlob into a union. A union of these
815           two blobs existed previously but was not explicit
816           in the metadata format.
817
818 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
819
820         * tools/gidlcompilercontext.c
821         * tools/gidlcompilercontext.h
822         * tools/gidlcompilerentrynode.c
823         * tools/gidlcompilerentrynode.h
824         * tools/gidlcompilertypenode.c
825         * tools/gidlcompilertypenode.h
826
827         Add code to compile a tree of GIdlNodes to
828         a 'C' struct representing the metadata.
829         This is to aid cross-compiling. Previously
830         the g-idl-compiler created a binary blob with
831         data written in the byte order and alignment
832         of the tool rather than the intended target.
833
834         Cleaned up and improved by Johan and Robert :-)
835
836 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
837
838         * girepository/ginvoke.c
839         * girepository/girepository.h
840         * girepository/gmetadata.c
841         * girepository/gmetadata.h
842         * tools/generate.c
843         * tools/gidlparser.c
844         Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
845         to avoid confusion with the interface blob.
846
847         * tools/generate.c
848         * tools/gidlparser.c
849         Remove magic numbers and replace with type-tag
850         enumeration symbols.
851
852         * girepository/gmetadata.c
853         Add validate declaration.
854
855 2008-03-10  Jürg Billeter  <j@bitron.ch>
856
857         * tools/gidlparser.c: (parse_type_internal):
858         * tools/scannerlexer.l:
859         * tools/scannerparser.y:
860         Support C99 _Bool type in scanner.
861
862 2008-03-10  Jürg Billeter  <j@bitron.ch>
863
864         * tests/parser/Foo-expected.gidl:
865         * tests/parser/foo-object.h:
866         * tests/parser/foo.c: (foo_enum_method):
867         * tools/scanner.c: (g_igenerator_process_function_symbol):
868         Don't skip functions that are defined in the namespace of a type
869         that doesn't support methods, as for example enums.
870
871 2008-03-10  Johan Dahlin  <johan@gnome.org>
872
873         * gidl.dtd: Remove, we're using relaxng for now
874
875         * tests/parser/Foo-expected.gidl:
876         * tests/parser/foo-object.h:
877         * tests/parser/foo.c:
878         Rename the enum/flags get_type functions to include the whole type.
879
880 2008-03-08  Marc-Andre Lureau  <marcandre.lureau@gmail.com>
881
882         * tools/gidlwriter.c (enum_generate): added "type-name",
883         "get-type" and "deprecated" missing arguments.
884         * tests/parser/Foo-expected.gidl:
885         * tests/parser/foo-object.h: test enum type, and no type.
886
887 2008-03-06  Johan Dahlin  <jdahlin@async.com.br>
888
889         * configure.ac:
890         Consistent checks, add missing 'test'
891
892 2008-03-05  Havoc Pennington  <hp@redhat.com>
893
894         * configure.ac: Take advantage of a libffi.pc if one exists, as it
895         does on Fedora 8. Make libffi a hard requirement, since it was in
896         practice anyway (was not really conditional in the code or
897         makefile, only in configure).
898
899 2008-02-21  Mark Doffman  <mark.doffman@codethink.co.uk>
900
901         reviewed by: Rob Taylor  <rob.taylor@codethink.co.uk>
902         reviewed by: Johan Dahlin  <johan@gnome.org>
903
904         * tests/Makefile.am:
905         * tests/roundtrips.sh:
906         Modify the roundtrips test so that they do not use the
907         --raw option of the gidl compiler but instead compile a
908         shared library to use with g_module.
909
910         * tests/invoke/Makefile.am:
911         * tests/invoke/invoke.c:
912         Modify the invoke tests to build a shared library rather
913         than use the --raw option.
914
915         * tests/invoke/invoke-namespace-find.sh: Removed:
916         Noone knows why this was here, so removed.
917
918 2008-02-19  Rob Taylor  <rob.taylor@codethink.co.uk>
919
920         * tools/scanner.c: (g_igenerator_process_function_symbol):
921         Move g_idl_node_can_have_member test later, as it broke spotting
922         get_type's for nodes that can't have members.
923
924 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
925
926         * tools/gidlnode.h:
927         * tools/gidlnode.c: (g_idl_node_can_have_member):
928         Add g_idl_node_can_have_member.
929
930         * tools/scanner.c: (g_igenerator_process_function_symbol):
931         Use g_idl_node_can_have_member to test if we should add a function
932         as a member of the type node.
933
934 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
935
936         * gidl/GLib.gidl: Renamed to gidl/gobject-2.0.gidl:
937         * gidl/Makefile.am:
938         * tests/parser/Makefile.am:
939         Rename GLib.gidl to gobject-2.0.gidl and install in /usr/share/gidl.
940
941 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
942
943         * tools/scanner.c: (main):
944         Ignore -pthread when passed to g-idl-scanner.
945
946 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
947
948         * tools/grealpath.h: Added:
949         * tools/scanner.c: (main):
950         * tools/scannerlexer.l:
951         * tools/Makefile.am:
952         Always use absolute paths with symbolic links resolved when
953         comparing filenames.
954
955 2008-02-18  Rob Taylor  <rob.taylor@codethink.co.uk>
956
957         * gobject-introspection.pc.in:
958         Provide variables for g-idl-parser, scanner and compiler in the
959         pkgconfig file.
960
961 2008-02-13  Rob Taylor  <rob.taylor@codethink.co.uk>
962
963         * gcov.mak:
964         * girepository/Makefile.am:
965         * tools/Makefile.am:
966         Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
967
968 2008-02-10  Johan Dahlin  <johan@gnome.org>
969
970         * tests/parser/Foo-expected.gidl:
971         * tests/parser/foo-object.h:
972         * tests/parser/foo.c: (foo_boxed_copy), (foo_boxed_free),
973         (foo_boxed_get_type), (foo_boxed_new), (foo_boxed_method):
974         Add boxed test.
975
976 2008-02-10  Johan Dahlin  <johan@gnome.org>
977
978         * tests/parser/Foo-expected.gidl:
979         * tests/parser/foo-object.h:
980         * tests/parser/foo.c: (foo_enum_get_type), (foo_flags_get_type):
981         Add enum and flags test.
982
983 2008-02-10  Johan Dahlin  <johan@gnome.org>
984
985         * Makefile.am:
986         * configure.ac:
987         * girepository/Makefile.am:
988         Make 'make distcheck' work again.
989
990 2008-02-10  Johan Dahlin  <johan@gnome.org>
991
992         * m4/Makefile.am (EXTRA_DIST): its called as-compiler-flag.m4,
993         not as-compiler.m4.
994
995         * tests/parser/Makefile.am: Only create Foo.gidl when running make
996         check, eg exclude it from BUILT_SOURCES.
997
998 2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>
999
1000         * Makefile.am:
1001         * configure.ac:
1002         * gcov.mak: Added:
1003         * girepository/Makefile.am:
1004         * m4/Makefile.am: Added:
1005         * m4/as-compiler-flag.m4: Added:
1006         * m4/gcov.m4: Added:
1007         * tools/Makefile.am:
1008         Add ability to generate a coverage report.
1009         Adds configure option --enable-gcov and make rule 'check-coverage'.
1010
1011 2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>
1012
1013         * Makefile.am:
1014         * configure.ac:
1015         * gidl/Makefile.am: Added:
1016         * girepository/Makefile.am: Added:
1017         * src/Makefile.am: Renamed to tools/Makefile.am:
1018         * src/compiler.c: Renamed to tools/compiler.c:
1019         * src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
1020         * src/generate.c: Renamed to tools/generate.c:
1021         * src/gidlmodule.c: Renamed to tools/gidlmodule.c:
1022         * src/gidlmodule.h: Renamed to tools/gidlmodule.h:
1023         * src/gidlnode.c: Renamed to tools/gidlnode.c:
1024         * src/gidlnode.h: Renamed to tools/gidlnode.h:
1025         * src/gidlparser.c: Renamed to tools/gidlparser.c:
1026         * src/gidlparser.h: Renamed to tools/gidlparser.h:
1027         * src/gidlwriter.c: Renamed to tools/gidlwriter.c:
1028         * src/gidlwriter.h: Renamed to tools/gidlwriter.h:
1029         * src/ginfo.c: Renamed to girepository/ginfo.c:
1030         * src/ginvoke.c: Renamed to girepository/ginvoke.c:
1031         * src/girepository.c: Renamed to girepository/girepository.c:
1032         * src/girepository.h: Renamed to girepository/girepository.h:
1033         * src/gmetadata.c: Renamed to girepository/gmetadata.c:
1034         * src/gmetadata.h: Renamed to girepository/gmetadata.h:
1035         * src/scanner.c: Renamed to tools/scanner.c:
1036         * src/scanner.h: Renamed to tools/scanner.h:
1037         * src/scannerlexer.l: Renamed to tools/scannerlexer.l:
1038         * src/scannerparser.y: Renamed to tools/scannerparser.y:
1039         * tests/invoke/Makefile.am:
1040         Split src/ into girepository/ and tools/
1041
1042         * Makefile.am:
1043         * configure.ac:
1044         * girepository/Makefile.am:
1045         * tests/Makefile.am:
1046         * tests/invoke/Makefile.am:
1047         * tests/parser/Makefile.am:
1048         * tests/roundtrips.sh:
1049         * tools/Makefile.am:
1050         Make distcheck work.
1051
1052 2008-02-04  Rob Taylor  <rob.taylor@codethink.co.uk>
1053
1054         * tests/invoke/invoke.c: (main):
1055         * tests/invoke/testfns.c: (test6), (test7):
1056         * tests/invoke/testfns.xml:
1057         Add tests for invokation with a GList argument.
1058         Also tests caller-owns return values.
1059
1060 2008-02-04  Rob Taylor  <robtaylor@floopily.org>
1061
1062         * src/ginfo.c:
1063         Add some documentation for GICallableInfo
1064
1065 2008-02-01  Mark Doffman  <mark.doffman@codethink.co.uk>
1066
1067         * gidl.dtd:
1068         Correct syntax errors in the DTD file.
1069         * relaxng/api.xml:
1070         * relaxng/c-types.xml:
1071         * relaxng/g-types.xml:
1072         * relaxng/util.xml:
1073         Add a RelaxNG specification for the GObject Introspection XML data.
1074         The Specification has validated all of the test files.
1075
1076 2008-01-25  Rob Taylor  <robtaylor@floopily.org>
1077
1078         * tests/roundtrips.sh:
1079         * tests/struct.test:
1080         Add roundtrip tests for structs.
1081
1082 2008-01-11  Johan Dahlin  <johan@gnome.org>
1083
1084         * src/scanner.c (g_igenerator_process_function_symbol):
1085         Refactor out g_idle_node_add_member.
1086         (create_node_from_gtype, create_node_from_ctype):
1087         Use case instead of if...else
1088         (get_type_from_type_id):
1089         Rename to create_node_from_gtype
1090         (get_type_from_ctype):
1091         Rename to create_node_from_ctype
1092
1093         Rename ginode -> node, gitype -> type, gifunc -> func.
1094
1095         * src/gidlnode.c (g_idl_node_add_member, g_idl_node_cmp):
1096         Two new functions, refactor out of scanner.c
1097
1098         * src/scanner.c: (g_igenerator_process_function_symbol):
1099         * src/scannerlexer.l:
1100         Do not save the content of the deprecated variable, only
1101         if it's set or not.
1102
1103 2008-01-11  Johan Dahlin  <johan@gnome.org>
1104
1105         * tests/parser/foo-object.h: Add a couple of comment parser tests.
1106
1107 2008-01-11  Jürg Billeter  <j@bitron.ch>
1108
1109         * src/scannerlexer.l:
1110         Fix GTK-Doc parsing.
1111
1112 2008-01-11  Jürg Billeter  <j@bitron.ch>
1113
1114         * src/scannerlexer.l:
1115         Fix GTK-Doc parsing.
1116
1117 2008-01-11  Jürg Billeter  <j@bitron.ch>
1118
1119         * src/scanner.c: (lookup_symbol):
1120         Return unresolved name if we find unknown symbol.
1121
1122 2008-01-11  Jürg Billeter  <j@bitron.ch>
1123
1124         * src/scanner.c: (g_igenerator_generate):
1125         Initialize GObject to fix scanning interface properties.
1126
1127         * tests/parser/Foo-expected.gidl:
1128         * tests/parser/foo-object.h:
1129         * tests/parser/foo.c: (foo_interface_get_type):
1130         Test interfaces with GObject prerequisite.
1131
1132         * tests/parser/Makefile.am:
1133         Set G_DEBUG=fatal_warnings to abort test on warnings and criticals.
1134
1135 2007-12-27  Johan Dahlin  <johan@gnome.org>
1136
1137         * src/scannerlexer.l:
1138         Parse gtk-doc comments.
1139
1140         * src/gidlwriter.c: (function_generate):
1141         Reorganize, avoid duplication and add support for
1142         writing deprecated functions.
1143
1144         * src/scannerparser.y:
1145         * src/scanner.h:
1146         Add new structure CDirective and functions to create/free them.
1147
1148         * src/scanner.c: (g_igenerator_process_function_symbol),
1149         (g_igenerator_process_unregistered_struct_typedef),
1150         (g_igenerator_process_struct_typedef),
1151         (g_igenerator_process_union_typedef),
1152         (g_igenerator_process_enum_typedef),
1153         (g_igenerator_process_function_typedef), (g_igenerator_add_symbol),
1154         (g_igenerator_start_preprocessor):
1155         Parse @deprecated directive for functions.
1156         Remove some more C99isms.
1157         Send in -C to cpp to avoid stripping comments.
1158
1159         * tests/parser/foo-object.h:
1160         * tests/parser/Foo-expected.gidl:
1161         Add deprecated directive
1162
1163 2007-12-27  Johan Dahlin  <johan@gnome.org>
1164
1165         * src/scannerlexer.l (intsuffix): Add emacs mode line and
1166         escape ' and " so it looks more like C.
1167
1168         * src/scanner.c:
1169         Unlink temporary file used.
1170
1171 2007-12-27  Johan Dahlin  <johan@gnome.org>
1172
1173         * src/scanner.c: (g_igenerator_new), (g_igenerator_free),
1174         (g_igenerator_start_preprocessor), (main):
1175         * src/scanner.h:
1176         * src/scannerparser.y:
1177         Plug a couple of simple memory leaks.
1178
1179 2007-12-27  Johan Dahlin  <johan@gnome.org>
1180
1181         * src/scanner.c: (g_igenerator_parse_macros),
1182         (g_igenerator_start_preprocessor), (g_igenerator_set_verbose),
1183         (main):
1184         * src/scanner.h:
1185         * src/scannerparser.y:
1186         * tests/parser/Makefile.am:
1187
1188         Improve error reporting, return when the preprocessor fails.
1189         Add a verbose parameter, to aid debugging.
1190         Revert to using a temporary file to communicate between the
1191         preprocessor and the parser, because we need to wait for
1192         the exit code from the pre-processor before starting to parse.
1193
1194 2007-12-16  Johan Dahlin  <jdahlin@async.com.br>
1195
1196         * src/Makefile.am: Rename clexer.l to scannerlexer.l and
1197         cparser.y to scannerparser.y
1198
1199 2007-12-11  Johan Dahlin  <johan@gnome.org>
1200
1201         * src/clexer.l:
1202         * src/cparser.y:
1203         * src/scanner.c: (g_igenerator_new):
1204         * src/scanner.h:
1205         Get rid of the global the_generator variable.
1206
1207 2007-12-10  Johan Dahlin  <johan@gnome.org>
1208
1209         * src/scanner.c (main): Add an output option,
1210         add checks for required parameters
1211
1212         * src/Makefile.am:
1213         set BUILD_SOURCES and CLEANFILES properly
1214
1215         * src/gidlwriter.c: (g_writer_write_inline), (g_writer_write),
1216         (g_writer_write_indent), (g_writer_write_unindent),
1217         (field_generate), (value_generate), (constant_generate),
1218         (property_generate), (function_generate), (vfunc_generate),
1219         (signal_generate), (interface_generate), (struct_generate),
1220         (union_generate), (boxed_generate), (enum_generate),
1221         (node_generate), (g_writer_write_module), (g_idl_writer_save_file):
1222         * src/gidlwriter.h:
1223         * src/scanner.c: (g_igenerator_generate):
1224         * src/scanner.h:
1225         * src/scannerwriter.c:
1226
1227         Refactor scannerwriter to only be tied to a GIdlModule and move
1228         it (again!) to gidlwriter.c. Change the writer function to take
1229         a filename.
1230
1231 2007-12-10  Johan Dahlin  <johan@gnome.org>
1232
1233         * src/Makefile.am:
1234         * src/scanner.c: (g_igenerator_generate):
1235         * src/scanner.h:
1236         * src/scannerwriter.c: (g_igenerator_write_inline),
1237         (g_igenerator_write), (g_igenerator_write_indent),
1238         (g_igenerator_write_unindent), (field_generate), (value_generate),
1239         (constant_generate), (property_generate), (function_generate),
1240         (vfunc_generate), (signal_generate), (interface_generate),
1241         (struct_generate), (union_generate), (boxed_generate),
1242         (enum_generate), (node_generate), (module_generate),
1243         (g_scanner_write_file):
1244
1245         Move the scanner gidl writing to a separate source file.
1246
1247 2007-12-10  Johan Dahlin  <johan@gnome.org>
1248
1249         * src/cparser.y:
1250         * src/scanner.c:
1251         * src/scanner.h:
1252         Move over all CType construction functions.
1253
1254         * tests/parser/Makefile.am:
1255         Be verbose when printing parsing tests results.
1256
1257 2007-12-10  Johan Dahlin  <johan@gnome.org>
1258
1259         * src/scanner.c (g_igenerator_start_preprocessor): Refactor
1260         preprocessor handling to here. Start cpp insteado of cc -E,
1261         always include -U__GNUC__, since it's specific to the preprocessor
1262         we use.
1263
1264         * tests/parser/Makefile.am (check-local): Silent diff and skip
1265         -U__GNUC__ which is always defined now
1266
1267 2007-12-10  Johan Dahlin,,,  <jdahlin@plasttroll>
1268
1269         reviewed by: <delete if not using a buddy>
1270
1271         * src/scanner.c: (g_igenerator_start_preprocessor), (main):
1272         * tests/parser/Makefile.am:
1273
1274 2007-12-09  Johan Dahlin  <johan@gnome.org>
1275
1276         * src/scanner.c:
1277         Use GOption for command line options.
1278         (g_igenerator_new, main): Simplify constructor and they way
1279         parameters are passed into it.
1280
1281         * src/cparser.y:
1282         * src/Makefile.am:
1283         * src/clexer.l:
1284         * src/cparser.y:
1285         * src/gen-introspect.c:
1286         * src/gen-introspect.h:
1287         * src/scanner.c:
1288         Rename gen-introspect.[ch] to scanner.[ch]
1289
1290 2007-12-09  Johan Dahlin  <johan@gnome.org>
1291
1292         * TODO: Update
1293
1294         * src/Makefile.am: Rename gen-introspect to g-idl-scanner,
1295         don't make the repository library and the other utilites link against
1296         gthread-2.0
1297
1298         * src/gen-introspect.c: (g_igenerator_create_object),
1299         (g_igenerator_create_interface), (g_igenerator_create_boxed),
1300         (g_igenerator_create_enum), (g_igenerator_create_flags),
1301         (g_igenerator_process_module_symbol),
1302         (g_igenerator_process_module), (g_igenerator_generate), (main):
1303         * src/gen-introspect.h:
1304         Refactor g_igenerator_process_types into smaller pieces.
1305
1306         * tests/parser/Makefile.am:
1307         Depend on the gen-introspect binary
1308
1309 2007-12-09  Johan Dahlin  <johan@gnome.org>
1310
1311         * src/gen-introspect.c (g_igenerator_process_types):
1312         Break into smaller pieces, one for each generated node type.
1313
1314 2007-12-08  Johan Dahlin  <johan@gnome.org>
1315
1316         * src/gen-introspect.c: (g_igenerator_process_types),
1317         (g_igenerator_add_module):
1318         * tests/parser/Foo-expected.gidl:
1319         * tests/parser/foo-object.h:
1320         * tests/parser/foo.c: (foo_subobject_class_init),
1321         (foo_subobject_init):
1322
1323         Add a subobject test and make sure to register defined classes
1324         in the lookup symbol hash table.
1325
1326 2007-12-08  Johan Dahlin  <johan@gnome.org>
1327
1328         * gidl/GLib.gidl:
1329         * src/Makefile.am:
1330         * src/gen-introspect.c: (g_igenerator_new), (lookup_symbol),
1331         (g_igenerator_process_types), (g_igenerator_add_module),
1332         (g_igenerator_add_include_idl), (main):
1333         * src/gen-introspect.h:
1334         * tests/parser/Makefile.am:
1335         * tests/parser/Foo-expected.gidl:
1336
1337         Change the gen-introspect to generate namespaced module names,
1338         such as GLib.Object instead of GObject.
1339         Add a GLib.gidl which introduces GLib.Object and GLib.InitiallyUnowned,
1340         add a --include-idl parameter to gen-introspect,
1341         and update the parser test.
1342
1343 2007-12-08  Johan Dahlin  <johan@gnome.org>
1344
1345         * src/gen-introspect.c:
1346         Move main to the end of the file and attempt to make it valid
1347         ansi c.
1348
1349         * tests/parser/Makefile.am (BUILT_SOURCES): Remove .repo here,
1350         we're not quite ready to generate metadata yet.
1351
1352         * tests/parser/:
1353         * configure.ac:
1354
1355         Add a simple gen-introspect parser test
1356
1357 2007-12-06  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
1358
1359         reviewed by: Johan Dahlin  <johan@gnome.org>
1360
1361         * configure.ac:
1362         * gobject-introspection.pc.in:
1363         * src/Makefile.am:
1364         * src/compiler.c: (format_output), (write_out_metadata), (main):
1365         * src/gen-introspect.c: (main):
1366         * src/gen-introspect.h:
1367         * src/generate.c: (write_callable_info), (write_repository),
1368         (load_metadata), (main):
1369         * src/gidlmodule.c: (g_idl_module_new),
1370         (g_idl_module_build_metadata):
1371         * src/gidlmodule.h:
1372         * src/gidlparser.c: (start_element_handler):
1373         * src/ginfo.c: (g_info_new), (g_info_from_entry),
1374         (g_base_info_get_name), (g_base_info_get_namespace),
1375         (g_base_info_is_deprecated), (g_base_info_get_annotation),
1376         (g_base_info_get_metadata), (g_function_info_get_symbol),
1377         (g_function_info_get_flags), (g_function_info_get_property),
1378         (g_function_info_get_vfunc), (signature_offset), (g_type_info_new),
1379         (g_callable_info_may_return_null),
1380         (g_callable_info_get_caller_owns), (g_callable_info_get_n_args),
1381         (g_callable_info_get_arg), (g_arg_info_get_direction),
1382         (g_arg_info_is_return_value), (g_arg_info_is_dipper),
1383         (g_arg_info_is_optional), (g_arg_info_may_be_null),
1384         (g_arg_info_get_ownership_transfer), (g_type_info_is_pointer),
1385         (g_type_info_get_tag), (g_type_info_get_param_type),
1386         (g_type_info_get_interface), (g_type_info_get_array_length),
1387         (g_type_info_is_zero_terminated),
1388         (g_type_info_get_n_error_domains), (g_type_info_get_error_domain),
1389         (g_error_domain_info_get_quark), (g_error_domain_info_get_codes),
1390         (g_value_info_get_value), (g_field_info_get_flags),
1391         (g_field_info_get_size), (g_field_info_get_offset),
1392         (g_registered_type_info_get_type_name),
1393         (g_registered_type_info_get_type_init),
1394         (g_struct_info_get_n_fields), (g_struct_info_get_field),
1395         (g_struct_info_get_n_methods), (g_struct_info_get_method),
1396         (find_method), (g_struct_info_find_method),
1397         (g_enum_info_get_n_values), (g_enum_info_get_value),
1398         (g_object_info_get_parent), (g_object_info_get_type_name),
1399         (g_object_info_get_type_init), (g_object_info_get_n_interfaces),
1400         (g_object_info_get_interface), (g_object_info_get_n_fields),
1401         (g_object_info_get_field), (g_object_info_get_n_properties),
1402         (g_object_info_get_property), (g_object_info_get_n_methods),
1403         (g_object_info_get_method), (g_object_info_find_method),
1404         (g_object_info_get_n_signals), (g_object_info_get_signal),
1405         (g_object_info_get_n_vfuncs), (g_object_info_get_vfunc),
1406         (g_object_info_get_n_constants), (g_object_info_get_constant),
1407         (g_interface_info_get_n_prerequisites),
1408         (g_interface_info_get_prerequisite),
1409         (g_interface_info_get_n_properties),
1410         (g_interface_info_get_property), (g_interface_info_get_n_methods),
1411         (g_interface_info_get_method), (g_interface_info_find_method),
1412         (g_interface_info_get_n_signals), (g_interface_info_get_signal),
1413         (g_interface_info_get_n_vfuncs), (g_interface_info_get_vfunc),
1414         (g_interface_info_get_n_constants),
1415         (g_interface_info_get_constant), (g_property_info_get_flags),
1416         (g_signal_info_get_flags), (g_signal_info_get_class_closure),
1417         (g_signal_info_true_stops_emit), (g_vfunc_info_get_flags),
1418         (g_vfunc_info_get_offset), (g_vfunc_info_get_signal),
1419         (g_constant_info_get_value), (g_union_info_get_n_fields),
1420         (g_union_info_get_field), (g_union_info_get_n_methods),
1421         (g_union_info_get_method), (g_union_info_is_discriminated),
1422         (g_union_info_get_discriminator_offset),
1423         (g_union_info_get_discriminator):
1424         * src/ginvoke.c: (g_function_info_invoke):
1425         * src/girepository.c: (g_irepository_register),
1426         (g_irepository_unregister), (g_irepository_get_default),
1427         (count_interfaces), (g_irepository_get_n_infos), (find_interface),
1428         (g_irepository_get_info), (g_irepository_find_by_name),
1429         (g_irepository_get_shared_library),
1430         (g_irepository_build_search_path), (g_irepository_register_file),
1431         (g_irepository_error_quark):
1432         * src/girepository.h:
1433         * src/gmetadata.c: (g_metadata_get_dir_entry),
1434         (g_metadata_check_sanity), (validate_header),
1435         (validate_array_type_blob), (validate_iface_type_blob),
1436         (validate_param_type_blob), (validate_error_type_blob),
1437         (validate_type_blob), (validate_arg_blob),
1438         (validate_signature_blob), (validate_function_blob),
1439         (validate_callback_blob), (validate_constant_blob),
1440         (validate_value_blob), (validate_field_blob),
1441         (validate_property_blob), (validate_signal_blob),
1442         (validate_vfunc_blob), (validate_struct_blob),
1443         (validate_enum_blob), (validate_object_blob),
1444         (validate_interface_blob), (validate_errordomain_blob),
1445         (validate_union_blob), (validate_blob), (validate_directory),
1446         (validate_annotations), (g_metadata_validate), (_g_metadata_init),
1447         (g_metadata_new_from_memory), (g_metadata_new_from_const_memory),
1448         (g_metadata_new_from_mapped_file), (g_metadata_free),
1449         (g_metadata_set_module), (g_metadata_get_namespace):
1450         * src/gmetadata.h:
1451         * tests/Makefile.am:
1452         * tests/invoke/Makefile.am:
1453         * tests/invoke/invoke-namespace-find.sh:
1454         * tests/invoke/invoke.c: (main):
1455
1456         Add a namespace/shared library mapping. fixes #313268.
1457
1458 2007-12-03  Johan Dahlin  <johan@gnome.org>
1459
1460         * src/gidlparser.c (parse_type_internal): Disable char/gchar and
1461         guchar for now.
1462
1463 2007-11-30  Jürg Billeter  <j@bitron.ch>
1464
1465         * configure.ac:
1466         * src/Makefile.am:
1467         * src/clexer.l:
1468         * src/cparser.y:
1469         * src/gen-introspect.c: (g_idl_node_cmp), (g_igenerator_new),
1470         (g_igenerator_write_inline), (g_igenerator_write),
1471         (g_igenerator_write_indent), (g_igenerator_write_unindent),
1472         (field_generate), (value_generate), (constant_generate),
1473         (property_generate), (function_generate), (vfunc_generate),
1474         (signal_generate), (interface_generate), (struct_generate),
1475         (union_generate), (boxed_generate), (enum_generate),
1476         (node_generate), (module_generate), (get_type_from_type_id),
1477         (str_replace), (g_igenerator_process_properties),
1478         (g_igenerator_process_signals), (g_igenerator_process_types),
1479         (get_type_from_ctype), (g_igenerator_process_function_symbol),
1480         (g_igenerator_process_unregistered_struct_typedef),
1481         (g_igenerator_process_struct_typedef),
1482         (g_igenerator_process_union_typedef),
1483         (g_igenerator_process_enum_typedef),
1484         (g_igenerator_process_function_typedef),
1485         (g_igenerator_process_constant), (g_igenerator_process_symbols),
1486         (g_igenerator_add_symbol), (g_igenerator_is_typedef),
1487         (g_igenerator_generate), (main), (csymbol_new),
1488         (csymbol_get_const_boolean), (ctype_new), (ctype_copy),
1489         (cbasic_type_new), (ctypedef_new), (cstruct_new), (cunion_new),
1490         (cenum_new), (cpointer_new), (carray_new), (cfunction_new),
1491         (eat_hspace), (eat_line), (read_identifier),
1492         (g_igenerator_parse_macros):
1493         * src/gen-introspect.h:
1494
1495         Import gen-introspect to generate introspection information by
1496         parsing C headers.
1497
1498 2007-11-30  Jürg Billeter  <j@bitron.ch>
1499
1500         * src/gidlnode.c: (g_idl_node_new): support creating callback nodes
1501
1502 2007-11-30  Jürg Billeter  <j@bitron.ch>
1503
1504         * src/gidlparser.c: (end_element_handler): Don't leave requires
1505         state too early.
1506
1507 2007-11-29  Johan Dahlin  <johan@gnome.org>
1508
1509         * src/gidlparser.c (parse_type_internal): Add char,
1510         gchar and guchar to the builtin types.
1511
1512 2007-11-26  Johan Dahlin  <johan@gnome.org>
1513
1514         * src/ginfo.c: (g_object_info_get_type_name),
1515         (g_object_info_get_type_init):
1516         * src/girepository.c: (g_irepository_is_registered):
1517         * src/girepository.h:
1518
1519         Add g_object_info_get_type_name, g_object_info_get_type_init and
1520         g_irepository_is_registered.
1521
1522 2006-08-14  Jürg Billeter  <j@bitron.ch>
1523
1524       * src/gidlparser.c: (end_element_handler): Don't leave
1525         namespace and implements states too early.
1526         Fixes #351264
1527
1528 2007-11-26  Johan Dahlin  <johan@gnome.org>
1529
1530         * src/gmetadata.c (validate_struct_blob):
1531         pass blob_type to validate_function_blob instead of
1532         hard-coding BLOB_TYPE_STRUCT.
1533
1534         Patch by Torsten Schoenfeld, fixes #314190
1535
1536 2006-10-03  Torsten Schoenfeld  <tsch@cvs.gnome.org>
1537
1538         * src/compiler.c, src/generate.c, src/gidlnode.c,
1539         src/gidlparser.c, src/ginfo.c, src/girepository.c,
1540         tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
1541         warnings about return values, signedness mismatches, unused
1542         variables, and unhandles enum values in switch statements.
1543
1544         * tests/invoke/Makefile.am: Don't install the invoke test program.
1545         Add -I ../../src to the cflags used for the test functions files.
1546
1547 2005-08-31  Torsten Schoenfeld  <tsch@cvs.gnome.org>
1548
1549         * src/girepository.h: Export g_invoke_error_quark.
1550
1551 2005-08-31  Torsten Schoenfeld  <tsch@cvs.gnome.org>
1552
1553         * src/ginvoke.c: Remove the fallback implementation of
1554         g_function_info_invoke since we now formally depend on libffi.
1555
1556 2005-07-25  Matthias Clasen  <mclasen@redhat.com>
1557
1558         * src/Makefile, tests/Makefile, tests/invoke/Makefile:
1559         Remove these files from cvs, as they are now generated.
1560
1561         * src/gmetadata.c (validate_iface_type_blob): Don't
1562         complain if blob->pointer is not set, since that
1563         happens for enum and flag types.  (#308935, Gustavo
1564         Carneiro)
1565
1566         * Commit an autoconf-conversion patch by
1567         Gustavo Carneiro (#308708)
1568
1569 2005-05-24  Matthias Clasen  <mclasen@redhat.com>
1570
1571         * src/compiler.c (main): Use it here to validate
1572         the generated metadata.
1573
1574         * src/gmetadata.[hc]: Add code to validate a
1575         metadata blob.
1576
1577         * metadata-format.txt: Updates
1578
1579 2005-05-22  Matthias Clasen  <mclasen@redhat.com>
1580
1581         * tests/*: Add struct offsets to field and vfunc
1582         elements.
1583
1584         * src/generate.c (write_vfunc_info): Write offset
1585         information for vfuncs.
1586
1587         * src/gidlnode.c (g_idl_node_build_metadata): Write
1588         the struct offsets into the metadata.
1589
1590         * src/gidlparser.c: Parse the offset attributes of
1591         field and vfunc elements.
1592
1593         * src/gidlnode.h: Add offset members to field and
1594         vfunc nodes.
1595
1596 2005-05-21  Matthias Clasen  <mclasen@redhat.com>
1597
1598         * TODO: Updates.
1599
1600         * gidl.dtd: Updates.
1601
1602         * src/g-idl-offsets.pl: A perl script which reads a .gidl
1603         file, creates, compiles and runs a C file, and folds the
1604         resulting struct offsets back into the .gidl file.
1605
1606 2005-05-20  Matthias Clasen  <mclasen@redhat.com>
1607
1608         * src/gidlparser.c (start_field): Make fields in objects
1609         work.
1610
1611         * src/gidlmodule.c: Include string.h
1612
1613         * TODO: Updates.
1614         :
1615
1616         * metadata-format.txt: Cleanup basic types.
1617         * src/*: Adapt to the changes.
1618         * tests/*: Adapt to the changes.
1619         * examples/gdk-pixbuf.gidl: Adapt to the changes.
1620
1621         * src/gidlnode.c (g_idl_node_get_size): Report the correct
1622         size for enum blobs.
1623         (g_idl_node_get_full_size): Report the correct size for
1624         function blobs.
1625
1626         * src/gidlmodule.c (g_idl_module_build_metadata): Add some
1627         error checking for blob sizes.
1628
1629 2005-05-19  Matthias Clasen  <mclasen@redhat.com>
1630
1631         * src/gidlnode.c (g_idl_node_build_metadata): Correctly handle
1632         interface types for which is_pointer is FALSE, e.g. enums.
1633
1634         * src/gidlnode.c (g_idl_node_get_full_size)
1635         * src/gidlparser.c (parse_type_internal):
1636         * src/generate.c (write_type_info): Support unspecialized
1637         lists, hashtables and errors. Also emit a '*' after these.
1638
1639         * TODO: Updates
1640
1641 2005-05-17  Matthias Clasen  <mclasen@redhat.com>
1642
1643         * TODO: Updates
1644
1645         * metadata-format.txt: Cleanups by Maciej Katafiasz.
1646
1647 2005-05-15  Matthias Clasen  <mclasen@redhat.com>
1648
1649         * src/*.c: Change the directory to be addressed by
1650         1-based indexes, and use an index of zero to mean
1651         'no object'.
1652
1653 2005-05-15  Matthias Clasen  <mclasen@redhat.com>
1654
1655         * tests/roundtrips.sh (SIMPLE_TESTS): Add union.test.
1656
1657         * tests/union.test: Add a union test.
1658
1659         * src/generate.c: Handle unions.
1660
1661         * src/girepository.h:
1662         * src/ginfo.c: Add GIUnionInfo and functions to access it.
1663
1664         * src/gidlnode.c: Handle GIdlNodeUnion nodes.
1665
1666         * src/gidlparser.c (start_union): Parse <union> elements.
1667
1668         * src/gidlnode.h: Add a GIdlNodeUnion.
1669
1670         * gidl.dtd: Add a <union> element.
1671
1672         * src/gmetadata.c (g_metadata_check_sanity): Check
1673         union_blob_size.
1674
1675         * src/gmetadata.h: Add union_blob_size to Header,
1676         add a UnionBlob.
1677
1678         * metadata-format.txt: Add a UnionBlob.
1679
1680 2005-05-13  Matthias Clasen  <mclasen@redhat.com>
1681
1682         * tests/*: Update testcases.
1683
1684         * src/generate.c (write_callable_info): Don't forget to
1685         write transfer and null-ok attributes for return types
1686         and parameters.
1687
1688         * src/girepository.h:
1689         * src/ginfo.c (g_callable_info_may_return_null):
1690         New function to find out if a function may return NULL.
1691
1692         * src/compiler.c (format_output): Make the generated
1693         C code compile.
1694
1695         * README: Point to a recent libffi snapshot.
1696
1697         * tests/invoke/*: Some invoke tests.
1698
1699         * src/Makefile: Add ginvoke.c and the necessary
1700         libffi information.
1701
1702         * src/girepository.h (g_function_info_invoke): Add
1703         a GError argument.
1704
1705         * src/ginvoke.c (g_function_info_invoke): Initial
1706         implementation of invoke functionality based on libffi.
1707
1708         * src/gidlnode.c (g_idl_node_build_metadata): Pass the
1709         strings and types hash tables in the right order when
1710         recursing.
1711         (find_entry_node): Free the name parts.
1712
1713 2005-05-12  Johan Dahlin  <johan@gnome.org>
1714
1715         * src/generate.c: Generate consistent end tags.
1716
1717         * tests/*: Update
1718
1719 2005-05-12  Matthias Clasen  <mclasen@redhat.com>
1720
1721         * TODO: Updates
1722
1723         * src/gidlparser.c (start_function): Actually add
1724         methods to objects.  (Steven Walter)
1725
1726         * src/girepository.h:
1727         * src/ginfo.c: Rename Transfer and Direction to
1728         GITransfer and GIDirection. (Torsten Schoenfeld)
1729
1730         * tests/*: Make tests work with the changes in name
1731         handling.
1732
1733         * src/gidlnode.c (find_entry_node): Parse qualified
1734         names and generate xref nodes for them if needed. Don't
1735         require all modules to be loaded any more.
1736
1737         * src/gidlmodule.c (g_idl_module_build_metadata): Choke
1738         on '.' in names.
1739
1740         * src/ginfo.c (g_object_info_get_parent): Return NULL
1741         if blob->parent is 0. Still need to make sure index
1742         0 is not used.
1743
1744         * src/generate.c: Generate qualified names when
1745         referring to non-local types. Emit transfer attribute
1746         for return types.
1747
1748         * src/compiler.c (format_output): Put the function
1749         attributes where gcc accepts them.
1750
1751 2005-05-11  Matthias Clasen  <mclasen@redhat.com>
1752
1753         * src/compiler.c (main): Add a --verbose cmdline option
1754         and only log messages if it is specified.
1755
1756         * src/gidlnode.h:
1757         * src/gidlnode.c (init_stats, dump_stats): Collect some
1758         statistics on string and type sharing.
1759
1760         * src/gidlmodule.c (g_idl_module_build_metadata): Use
1761         g_message() instead of fprintf().
1762
1763         * src/gidlnode.c (g_idl_node_free): Make this more robust.
1764         (g_idl_node_get_size): Implement for structs.
1765         (g_idl_node_get_full_size): Handle parent being NULL.
1766         (serialize_type): Handle lookup failures more gracefully.
1767
1768 2005-05-10  Matthias Clasen  <mclasen@redhat.com>
1769
1770         * src/gidlnode.c (g_idl_node_get_full_size): Correct the
1771         size calculation for 2-parameter types and for objects.
1772
1773         * src/compiler.c: Add a cmdline option for debug output
1774         and install a log handler to implement it.
1775         * src/gidlnode.c: Add some debug spew.
1776
1777         * TODO: Updates
1778
1779         * src/gidlmodule.c (g_idl_module_build_metadata): Don't
1780         forget to count the module name when calculating the
1781         required size for the metadata.
1782
1783         * src/gidlnode.c:
1784         * src/gidlparser.c: Fix compiler warnings.
1785
1786 2005-05-09  Matthias Clasen  <mclasen@redhat.com>
1787
1788         * src/compiler.c (main): Free the option context.
1789
1790         * gidl.dtd: Clean up handling of names. All elements
1791         have a "name", only the elements corresponding to
1792         actual callable functions (function, method, constructor),
1793         have an additional "symbol" attribute holding the
1794         dlsym()-able function name.
1795
1796         * src/generate.c: Adapt to generate xml matching the
1797         new dtd.
1798
1799         * src/gidlparser.c:
1800         * src/gidlnode.c: Adapt to parse the new dtd.
1801
1802         * tests/*.test: Adjust to the new dtd.
1803
1804         * metadata-format.txt:
1805         * src/gmetadata.h: Remove the short_name field
1806         from the ValueBlob.
1807         * src/gmetadata.c: Shrink size of ValueBlob to 12.
1808         * src/girepository.h:
1809         * src/ginfo.c (g_value_info_get_short_name): Removed
1810
1811 2005-05-09  Matthias Clasen  <mclasen@redhat.com>
1812
1813         * gidl.dtd: Allow constructors for boxed types,
1814         patch by Jonathan Blandford.
1815
1816
1817 2005-05-09  Matthias Clasen  <mclasen@redhat.com>
1818
1819         * --- Initial import ---