gnome.gobject-introspection
15 years agoRelease 0.6.1 GOBJECT_INTROSPECTION_0_6_1
Johan Dahlin [Tue, 25 Nov 2008 22:48:51 +0000 (22:48 +0000)]
Release 0.6.1

2008-11-25  Johan Dahlin  <jdahlin@async.com.br>

* NEWS:
Release 0.6.1

svn path=/trunk/; revision=973

15 years agoBug 559705 – Missing association between static methods and classes
Colin Walters [Tue, 25 Nov 2008 22:29:20 +0000 (22:29 +0000)]
Bug 559705 – Missing association between static methods and classes

2008-11-25  Colin Walters  <walters@verbum.org>

        Bug 559705 – Missing association between static methods and classes

        * docs/typelib-format.txt:
        * girepository/ginfo.c (g_function_info_get_flags):
        * girepository/girmodule.c (g_ir_module_build_typelib):
        * girepository/girnode.c (g_ir_node_get_size),
        (g_ir_node_build_typelib):
        * girepository/girparser.c (start_function):
        * girepository/gtypelib.c (g_typelib_check_sanity),
        (validate_header), (validate_function_blob):
        * girepository/gtypelib.h:
        * giscanner/ast.py:
        * giscanner/girwriter.py:
        * giscanner/glibtransformer.py:
        * tests/scanner/foo-1.0-expected.gir:
        * tests/scanner/foo-1.0-expected.tgir:
        * tests/scanner/foo.h:

svn path=/trunk/; revision=972

15 years agoRemove debug print
Colin Walters [Tue, 25 Nov 2008 21:48:38 +0000 (21:48 +0000)]
Remove debug print

svn path=/trunk/; revision=971

15 years agoBug 561137 - support multiple repositories
Colin Walters [Tue, 25 Nov 2008 21:48:34 +0000 (21:48 +0000)]
Bug 561137 - support multiple repositories

This change makes us stop calling g_irepository_get_default inside ginfo.c,
which won't work for non-default repositories.

Change GIBaseInfo to not only keep track of its source repository,
we hold a reference.  This makes memmgt much clearer.

svn path=/trunk/; revision=970

15 years agoRevert earlier libtool change, there's no need
Johan Dahlin [Tue, 25 Nov 2008 21:09:56 +0000 (21:09 +0000)]
Revert earlier libtool change, there's no need
to execute through libtool since libtool would have
created a wrapper if it was found at link time

svn path=/trunk/; revision=969

15 years agoDefine socklen_t as an alias for int32.
Johan Dahlin [Tue, 25 Nov 2008 21:05:21 +0000 (21:05 +0000)]
Define socklen_t as an alias for int32.

2008-11-25  Johan Dahlin  <jdahlin@async.com.br>

    * giscanner/ast.py: Define socklen_t as an alias for int32.

svn path=/trunk/; revision=968

15 years agoBump required automake version to 1.9; 1.7 fails
Colin Walters [Tue, 25 Nov 2008 18:30:16 +0000 (18:30 +0000)]
Bump required automake version to 1.9; 1.7 fails

GLib currently depends on 1.9 or later, so this change seems safe.

svn path=/trunk/; revision=967

15 years agofix link failure when introspecting girepository itself
Tommi Komulainen [Tue, 25 Nov 2008 17:54:41 +0000 (17:54 +0000)]
fix link failure when introspecting girepository itself

* giscanner/dumper.py (_link): fix link failure when
introspecting girepository itself by ordering the command line
options better

svn path=/trunk/; revision=966

15 years agoprefer uninstalled libraries to installed ones
Tommi Komulainen [Tue, 25 Nov 2008 17:02:43 +0000 (17:02 +0000)]
prefer uninstalled libraries to installed ones

* giscanner/dumper.py (_link): prefer uninstalled libraries to
installed ones so that we don't introspect an older, installed
version

svn path=/trunk/; revision=965

15 years agoExecute the dumper program through libtool if it's installed, so we avoid
Johan Dahlin [Tue, 25 Nov 2008 13:01:58 +0000 (13:01 +0000)]
Execute the dumper program through libtool if it's installed, so we avoid

2008-11-25  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/glibtransformer.py:
        * tools/g-ir-scanner:
        Execute the dumper program through libtool if it's installed,
        so we avoid loading the installed version.

svn path=/trunk/; revision=964

15 years agoRemove a warning, be less verbose on error on fundamental types.
Johan Dahlin [Mon, 24 Nov 2008 16:22:16 +0000 (16:22 +0000)]
Remove a warning, be less verbose on error on fundamental types.

2008-11-24  Johan Dahlin  <jdahlin@async.com.br>

* girepository/gdump.c (dump_type): Remove a warning,
be less verbose on error on fundamental types.

svn path=/trunk/; revision=963

