platform/upstream/gobject-introspection.git
15 years agoAdd a function to test arrays as inout argument in Everything
Simon van der Linden [Sun, 5 Jul 2009 16:12:45 +0000 (18:12 +0200)]
Add a function to test arrays as inout argument in Everything

Add test_array_int_inout in Everything.

15 years agoSync the basic types array in girnode.c:serialize_type with GITypeTag
Dan Winship [Mon, 6 Jul 2009 15:17:40 +0000 (11:17 -0400)]
Sync the basic types array in girnode.c:serialize_type with GITypeTag

Fixes a crash compiling GIRepository-2.0.gir.

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

15 years agoBug 583686 - Add gobject-introspection-no-export-1.0.pc
Colin Walters [Mon, 6 Jul 2009 15:22:48 +0000 (11:22 -0400)]
Bug 583686 - Add gobject-introspection-no-export-1.0.pc

Some projects may want to avoid the giant -Wl,--export-dynamic
hammmer and instead use a custom regexp or export list, so
provide a .pc file for them to use.

15 years agoMerge commit 'origin'
Johan Dahlin [Mon, 6 Jul 2009 14:05:11 +0000 (11:05 -0300)]
Merge commit 'origin'

15 years agoOmit warnings, my console is not a todo list
Johan Dahlin [Mon, 6 Jul 2009 14:04:22 +0000 (11:04 -0300)]
Omit warnings, my console is not a todo list

15 years agoAdd a TestObj subclass in Everything
Simon van der Linden [Sun, 28 Jun 2009 14:05:46 +0000 (16:05 +0200)]
Add a TestObj subclass in Everything

Add an instance method to TestObj.
Add a TestObj subclass in Everything, with another constructor, an
additional instance method and an overridden instance method.

15 years agoAllow annotations on fields
Andreas Rottmann [Fri, 3 Jul 2009 21:14:04 +0000 (23:14 +0200)]
Allow annotations on fields

Plain fields (i.e. non-callbacks) may have a 'type' annotation now.

15 years agoAdd xmlTextReaderPtr type to fake libxml2 GIR
Tim Horton [Fri, 26 Jun 2009 00:28:30 +0000 (20:28 -0400)]
Add xmlTextReaderPtr type to fake libxml2 GIR

This is needed in order to get libgweather introspecting.

15 years agoBug 586994: Add annotations for g_file_open_tmp()/g_file_replace_contents().
C. Scott Ananian [Thu, 25 Jun 2009 21:18:56 +0000 (17:18 -0400)]
Bug 586994: Add annotations for g_file_open_tmp()/g_file_replace_contents().

15 years agoName unions to enable compilation on Solaris
Tobias Mueller [Wed, 24 Jun 2009 21:52:05 +0000 (23:52 +0200)]
Name unions to enable compilation on Solaris

Patch by Brian Cameron <brian.cameron@sun.com>.
Fixes bug 578199.

15 years agoFix 'make check'.
C. Scott Ananian [Wed, 24 Jun 2009 18:12:52 +0000 (14:12 -0400)]
Fix 'make check'.

Commits 0561c1e84 and f88185674 (for b.g.o 585427 and 585368) broke 'make
check' because they forgot to update Everything-1.0-expected.gir when
additional tests were added to the Everything library.  Add the new
methods to the -expected.gir file.

15 years agoAdd tests for array as output argument and fixed-size arrays in Everything
Simon van der Linden [Wed, 24 Jun 2009 15:16:48 +0000 (17:16 +0200)]
Add tests for array as output argument and fixed-size arrays in Everything

Add test_array_int_out to test arrays as output argument.
Add test_array_fixed_size_int_in, test_array_fixed_size_int_out, and
test_array_fixed_size_int_return to test fixed-size arrays as arguments.

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

15 years agoAdd two tests in Everything regarding multiple output arguments
Simon van der Linden [Wed, 24 Jun 2009 15:01:21 +0000 (17:01 +0200)]
Add two tests in Everything regarding multiple output arguments

