This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
/
ChangeLog
4702 lines (3474 loc) · 144 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2008-10-29 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 558065 – gitesttypes should be installed
* configure.ac:
* tests/Makefile.am:
* tests/types/Makefile.am -> tests/everything/Makefile.am
* tests/types/gitesttypes.c -> tests/everything/gitesttypes.c
* tests/types/gitesttypes.h -> tests/everything/gitesttypes.h
move tests/types to tests/everything
* tests/everything/Makefile.am: build normal shared library
libgirepository-everything.so.1.0.0 and corresponding typelib
Everything-1.0.typelib
* tests/everything/Makefile.am: explicitly link libtool
versioning with typelib versioning with variables
2008-10-28 Johan Bilien <jobi@via.ecp.fr>
* tools/g-ir-scanner: add LD_LIBRARY_PATH to LPATH before calling ld.
2008-10-27 Johan Bilien <jobi@via.ecp.fr>
* gio/gio-2.0.c: add allow-none annotations, based on the pygobject
.defs file
2008-10-27 Johan Bilien <jobi@via.ecp.fr>
Bug 558068 – when invoking a method, offset the in arguments by one,
not the out
* tests/invoke/invoke.c, tests/invoke/testfns.c,
tests/invoke/testfns-1.0.gir: Add testing of method and constructor.
* girepository/ginvoke.c: do not offset the index of given out
arguments by one for methods, "this" is provided as in argument only.
2008-10-27 Johan Bilien <jobi@via.ecp.fr>
* gir/gio-2.0.c: add annotation for g_file_delete
2008-10-27 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 558062 – provide and use paths in the .pc file
* gobject-introspection-1.0.pc.in: provide typelibdir variable
for where .typelibs should be installed (callers shouldn't need
to construct paths from bits and pieces)
2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
Bug 557791 – g_irepository_require() could return a GTypelib *
* girepository/girepository.c: Return GTypelib; this is useful
for low level manipulation.
2008-10-25 Colin Walters <walters@verbum.org>
Bug 557788 – Return types for constructors in generated typelib bogus
* giscanner/glibtransformer.py: Don't resolve ctors incrementally,
rely on end pass resolution.
2008-10-25 Andreas Rottmann <a.rottmann@gmx.at>
Bug 557786 - support fixed size arrays
* girepository/ginfo.c: Add g_type_info_get_array_fixed_size.
* giscanner/scannerparser.y: Retain fixed array size.
* giscanner/ast.py: Add to note.
* giscanner/girwriter.py: Write to gir.
* girepository/girnode.c: Write it to typelib.
* tools/generate.c: Generate.
* tests/*: Add tests.
2008-10-25 Colin Walters <walters@verbum.org>
Bug 557076 - move typelibs to $libdir
* configure.ac: Steal some configury bits from dbus to expand
libdir.
* gir/Makefile.am: Move to libdir.
* girepository/girepository.c: Stop searching XDG_DATA_DIRS;
instead just look at one hardcoded path in libdir.
* acinclude.m4: Bits from dbus.
2008-10-24 Johan Dahlin <johan@gnome.org>
* girepository/girnode.c (g_ir_node_check_unhandled_members):
Be quiet, do not warn about unhandled members.
2008-10-24 Johan Dahlin <johan@gnome.org>
* girepository/gtypelib.c:
Only use SHLIB_SUFFIX on darwin, otherwise use
G_MODULE_SUFFIX, we cannot get shext_cmds from libtool 2.2.
2008-10-24 Lucas Rocha <lucasr@gnome.org>
Bug 557623 - Constructors shouldn't be flagged as methods.
* girepository/ginfo.c (g_function_info_get_flags): ditto.
2008-10-24 Johan Dahlin <johan@gnome.org>
* giscanner/scannerparser.y:
Check against division by zero for the modula operator.
This fixes header parsing of OSX system headers included
by libsoup.
2008-10-24 Johan Dahlin <johan@gnome.org>
* CONTRIBUTORS:
* Makefile.am:
Add a CONTRIBUTORS file and dist it.
2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556739 – transfer-ownership attribute should be mandatory in .gir
* girepository/girparser.c (parse_param_transfer):
* giscanner/transformer.py (_create_parameter, _create_return):
* giscanner/girwriter.py (_write_return, _write_parameter):
* tools/generate.c (write_callable_info): always write and
require "transfer-ownership" for return-values and parameters
* tests/boxed.gir:
* tests/invoke/testfns-1.0.gir:
* tests/object.gir:
* tests/scanner/DrawableAdditions.xml:
* tests/scanner/GtkFrob-1.0-expected.tgir:
* tests/scanner/annotation-1.0-expected.tgir:
* tests/scanner/drawable-1.0-expected.tgir:
* tests/scanner/drawable-injected-1.0-expected.gir:
* tests/scanner/drawable-injected-1.0-expected.tgir:
* tests/scanner/foo-1.0-expected.tgir: Updated
2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
* giscanner/cgobject.py: build fundamental types same way as glib
* giscanner/glibtransformer.py (_type_from_gtype): record GType
when constructing the Type from it
* giscanner/glibtransformer.py (_adjust_transfer): Check whether
the parameter is a GObject from its GType, if available.
* giscanner/glibtransformer.py (_adjust_transfer):
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir: deduce
transfer-ownership from GTypes
2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi>
* giscanner/transformer.py (_create_parameter):
* tests/scanner/foo-1.0-expected.gir: make varargs
transfer-ownership="none"
2008-10-23 Colin Walters <walters@verbum.org>
Bug 556739 - transfer ownership
* giscanner/ast.py: Refactor Parameter/Return to share
common attributes. Add transfer_inferred attribute
which says whether or not we made a guess.
* giscanner/transformer.py: Add much more extensive
heuristics around parameter and return transfer.
* giscanner/glibtransformer.py: Adjust to inspect
transfer_inferred.
* tests/*: Adjust.
2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 557377 – Add test to ensure annotations survive the roundtrip via typelib
* tests/scanner/Makefile.am:
* tests/scanner/annotation-1.0-expected.tgir:
* tests/scanner/drawable-1.0-expected.tgir:
* tests/scanner/drawable-injected-1.0-expected.tgir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/GtkFrob-1.0-expected.tgir:
* tests/scanner/utility-1.0-expected.tgir: Add test to ensure
annotations survive the roundtrip via typelib
The expectations are as currently produced by g-ir-generate,
comparison with the .gir files shows there are differences.
2008-10-23 Johan Bilien <jobi@via.ecp.fr>
Bug 557468 – Support for GI_TYPELIB_PATH
* girepository/girepository.c: if the GI_TYPELIB_PATH is set, add the
provided paths to the global search path.
2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 557379 – g-ir-generate not writing the 'abstract' attribute
* tests/scanner/drawable-1.0-expected.tgir:
* tests/scanner/drawable-injected-1.0-expected.tgir:
* tests/scanner/foo-1.0-expected.tgir:
* tools/generate.c (write_object_info): write 'abstract'
attribute for classes
2008-10-22 Lucas Rocha <lucasr@gnome.org>
* girepository/girmodule.c, girepository/gtypelib.c,
girepository/girparser.[ch]: fix some build warnings.
2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 557405 – Use 'allow-none' consistently
* docs/typelib-format.txt:
* girepository/ginfo.c (g_arg_info_may_be_null):
* girepository/girnode.c (g_ir_node_build_typelib):
* girepository/girnode.h (struct _GIrNodeParam):
* girepository/girparser.c (start_parameter):
* girepository/girwriter.c (function_generate):
* girepository/gtypelib.h (ArgBlob):
* tests/errors.gir:
* tests/function.gir:
* tools/generate.c (write_callable_info): Use 'allow-none'
consistently throughout
2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 557092 – Callback annotations not used
* giscanner/transformer.py (_create_callback): use annotations
for callbacks
* tests/scanner/annotation.h
* tests/scanner/annotation-1.0-expected.gir: add tests
2008-10-21 Colin Walters <walters@verbum.org>
* giscanner/scannerlexer.l: Don't require trailing whitespace after
uncommented parameters.
* tests/*: Test it.
2008-10-21 Colin Walters <walters@verbum.org>
* girepository/girepository.c: Ensure that when doing an unversioned
require, we prefer items earlier in the search path to later ones.
2008-10-21 Owen Taylor <otaylor@redhat.com>
* giscanner/transformer.py: For string parameters allow transfer annotation
to override the standard automatic guessing based on 'const'.
2008-10-21 Johan Bilien <jobi@via.ecp.fr>
Bug 557241 – "throws" flag for functions
* tests/scanner/drawable-1.0-expected.gir,
tests/scanner/drawable-injected-1.0-expected.gir,
tests/scanner/drawable.[ch]: add simple test for throwing
function (has GError ** as last argument)
* giscanner/ast.py: add a 'throws' flag to Function
* giscanner/glibtransformer.py: if a function's last paramerter is
a GError, set the 'throws' flag and remove that parameter
* giscanner/girwriter.py: write out the 'throws' attribute
* giscanner/girparser.py: support parsing the 'throws' attribute
* tests/repository/gitestthrows.c: add a simple test to check the
throws flag in a typelib and invoke the function
* girepository/ginfo.c, girepository/girnode.[ch],
girepository/girnode.h, girepository/girparser.c,
girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag
* girepository/ginvoke.c: if a function throws, add a GError as last
arguments, and propagate the error to the invoker.
2008-10-21 Tommi Komulainen <tommi.komulainen@iki.fi>
* giscanner/transformer.py (_create_parameters): Warn if we see
annotations for unknown parameters. If .h and .c files name
parameters differently, the annotations may be lost.
2008-10-21 Johan Dahlin <johan@gnome.org>
Bug 556358 - don't use libtool internals
* giscanner/Makefile.am:
* giscanner/libtoolimporter.py:
* giscanner/sourcescanner.py:
* giscanner/utils.py:
Add a python meta importer and remove a libtool symlink hack.
2008-10-20 Andreas Rottmann <a.rottmann@gmx.at>
* tests/scanner/Makefile.am (%.typelib): Set PYTHONPATH
and --add-include-path appropriately when invoking the scanner.
* tests/types/Makefile.am (%typelib): Likewise.
2008-10-20 Colin Walters <walters@verbum.org>
Bug 556777 - validate properties
* giscanner/transformer.py: Add option to throw on unknown types.
* giscanner/glibtransformer.py: Use it on properties.
* tests/*: Add a test.
2008-10-20 Colin Walters <walters@verbum.org>
* giscanner/glibast.py: Also register g variants of
default_array_types. This is not beautiful, but
good alternatives aren't easy to come by.
This fixes gchar ** parsing.
2008-10-20 Colin Walters <walters@verbum.org>
* docs/typelib-format.txt, girepository/gtypelib.h:
Take a bit from ObjectInfo to represent abstract flag.
* giscanner/cgobject.py: Expose g_type_get_flags.
* girepository/girepository.h: Add accessor.
* girepository/ginfo.c: Implement it.
* giscanner/ast.py: Add is_abstract flag to generic
class object.
* giscanner/glibast.py: Use it.
* giscanner/girwriter.py: Write it.
* girepository/girparser.c: Parse it.
* tests/*: Test it.
2008-10-20 Tommi Komulainen <tommi.komulainen@iki.fi>
* giscanner/girparser.py (_parse_function): don't lose
'transfer-ownership' attributes when injecting, check for the
correct attribute
2008-10-19 Johan Dahlin <johan@gnome.org>
* giscanner/scannerlexer.l: Parse and ignore __asm.
2008-10-19 Colin Walters <walters@verbum.org>
* giscanner/girparser.py: Parse array length= to ensure
it doesn't get lost from --inject.
2008-10-17 Colin Walters <walters@verbum.org>
Bug 556795 - char ** regression
* giscanner/transformer.py: Fix parsing of ctypes, add some
comments about what's going on.
* tests/*: Add a test for char **.
2008-10-17 Colin Walters <walters@verbum.org>
Bug 556783 - change namespace handling to be more consistent
* giscanner/transformer.py: Eliminate usage of
strip_namespace_object. We now treat --namespace as the default
--strip-prefix; however, if --strip-prefix is specified it
overrides --namespace. This applies to everything except function
names, where we do also strip the namespace.
* giscanner/glibtransformer.py: Remove usage of
strip_namespace_object.
* tests/*: Update.
* tests/*: Add skeletal GtkFrob-1.0 test which has different
--namespace and --strip-prefix.
2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556732 – generate gir files consistently
* girepository/girparser.c (start_parameter):
* tests/boxed.gir:
* tests/invoke/testfns-1.0.gir:
* tools/generate.c (write_callable_info): write
'transfer-ownership' attribute consistently with both
return-value and parameter elements
2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556732 – generate gir files consistently
* tools/generate.c (write_callable_info): write 'direction'
attribute only if other than 'in' to be consistent with
girwriter.py
* tests/boxed.gir:
* tests/object.gir: remove direction="in" which is the default
2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556732 – generate gir files consistently
* giscanner/ast.py (Field): add readable and writable properties
* giscanner/girparser.py (_parse_field): copy 'readable' and
'writable' attributes
* giscanner/transformer.py (_create_member): create fields as
read-write
* giscanner/glibtransformer.py (_introspect_object,
_pair_class_struct): make object instance and class fields
read-only
* giscanner/girwriter.py (_write_field):
* tools/generate.c (write_field_info): write field 'readable'
and 'writable' attributes only if non-default (read-only)
* girepository/girparser.c (start_field): in the absence of
attributes assume fields are read-only
* tests/boxed.gir:
* tests/struct.gir: remove redundant readable="1" from fields
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir: add writable="1" to
all record and union fields
2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556732 – generate gir files consistently
* giscanner/girwriter.py (_write_property): write properties
'construct' attribute if set
* tools/generate.c (write_property_info): write properties
'readable' and 'writable' attributes only if non-default
* tests/object.gir: add writable="0"
* tests/scanner/foo-1.0-expected.gir: add construct="1"
2008-10-17 Johan Bilien <jobi@via.ecp.fr>
* gir/glib-2.0.c: added annotations
2008-10-16 Johan Bilien <jobi@via.ecp.fr>
* giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
arguments
2008-10-16 Johan Bilien <jobi@via.ecp.fr>
Bug 556610 – giscanner/girparser.py drops parameter options
* tests/scanner/drawable-injected-1.0-expected.gir,
tests/scanner/DrawableAdditions.xml: added simple test for injection.
* giscanner/ast.py: allow Parameter to take options in the constructor
* giscanner/girparser.py: parse parameter options (transfer,
direction, allow-none)
2008-10-16 Colin Walters <walters@verbum.org>
Bug 556185 - segfault on g_callable_info_get_return_type
Initial patch from John Ehresman.
* tests/repository/*: Add a test using
g_callable_info_get_return_type. Instead of casting a
GITypeInfo directly to a GIRegisteredTypeInfo, we need
to call g_type_info_get_interface.
2008-10-16 Colin Walters <walters@verbum.org>
Bug 556579 - union and struct name misresolved
* giscanner/transformer.py: The calls to _resolve_type_name
for struct/union names was a legacy holdover from when type
resolution had multiple phases. Now it's actively harmful
since we might pull in an identical name from another
namespace.
* tests/*: Update.
2008-10-16 Colin Walters <walters@verbum.org>
Bug 556432 - transfer annotations and defaults
* giscanner/transformer.py: Canonicalize type
after removing *, not before. This ensures that
guchar* is transformed to 'uint8'.
Add some comments here.
* giscanner/glibtransformer.py: Add _adjust_transfer
phase for tweaking GObject transfers.
* tests/*: test it.
2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
* configure.ac: enable bunch of gcc warning CFLAGS
2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556543 – reduce compiler warnings
* girepository/ginfo.c:
* girepository/girepository.c (register_internal,
count_interfaces, find_interface, find_namespace_version,
parse_version, g_irepository_require):
* girepository/girmodule.c (g_ir_module_build_typelib):
* girepository/girnode.c (init_stats, dump_stats,
_g_irnode_init_stats, _g_irnode_dump_stats,
g_ir_node_can_have_member):
* girepository/girparser.c (firstpass_end_element_handler,
locate_gir, parse_basic, parse_type_internal, resolve_aliases,
start_alias, start_type, end_type_top, parse_include, cleanup,
post_filter):
* girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
* giscanner/giscannermodule.c (directive_get_options,
type_get_child_list):
* giscanner/scannerlexer.l (parse_gtkdoc):
* giscanner/scannerparser.y (ctype_free):
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
* tests/types/gitesttypes.c:
* tools/compiler.c (main):
* tools/generate.c (write_repository): Remove unused variables
and code, add missing includes, declarations and case
statements.
2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556541 – access union members through UnionBlob rather than
StructBlob
* girepository/ginfo.c (g_union_info_find_method): access union
members through UnionBlob rather than StructBlob
2008-10-15 Colin Walters <walters@verbum.org>
Bug 556331 - clean up includes handling
* tools/g-ir-scanner: Rework command line arguments; now we take
--add-include-path and --include separately.
* giscanner/girwriter.py: Separate name= and version= in include
directives.
* giscanner/ast.py: Add Include type.
* giscanner/transformer.py: Cleanups to register_include now that
we don't need to handle mixed filenames and relative arguments.
* girepository/girparser.c: Parse name and version separately;
this fixes a bug as a side effect where we weren't resolving
through aliases for basic types.
* girepository/girepository.c: Fix format string args.
* gir/Makefile.am: Update.
* tests/*: Update.
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556434 – unhandled interface/object/... member types
* girepository/girnode.c (g_ir_node_check_unhandled_members,
g_ir_node_build_typelib): Check all
interface/object/boxed/struct/union members are processed and
abort if they are not. (Mostly callbacks in structs, but also
fields in interfaces.)
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* a/girepository/girnode.c (g_ir_node_build_members,
g_ir_node_build_typelib): refactor common code for processing
members to a function
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* gir/Makefile.am (check-local): check that typelib -> gir -> typelib
transformation is lossless (it's not)
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tests/Makefile.am: fix tests to compare xml to xml instead of
typelib to xml, and stop on error
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (write_type_name, write_type_info,
write_type_info, write_object_info, write_object_info,
write_interface_info, write_error_domain_info): reduce code
duplication
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556174 – parse types for lists etc.
* girepository/girparser.c (end_type_recurse):
* tests/boxed.gir:
* tools/generate.c (write_type_info, write_field_info,
write_callable_info, write_callable_info, write_constant_info,
write_property_info): use nested <type>s for lists and hashes
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tests/enum.gir:
* tests/object.gir: remove trailing whitespace from inside
elements to match g-ir-generate output
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (xml_printf): quote printf arguments so that
we don't generate invalid XML by writing unescaped double quotes
and such in attributes
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (write_field_info, write_callable_info,
write_function_info, write_callback_info, write_struct_info,
write_constant_value, write_signal_info, write_vfunc_info,
write_object_info, write_interface_info, write_union_info,
write_repository): remove unused indent parameters, xmlwriter
keeps track of necessary indentation
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (xml_element_new, xml_element_free,
xml_start_element, xml_end_element, xml_end_element_unchecked,
xml_open, xml_close): Keep track of generated XML tree and
handle indentation and closing tags properly.
(write_field_info, write_callable_info, write_function_info,
write_callback_info, write_struct_info, write_value_info,
write_constant_info, write_enum_info, write_signal_info,
write_vfunc_info, write_property_info, write_object_info,
write_interface_info, write_error_domain_info, write_union_info,
write_repository): Use xml_start_element and xml_end_element to
open/close tags.
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
(write_type_name, write_type_info, write_field_info,
write_callable_info, write_function_info, write_callback_info,
write_struct_info, write_value_info, write_constant_value,
write_constant_info, write_enum_info, write_signal_info,
write_vfunc_info, write_property_info, write_object_info,
write_interface_info, write_error_domain_info, write_union_info,
write_repository): wrap all FILE access to go through simple xmlwriter
2008-10-15 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556400 – Fails to build on OS X 10.4
* configure.ac: check for functions backtrace and backtrace_symbols
* girepository/girparser.c (backtrace_stderr): Comment out
implementation if the functions are not available.
* gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
directory for better portability
2008-10-15 Johan Bilien <jobi@via.ecp.fr>
Bug 556433 – assume direction = out for int * parameters
* giscanner/ast.py: define a list of types for which, if passed as
reference, we assume a default direction of 'out'
* giscanner/transformer.py: if a type has type pointer to one of the
previously defined types, and no direction is set, assume out.
* tests/scanner/drawable.[ch]: added tests for guessed direction=out
2008-10-15 Johan Bilien <jobi@via.ecp.fr>
* tests/scanner/annotation.c: fixed a few copy-paste errors
2008-10-14 Johan Bilien <jobi@via.ecp.fr>
Bug 556323 – transfer-ownership is wrong for functions returning const
char *
* giscanner/transformer.py: check for a const string as return value,
not just const char*. Suggested by Colin Walters
* tests/scanner/annotation-1.0-expected.gir: updated expected output
2008-10-14 Johan Bilien <jobi@via.ecp.fr>
* girepository/ginfo.c, girepository/girepository.h: add
g_union_info_find_method
2008-10-14 Colin Walters <walters@verbum.org>
* tests/repository/Makefile.am: Reenable repo test.
* tests/repository/gitestrepo.c: Prepend search
path for $(top_builddir)/gir dir so that we don't
require installation for "make check" to pass.
2008-10-13 Jürg Billeter <j@bitron.ch>
* giscanner/glibtransformer.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/drawable-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir:
Support fields in GObject structs
2008-10-13 Jürg Billeter <j@bitron.ch>
* giscanner/ast.py: add signed integer and off_t to type_names
2008-10-12 Jürg Billeter <j@bitron.ch>
* giscanner/girparser.py: Parse bits attribute of fields
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
* tests/repository/gitestrepo.c (main): instantiate
'GCancellable' to ensure the GType is registered before using
g_type_from_name()
2008-10-12 Johan Bilien <jobi@via.ecp.fr>
* giscanner/girparser.py: actually add the parsed constant nodes
2008-10-12 Colin Walters <walters@verbum.org>
* girepository/girepository.c: Don't cast DirEntry to Blob,
actually look it up by offset.
2008-10-12 Johan Bilien <jobi@via.ecp.fr>
* giscanner/girparser.py: parse constant nodes in gir files
2008-10-12 Johan Bilien <jobi@via.ecp.fr>
* giscanner/transformer.py: prefix for constants have an underscore,
so remove them as if they were functions, not objects.
2008-10-12 Johan Bilien <jobi@via.ecp.fr>
* tests/scanner/foo-1.0-expected.gir: add constants to expected gir
file
2008-10-12 Colin Walters <walters@verbum.org>
Initial patch from Jani Monoses.
* girepository/gtypelib.c: Fix inverted test for success
in version parsing.
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (write_callable_info): use "transfer-ownership"
attribute for return values
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* tools/generate.c (write_callable_info): move "transfer" and
"null-ok" attributes from <function> to <return-value> element
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* girepository/girparser.c (start_return_value): handle
"transfer-ownership" attribute
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* girepository/girparser.c (parse_param_transfer):
* tools/generate.c (write_callable_info): use "container" for
container/shallow ownership transfer (not "shallow")
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* girepository/girparser.c (parse_param_transfer,
start_parameter): Refactor handling of transfer=none/shallow/full
to separate function
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556048 – Crash in g_irepository_find_by_gtype
* girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
* girepository/girepository.c (find_interface): Fix
find_by_gtype case to get the type name from right offset
2008-10-12 Jürg Billeter <j@bitron.ch>
* giscanner/girparser.py: Fix parsing transfer-ownership attribute
of <return-value>
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* girepository/gtypelib.h (RegisteredTypeBlob): make
'unregistered' one bit wide as everywhere else
2008-10-12 Jürg Billeter <j@bitron.ch>
* giscanner/glibtransformer.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/drawable-1.0-expected.gir:
* tests/scanner/drawable.h:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir:
Readd class records as workaround to not break Gtk typelib
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi>
* tests/types/Makefile.am: fix typo in gitesttypes namespace
2008-10-12 Jürg Billeter <j@bitron.ch>
* giscanner/glibtransformer.py: Don't generate <record> elements
for class structs.
* tests/scanner/*: Update test cases
2008-10-11 Colin Walters <walters@verbum.org>
Bug 552858: versioning
This is a big patch. You should probably remove your installation
tree to be cleaner.
* docs/typelib-format.txt: Add nsversion entry which holds
version of namespace.
* girepository/girepository.h: Add 'version' parameter to
g_irepository_require. This may be NULL. Normally
bindings should pass an explicit version though.
* girepository/girepository.c: Lots of infrastructure to
support versioning. Add some more documentation. Disallow
some usage of NULL namespaces.
* girepository/girmodule.c: Add version parameter.
* girepository/gtypelib.c: Update header size.
* giscanner/ast.py: Add version to Namespace.
* giscanner/girparser.py: Parse version attribute from
XML, pass to Namespace.
* giscanner/girwriter.py: Write out version parameter.
* giscanner/transformer.py: Clean up include registration.
* tests/*: Add version attribute.
* tests/invoke/invoke.c: Don't try looking up test before
it's loaded in repository.
* tools/generate.c: Output version parameter.
* gir/Makefile.am: Add 2.0 version to .gir files.
2008-10-11 Colin Walters <walters@verbum.org>
* giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
if we have mismatched parens.
2008-10-11 Lucas Rocha <lucasr@gnome.org>
* giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
on 'members' variable.
2008-10-11 Colin Walters <walters@verbum.org>
Bug 555947 - update annotations syntax
* giscanner/ast.py: Default to None for transfer. Remove
default transfers for container types; we require this to
be specified now.
* giscanner/girwriter.py: Transfer is now 'none', 'container',
'full' to match repository.
* giscanner/scannerlexer.l: Annotations now are parenthesized.
* giscanner/transformer.py: Update for new annotations syntax.
* tests/*: Update.
2008-10-11 Johan Bilien <jobi@litl.com>
* giscanner/scannerparser.y: ignore non-UTF-8 string constants
2008-10-11 Johan Bilien <jobi@litl.com>
Bug 552347: Parse #defines constants
* girepository/gtypelib.c: update the list of value_size
with recently defined type tags
* giscanner/scannerparser.y: brought back parsing of #defined, as
present in older version
* giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
* giscanner/girwriter.py: write out constant tags in the gir
* giscanner/sourcescanner.py: add accessor for const_string
* giscanner/transformer.py, giscanner/glibtransformer.py: handle
constant
2008-10-11 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 555946: Install a test module exercising all types, transfer
rules, etc.
* configure.ac
* tests/Makefile.am
* tests/types/*: Add and install a test module that has functions
accepting and returning most of the basic types to enable bindings
implementors to more easily test their type conversion routines.
2008-10-11 Jürg Billeter <j@bitron.ch>
Bug 552374: Const strings should be identified in the gir.
* giscanner/transformer.py: support string memory management
* tests/scanner/foo.h: use char * and const char *
* tests/scanner/foo-expected.gir: test that
2008-10-11 Johan Dahlin <johan@gnome.org>
* giscanner/girparser.py:
Also parse enums which are not glib types.
2008-10-11 Lucas Rocha <lucasr@gnome.org>
Bug 552370: add one more test for unsigned as a type, not as
a type qualifier.
* giscanner/ast.py: add 'uint' type name for 'unsigned'.
* test/scanner/foo.h: add function which uses unsigned as a type.
* test/scanner/foo-expected.gir: test that.
2008-10-11 Andreas Rottmann <a.rottmann@gmx.at>
Bug 555712: Struct and union issues
* giscanner/scannerparser.y (struct_declarator): Use information
provided about the bit width of a field.
* giscanner/transformer.py (Transformer._create_member): Pass the
symbol's const_int member to the created field (it represents the
bit width).
* giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
field attribute, if present.
* giscanner/ast.py (Field): Add 'bits' member, specifying the
width in bits of the field (only relevant for bitfields).
* tests/*: Updated.
* giscanner/transformer.py (Transformer._create_typedef_struct)
(Transformer._create_typedef_union): Add calls to _create_struct()
and _create_union(), respectively. This causes the scanner to
generate output for fields of struct and union typedefs.
* tests/*: Updated.
2008-10-11 Jürg Billeter <j@bitron.ch>
Bug 552370: unsigned not scanned properly
* giscanner/scannerparser.y: combine basic types such as unsigned
int and long long when scanning
* tests/scanner/foo-expected.gir:
* tests/scanner/foo.c: (foo_test_unsigned):
* tests/scanner/foo.h: test that
2008-10-11 Lucas Rocha <lucasr@gnome.org>
Bug 554854: The --typelib-xml and --inject options should reuse
giscanner parser/writer.
* giscanner/ast.py: add constructor list to Struct and Union.
Add new param in Return's contructor to define transfer.
* giscanner/girparser.py: several additions to the parser in order
to have parsing all nodes of the gir xml files.
* tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
and writer in --inject and --typelib-xml options.
* giscanner/xmlwriter.py: ignore empty attributes instead of
raising an error as this basically exposes a bug in GIRParser.
This should be reverted as soon as the parser is fixed.
2008-10-11 Lucas Rocha <lucasr@gnome.org>
Bug 552376: scanner generates wrong names for enum members when
there's no defined gtype.
* giscanner/utils.py (strip_common_prefix): Always strip common
prefix exactly up to the last "_", and not beyond.
* tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
here is that the first character after the last '_' should should be
the same as the character in the same position on the type name.
* tests/scanner/foo-expected.gir: test that
2008-10-10 Lucas Rocha <lucasr@gnome.org>
Bug 555293: append library_paths to LPATH env variable to work
around a bug in find_library when using ldconfig.
* tools/g-ir-scanner (main): ditto.
2008-10-09 Lucas Rocha <lucasr@gnome.org>
* girepository/girepository.c (register_internal): fix regression on
invoke test case by making sure we load the global module in the
typelib when dealing with inline typelibs.
* girepository/gtypelib.c: a couple of coding style fixes.
2008-10-06 Lucas Rocha <lucasr@gnome.org>
Bug 555294: Add support for multiple shared libraries per typelib.
* girepository/ginvoke.c (g_function_info_invoke),
girepository/ginfo.c(g_registered_type_info_get_g_type): use
g_typelib_symbol instead of g_module_symbol.
* girepository/girepository.h: remove g_typelib_set_module and add
g_typelib_symbol.
* girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
g_typelib_new_from_memory, g_typelib_new_from_const_memory,
g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
modules instead of just one. The symbol lookup is now abstracted
behind g_typelib_symbol which tries to find the passed symbol name in
one of its modules.
* giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
and write shared_library attribute as a comma-separated list of libs.
2008-10-06 Colin Walters <walters@verbum.org>
* giscanner/transformer.py: Parse length= annotation as
a parameter name, not a raw int.
* tests/*: Update.
2008-10-03 Colin Walters <walters@verbum.org>
Bug 551744: Non-GObject types aren't aggregating ctors and methods
* girepository/gtypelib.c: Allow ctors/methods on struct,union,
and boxed.
* giscanner/glibtransformer.py: Ditto, and GLibBoxed is also a
registered type.
* tests/*: Extend.
2008-10-03 Colin Walters <walters@verbum.org>
Bug 554576: scan problem with ev_selection_render_selection()
* giscanner/transformer.py: Only do type resolution once we've
scanned all types. What could happen before is that we'd strip