15 years agoAdd license headers, refactor into a class, avoid some duplication and do
Johan Dahlin [Sun, 23 Nov 2008 21:38:08 +0000 (21:38 +0000)]
Add license headers, refactor into a class, avoid some duplication and do

2008-11-23  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/dumper.py: Add license headers,
        refactor into a class, avoid some duplication and do some
        extra pedantic checks.

svn path=/trunk/; revision=962

15 years agoMake it compilable with -Werror on my system by adding a couple of
Johan Dahlin [Sun, 23 Nov 2008 20:36:15 +0000 (20:36 +0000)]
Make it compilable with -Werror on my system by adding a couple of

2008-11-23  Johan Dahlin  <jdahlin@async.com.br>

        Make it compilable with -Werror on my system by adding
        a couple of prototypes and including headers.

svn path=/trunk/; revision=960

15 years agoBug 562022 – gobject-introspection needs python headers
Johan Dahlin [Sun, 23 Nov 2008 16:42:07 +0000 (16:42 +0000)]
Bug 562022 – gobject-introspection needs python headers

2008-11-23  Johan Dahlin  <jdahlin@async.com.br>

    Bug 562022 – gobject-introspection needs python headers

    * configure.ac: fail without python headers present.
    Patch by: Tom Parker

svn path=/trunk/; revision=959

15 years agoAdd time_t to Everything
Colin Walters [Fri, 21 Nov 2008 14:47:03 +0000 (14:47 +0000)]
Add time_t to Everything

svn path=/trunk/; revision=958

15 years agoBug 561617 – Return value array annotations
Johan Dahlin [Fri, 21 Nov 2008 02:53:28 +0000 (02:53 +0000)]
Bug 561617 – Return value array annotations

2008-11-21  Johan Dahlin  <jdahlin@async.com.br>

    Bug 561617 – Return value array annotations

    * giscanner/transformer.py:
    * tests/scanner/annotation.c (annotation_return_array):
    * tests/scanner/annotation.h:
    Add support for (array) for return value annotations as well.

svn path=/trunk/; revision=957

15 years agoAnnotate g_app_info_get_icon
Colin Walters [Fri, 21 Nov 2008 00:13:34 +0000 (00:13 +0000)]
Annotate g_app_info_get_icon

svn path=/trunk/; revision=956

15 years agotests/everything/everything.c: (test_closure_one_arg): set the value to 0
Johan Bilien [Thu, 20 Nov 2008 12:05:31 +0000 (12:05 +0000)]
tests/everything/everything.c: (test_closure_one_arg): set the value to 0
before use

svn path=/trunk/; revision=955

15 years agoadd a test function which calls a closure.
Johan Bilien [Thu, 20 Nov 2008 11:54:05 +0000 (11:54 +0000)]
add a test function which calls a closure.

2008-11-20  Johan Bilien  <jobi@via.ecp.fr>

* tests/everything/everything.[ch]: add a test function which calls a
closure.

svn path=/trunk/; revision=954

15 years agoAdd Gio Unix bits to the Gio.gir if available
Colin Walters [Wed, 19 Nov 2008 22:42:09 +0000 (22:42 +0000)]
Add Gio Unix bits to the Gio.gir if available

Having a separate .gir would be fairly overkill for the few components
in the Gio Unix integration, and this mirrors how we handle Gtk.

svn path=/trunk/; revision=953

15 years agoAdd TestObj with static methods
Colin Walters [Wed, 19 Nov 2008 22:38:47 +0000 (22:38 +0000)]
Add TestObj with static methods

Static methods and ctors are a useful semi-corner case for bindings.

svn path=/trunk/; revision=952

15 years agoAnnotate g_app_info_get_all
Colin Walters [Wed, 19 Nov 2008 21:38:09 +0000 (21:38 +0000)]
Annotate g_app_info_get_all

svn path=/trunk/; revision=951

15 years agoCatch ValueError exceptions.
Johan Dahlin [Wed, 19 Nov 2008 20:15:14 +0000 (20:15 +0000)]
Catch ValueError exceptions.

2008-11-19  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/cachestore.py:
        Catch ValueError exceptions.

svn path=/trunk/; revision=950

15 years agoSwitch everything to .tgir convention
Colin Walters [Wed, 19 Nov 2008 20:11:31 +0000 (20:11 +0000)]
Switch everything to .tgir convention

We want to be using .tgir and g-ir-generate like the other cool kids;
the --typelib-xml option to the scanner is not at all the same thing.

svn path=/trunk/; revision=949

15 years agoAdd allow-none for Gio method
Colin Walters [Wed, 19 Nov 2008 20:11:26 +0000 (20:11 +0000)]
Add allow-none for Gio method

svn path=/trunk/; revision=948