Add test_utf8_out_out and test_utf8_out_nonconst_return in Everything to
test the return of more than one value in a tuple in dynamic bindings.

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

15 years agoBug 579008 - Don't override element-type for arrays
Colin Walters [Tue, 23 Jun 2009 21:51:15 +0000 (17:51 -0400)]
Bug 579008 - Don't override element-type for arrays

Annotation parser patch from: Tim Horton <hortont424@gmail.com>

If an explicit element type is specified, don't override it with
guint8.

15 years agoPost release version bump
Johan Dahlin [Mon, 22 Jun 2009 19:44:13 +0000 (16:44 -0300)]
Post release version bump

15 years agoCreate signed tags instead of lightweight ones
Johan Dahlin [Mon, 22 Jun 2009 19:37:47 +0000 (16:37 -0300)]
Create signed tags instead of lightweight ones

15 years agoUpdate NEWS GOBJECT_INTROSPECTION_0_6_3
Johan Dahlin [Mon, 22 Jun 2009 19:08:05 +0000 (16:08 -0300)]
Update NEWS

15 years agoBug 584423 – Add short/ushort support
Mark Lee [Fri, 19 Jun 2009 23:53:03 +0000 (16:53 -0700)]
Bug 584423 – Add short/ushort support

Add type tags for short and ushort, plus all of the requisite code needed
to utilize them in libgirepository.
Add support in the scanner's AST files.
Add test functions to the everything library and the expected gir file.

gtypelib.c constant validation fixed by Colin Walters <walters@verbum.org>

15 years agoUpdate annotation expected "tgir" for previous commit
Colin Walters [Thu, 18 Jun 2009 21:56:31 +0000 (17:56 -0400)]
Update annotation expected "tgir" for previous commit

Since we're not writing out the zero-terminated flag now when
we shouldn't, update the tests too.

15 years agoBug 585328 - Only set zero_terminated flag for types we know are
Simon van der Linden [Wed, 17 Jun 2009 21:30:19 +0000 (17:30 -0400)]
Bug 585328 - Only set zero_terminated flag for types we know are

Rationalize our setting of the zero_terminated flag; we shouldn't
set it if the gir doesn't say to.

15 years agoEverything: add a boxed property to TestObj
Andreas Rottmann [Wed, 17 Jun 2009 16:11:16 +0000 (18:11 +0200)]
Everything: add a boxed property to TestObj

15 years agoMake sure the scanner and compiler are able to find libeverything.so.1
Johan Bilien [Tue, 16 Jun 2009 17:41:29 +0000 (18:41 +0100)]
Make sure the scanner and compiler are able to find libeverything.so.1

and that it uses the uninstalled version.
Fixes make check (when libeverything.so.1 was uninstalled).

15 years agoBug 585579: actually check Everything-1.0-expected.gir
C. Scott Ananian [Mon, 15 Jun 2009 20:48:12 +0000 (16:48 -0400)]
Bug 585579: actually check Everything-1.0-expected.gir

As discussed in bug 585908, we also rename CHECKGIRS and EXPECTEDGIRS to
match the naming in tests/scanner/Makefile.am.

15 years agoFix distcheck. A couple of files was missing from EXTRA_DIST.
Marco Pesenti Gritti [Mon, 15 Jun 2009 20:21:53 +0000 (16:21 -0400)]
Fix distcheck. A couple of files was missing from EXTRA_DIST.

15 years agoAnnotate g_get_system_*_dirs ()
Johan Bilien [Mon, 15 Jun 2009 11:36:31 +0000 (12:36 +0100)]
Annotate g_get_system_*_dirs ()

15 years agoBug 585579: Update Everything-1.0-expected.gir to match recent array/strv changes.
C. Scott Ananian [Fri, 12 Jun 2009 15:19:40 +0000 (11:19 -0400)]
Bug 585579: Update Everything-1.0-expected.gir to match recent array/strv changes.

15 years agoBug 585373: Add annotations for g_spawn_* functions.
C. Scott Ananian [Fri, 5 Jun 2009 22:07:25 +0000 (18:07 -0400)]
Bug 585373: Add annotations for g_spawn_* functions.

