platform/upstream/gobject-introspection.git
12 years agoginvoke: support conversion of fundamental type GParamSpec values
Mark Nauwelaerts [Mon, 3 Sep 2012 12:39:31 +0000 (14:39 +0200)]
ginvoke: support conversion of fundamental type GParamSpec values

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

12 years agoUpdate tests to show off some new features
Jasper St. Pierre [Wed, 29 Aug 2012 09:02:59 +0000 (06:02 -0300)]
Update tests to show off some new features

These includes more proper links and fundamentals.

12 years agomallardwriter: Fix fundamental false alarms for the C formatter
Jasper St. Pierre [Wed, 29 Aug 2012 17:46:02 +0000 (14:46 -0300)]
mallardwriter: Fix fundamental false alarms for the C formatter

Just use a constant translation dictionary. If somebody needs something
more fancy they can use a custom match.

12 years agomallardwriter: Fix formatting the function name
Jasper St. Pierre [Wed, 29 Aug 2012 09:07:14 +0000 (06:07 -0300)]
mallardwriter: Fix formatting the function name

This is not what format_type is for.

12 years agogirparser: Track methods/constructors by symbol
Jasper St. Pierre [Wed, 29 Aug 2012 09:06:55 +0000 (06:06 -0300)]
girparser: Track methods/constructors by symbol

In order to be able to linkify a constructor/method, we need
to first track it by symbol.

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

12 years agoast: Remove what looks to be a copy/paste error
Jasper St. Pierre [Wed, 29 Aug 2012 09:16:39 +0000 (06:16 -0300)]
ast: Remove what looks to be a copy/paste error

A symbol isn't a ctype. None of the tests failed when I removed
this, git blame wasn't very enlightening, and we don't remove this
in the remove method, so I'm thinking it's an error.

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

12 years ago.gitignore: Add doctool examples output
Jasper St. Pierre [Wed, 29 Aug 2012 17:46:35 +0000 (14:46 -0300)]
.gitignore: Add doctool examples output

12 years agotests: Don't error out if there is no existing directory
Jasper St. Pierre [Wed, 29 Aug 2012 17:40:20 +0000 (14:40 -0300)]
tests: Don't error out if there is no existing directory

12 years agomallardwriter: Remove some silly code
Jasper St. Pierre [Wed, 29 Aug 2012 08:39:53 +0000 (05:39 -0300)]
mallardwriter: Remove some silly code

This silly code was part of a debugging harness.

12 years agomallardwriter: Fix whitespace
Jasper St. Pierre [Wed, 29 Aug 2012 08:39:23 +0000 (05:39 -0300)]
mallardwriter: Fix whitespace

The whitespace should come included with the surrounding 'other'
tokens. We shouldn't need to add any.

12 years agomallardwriter: Fix property and signal output
Jasper St. Pierre [Wed, 29 Aug 2012 08:39:00 +0000 (05:39 -0300)]
mallardwriter: Fix property and signal output

12 years agogiscanner: Fix make check issues
Jasper St. Pierre [Wed, 29 Aug 2012 08:26:08 +0000 (05:26 -0300)]
giscanner: Fix make check issues

Whoops.

12 years agomallardwriter: Hack a lot more on document block processing
Jasper St. Pierre [Wed, 29 Aug 2012 00:26:55 +0000 (21:26 -0300)]
mallardwriter: Hack a lot more on document block processing

Use a new regex scanner to parse the contents of document blocks
and emit the proper XML document for it.

12 years agomallardwriter: Remove a silly try/except
Jasper St. Pierre [Tue, 28 Aug 2012 23:52:31 +0000 (20:52 -0300)]
mallardwriter: Remove a silly try/except

This isn't necessary as far as I can tell

12 years agomallardwriter: Use a more generic system for language formatting
Jasper St. Pierre [Tue, 28 Aug 2012 23:45:22 +0000 (20:45 -0300)]
mallardwriter: Use a more generic system for language formatting

12 years agomallardwriter: Remove some unused stuff
Jasper St. Pierre [Tue, 28 Aug 2012 23:42:29 +0000 (20:42 -0300)]
mallardwriter: Remove some unused stuff

12 years agodocmain: Fix error message
Jasper St. Pierre [Wed, 29 Aug 2012 00:41:19 +0000 (21:41 -0300)]
docmain: Fix error message