15 years agofix builddir != srcdir
Tommi Komulainen [Tue, 18 Nov 2008 22:29:27 +0000 (22:29 +0000)]
fix builddir != srcdir

svn path=/trunk/; revision=947

15 years agoUse sizeof() instead of hard-coding struct sizes
Colin Walters [Tue, 18 Nov 2008 18:42:36 +0000 (18:42 +0000)]
Use sizeof() instead of hard-coding struct sizes

svn path=/trunk/; revision=946

15 years agoAdd a comment about keeping hardcoded numbers in g_typelib_check_sanity
Colin Walters [Tue, 18 Nov 2008 18:42:32 +0000 (18:42 +0000)]
Add a comment about keeping hardcoded numbers in g_typelib_check_sanity

svn path=/trunk/; revision=945

15 years agoAdd "storage type" to the typelib data for enums
Owen Taylor [Tue, 18 Nov 2008 12:29:10 +0000 (12:29 +0000)]
Add "storage type" to the typelib data for enums

In order to set and get enum and flag fields in structures, we need
to know the integral type that the enumeration is stored as. We are already
computing that at compile time in order to compute struct offsets, so the
easiest thing to do is to save that in the typelib.

* docs/typelib-format.txt girepository/girnode.[ch] girepository/giroffsets.c
girepository/gtypelib.h: Add 'storage_type' to the typelib format for EnumBlob
and compute and save it at compile time.

* girepository/girepository.h girepository/ginfo.c:
Add g_enum_info_get_storage_type().

* girepository/gfield.c: Implement reading and writing enum and flags fields
based on the storage type.

http://bugzilla.gnome.org/show_bug.cgi?id=561296

svn path=/trunk/; revision=944

15 years agoAdd enums to the Everything test module
Owen Taylor [Tue, 18 Nov 2008 12:29:01 +0000 (12:29 +0000)]
Add enums to the Everything test module

* tests/everything/everything.[ch]: Add TestEnum and TestFlags to the Everything
test module and register them as GTypes.

https://bugzilla.gnome.org/show_bug.cgi?id=561296

svn path=/trunk/; revision=943

15 years agoCatch BadPickleGet exceptions as well.
Johan Dahlin [Tue, 18 Nov 2008 11:02:24 +0000 (11:02 +0000)]
Catch BadPickleGet exceptions as well.

2008-11-18  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/cachestore.py:
        Catch BadPickleGet exceptions as well.

svn path=/trunk/; revision=942

15 years agoFix doc comment annotations for test_struct_b_clone()
Owen Taylor [Mon, 17 Nov 2008 23:24:17 +0000 (23:24 +0000)]
Fix doc comment annotations for test_struct_b_clone()

* tests/everything/everything.c: Fix doc comment annotations
for test_struct_b_clone() to refer to the right function.

svn path=/trunk/; revision=941

15 years agofix spelling of GHashTable. #561135
Dan Winship [Mon, 17 Nov 2008 22:07:26 +0000 (22:07 +0000)]
fix spelling of GHashTable. #561135

* giscanner/glibtransformer.py (GLibTransformer.__init__): fix
spelling of GHashTable. #561135

* tests/scanner/annotation.c (annotation_object_get_hash):
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir: add a test of
GHashTable annotations

svn path=/trunk/; revision=940

15 years agoBug 552568 - All the argv parameters in Gtk.gir map char*** to int8
Colin Walters [Mon, 17 Nov 2008 17:01:36 +0000 (17:01 +0000)]
Bug 552568 - All the argv parameters in Gtk.gir map char*** to int8

svn path=/trunk/; revision=939

15 years agoEnsure we always call init_globals
Colin Walters [Mon, 17 Nov 2008 00:49:58 +0000 (00:49 +0000)]
Ensure we always call init_globals

svn path=/trunk/; revision=938

15 years agog_irepository_get_default is (transfer none)
Colin Walters [Mon, 17 Nov 2008 00:39:46 +0000 (00:39 +0000)]
g_irepository_get_default is (transfer none)

svn path=/trunk/; revision=937

15 years agoBug 559706 - Interface prerequisites
Colin Walters [Mon, 17 Nov 2008 00:27:46 +0000 (00:27 +0000)]
Bug 559706 - Interface prerequisites

svn path=/trunk/; revision=936

15 years agoAdd test for interface prereq
Colin Walters [Mon, 17 Nov 2008 00:27:44 +0000 (00:27 +0000)]
Add test for interface prereq

svn path=/trunk/; revision=935

15 years agoParse interface prerequisites
Colin Walters [Mon, 17 Nov 2008 00:27:41 +0000 (00:27 +0000)]
Parse interface prerequisites

svn path=/trunk/; revision=934

15 years agoAlso generate new syntax
Colin Walters [Mon, 17 Nov 2008 00:27:39 +0000 (00:27 +0000)]
Also generate new syntax