15 years agoBug 585584: Fix warnings in girparser backtrace functionality and compiler.c
C. Scott Ananian [Fri, 12 Jun 2009 15:52:56 +0000 (11:52 -0400)]
Bug 585584: Fix warnings in girparser backtrace functionality and compiler.c

15 years agoBug 585374: Fix misspelling of 'infinite'.
C. Scott Ananian [Mon, 18 May 2009 18:23:29 +0000 (14:23 -0400)]
Bug 585374: Fix misspelling of 'infinite'.

15 years agoBug 581685: Parse parameterized types (using <>) in annotations.
C. Scott Ananian [Fri, 12 Jun 2009 14:57:38 +0000 (10:57 -0400)]
Bug 581685: Parse parameterized types (using <>) in annotations.

You can now specify a nested parameterized type in annotations as
(for example):
  @param: (type GLib.HashTable<utf8,GLib.HashTable<utf,utf>>)
or
  @param: (element-type utf8 GLib.HashTable<utf,utf>)

New test functions for the Everything typelib show how it works.

15 years agoMake g-ir-compiler find files installed by make install
Holger Hans Peter Freyther [Mon, 1 Jun 2009 07:18:43 +0000 (09:18 +0200)]
Make g-ir-compiler find files installed by make install

When ./configure --prefix $HOME/some/where is used gobject-introspection
will happily install the files into $HOME/some/where/data/gir-1.0 but
it will refuse to find them. Apply the same trick as in
girepository/girepository.c:init_globals to find the gir files.

Unifiy the name gir-1.0 in GIR_SUFFIX and use it throughout the
project, introduce GIR_DIR which holds the path to the gir files and
update girparser and transformer.py to look into this path.

15 years agoDon't fail if no --output option is specified
Colin Walters [Thu, 11 Jun 2009 13:53:35 +0000 (09:53 -0400)]
Don't fail if no --output option is specified

Printing to stdout is legitimate.

15 years agoRemove duplicate typelib installation rules
root [Wed, 10 Jun 2009 19:00:17 +0000 (15:00 -0400)]
Remove duplicate typelib installation rules

No need to list them twice, and it confuses/breaks some install tools.

15 years agoBug 577546 - More annotations for GLib, GObject, Gio
Colin Walters [Tue, 9 Jun 2009 19:51:57 +0000 (15:51 -0400)]
Bug 577546 - More annotations for GLib, GObject, Gio

Patch modified from one by Norbert Freese <nf2.email@gmail.com>.

15 years agoBug 577534 - Use rename to write new typelibs, instead of in-place overwrite
Colin Walters [Tue, 9 Jun 2009 18:03:47 +0000 (14:03 -0400)]
Bug 577534 - Use rename to write new typelibs, instead of in-place overwrite

This avoids having processes with the typelibs currently open exploding
immediately.

15 years agoBug 584453 - Handle char ** correctly (and const variation)
Colin Walters [Thu, 4 Jun 2009 17:51:26 +0000 (13:51 -0400)]
Bug 584453 - Handle char ** correctly (and const variation)

This patch fixes our default handling of char **.  We add Return
node types as a case where we test for array handling.

Remove the hardcoded assumption of array = "no transfer", just
use the separate Parameter/Return cases.  This change causes
inout char ** to be transfer="full", but that seems more correct.

15 years agoAdd a test_strv_out which is unannotated, rename current to test_strv_out_container
Colin Walters [Thu, 4 Jun 2009 16:40:41 +0000 (12:40 -0400)]
Add a test_strv_out which is unannotated, rename current to test_strv_out_container

We need a test case for a plain unannotated char ** return value, which
should be an array.

Keep the old annotated test as a test case for the container transfer.

15 years agoBug 585081 - Correct everything linkage
Simon van der Linden [Mon, 8 Jun 2009 16:51:33 +0000 (12:51 -0400)]
Bug 585081 - Correct everything linkage

We need to link with gobject.