12 years agogirepository: Fix leak in g_vfunc_info_get_address
Jasper St. Pierre [Sat, 25 Aug 2012 07:05:17 +0000 (04:05 -0300)]
girepository: Fix leak in g_vfunc_info_get_address

We need to fix the struct info here.

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

12 years agogirepository: Add g_interface_info_find_signal
Torsten Schönfeld [Sat, 25 Aug 2012 13:51:15 +0000 (15:51 +0200)]
girepository: Add g_interface_info_find_signal

Add the convenience method g_interface_info_find_signal, mirroring
g_object_info_find_signal.

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

12 years agoscanner: methods cannot have an out-arg as their first arg
Torsten Schönfeld [Fri, 17 Aug 2012 22:27:21 +0000 (00:27 +0200)]
scanner: methods cannot have an out-arg as their first arg

This ensures that if the first argument of a function like

  gboolean gdk_rgba_parse (GdkRGBA *rgba, const gchar *spec);

is annotated as being an out-arg, the result is a class function with two
arguments, not a method with one argument.  Previously, the (out) annotation
was simply ignored.

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

12 years agoPost-release version bump
Colin Walters [Mon, 20 Aug 2012 21:34:07 +0000 (17:34 -0400)]
Post-release version bump

12 years agogimarshallingtests: Add GParamSpec return and (out) argument
Mathieu Duponchelle [Mon, 20 Aug 2012 20:43:29 +0000 (22:43 +0200)]
gimarshallingtests: Add GParamSpec return and (out) argument

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

Co-Authored-By: Martin Pitt <martinpitt@gnome.org>
12 years agogirffi: Fix g_callable_info_prepare_closure for certain callables
Jasper St. Pierre [Mon, 9 Apr 2012 20:51:08 +0000 (17:51 -0300)]
girffi: Fix g_callable_info_prepare_closure for certain callables

Namely, those that are methods and those that throw GErrors.
We have very similar code in two places that calculate arg lengths and
argument types to stick into libffi. Merge, clean up, and correct both.

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

12 years agogicallableinfo: Add two new convenience methods: is_method and can_throw_gerror
Jasper St. Pierre [Mon, 9 Apr 2012 18:41:39 +0000 (15:41 -0300)]
gicallableinfo: Add two new convenience methods: is_method and can_throw_gerror

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

12 years agoRelease 1.33.9 GOBJECT_INTROSPECTION_1_33_9
Colin Walters [Mon, 20 Aug 2012 16:33:52 +0000 (12:33 -0400)]
Release 1.33.9

12 years agoUpdate annotations from glib git
Colin Walters [Mon, 20 Aug 2012 16:33:33 +0000 (12:33 -0400)]
Update annotations from glib git

12 years agoMakefile.introspection: Add gir dependency to example
Colin Walters [Wed, 15 Aug 2012 00:40:56 +0000 (20:40 -0400)]
Makefile.introspection: Add gir dependency to example

12 years agobuild: Ensure cairo-gobject always ends up in cairo.gir
Colin Walters [Wed, 15 Aug 2012 00:27:17 +0000 (20:27 -0400)]
build: Ensure cairo-gobject always ends up in cairo.gir

We were conditionalizing on the presence of cairo in the buildroot,
but that's super lame since it makes a huge mess of the build
dependency graph.

Let's just always stick cairo-gobject in there.  I doubt anyone cares
anymore about building g-i on really old systems without it.

If they do...well, we can revisit this again.

12 years agoRevert "Implement "rename to" annotation for records"
Colin Walters [Thu, 9 Aug 2012 21:17:15 +0000 (17:17 -0400)]
Revert "Implement "rename to" annotation for records"

This reverts commit 764366f7e4ef5a765a24ffac8c60b811f38b9ad9.

It can't work right now because to really use the structures, you need
to register them as a boxed, and that means we also need to rename the
boxed type.

A future version of this patch will need to handle both the structure
name and the GType name.

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

12 years agotests: Fix coding style and compiler warning in regress
Colin Walters [Sun, 5 Aug 2012 21:24:59 +0000 (17:24 -0400)]
tests: Fix coding style and compiler warning in regress

Previous commit used old-style declarations which was broken.

12 years agoTest typedef in #define
Alban Browaeys [Tue, 24 Jul 2012 13:34:24 +0000 (15:34 +0200)]
Test typedef in #define