svn path=/trunk/; revision=933

15 years agoBug 559706 - interface prequisites
Colin Walters [Mon, 17 Nov 2008 00:27:37 +0000 (00:27 +0000)]
Bug 559706 - interface prequisites

svn path=/trunk/; revision=932

15 years agoRespect is_pointer in serialize_type()
Owen Taylor [Sun, 16 Nov 2008 21:20:26 +0000 (21:20 +0000)]
Respect is_pointer in serialize_type()

Add a '*' to the serialization for the cases where we set is_pointer
in the type blob we write out depending on node->is_pointer. Don't
add the '*' in the cases where is_pointer is set or not set in a
fixed fashion.

http://bugzilla.gnome.org/show_bug.cgi?id=561087

svn path=/trunk/; revision=931

15 years agoBug 560825 – Add size and alignment to typelib
Owen Taylor [Sun, 16 Nov 2008 21:15:54 +0000 (21:15 +0000)]
Bug 560825 – Add size and alignment to typelib

Include the size and alignment of structures and unions in the typelib,
and add getter methods to retrieve them from GIStructInfo/GIUnionInfo.

* docs/typelib-format.txt girepository/gtypelib.h girepository/girnode.c
girepository/girmodule.c girepository/gtypelib.c: Add size and alignment
to StructBlob and UnionBlob.

* girepository/ginfo.c girepository/girepository.h:
Add g_[struct|union]_get[size|alignment]().

* test/offsets/gen-gitestoffsets: Test overall structure size and alignment.

svn path=/trunk/; revision=930

15 years agoBug 552371 – implement struct field get/set
Owen Taylor [Sun, 16 Nov 2008 21:14:19 +0000 (21:14 +0000)]
Bug 552371 – implement struct field get/set

Add convenience functions g_field_info_set_field() and
g_field_info_get_field() to set and get fields based on the offsets
in GIFieldInfo.

svn path=/trunk/; revision=929

15 years agoBug 560241 - Out-arguments should not be marked as being pointers in all cases
Colin Walters [Sun, 16 Nov 2008 20:58:35 +0000 (20:58 +0000)]
Bug 560241 - Out-arguments should not be marked as being pointers in all cases

svn path=/trunk/; revision=928

15 years agoBug 560241 - Out-arguments should not be marked as being pointers in all cases
Colin Walters [Sun, 16 Nov 2008 20:45:30 +0000 (20:45 +0000)]
Bug 560241 - Out-arguments should not be marked as being pointers in all cases

svn path=/trunk/; revision=927

15 years agoChangelog
Colin Walters [Sat, 15 Nov 2008 21:43:05 +0000 (21:43 +0000)]
Changelog

svn path=/trunk/; revision=926

15 years agoconst char->char to avoid leaking the return value, as pointed out by Tommi
Johan Dahlin [Fri, 14 Nov 2008 12:07:53 +0000 (12:07 +0000)]
const char->char to avoid leaking the return value, as pointed out by Tommi

svn path=/trunk/; revision=925

15 years agoRename the int/gtype array tests. Make the return value useful, an
Johan Dahlin [Fri, 14 Nov 2008 11:37:29 +0000 (11:37 +0000)]
Rename the int/gtype array tests. Make the return value useful, an

2008-11-14  Johan Dahlin  <jdahlin@async.com.br>

    * tests/everything/everything.c (test_array_int_in),
    (test_array_gtype_in):
    * tests/everything/everything.h:
    Rename the int/gtype array tests. Make the return value
    useful, an aggregation of the array input values.

svn path=/trunk/; revision=924

15 years agoRename gitesttypes.[ch] to everything.[ch]
Johan Dahlin [Fri, 14 Nov 2008 11:23:01 +0000 (11:23 +0000)]
Rename gitesttypes.[ch] to everything.[ch]

2008-11-14  Johan Dahlin  <jdahlin@async.com.br>

        * tests/everything/Makefile.am:
        * tests/everything/everything.c:
        * tests/everything/everything.h:
        * tests/everything/gitesttypes.c:
        * tests/everything/gitesttypes.h:
        Rename gitesttypes.[ch] to everything.[ch]

svn path=/trunk/; revision=923

15 years agoCorrect nsversion for GIRepository
Colin Walters [Fri, 14 Nov 2008 03:41:40 +0000 (03:41 +0000)]
Correct nsversion for GIRepository

svn path=/trunk/; revision=922

15 years agoBug 560708 – Fix zero-termination defaults for arrays with length=
Colin Walters [Thu, 13 Nov 2008 23:17:57 +0000 (23:17 +0000)]
Bug 560708 – Fix zero-termination defaults for arrays with length=

svn path=/trunk/; revision=921