15 years agoMove Everything into gir/, since it's a public library
Colin Walters [Thu, 4 Jun 2009 19:35:01 +0000 (15:35 -0400)]
Move Everything into gir/, since it's a public library

Everything isn't a test for quite a while now, it's a public library.
So move it to gir/.

15 years agoAdd an Everything-1.0-expected.gir, test Everything versus it
Colin Walters [Thu, 4 Jun 2009 16:42:11 +0000 (12:42 -0400)]
Add an Everything-1.0-expected.gir, test Everything versus it

We should be testing the Everything library as well.

15 years agoAdd GLclampf to the GL GIR
Emmanuele Bassi [Thu, 4 Jun 2009 12:15:31 +0000 (13:15 +0100)]
Add GLclampf to the GL GIR

The GLclampf type is missing from the GL definitions.

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

15 years agoAnnotations for g_option_context_parse.
C. Scott Ananian [Mon, 18 May 2009 21:10:14 +0000 (17:10 -0400)]
Annotations for g_option_context_parse.

These annotations match those for gtk_init(), which takes the same
types of arguments.

15 years agoA few transfer-related tests for "Everything"
Andreas Rottmann [Fri, 29 May 2009 20:35:07 +0000 (22:35 +0200)]
A few transfer-related tests for "Everything"

15 years agoFix pep8.py and its invocation.
Chris Rivera [Wed, 20 May 2009 23:29:33 +0000 (19:29 -0400)]
Fix pep8.py and its invocation.

pep8.py:input_file() normally returns the number of errors found in a
given file, but it returns an empty dict if the file is excluded.  Change
it to return 0 instead.

config.py is auto-generated with a prefix that may be longer than
80 characters.  Exclude config.py in the pep8.py check.  This fixes
4042.

15 years agoBetter handle classes with non-standard to_underscore names.
C. Scott Ananian [Wed, 20 May 2009 00:17:08 +0000 (20:17 -0400)]
Better handle classes with non-standard to_underscore names.

Previously we tried to guess what the "underscore version" of a class name
would be, but for classes like NMSetting8021x we'd guess "nm_setting8021x"
instead of "nm_setting_802_1x".  All such guesses are subject to error:
instead let's try to use the prefix of the _get_type() method instead, and
only guess if that doesn't work.

We do this for both class names and when detecting methods.  An additional
type with a "non-standard" underscored version (TestWi8021x) added to the
everything.[ch] test suite to test proper conversion.

GdkWindow and GObject have unusual get_type methods; add special quirks
to handle these (at least until the methods are renamed upstream).

(Slightly modified for PEP8 compliance by Colin Walters)

Signed-off-by: Colin Walters <walters@verbum.org>
15 years agoUpdate doc comments.
C. Scott Ananian [Tue, 5 May 2009 17:06:37 +0000 (13:06 -0400)]
Update doc comments.

The enumeration values cited here were out of date.  Rewrite to eliminate
the explicit mention of the enumeration value, to prevent it from
drifting out of date again in the future.

15 years agoAdd GHash tests to Everything test GI library.
C. Scott Ananian [Fri, 1 May 2009 17:36:28 +0000 (13:36 -0400)]
Add GHash tests to Everything test GI library.

15 years agoFix the list comparison assertions.
C. Scott Ananian [Fri, 1 May 2009 22:20:06 +0000 (18:20 -0400)]
Fix the list comparison assertions.

We weren't checking the length of the input list, and we were erroneously
comparing every element in the test sequence against the *first* element
of the passed-in list.

15 years agoEverything: more tests for integer array parameters.
C. Scott Ananian [Fri, 1 May 2009 20:32:33 +0000 (16:32 -0400)]
Everything: more tests for integer array parameters.

15 years agoFix annotations for GList and GSList tests.
C. Scott Ananian [Fri, 1 May 2009 17:33:04 +0000 (13:33 -0400)]
Fix annotations for GList and GSList tests.

15 years agoEnable the utf8 tests in the everything module.
C. Scott Ananian [Fri, 1 May 2009 16:00:45 +0000 (12:00 -0400)]
Enable the utf8 tests in the everything module.