requires "handle unsigned properly for type of defined size" patch.

12 years agoscanner: handle unsigned properly for type of defined size
Alban Browaeys [Fri, 29 Jun 2012 02:38:04 +0000 (04:38 +0200)]
scanner: handle unsigned properly for type of defined size

12 years agogiscanner: special case G_GINT64_CONSTANT and G_GUINT64_CONSTANT + misc
Alban Browaeys [Thu, 28 Jun 2012 16:34:02 +0000 (18:34 +0200)]
giscanner: special case G_GINT64_CONSTANT and G_GUINT64_CONSTANT + misc

This let the macro expands to its value as gint64/guint64.

Also
- fix lexer identifier/typdef detection for macro and misc

- do not discard cast

12 years agogimarshallingtests: More useful assertions
Martin Pitt [Thu, 2 Aug 2012 16:48:57 +0000 (18:48 +0200)]
gimarshallingtests: More useful assertions

Convert the simple g_assert() statements into g_assert_cmp*, to show what the
actual value is in case of a failure. This makes it easier to port
g-i/pygobject/etc. to new architectures which exhibit bugs, like powerpc64.

12 years agoRegress: Update expected gir for previous changes
Colin Walters [Tue, 31 Jul 2012 12:48:47 +0000 (08:48 -0400)]
Regress: Update expected gir for previous changes

12 years agogimarshallingtests: Squash compiler warning
Colin Walters [Tue, 31 Jul 2012 12:47:57 +0000 (08:47 -0400)]
gimarshallingtests: Squash compiler warning

12 years agotests: Fix comment about expected result
Jon Nordby [Sun, 29 Jul 2012 12:56:43 +0000 (14:56 +0200)]
tests: Fix comment about expected result

12 years agoImplement "rename to" annotation for records
Jon Nordby [Sat, 23 Jun 2012 11:59:12 +0000 (13:59 +0200)]
Implement "rename to" annotation for records

https://bugzilla.gnome.org/show_bug.cgi?id=675985
Moving the early annotation pass is needed to avoid
the first type resolve pass to resolve to the not-renamed type.

12 years agoAdd test for "rename to" annotation for records
Jon Nordby [Fri, 27 Jul 2012 16:21:34 +0000 (18:21 +0200)]
Add test for "rename to" annotation for records

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

12 years agoregress: Use G_DEFINE_INTERFACE
Jasper St. Pierre [Mon, 16 Jul 2012 02:47:53 +0000 (22:47 -0400)]
regress: Use G_DEFINE_INTERFACE

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

12 years agoregress: Fix regress_test_versioning
Jasper St. Pierre [Mon, 16 Jul 2012 02:42:43 +0000 (22:42 -0400)]
regress: Fix regress_test_versioning

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

12 years agoRelease 1.33.4 GOBJECT_INTROSPECTION_1_33_4
Colin Walters [Mon, 16 Jul 2012 15:15:41 +0000 (11:15 -0400)]
Release 1.33.4

12 years agoUpdate annotations from glib git
Colin Walters [Mon, 16 Jul 2012 14:47:32 +0000 (10:47 -0400)]
Update annotations from glib git

12 years agoUpdate glib annotations from git
Rico Tzschichholz [Thu, 12 Jul 2012 07:47:12 +0000 (09:47 +0200)]
Update glib annotations from git

12 years agoGIMarshallingTests: Add method taking array of variants
Mikkel Kamstrup Erlandsen [Thu, 12 Jul 2012 06:38:13 +0000 (08:38 +0200)]
GIMarshallingTests: Add method taking array of variants

Add a new interface GIMarshallingTestsInterface3 with a method that takes an
array of variants as argument. This can be used for testing the passing of
array of variants from C to introspection clients, which is not otherwise
covered in the tests for arrays of variants.

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

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
12 years agoFix GI_MARSHALLING_TESTS_INTERFACE2_GET_IFACE() definition
Martin Pitt [Thu, 12 Jul 2012 06:32:56 +0000 (08:32 +0200)]
Fix GI_MARSHALLING_TESTS_INTERFACE2_GET_IFACE() definition

This used the non-existing G_TYPE_INSTANCE_GET_INTERFACE2 macro, likely a
copy&paste error.