15 years agoBug 557788 - Return types for constructors in generated typelib bogus
Colin Walters [Thu, 13 Nov 2008 22:56:15 +0000 (22:56 +0000)]
Bug 557788 - Return types for constructors in generated typelib bogus

svn path=/trunk/; revision=920

15 years agogirepository/girffi.c: Fix "Unexpected time for time_t" message.
Owen Taylor [Thu, 13 Nov 2008 21:38:42 +0000 (21:38 +0000)]
girepository/girffi.c: Fix  "Unexpected time for time_t" message.

svn path=/trunk/; revision=919

15 years agoAdd test_int_in function. Fix test_gtype_in prototype
Johan Dahlin [Thu, 13 Nov 2008 20:25:08 +0000 (20:25 +0000)]
Add test_int_in function. Fix test_gtype_in prototype

svn path=/trunk/; revision=918

15 years agoRemove stray print(s)
Johan Dahlin [Thu, 13 Nov 2008 20:23:47 +0000 (20:23 +0000)]
Remove stray print(s)

svn path=/trunk/; revision=916

15 years agoRemove processing msg
Colin Walters [Thu, 13 Nov 2008 20:21:05 +0000 (20:21 +0000)]
Remove processing msg

svn path=/trunk/; revision=915

15 years agoAdd expected girs
Colin Walters [Thu, 13 Nov 2008 20:19:27 +0000 (20:19 +0000)]
Add expected girs

svn path=/trunk/; revision=914

15 years agoAdd new files from last commit
Colin Walters [Thu, 13 Nov 2008 20:13:39 +0000 (20:13 +0000)]
Add new files from last commit

svn path=/trunk/; revision=913

15 years agoBug 558436 - avoid having scanner load app code
Colin Walters [Thu, 13 Nov 2008 19:57:12 +0000 (19:57 +0000)]
Bug 558436 - avoid having scanner load app code

svn path=/trunk/; revision=912

15 years agog_irepository_dump implementation
Colin Walters [Thu, 13 Nov 2008 19:57:09 +0000 (19:57 +0000)]
g_irepository_dump implementation

svn path=/trunk/; revision=911

15 years agoAdd a file to include with Makefile fragments useful for scanner invocation
Colin Walters [Thu, 13 Nov 2008 19:57:07 +0000 (19:57 +0000)]
Add a file to include with Makefile fragments useful for scanner invocation

svn path=/trunk/; revision=910

15 years agoReturn strings in filename encoding.
Tommi Komulainen [Thu, 13 Nov 2008 15:18:30 +0000 (15:18 +0000)]
Return strings in filename encoding.

2008-11-13  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tests/everything/gitesttypes.c (test_filename_return): Return
strings in filename encoding.

svn path=/trunk/; revision=909

15 years agoBug 560253 - Add struture and boxed types to Everything test module
Owen Taylor [Thu, 13 Nov 2008 15:14:09 +0000 (15:14 +0000)]
Bug 560253 - Add struture and boxed types to Everything test module

Add examples of:

 Plain old data structs
 Plain old data structs with nested fields
 Plain old data boxed
 Plain old data boxed with nested fields
 More complicated boxed types with internal state

svn path=/trunk/; revision=908

15 years agoAdd a test of GType arrays, a la gtk_list_store_set_columns.
Johan Dahlin [Thu, 13 Nov 2008 09:37:49 +0000 (09:37 +0000)]
Add a test of GType arrays, a la gtk_list_store_set_columns.

2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

    * tests/everything/gitesttypes.c (test_gtype_in):
    * tests/everything/gitesttypes.h:
    Add a test of GType arrays, a la gtk_list_store_set_columns.

svn path=/trunk/; revision=907

15 years agoBug 560419 – Cache includes when parsing
Owen Taylor [Wed, 12 Nov 2008 17:17:15 +0000 (17:17 +0000)]
Bug 560419 – Cache includes when parsing

Keep track of all modules parsed within a GIrParser, and when a
module is referenced a second time, use the existing parsed copy
instead of reparsing.

svn path=/trunk/; revision=906