We needed to tweak a couple of the tests for correctness.

15 years agoAllow the use of the "Rename To" annotation for literal method renaming.
C. Scott Ananian [Mon, 27 Apr 2009 14:48:12 +0000 (10:48 -0400)]
Allow the use of the "Rename To" annotation for literal method renaming.

As originally implemented, this annotation was only used for method
overloading (argument signature polymorphism).  Allow it to be used to
clean up historically poorly-named methods as well.

15 years agoRemove orphan text, left over from parent document.
C. Scott Ananian [Mon, 27 Apr 2009 14:47:40 +0000 (10:47 -0400)]
Remove orphan text, left over from parent document.

15 years agoRemove (out) annotation for now from Everything structs
Colin Walters [Thu, 7 May 2009 18:41:30 +0000 (14:41 -0400)]
Remove (out) annotation for now from Everything structs

Right now these annotations don't work; (out) is for callee-allocates.
For more information see
http://bugzilla.gnome.org/show_bug.cgi?id=573314

15 years agoFix typo in the TestInterface gtype name
Tomeu Vizoso [Wed, 6 May 2009 13:18:36 +0000 (15:18 +0200)]
Fix typo in the TestInterface gtype name

15 years agoAdd an interface to Everything
Tomeu Vizoso [Tue, 5 May 2009 16:33:55 +0000 (18:33 +0200)]
Add an interface to Everything

15 years agoAdd element type annotations for GList arguments
Marina Zhurakhinskaya [Fri, 1 May 2009 22:13:39 +0000 (18:13 -0400)]
Add element type annotations for GList arguments

g_app_info_launch and g_app_info_launch_uris needed element type annotations
for their GList arguments.

15 years agoAvoid writing out empty array if we have no _get_type functions
Colin Walters [Fri, 3 Apr 2009 19:12:04 +0000 (15:12 -0400)]
Avoid writing out empty array if we have no _get_type functions

Zero length arrays are a GNU C extension, so this way we don't
fail on non-GCC.

15 years agoFix 'Could not find GIR file ...' error to use right filename.
Dan Winship [Sat, 28 Mar 2009 12:34:36 +0000 (08:34 -0400)]
Fix 'Could not find GIR file ...' error to use right filename.

Also plug a leak; girname was previously only freed on error.

15 years agoBug 576605 - Get rid of GI_SCOPE_TYPE_OBJECT
Andreas Rottmann [Fri, 27 Mar 2009 18:31:55 +0000 (19:31 +0100)]
Bug 576605 - Get rid of GI_SCOPE_TYPE_OBJECT

Remove support for (scope object) as it lacks a real use case.

15 years agoAnnotate g_filename_completer_get_completions
Johan Dahlin [Thu, 26 Mar 2009 01:18:04 +0000 (22:18 -0300)]
Annotate g_filename_completer_get_completions

15 years agoRemove spurious addition of 'GSList *handlers' in last commit
Andreas Rottmann [Tue, 24 Mar 2009 19:33:53 +0000 (20:33 +0100)]
Remove spurious addition of 'GSList *handlers' in last commit

15 years agoAdditions to the 'Everything' namespace
Andreas Rottmann [Tue, 24 Mar 2009 19:26:36 +0000 (20:26 +0100)]
Additions to the 'Everything' namespace

- Make the destroy-notfied callback test harder by retaining the
  callbacks until test_callback_thaw_notifications() is called.

15 years agoBug 576323 - Fix inner constant parsing Signed-off-by: Didier 'Ptitjes <ptitjes@free.fr>
Didier 'Ptitjes [Sun, 22 Mar 2009 20:50:40 +0000 (21:50 +0100)]
Bug 576323 - Fix inner constant parsing Signed-off-by: Didier 'Ptitjes <ptitjes@free.fr>

Signed-off-by: Colin Walters <walters@verbum.org>
15 years agoInclude g-ir-scanner.in in the distribution
Johan Bilien [Tue, 24 Mar 2009 18:36:18 +0000 (18:36 +0000)]
Include g-ir-scanner.in in the distribution