12 years agoUpdate glib annotations from git
Rico Tzschichholz [Wed, 11 Jul 2012 06:28:17 +0000 (08:28 +0200)]
Update glib annotations from git

12 years agoscanner: support stability tag
Evan Nemerson [Tue, 10 Jul 2012 20:59:23 +0000 (13:59 -0700)]
scanner: support stability tag

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

12 years agoscanner: Ensure "complete_ctype" patch doesn't throw an exception for anonymous unions
Colin Walters [Mon, 9 Jul 2012 00:36:50 +0000 (20:36 -0400)]
scanner: Ensure "complete_ctype" patch doesn't throw an exception for anonymous unions

The previous patch introduced a regression where we would crash on
encountering an anonymous union.  Work around this by just writing out
'gpointer' in this case, and add a regression test.

12 years agogiscanner: Write detailed information in "type" tag's "c:type" attribute.
Krzesimir Nowak [Wed, 4 Jul 2012 20:52:02 +0000 (22:52 +0200)]
giscanner: Write detailed information in "type" tag's "c:type" attribute.

That is - write also type qualifiers (const and volatile here). Update
existing tests and add a new struct to regress.h having members with
type qualifiers.

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

12 years agoscanner: Turn dead code into assertion
Colin Walters [Fri, 6 Jul 2012 15:22:08 +0000 (11:22 -0400)]
scanner: Turn dead code into assertion

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

12 years agogiscanner: Fix pointer parsing.
Krzesimir Nowak [Wed, 4 Jul 2012 20:44:02 +0000 (22:44 +0200)]
giscanner: Fix pointer parsing.

They were parsed in wrong order resulting in having wrong pointer
being const. For example - g_settings_list_schemas return type is
normally 'const gchar *const *', but parsing result was
'const gchar ** const'.

This was unnoticed, because pointer constness information is rather
not used by gobject-introspection now.

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

12 years agotests: Ignore SLetter generated gir.
Krzesimir Nowak [Wed, 4 Jul 2012 20:36:22 +0000 (22:36 +0200)]
tests: Ignore SLetter generated gir.

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

12 years agoMaintransfomer: fix again paring error domains with unregistered enums
Giovanni Campagna [Mon, 2 Jul 2012 20:51:19 +0000 (22:51 +0200)]
Maintransfomer: fix again paring error domains with unregistered enums

Previous fix was wrong, as it called to_underscores_noprefix on a
prefixed type name. The actual fix is to call the transformer to
do the prefix / type_name split, and turn the latter to underscores.
Test case included.

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

12 years agoAdd missing SLetter expected gir
Colin Walters [Mon, 2 Jul 2012 21:04:15 +0000 (17:04 -0400)]
Add missing SLetter expected gir

12 years agotests: Add GSpawnError-alike to SLetter
Colin Walters [Mon, 2 Jul 2012 20:15:05 +0000 (16:15 -0400)]
tests: Add GSpawnError-alike to SLetter

See https://bugzilla.gnome.org/show_bug.cgi?id=637025 for motivation.

12 years agotests: Add SLetter
Colin Walters [Mon, 2 Jul 2012 20:06:00 +0000 (16:06 -0400)]
tests: Add SLetter

This test case has a single-letter symbol prefix, which triggers
edge cases in the difference between prefix handling.

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

12 years agoFix build
Jasper St. Pierre [Fri, 29 Jun 2012 14:05:09 +0000 (10:05 -0400)]
Fix build

12 years agoscanner: Remove properties
Jasper St. Pierre [Thu, 28 Jun 2012 20:52:57 +0000 (16:52 -0400)]
scanner: Remove properties

We don't need a basic getter for a private field - this isn't Java.

12 years agoscanner: Don't use an O(N) lookup when we already have a hashmap
Jasper St. Pierre [Thu, 28 Jun 2012 19:13:08 +0000 (15:13 -0400)]
scanner: Don't use an O(N) lookup when we already have a hashmap

This is a general code cleanup.

12 years agofix GIArgument being exported as _Argument in .gir
Alan Knowles [Thu, 28 Jun 2012 16:07:35 +0000 (12:07 -0400)]
fix GIArgument being exported as _Argument in .gir

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

12 years agoRevert scanner fix in 64f3832
Jasper St. Pierre [Wed, 27 Jun 2012 22:02:26 +0000 (18:02 -0400)]
Revert scanner fix in 64f3832