15 years agoFix management of ParseContext.includes_modules (#560419)
Owen Taylor [Wed, 12 Nov 2008 17:17:08 +0000 (17:17 +0000)]
Fix management of ParseContext.includes_modules (#560419)

Fix some trivial bugs in managing the list of include modules.
(Add to module's list twice, not initialized to NULL, not freed.)

svn path=/trunk/; revision=905

15 years agoKeep aliases and disguised_structures local to each module (#560419)
Owen Taylor [Wed, 12 Nov 2008 17:17:01 +0000 (17:17 +0000)]
Keep aliases and disguised_structures local to each module (#560419)

When parsing, keep keep a separate hash tables of aliases and
'disguised' flags for each module, and store that on the module.

After parsing an include merge the aliases/disguised flags to the
including module.

Remove 'prefix_aliases' flag and always prefix aliases/disguised
structure types when parsing; this simplifies the code considerably.

svn path=/trunk/; revision=904

15 years agoFix mismatches between .gir name and 'name' attribute (#560419)
Owen Taylor [Wed, 12 Nov 2008 17:16:55 +0000 (17:16 +0000)]
Fix mismatches between .gir name and 'name' attribute (#560419)

* tests/boxed.gir tests/constant.gir tests/enum.gir tests/invoke/invoke.c
tests/invoke/testfns-1.0.gir tests/object.gir tests/struct.gir: Fix places
where the 'name' element of <namespace/> didn't match the filename of the
gir, an assumption that the compiler has always expected and now enforces.

svn path=/trunk/; revision=903

15 years agoOnly allow one <namespace/> element per <repository/> (#560419)
Owen Taylor [Wed, 12 Nov 2008 17:16:49 +0000 (17:16 +0000)]
Only allow one <namespace/> element per <repository/> (#560419)

The logic in girparser.c didn't work very well if there were multiple
<namespace/> nodes within a single <repository/> (context->namespace
was always the overall filename and not the the name specified in the
<namespace/> element for one thing; this would cause aliases to
be mis-prefixed in include modules.) Also check that the "name" in
the <namespace/> node matches the filename.

svn path=/trunk/; revision=902

15 years agoAdd a GirParser object to hold the state of a compilation
Owen Taylor [Wed, 12 Nov 2008 17:16:42 +0000 (17:16 +0000)]
Add a GirParser object to hold the state of a compilation

Add a toplevel GirParser object to hold state that is global across
a compilation. Currently just holds the include path, but will
eventually also keep a cached list of parsed modules.

svn path=/trunk/; revision=901

15 years agoAdd a UTF-8 encoded filename too
Johan Dahlin [Wed, 12 Nov 2008 15:00:30 +0000 (15:00 +0000)]
Add a UTF-8 encoded filename too

svn path=/trunk/; revision=900

15 years agoFix minor memory leak.
Tommi Komulainen [Wed, 12 Nov 2008 14:42:13 +0000 (14:42 +0000)]
Fix minor memory leak.

2008-11-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* girepository/girepository.c (find_namespace_latest): Fix
minor memory leak.

svn path=/trunk/; revision=899

15 years agouse 'introspection' component for bugs
Tommi Komulainen [Wed, 12 Nov 2008 14:42:07 +0000 (14:42 +0000)]
use 'introspection' component for bugs

2008-11-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* configure.ac: use 'introspection' component for bugs

svn path=/trunk/; revision=898

15 years agoAdd a filename return test.
Johan Dahlin [Wed, 12 Nov 2008 14:17:07 +0000 (14:17 +0000)]
Add a filename return test.

2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

    * tests/everything/gitesttypes.c (test_filename_return):
    * tests/everything/gitesttypes.h:
    Add a filename return test.

svn path=/trunk/; revision=897

15 years agofix gen-gitestoffsets invocation with builddir != srcdir
Tommi Komulainen [Wed, 12 Nov 2008 14:15:17 +0000 (14:15 +0000)]
fix gen-gitestoffsets invocation with builddir != srcdir

2008-11-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tests/offsets/Makefile.am (gitestoffsets.c): fix
gen-gitestoffsets invocation with builddir != srcdir

svn path=/trunk/; revision=896

15 years agoChange the element type from utf8 to filename Special case filename
Johan Dahlin [Wed, 12 Nov 2008 12:59:01 +0000 (12:59 +0000)]
Change the element type from utf8 to filename Special case filename

2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

        * girepository/girepository.c:
        Change the element type from utf8 to filename
        * girepository/girnode.c (g_ir_node_build_typelib):
        Special case filename equally to utf8 here.

svn path=/trunk/; revision=895

15 years agoRemove unused variables, add a dependency of girepository.ch, so when they
Johan Dahlin [Wed, 12 Nov 2008 12:48:02 +0000 (12:48 +0000)]
Remove unused variables, add a dependency of girepository.ch, so when they

2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

        * gir/Makefile.am:
        Remove unused variables, add a dependency of girepository.ch, so when
        they change we rebuild the gir automatically.

svn path=/trunk/; revision=894

15 years agoAdd a g_irepository_get_search_path, so we can access the search paths
Johan Dahlin [Wed, 12 Nov 2008 12:40:34 +0000 (12:40 +0000)]
Add a g_irepository_get_search_path, so we can access the search paths

2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

        * girepository/girepository.c (g_irepository_get_search_path):
        * girepository/girepository.h:
        Add a g_irepository_get_search_path, so we can access the search
        paths from runtime.

svn path=/trunk/; revision=893

15 years agoOnly resolve the libname to the basename of the path when passing in an absolute...
Johan Dahlin [Wed, 12 Nov 2008 12:12:23 +0000 (12:12 +0000)]
Only resolve the libname to the basename of the path when passing in an absolute .la filename

svn path=/trunk/; revision=892

15 years agoBug 560474 – g-ir-compiler crashes when compiling the glib gir
Johan Bilien [Wed, 12 Nov 2008 12:12:04 +0000 (12:12 +0000)]
Bug 560474 – g-ir-compiler crashes when compiling the glib gir

2008-11-12  Johan Bilien  <jobi@via.ecp.fr>

Bug 560474 – g-ir-compiler crashes when compiling the glib gir

* girepository/girparser.c: avoid freeing an uninitialized pointer

svn path=/trunk/; revision=891

15 years agoAdd a GIRepository-2.0.gir. Change the libtool lookup slightly so we can
Johan Dahlin [Wed, 12 Nov 2008 12:04:54 +0000 (12:04 +0000)]
Add a GIRepository-2.0.gir. Change the libtool lookup slightly so we can

2008-11-12  Johan Dahlin  <jdahlin@async.com.br>

        * gir/Makefile.am:
        * giscanner/glibtransformer.py:
        * tools/g-ir-scanner:
        Add a GIRepository-2.0.gir. Change the libtool lookup slightly
        so we can just pass in --library=foo/bar/baz.la and the scanner
        does the right thing.
        Don't warn for _get_type() functions if they don't take any
        parameters

svn path=/trunk/; revision=890

15 years agoBug 560404 – Prefix types when resolving aliases in included modules
Owen Taylor [Tue, 11 Nov 2008 22:02:37 +0000 (22:02 +0000)]
Bug 560404 – Prefix types when resolving aliases in included modules

* girepository/girparser.c: When resolving aliases in an included
module, prefix types before looking them up.

svn path=/trunk/; revision=889

15 years agoCompute field offsets and overall size for object structures
Owen Taylor [Tue, 11 Nov 2008 21:10:12 +0000 (21:10 +0000)]
Compute field offsets and overall size for object structures

2008-11-11  Owen Taylor  <otaylor@redhat.com>

        Compute field offsets and overall size for object structures

        Bug 560326 – Fails to build Gtk-2.0.typelib with "Unexpected non-pointer
        field of type object in structure"

        Do basic computation of field offsets for objects and interfaces;
        this doesn't attempt to address all of the "mess" for virtual
        functions described in Bug 560281.

svn path=/trunk/; revision=888

15 years agoBug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir
Tommi Komulainen [Tue, 11 Nov 2008 17:26:59 +0000 (17:26 +0000)]
Bug 560308 – g-ir-compiler goes in infinite loop on Gdk-2.0.gir

2008-11-11  Tommi Komulainen  <tommi.komulainen@iki.fi>

Based on patch by Johan Bilien.

* giscanner/transformer.py (_create_member, _create_parameter):
Resolve types here as well.
(_resolve_type_name_1): Try resolving using 'ctype' first since
it's least ambiguous. Fixes struct member type resolution with
similarly named types, e.g. Gdk.PangoRendererClass and
Pango.RendererClass
* tests/scanner/foo*: Add test.

svn path=/trunk/; revision=887

15 years agoSearch provided include dirs before the default directories.
Owen Taylor [Tue, 11 Nov 2008 15:25:59 +0000 (15:25 +0000)]
Search provided include dirs before the default directories.

2008-11-11  Owen Taylor  <otaylor@redhat.com>

        * girepository/girparser.c: Search provided include dirs before
        the default directories.

svn path=/trunk/; revision=885

15 years agoInclude fully-qualified names in all error messages.
Owen Taylor [Tue, 11 Nov 2008 15:25:51 +0000 (15:25 +0000)]
Include fully-qualified names in all error messages.

2008-11-11  Owen Taylor  <otaylor@redhat.com>

        * girepository/giroffsets.c: Include fully-qualified names in
        all error messages.

svn path=/trunk/; revision=884

15 years agoImprove warning message formatting
Johan Dahlin [Tue, 11 Nov 2008 13:53:00 +0000 (13:53 +0000)]
Improve warning message formatting

svn path=/trunk/; revision=883

15 years agoFail gracefully with an informative error message when recursion is
Owen Taylor [Tue, 11 Nov 2008 13:45:13 +0000 (13:45 +0000)]
Fail gracefully with an informative error message when recursion is

2008-11-11  Owen Taylor  <otaylor@redhat.com>

        * girepository/giroffsets.c: Fail gracefully with an informative
        error message when recursion is encountered when computing a
        structure size.

svn path=/trunk/; revision=882

15 years agoReorganize and fix compiler warnings
Johan Dahlin [Tue, 11 Nov 2008 13:21:01 +0000 (13:21 +0000)]
Reorganize and fix compiler warnings

svn path=/trunk/; revision=880

15 years agogirepository/girparser.c: Remove an unused variable.
Owen Taylor [Tue, 11 Nov 2008 05:11:05 +0000 (05:11 +0000)]
girepository/girparser.c: Remove an unused variable.

svn path=/trunk/; revision=879

15 years agoAdd tests for field offset computations
Owen Taylor [Tue, 11 Nov 2008 05:10:56 +0000 (05:10 +0000)]
Add tests for field offset computations

tests/offsets/offsets.h: Header file with structure definitions to test

tests/offsets/gen-gitestoffsets: Generate a C program that computes
  field offsets for the structures in offsets.h two ways: using
  the information from a generated typelib, and as computed by the
  compiler.

We diff these two versions to test that everything is OK.

svn path=/trunk/; revision=878

15 years agoRemove field offsets from g-ir-generate output and test inputs
Owen Taylor [Tue, 11 Nov 2008 05:10:47 +0000 (05:10 +0000)]
Remove field offsets from g-ir-generate output and test inputs

Field offsets are a) architecture dependent so they shouldn't be part
of the architecture-independent gir format which is installed in
datadir. b) Are architecture-dependent so they shouldn't be in test
expected output. Remove field offsets from girs.
(Virtual function and discriminator offsets are not removed, as they
aren't fully hooked up to the field-offset computation machinery yet.)

svn path=/trunk/; revision=877

15 years agoBug 560252 - Compute field offsets before writing typelib
Owen Taylor [Tue, 11 Nov 2008 05:10:36 +0000 (05:10 +0000)]
Bug 560252 - Compute field offsets before writing typelib

girnode.h: Store the total size and alignment for
 GIrNodeStruct/Boxed/Union.

giroffset.c: New file implementing computation of structure
 field offsets.

girnode.c: Compute structure field offsets before writing types
 into the typelib.

docs/typelib-format.txt: Document that a field offset of 0xFFFF
means "unknown". Also fix description of the discriminator_offset
field for unions.

svn path=/trunk/; revision=876

15 years agoAdd ChangeLog entries for last 3 commits
Owen Taylor [Tue, 11 Nov 2008 04:33:24 +0000 (04:33 +0000)]
Add ChangeLog entries for last 3 commits

svn path=/trunk/; revision=875

15 years agoBug 560250 - Fully parse included modules
Owen Taylor [Tue, 11 Nov 2008 00:48:17 +0000 (00:48 +0000)]
Bug 560250 - Fully parse included modules

For some things, like computing structure offsets to put into the typelib
we need more than just the aliases from included modules. Do a completel
parse of included modules and store in module->included_modules.

Also add g_ir_find_node() to find node information from within the
active set of modules and their includes.

svn path=/trunk/; revision=874

15 years agoSplit g_ir_ffi_get_ffi_type() out from ginvoke.c
Owen Taylor [Tue, 11 Nov 2008 00:04:45 +0000 (00:04 +0000)]
Split g_ir_ffi_get_ffi_type() out from ginvoke.c

Extract a function to convert GITypeTag to ffi_type from the internals
of ginvoke.c. This will be useful in figure out structure alignment.

Also fix handling of gsize and time_t to be portable. (Add a check
to configure.ac to figure out the width of time_t.)

svn path=/trunk/; revision=873

15 years agoBug 560248 – "disguised structures"
Owen Taylor [Mon, 10 Nov 2008 23:58:49 +0000 (23:58 +0000)]
Bug 560248 – "disguised structures"

Certain types like GIConv and GdkAtom are pointers internally but don't
look like pointers when referenced. They have the form.

 typedef struct _X *X;

Parse these as structures/records but mark them in the gir with a 'disguised'
attribute so that we know that they need special handling.

In the typelib treat them like any other structure.

svn path=/trunk/; revision=872

15 years agoWrite throws attribute for virtual functions, fixes bug 559703
Jürg Billeter [Sun, 9 Nov 2008 14:33:24 +0000 (14:33 +0000)]
Write throws attribute for virtual functions, fixes bug 559703

2008-11-09  Jürg Billeter  <j@bitron.ch>

* giscanner/ast.py:
* giscanner/girwriter.py:

Write throws attribute for virtual functions, fixes bug 559703

svn path=/trunk/; revision=871

15 years agoSet module.__loader__ as per PEP 302.
Johan Dahlin [Fri, 7 Nov 2008 17:49:33 +0000 (17:49 +0000)]
Set module.__loader__ as per PEP 302.

2008-11-07  Johan Dahlin  <jdahlin@async.com.br>

    * giscanner/libtoolimporter.py
    (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.

svn path=/trunk/; revision=870