and other make distcheck fixes.

15 years agoAdd a test signal with an argument flagged as G_SIGNAL_TYPE_STATIC_SCOPE
Johan Bilien [Tue, 24 Mar 2009 11:12:38 +0000 (11:12 +0000)]
Add a test signal with an argument flagged as G_SIGNAL_TYPE_STATIC_SCOPE

15 years agoAdd several GLib annotations
Andreas Rottmann [Mon, 23 Mar 2009 23:19:03 +0000 (00:19 +0100)]
Add several GLib annotations

15 years agoBug 574284 - Add support for a 'closure' and 'destroy' annotations
Andreas Rottmann [Mon, 23 Mar 2009 22:19:24 +0000 (23:19 +0100)]
Bug 574284 - Add support for a 'closure' and 'destroy' annotations

This allows to annotate cases where the heuristics don't work.

TODO: According to Juerbi, there are cases where two callbacks refer
      to the same user_data, which is prohibited by the current
      implementation.

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoSome small cosmetic tweaks
Andreas Rottmann [Thu, 19 Mar 2009 00:25:09 +0000 (01:25 +0100)]
Some small cosmetic tweaks

* Fix compiler warnings:

- Missing return value in annotation-testing code

- Fix two function declarations to have a (void) parameter list --
  this is not C++ ;-)

* Add tools/g-ir-scanner to .gitignore, as it's now generated

15 years agoBug 556475 – support Shadows: annotation
Andreas Rottmann [Thu, 19 Mar 2009 00:01:58 +0000 (01:01 +0100)]
Bug 556475 – support Shadows: annotation

Add support for the 'Rename To:' annotation for functions and methods.

15 years agoBug 564016 - Include c:prefix in typelib, use it to optimize find_by_gtype
Colin Walters [Thu, 12 Feb 2009 23:42:47 +0000 (18:42 -0500)]
Bug 564016 - Include c:prefix in typelib, use it to optimize find_by_gtype

Parse the c:prefix from the .gir, include it in the header.  Armed with this
information, we can now optimize lookups of GTypes because we
have the requirement that GTypes must start with the c:prefix.  We do
fall back though if a lookup fails.

15 years agoBug 564016 - Add c:prefix to .gir
Colin Walters [Thu, 12 Feb 2009 22:40:08 +0000 (17:40 -0500)]
Bug 564016 - Add c:prefix to .gir

This has a few use cases; the main one in mind right now is that
when we place this in the .typelib as well, we can use it to optimize
lookups based on GType names, by skipping entirely typelibs whose
c:prefix is not a prefix of the target type lookup.

15 years agoBug 575613 - Enum stripping with common prefix, also use "_" consistently
Colin Walters [Mon, 16 Mar 2009 22:25:19 +0000 (18:25 -0400)]
Bug 575613 - Enum stripping with common prefix, also use "_" consistently

Some enums have members which have a common prefix which doesn't
match that of the enum name, but it also longer than the global
namespace prefix.  Instead, try stripping the common prefix first,
and only if that fails fall back to the global strip.

Also, for glib-registered enums we were using the nick, which
typically has "-" as a separator.  Replace that with "_" for
consistency between unregistered enums and registered.

utils.py:strip_common_prefix is now unused, delete.

15 years agoSubstitute g-ir-scanner in Makefile, not in configure.ac
Colin Walters [Mon, 16 Mar 2009 19:36:21 +0000 (15:36 -0400)]
Substitute g-ir-scanner in Makefile, not in configure.ac

This avoids issues with unexpanded variables, i.e. ${exec_prefix}/libdir

15 years agoBug 565147 - Add (type) annotation to override the C type definition
Colin Walters [Thu, 19 Feb 2009 17:16:17 +0000 (12:16 -0500)]
Bug 565147 - Add (type) annotation to override the C type definition

We previously supported (type) on signals only, extend it to all cases.
This is useful for a few cases where libraries use a superclass like GtkWidget*
for C convenience, where the actual type is a subclass.