This is incorrect -- the type name that's passed to the function
should contain a prefix. This fixes error domains for GLib errors.
Don't revert doc changes or test additions.

12 years agoRelease 1.33.3 GOBJECT_INTROSPECTION_1_33_3
Colin Walters [Tue, 26 Jun 2012 13:04:27 +0000 (09:04 -0400)]
Release 1.33.3

12 years agoUpdate glib annotations from git
Rico Tzschichholz [Sat, 23 Jun 2012 18:59:19 +0000 (20:59 +0200)]
Update glib annotations from git

12 years agoscanner: complete the enum-to-error-quark fix
Giovanni Campagna [Mon, 18 Jun 2012 17:10:50 +0000 (19:10 +0200)]
scanner: complete the enum-to-error-quark fix

Turns out that the problem was not only in the wrong matching
to GType enums, but also that the non-GType heuristics used
to_underscores instead of to_underscores_noprefix, turning DBusError
into D_Bus_Error instead of DBus_Error.
Complete with various tests.

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

12 years agoscanner: fix pairing of error quarks with registered enums
Giovanni Campagna [Sat, 16 Jun 2012 12:59:32 +0000 (14:59 +0200)]
scanner: fix pairing of error quarks with registered enums

_uscore_type_names maps from the c_symbol_prefix, which has the
global ns prefix removed, so we need to split the function symbol
before the lookup. Previously it worked because it used the heuristics
for unregistered enums (and failed for GDBusError, which has two
uppercase letters in succession)

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

12 years agoRelease 1.33.2 GOBJECT_INTROSPECTION_1_33_2
Colin Walters [Tue, 5 Jun 2012 15:20:03 +0000 (11:20 -0400)]
Release 1.33.2

12 years agoUpdate annotations to glib 2.33.2
Colin Walters [Tue, 5 Jun 2012 15:19:33 +0000 (11:19 -0400)]
Update annotations to glib 2.33.2

12 years agotests: Add marshalling test for a boxed struct property
Martin Pitt [Tue, 5 Jun 2012 09:48:15 +0000 (11:48 +0200)]
tests: Add marshalling test for a boxed struct property

Also make the _copy()/_free() methods for GIMarshallingTestsBoxedStruct get
along with NULL values.

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

12 years agotests: Add a refcounting boxed
Jasper St. Pierre [Fri, 1 Jun 2012 06:54:46 +0000 (02:54 -0400)]
tests: Add a refcounting boxed

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

12 years agotests: Add vfunc taking a caller-allocated out parameter
Martin Pitt [Fri, 1 Jun 2012 10:31:15 +0000 (12:31 +0200)]
tests: Add vfunc taking a caller-allocated out parameter

This reproduces
https://bugzilla.gnome.org/show_bug.cgi?id=653151

12 years agotests: Add marshalling test for a caller-allocated out GValue parameter
Martin Pitt [Fri, 1 Jun 2012 10:01:53 +0000 (12:01 +0200)]
tests: Add marshalling test for a caller-allocated out GValue parameter

This came up as a side issue in
https://bugzilla.gnome.org/show_bug.cgi?id=653151

12 years agoscanner: allow for functions that look like constructors but aren't
Dan Winship [Sun, 27 May 2012 00:19:39 +0000 (20:19 -0400)]
scanner: allow for functions that look like constructors but aren't

If the scanner found a function with _new in its name, but not
prefixed by the name of a known type, it would assume that the
function was a constructor, and then complain that it couldn't figure
out what it was a constructor for, and mark it introspectable=0.