15 years agoBug 574501 - Install giscanner Python module to private directory
Colin Walters [Mon, 9 Mar 2009 19:08:50 +0000 (15:08 -0400)]
Bug 574501 - Install giscanner Python module to private directory

We don't want to pollute the global namespace with our private
libraries.  Also, this sidesteps all the craziness that is happening
with OS vendors changing how Python installs modules.

15 years agoBug 574139 – There is no way to identify 'user_data' arguments in the callback signature
Andreas Rottmann [Mon, 9 Mar 2009 17:33:00 +0000 (18:33 +0100)]
Bug 574139 – There is no way to identify 'user_data' arguments in the callback signature

Add a heuristic to the scanner that flags arguments of callbacks that
are named 'user_data' (exact match) and have a 'any (void*) type.

These arguments are marked by setting the 'closure' field of ArgBlob
to the index of themselves.

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoBug 557383 - Virtual method support
Colin Walters [Sat, 28 Feb 2009 00:02:48 +0000 (19:02 -0500)]
Bug 557383 - Virtual method support

Broadly speaking, this change adds the concept of <vfunc> to the .gir.
The typelib already had most of the infrastructure for virtual functions,
though there is one API addition.

The scanner assumes that any class callback slot that doesn't match
a signal name is a virtual.  In the .gir, we write out *both* the <method>
wrapper and a <vfunc>.  If we can determine an association between
them (based on the names matching, or a new Virtual: annotation),
then we notate that in the .gir.

The typelib gains an association from the vfunc to the function, if
it exists.  This will be useful for bindings since they already know
how to consume FunctionInfo.

15 years agoBug 573332 - Allow annotation of enums as bitfields
Andreas Rottmann [Wed, 4 Mar 2009 14:59:28 +0000 (15:59 +0100)]
Bug 573332 - Allow annotation of enums as bitfields