Instead, just assume that the function is not actually a constructor
in that case (unless it's explicitly tagged as such).

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

12 years agogivfuncinfo: Fix memory leak
Jasper St. Pierre [Fri, 25 May 2012 20:32:44 +0000 (16:32 -0400)]
givfuncinfo: Fix memory leak

The field info wasn't being freed after it was used

12 years agotests: Fix a memory leak
Jasper St. Pierre [Fri, 25 May 2012 20:00:38 +0000 (16:00 -0400)]
tests: Fix a memory leak

We need to unref the cairo surface here, as we are making the context
be the sole owner of it.

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

12 years agotests: Add a foreign struct signal test
Jasper St. Pierre [Fri, 25 May 2012 19:24:34 +0000 (15:24 -0400)]
tests: Add a foreign struct signal test

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

12 years agotests: Fix warnings
Jasper St. Pierre [Fri, 25 May 2012 19:27:38 +0000 (15:27 -0400)]
tests: Fix warnings

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

12 years agoUpdate annotations
Jasper St. Pierre [Thu, 24 May 2012 21:53:49 +0000 (17:53 -0400)]
Update annotations

12 years agoUpdate glib annotations from git
Rico Tzschichholz [Thu, 24 May 2012 06:27:36 +0000 (08:27 +0200)]
Update glib annotations from git

12 years agogirepository: avoid crash when querying nonexistent info
Pavel Holejsovsky [Sat, 12 May 2012 05:44:57 +0000 (07:44 +0200)]
girepository: avoid crash when querying nonexistent info

It appears that cmph library can return (n+1) when querying item not
present in its original n-item-sized set.  Adjust code so that it
detects this condition and do not chase stray pointers resulting from
this bogus(?) hash result.

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

12 years agoGIMarshallingTests: Add GStrv property
Martin Pitt [Sat, 5 May 2012 21:43:21 +0000 (14:43 -0700)]
GIMarshallingTests: Add GStrv property

12 years agoFix regress_test_closure_variant return value
Martin Pitt [Sat, 5 May 2012 19:14:52 +0000 (12:14 -0700)]
Fix regress_test_closure_variant return value

We need to g_variant_ref() the return type: the closure delivers it wrapped
in a GValue, and the subsequent g_value_unset() unrefs it to zero otherwise.

This was uncovered by the now working TestClosures.test_variant() test case in
PyGObject.

Also allow passing NULL as argument, to be able to test these code paths as
well.

12 years agoUpdate glib annotations to 2.33.1
Rico Tzschichholz [Wed, 2 May 2012 19:26:42 +0000 (21:26 +0200)]
Update glib annotations to 2.33.1

12 years agoAdd the fixed width C99 types from stdint.h
Neil Roberts [Wed, 25 Apr 2012 13:20:09 +0000 (14:20 +0100)]
Add the fixed width C99 types from stdint.h

C99 has standard types for fixed width signed and unsigned integers.
This adds types to giscanner to map them to the glib equivalent types.

stdint.h also has other types to specify specify sizes with at least a
certain number of bits, the fastest type with at least some number of
bits, a type big enough to store a pointer and a type containing the
most number of bits. These don't map well to glib types so I have
ignored them.

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

12 years agoFix GVariant handling in regress_test_closure_variant
Martin Pitt [Wed, 2 May 2012 10:49:25 +0000 (12:49 +0200)]
Fix GVariant handling in regress_test_closure_variant

Commit 7c4fbbd6 introduced some low-level g_memdup()ing of the passed GVariant
in regress_test_closure_variant(). This causes a race condition with GI clients
like pygobject's test suite, which sometimes fail with

  (runtests.py:15653): GLib-CRITICAL **: g_variant_ref_sink: assertion `value->ref_count > 0' failed

Drop the memduping again, and instead make the argument non-const (which is
true, as the method temporarily increases the refcount).

12 years agog-ir-doc-tool: Update expected file
Rico Tzschichholz [Thu, 26 Apr 2012 16:05:29 +0000 (18:05 +0200)]
g-ir-doc-tool: Update expected file

Should have signal arguments in the right order

12 years agoUpdate glib annotations from git
Rico Tzschichholz [Thu, 26 Apr 2012 14:52:26 +0000 (16:52 +0200)]
Update glib annotations from git

12 years agoconfigure: Update to 1.33.0
Rico Tzschichholz [Thu, 26 Apr 2012 14:39:46 +0000 (16:39 +0200)]
configure: Update to 1.33.0

12 years agotests: Add flags and enum to GValue GHash in/out
Martin Pitt [Tue, 24 Apr 2012 11:19:43 +0000 (13:19 +0200)]
tests: Add flags and enum to GValue GHash in/out

Add a flag and enum check to
the GHashes returned/expected by regress_test_ghash_gvalue_{return,in}().

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

12 years agotests: Add array marshalling test for array without length argument
Bastian Winkler [Fri, 20 Apr 2012 12:01:18 +0000 (14:01 +0200)]
tests: Add array marshalling test for array without length argument

A test case with an array in-argument that is neither zero terminated,
nor fixed length, nor blessed with a length argument.

This is, for example, the case in clutter_texture_set_from_rgb_data()

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

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
12 years agotests: Add GType property TestObj:gtype
Bastian Winkler [Thu, 19 Apr 2012 06:01:18 +0000 (08:01 +0200)]
tests: Add GType property TestObj:gtype

Needed for https://bugzilla.gnome.org/show_bug.cgi?id=674351

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

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
12 years agoUpdate Gio/GLib/GObject annotations
Stef Walter [Wed, 18 Apr 2012 13:06:20 +0000 (15:06 +0200)]
Update Gio/GLib/GObject annotations

Ran misc/update-glib-annotations.py against current glib master.

12 years agoannotationparser: add test for comment lines not starting with ' * '
Dieter Verfaillie [Tue, 17 Apr 2012 18:58:08 +0000 (20:58 +0200)]
annotationparser: add test for comment lines not starting with ' * '

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

12 years agoannotationparser: cleanup and add tests for the new warnings we now emit
Dieter Verfaillie [Tue, 17 Apr 2012 20:23:14 +0000 (22:23 +0200)]
annotationparser: cleanup and add tests for the new warnings we now emit

Including:
- handle things in the logical order encountered (first colon,
  then annotations)
- correctly report column when missing a colon on the identifier part
- small type fixes
- remove no longer useful "parameter/tag expected" warnings

12 years agowarningtester: make it possible to EXPECT multiple lines of output
Dieter Verfaillie [Tue, 17 Apr 2012 20:31:56 +0000 (22:31 +0200)]
warningtester: make it possible to EXPECT multiple lines of output

12 years agoRevert "annotationparser: indent _parse_comment_block gtkdoc code"
Dieter Verfaillie [Tue, 17 Apr 2012 18:58:53 +0000 (20:58 +0200)]
Revert "annotationparser: indent _parse_comment_block gtkdoc code"

This reverts commit f41525d54f53edd9b0d665397f7c6c755ee3616b and
adds a more complete solution as the original commit only handled
empty lines between the GTK-Doc comment block start token "/**" and
the identifier.

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

12 years agoupdate-glib-annotations: Set required environment variables
Colin Walters [Tue, 17 Apr 2012 20:22:17 +0000 (16:22 -0400)]
update-glib-annotations: Set required environment variables

Assume srcdir=builddir, so users don't have to set this.

12 years agoannotationparser: indent _parse_comment_block gtkdoc code
Alban Browaeys [Mon, 9 Apr 2012 23:06:45 +0000 (01:06 +0200)]
annotationparser: indent _parse_comment_block gtkdoc code

The current logic in _parse_comment_block of the annotationparser
check the identifier and use variables that only makes sense if a
result was returned (column_offset, original_line). This patch
indent the logic so it is only triggered if a result is found.
Otherwise it returns None as expected by call chain
"parse >  parse_comment_block > _parse_comment_block":
ie in "parse":
   comment_block = self.parse_comment_block(comment)
   if comment_block is not None:

This still raises a lot of warnings but does not abort while generating
gir for libgnomekbd, mutter or telepathy-glib (those thus have to be
tweaked not to call g-ir-scanner with --warn-error at least until the
parser mask those false positives or the doc from those projects is
fixed to comply with the behaviour expected by giscanner).

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

12 years agoMove libffi and gmodule to Requires.private in .pc files
Kalev Lember [Fri, 13 Apr 2012 15:30:30 +0000 (18:30 +0300)]
Move libffi and gmodule to Requires.private in .pc files

The intention of the change is to clean up unnecessary linking with
libffi and gmodule in g-i consumers as they typically don't use any
libffi/gmodule symbols.

Listing libffi and gmodule in pkg-config Requires meant that every
consumer that wanted to link with -lgirepository also got -lffi and
-lgmodule-2.0, which caused ld to emit unnecessary DT_NEEDED entries.

Moving the deps to Requires.private removes the internal dependencies
from 'pkg-config --libs', but keeps them in --libs --static output. The
change won't affect --cflags and the include directories necessary for
<ffi.h> will still be listed.

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

12 years agoDon't link with gthread-2.0
Kalev Lember [Fri, 13 Apr 2012 15:20:17 +0000 (18:20 +0300)]
Don't link with gthread-2.0

Commit 2fff986 removed the use of g_thread_init() and we don't use any
other symbols from gthread-2.0.

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