Add support for a `(type bitfield)' annotation for enums.

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoIntroduce documentation-block options
Andreas Rottmann [Wed, 4 Mar 2009 14:59:28 +0000 (15:59 +0100)]
Introduce documentation-block options

Allow a documentation block to have options, e.g.:

/*
 * SomeType: (OPT-NAME VALUE) ...
 */

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoAdd XftGlyphSpec to xft-2.0.gir
Colin Walters [Tue, 3 Mar 2009 23:14:28 +0000 (18:14 -0500)]
Add XftGlyphSpec to xft-2.0.gir

For PangoXft.

15 years agoAdd XTrapezoid to xlib-2.0.gir
Colin Walters [Tue, 3 Mar 2009 23:00:16 +0000 (18:00 -0500)]
Add XTrapezoid to xlib-2.0.gir

This is necessary for PangoXft.

15 years agoBug 571548 - Generic attributes
Colin Walters [Fri, 20 Feb 2009 02:48:51 +0000 (21:48 -0500)]
Bug 571548 - Generic attributes

We now support an extensible mechanism where arbitrary key-value
pairs may be associated with almost all items, including objects,
methods, and properties.

These attributes appear in both the .gir and the .typelib.

15 years agoKeep TestStructA as simple by moving GObject member to a new structure
Colin Walters [Tue, 3 Mar 2009 21:44:36 +0000 (16:44 -0500)]
Keep TestStructA as simple by moving GObject member to a new structure

The change in commit 2912b broke the gjs test suite which was relying
on TestStructA being "simple" (i.e. only having primitive fields as members).

15 years agoRemove hand-written .gir files, move PEP-8 inquisition into top Makefile.am
Colin Walters [Tue, 3 Mar 2009 19:55:39 +0000 (14:55 -0500)]
Remove hand-written .gir files, move PEP-8 inquisition into top Makefile.am

We have more comprehensive testing in tests/scanner and tests/everything,
and these tests were designed from a time when we were trying to make
the g-ir-generate output exactly match the .gir, which has not been true
for some time and will not be in the future.

15 years agoAdd a parent parmeter to g_ir_node_build_typelib
Colin Walters [Sat, 28 Feb 2009 00:11:26 +0000 (19:11 -0500)]
Add a parent parmeter to g_ir_node_build_typelib

This will be useful for later changes which need to inspect the parent.

15 years agoAdd srcdir, so distcheck passes
Johan Dahlin [Fri, 27 Feb 2009 16:50:06 +0000 (13:50 -0300)]
Add srcdir, so distcheck passes

15 years agoDist m4 files
Johan Dahlin [Fri, 27 Feb 2009 16:49:56 +0000 (13:49 -0300)]
Dist m4 files

15 years agoAdd GObject-2.0.xpath to EXTRA_DIST
Johan Dahlin [Fri, 27 Feb 2009 16:32:48 +0000 (13:32 -0300)]
Add GObject-2.0.xpath to EXTRA_DIST

15 years agoDisable more of the build if gtk-doc is disabled
Johan Dahlin [Fri, 27 Feb 2009 14:39:14 +0000 (11:39 -0300)]
Disable more of the build if gtk-doc is disabled

15 years agoAdd --all option to g-ir-generate
Andreas Rottmann [Thu, 26 Feb 2009 23:17:16 +0000 (00:17 +0100)]
Add --all option to g-ir-generate

Add --all option, which is intended to show some information not
usually included in the GIR.

Currently, it shows the size of structs and unions.

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoAdditions to "Everything" test namespace
Andreas Rottmann [Thu, 26 Feb 2009 23:12:19 +0000 (00:12 +0100)]
Additions to "Everything" test namespace

Add a signal and a "bare" member (i.e. a member without getter/setter)
to TestObj.

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoRevert "Bug 557383 - Virtual function support"
Colin Walters [Thu, 26 Feb 2009 21:52:42 +0000 (16:52 -0500)]
Revert "Bug 557383 - Virtual function support"

This reverts commit 4470a24e8cf3827efaddcfe240c3271cf1a0d6c0.

Needs more work as it turns out, we need to figure out the binding
story.

15 years agoBug 573306 – Relax callback grouping detection rules
Andreas Rottmann [Thu, 26 Feb 2009 20:17:39 +0000 (21:17 +0100)]
Bug 573306 – Relax callback grouping detection rules

Make the callback grouping heuristic more lax: consider all pointer
parameters ending in 'data' to be the user_data parameter (instead of
requiring an exact 'user_data' name).

Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
15 years agoMerge branch 'bug557383-vfuncs'
Colin Walters [Thu, 26 Feb 2009 19:44:24 +0000 (14:44 -0500)]
Merge branch 'bug557383-vfuncs'

15 years agoBug 557383 - Virtual function support
Colin Walters [Wed, 25 Feb 2009 23:43:14 +0000 (18:43 -0500)]
Bug 557383 - Virtual function support

In order to determine whether a method is virtual, by default we look
at the class table to find a callback field.  This should be fairly reliable,
but we may also later need annotations to more finely control this
in the case of a name clash with a signal.

15 years agoDon't assume _pkgconfig_packages is set.
Johan Dahlin [Thu, 26 Feb 2009 13:21:40 +0000 (10:21 -0300)]
Don't assume _pkgconfig_packages is set.

This fixes a cache issue where the pickle in the cache doesn't
have self._pkgconfig_packages set in its instance

15 years agoBug 572434 - Associate interfaces with their C structures
Colin Walters [Fri, 20 Feb 2009 22:34:20 +0000 (17:34 -0500)]
Bug 572434 - Associate interfaces with their C structures

Similar to GObject class structs, we pair up GInterfaces with
their C structures.

Also, move some GLib-specific things into glibast.py, and make
the naming more generic.

15 years agoBug 555964 - Parse floating-point #defines
Colin Walters [Wed, 25 Feb 2009 20:25:36 +0000 (15:25 -0500)]
Bug 555964 - Parse floating-point #defines

Previously we just supported int and string, add double to this.
Technically we should probably differentiate between float and
double, but it's not likely to be very useful in practice to do so.

15 years agoMerge commit 'origin'
Johan Dahlin [Wed, 25 Feb 2009 17:38:39 +0000 (14:38 -0300)]
Merge commit 'origin'