Johan Dahlin [Tue, 1 Feb 2011 18:14:00 +0000 (16:14 -0200)]
Preserve gtk-doc section names
Preserve the section names and write them out on the class/record/
interface.
Johan Dahlin [Tue, 1 Feb 2011 18:13:52 +0000 (16:13 -0200)]
Sort gio/gobject annotations
Johan Dahlin [Tue, 1 Feb 2011 18:13:08 +0000 (16:13 -0200)]
Sort output
Johan Dahlin [Tue, 1 Feb 2011 15:20:19 +0000 (13:20 -0200)]
Add missing spaces
Tomeu Vizoso [Fri, 21 Jan 2011 16:32:51 +0000 (17:32 +0100)]
Add (constructor) annotation
https://bugzilla.gnome.org/show_bug.cgi?id=561264
Tomeu Vizoso [Fri, 21 Jan 2011 14:32:52 +0000 (15:32 +0100)]
[scanner] Don't crash if we don't have a ctype in array element types
Tomeu Vizoso [Wed, 19 Jan 2011 15:48:47 +0000 (16:48 +0100)]
Pass shared-library as-is to g_module_open
Because it already has the lib prefix and the .so postfix
https://bugzilla.gnome.org/show_bug.cgi?id=639961
Tomeu Vizoso [Thu, 20 Jan 2011 15:34:45 +0000 (16:34 +0100)]
Preserve the c:type of array elements
So the element type has the correct is_pointer flag
https://bugzilla.gnome.org/show_bug.cgi?id=638929
Johan Dahlin [Thu, 20 Jan 2011 15:52:48 +0000 (13:52 -0200)]
Disable missing class structure warning, add a bug reference
Johan Dahlin [Wed, 19 Jan 2011 13:04:24 +0000 (11:04 -0200)]
ast: cleanup clone() methods
Tomeu Vizoso [Wed, 19 Jan 2011 11:43:13 +0000 (12:43 +0100)]
Depend on cairo-gobject if available
And set library-name and package accordingly in the cairo .gir
https://bugzilla.gnome.org/show_bug.cgi?id=639831
Tomeu Vizoso [Thu, 20 Jan 2011 14:54:41 +0000 (15:54 +0100)]
Add GIMarshallingTests.Interface2
so we can test conflicts when two bases have a vfunc with the
same name.
Pavel Holejsovsky [Thu, 20 Jan 2011 14:07:51 +0000 (15:07 +0100)]
Regenerate gio-2.0.c from glib/master
Tomeu Vizoso [Wed, 19 Jan 2011 18:09:25 +0000 (19:09 +0100)]
Initialize GIMarshallingTestsBoxedStruct so we can test its values
Laszlo Pandy [Wed, 19 Jan 2011 16:31:16 +0000 (17:31 +0100)]
Add GIMarshallingTests function which sets a GError, to test exception handling in bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=639834
Ignacio Casal Quinteiro [Wed, 19 Jan 2011 11:07:49 +0000 (12:07 +0100)]
[tests] add tests for guint8 arrays
* guint8 can be interpreted as array characters that can be memcpyied
during marshalling so add a test to check if we are correctly handling
this codepath
Laszlo Pandy [Mon, 17 Jan 2011 14:09:45 +0000 (15:09 +0100)]
Add a second enum to GIMarshallingTests to support pygi tests for non-gtype enums.
There was a bug in pygi in which non-gtype enums shared values between themselves.
That is, if there was an attribute Enum.THE_VALUE, it would be available on as OtherEnum.THE_VALUE as well.
To make a test case for this bug, we need a second non-gtype enum in GIMarshallingTests to compare with.
Mikkel Kamstrup Erlandsen [Fri, 7 Jan 2011 15:05:07 +0000 (16:05 +0100)]
test: gi_marshalling_tests_array_gvariant_in
A new test to expose a bug in pygobject
https://bugzilla.gnome.org/show_bug.cgi?id=638915
Pavel Holejsovsky [Sun, 9 Jan 2011 15:12:46 +0000 (16:12 +0100)]
Make caller-allocates detection work for struct aliases
Scanner tries to detect caller-allocates attribute automatically if
not explicitly specified by checking that parameter is not double-referenced
and is struct or union. This patch adds resolving of aliases when
checking whether parameter is struct or union.
Also removes old incorrect method transformer.follow_aliases, which
was never used in current code.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=639081
Pavel Holejsovsky [Tue, 14 Dec 2010 15:28:01 +0000 (16:28 +0100)]
Add support for g[u]intptr in scanner and girwriter.
https://bugzilla.gnome.org/show_bug.cgi?id=634838
Colin Walters [Wed, 12 Jan 2011 20:12:33 +0000 (15:12 -0500)]
Post-release version bump
Tomeu Vizoso [Mon, 13 Dec 2010 12:53:55 +0000 (13:53 +0100)]
Add g_vfunc_info_invoke and g_vfunc_info_get_address
for calling the native implementation of a virtual function. Refactors
the code common with g_function_info_invoke in _g_callable_info_invoke.
https://bugzilla.gnome.org/show_bug.cgi?id=637145
Colin Walters [Tue, 11 Jan 2011 15:59:44 +0000 (10:59 -0500)]
tests: Update expected girs for --c-include
Colin Walters [Tue, 11 Jan 2011 15:46:12 +0000 (10:46 -0500)]
Revert "scanner: Stop predeclaring the functions that are to be scanned"
This reverts commit
88553b4cd6776b7eff9a3b1d63eb8e49be0bd8f2.
Colin Walters [Tue, 11 Jan 2011 15:46:01 +0000 (10:46 -0500)]
Revert "scanner: Include all headers when building the dumper binary"
This reverts commit
bedd7dd61508684b78bd1e95fed8025d48661b48.
Benjamin Otte [Tue, 11 Jan 2011 14:25:47 +0000 (15:25 +0100)]
tests: Fix build by including correct headers with --c-include
Benjamin Otte [Tue, 11 Jan 2011 13:26:29 +0000 (14:26 +0100)]
scanner: Rename g_irepository_dump when included from the dumper
This avoids a naming conflict when compiling GiRepository.gir, where
g_irepository_dump() was defined in an included header.
Benjamin Otte [Tue, 11 Jan 2011 13:02:58 +0000 (14:02 +0100)]
gir: Fix build of Gio-2.0.gir
- include gio-unix headers properly into Gio gir
- don't include gsettingsbackend.h
Benjamin Otte [Mon, 10 Jan 2011 17:53:55 +0000 (18:53 +0100)]
scanner: Stop predeclaring the functions that are to be scanned
Instead, rely on the c_includes. See the previous commit for details.
Benjamin Otte [Mon, 10 Jan 2011 17:48:23 +0000 (18:48 +0100)]
scanner: Include all headers when building the dumper binary
This avoids warnings about undefined functions when using init sections
and it removes the requirement to predeclare the get_type functions that
should be called. For an example for this problem with GStreamer, see
https://bugzilla.gnome.org/show_bug.cgi?id=639039
We can now also use gcc's error checking to ensure that users
- specify the correct C includes in the gir file (because otherwise we
get errors when compiling the dumper).
- the types do actually exist (because again, the compiler will
complain).
Benjamin Otte [Mon, 10 Jan 2011 17:15:03 +0000 (18:15 +0100)]
scanner: Use packages from --pkg
Use pkgconfig files from --pkg when compiling the dump binary.
This helps avoiding linker errors when init sections are provided that
use code from those packages.
https://bugzilla.gnome.org/show_bug.cgi?id=639039
Tomeu Vizoso [Fri, 7 Jan 2011 16:15:52 +0000 (17:15 +0100)]
scanner: Make sure that vfuncs made to the GIR
* don't skip those associated to a signal
* don't warn if it doesn't have an invoker
https://bugzilla.gnome.org/show_bug.cgi?id=637215
Colin Walters [Wed, 5 Jan 2011 21:32:44 +0000 (16:32 -0500)]
scanner: Fix handling of property transfer
* gdumpparser.py was incorrectly passing the ctype for transfer
* Property constructor wasn't actually doing anything with passed transfer
* Parse transfer-ownership in girparser
Colin Walters [Wed, 5 Jan 2011 20:56:01 +0000 (15:56 -0500)]
scanner: Properly parse recursive list type nodes
Previously we were just looking for <type> inside a GLib.List,
but it may be <array>.
See bug 637262 for code that triggered this.
Pavel Holejsovsky [Wed, 5 Jan 2011 19:23:49 +0000 (20:23 +0100)]
Regenerate gio-2.0.c
Pavel Holejsovsky [Wed, 29 Dec 2010 15:23:12 +0000 (16:23 +0100)]
Regenerate gio-2.0.c and gobject-2.0.c from current glib HEAD
Kristian Rietveld [Tue, 28 Dec 2010 09:41:16 +0000 (10:41 +0100)]
Avoid using namespace as identifier in public header files
Owen W. Taylor [Wed, 22 Dec 2010 20:53:25 +0000 (15:53 -0500)]
Post-release version bump
Owen W. Taylor [Wed, 22 Dec 2010 20:42:41 +0000 (15:42 -0500)]
Fix srcdir != builddir problems for test cases
Owen W. Taylor [Wed, 22 Dec 2010 20:40:53 +0000 (15:40 -0500)]
Fix error handling when writing out typelib
Return a non-zero result when opening the output file fails and
don't use g_error() for other failures when writing out the file,
since such errors should not produce a core dump.
Pavel Holejsovsky [Tue, 21 Dec 2010 17:22:52 +0000 (18:22 +0100)]
Regenerate gir/gio-2.0.c
Pavel Holejsovsky [Tue, 21 Dec 2010 15:21:02 +0000 (16:21 +0100)]
scanner: avoid crash when annotation explicitly changes 'self' argument
Pavel Holejsovsky [Sun, 19 Dec 2010 21:24:10 +0000 (22:24 +0100)]
Regenerate gio-2.0.c and gobject-2.0.c from current glib.
Pavel Holejsovsky [Sun, 19 Dec 2010 09:46:22 +0000 (10:46 +0100)]
Fix misc/extract-gobject-sources.sh.
g-ir-annotation-tool is in builddir root now. Also avoid feeding
problematic and not-GI-useful headers to it.
Dan Winship [Fri, 17 Dec 2010 20:23:46 +0000 (15:23 -0500)]
glib-2.0.c: annotate g_get_environ() and g_listenv()
Colin Walters [Fri, 17 Dec 2010 17:58:59 +0000 (12:58 -0500)]
make check pass for recent commits
* Fix use of tabs
* Update for correct signal parameters
Pavel Holejsovsky [Fri, 17 Dec 2010 15:34:39 +0000 (16:34 +0100)]
Regenerate gio-2.0.c from current glib/gio HEAD.
Pavel Holejsovsky [Thu, 16 Dec 2010 20:07:46 +0000 (21:07 +0100)]
Regenerate gio-2.0.c
Pavel Holejsovsky [Thu, 16 Dec 2010 20:00:11 +0000 (21:00 +0100)]
Update path to g-ir-annotation-tool in extract-gio-sources.sh.
Jonathan Matthew [Wed, 27 Oct 2010 09:11:13 +0000 (19:11 +1000)]
scanner: support typedefs for container types
Inside an alias definition, we only need the name of the alias target
type. Add a method to GIRWriter to write out a type reference rather
than full type definition and use it when writing out an alias.
Determine introspectableness of aliases in IntrospectablePass so functions
using aliases can be marked not-introspectable if the alias itself is not.
https://bugzilla.gnome.org/show_bug.cgi?id=629682
Pavel Holejsovsky [Wed, 15 Dec 2010 10:35:01 +0000 (11:35 +0100)]
Regenerate gio-2.0.c from current glib/gio.
Pavel Holejsovsky [Tue, 14 Dec 2010 15:14:55 +0000 (16:14 +0100)]
giscanner: don't ignore signal parameter names from annotations.
If present in annotation, use parameter names from annotation instead
of (object, p0, p1, ...) names generated by dumpparser.
Assign names for all parameters before trying to resolve annotation
types, so that annotations containing forward references to other
arguments, e.g.
* GApplication::open:
* @application: the application
* @files: (array length=n_files) (element-type GFile): an array of #GFiles
* @n_files: the length of @files
Colin Walters [Mon, 6 Dec 2010 20:10:58 +0000 (15:10 -0500)]
cairo: Fill out GIR with cairo-gobject boxed information
We need these references to correctly handle when an API (say GTK3)
uses the cairo-gobject boxed types in a signal (like "draw").
API consumers need to be using g-i for signal handling to make
this all work.
https://bugzilla.gnome.org/show_bug.cgi?id=636646
Colin Walters [Mon, 6 Dec 2010 15:26:02 +0000 (10:26 -0500)]
cairo-1.0.gir: Un-foreign RectangleInt
cairo.RectangleInt is a very tricky case; it's (as of now)
boxed in cairo-gobject. We're trying to fix a few bugs here. First,
we want to make (out caller-allocates) work. In order to do that,
we need to explicitly specify the fields so that the typelib
has the right size.
Also, add the boxed type now so that we pick up the right thing
from GObject signal parameters.
See history in bug 623222 and bug 636393.
https://bugzilla.gnome.org/show_bug.cgi?id=636617
Emmanuele Bassi [Thu, 9 Dec 2010 12:31:40 +0000 (12:31 +0000)]
gir: Add Time to xlibs-2.0
Pavel Holejsovsky [Tue, 30 Nov 2010 08:41:12 +0000 (09:41 +0100)]
Fix thinko in regress suite.
regress_test_fundamental_sub_object_finalize should call parent's
regress_test_fundamental_object_finalize instead of
regress_test_fundamental_object_unref, otherwise recursion and
double-free might happen.
https://bugzilla.gnome.org/show_bug.cgi?id=636620
Andreas Rottmann [Mon, 6 Dec 2010 23:18:15 +0000 (00:18 +0100)]
Support glib-mkenums comment /*< flags >*/
- Modify the lexer to consider all "trigraph" comments specially, and
parse them for "flags" as well as "private" and "public" (which were
previously hardcoded). This change allows for future support of
multiple annotations inside a single trigraph comment.
- Change the parser to consider the additional field "flags" set by
the lexer when constructing enums.
- Add a test case for the "flags" trigraph comment to the scanner
annotation tests.
See <https://bugzilla.gnome.org/show_bug.cgi?id=631530>.
Andreas Rottmann [Mon, 6 Dec 2010 23:07:08 +0000 (00:07 +0100)]
Don't emit shadowed methods into the typelib
Ignore shadowed methods when parsing the GIR.
Colin Walters [Mon, 6 Dec 2010 16:14:53 +0000 (11:14 -0500)]
g_object_info_find_method_using_interfaces: Fix crash if not found
If a method wasn't found, we'd try to unref NULL.
Colin Walters [Fri, 22 Oct 2010 18:22:19 +0000 (14:22 -0400)]
g_object_info_find_method_using_interfaces: New function
Pull this down into introspection from gjs; this will allow us
to cache this better in the future (for example, by caching the
infos for interfaces in the info for the object).
https://bugzilla.gnome.org/show_bug.cgi?id=632924
Tomeu Vizoso [Mon, 6 Dec 2010 15:10:02 +0000 (16:10 +0100)]
Make sure we don't mark GInitiallyUnownedClass as disguised
Colin Walters [Mon, 25 Oct 2010 17:33:01 +0000 (13:33 -0400)]
Add directory index section
Use the internal perfect hashing API to add an index to the directory.
To support this, add the notion of additional "sections" to the
typelib. A section index is inserted between the header and the
directory.
https://bugzilla.gnome.org/show_bug.cgi?id=554943
Colin Walters [Thu, 11 Nov 2010 21:09:51 +0000 (16:09 -0500)]
.gitignore: Update
Colin Walters [Mon, 25 Oct 2010 11:56:05 +0000 (07:56 -0400)]
Add internal hashing API designed for the typelib
In multiple places in the typelib, but most importantly the directory,
we need some fast indexing. Perfect hashing, as implemented by CMPH
(previous commit), is an exact fit for the problem domain.
Add an API built on top of CMPH which maps strings->guint16 (we just
need a guint16 for the typelib index).
https://bugzilla.gnome.org/show_bug.cgi?id=554943
Colin Walters [Thu, 11 Nov 2010 20:34:11 +0000 (15:34 -0500)]
cmph-bdz-test: New test
Add a basic test of CMPH (without any layers on top).
Colin Walters [Thu, 2 Dec 2010 16:34:46 +0000 (11:34 -0500)]
cmph: Squash a lot of gcc -Wall compiler warnings
* Functions taking no parameters need to explicitly say (void).
* Mark some functions as static that are
* Comment out an unused function in bdz.c
* Change loop indicies "i" to be unsigned if our limit is unsigned
Colin Walters [Thu, 11 Nov 2010 20:14:07 +0000 (15:14 -0500)]
cmph: Add automake rules
Colin Walters [Thu, 11 Nov 2010 20:03:20 +0000 (15:03 -0500)]
cmph: Modify types to use GLib types
The 64 bit #ifdefs is just hackish and broken; e.g. it will fail
on ppc64/linux and WIN64.
Use the GLib typedefs, which I know are more correct.
Colin Walters [Thu, 11 Nov 2010 20:01:07 +0000 (15:01 -0500)]
Import CMPH 1.0
This will be used for typelib indexing. See README-CMPH-IMPORT.txt
for more information.
Colin Walters [Thu, 11 Nov 2010 20:33:41 +0000 (15:33 -0500)]
Makefile.am: Add GTESTER_PROGS
This is a list of test programs to run under "gtester".
Colin Walters [Fri, 3 Dec 2010 15:41:50 +0000 (10:41 -0500)]
scanner: Switch to only Python 2.5 C API usage
PyUnicode_FromString is 2.6 only, we can use PyUnicode_DecodeUTF8
easily enough though.
Also, fix memory leaks in this function; we leaked the buffer
on success, and also in most failure paths.
Colin Walters [Thu, 2 Dec 2010 19:58:27 +0000 (14:58 -0500)]
scanner: More XML unicode fixes
Coerce input temporarily inside xmlwriter into Unicode to do
string manipulation, and then only convert it to "UTF8str" when
writing into the data buffer.
Johan Dahlin [Thu, 2 Dec 2010 16:10:33 +0000 (14:10 -0200)]
Add proper unicode support to the source scanner
The assumption is that the only allowed source encoding
is utf-8. Always strings as unicode and fix up the transformer
and xml writer to properly output utf-8.
Colin Walters [Fri, 29 Oct 2010 22:37:43 +0000 (18:37 -0400)]
Support hexadecimal escapes in constants
g_strcompress() only does some of what we need; fork it
and add support for \x escapes too.
https://bugzilla.gnome.org/show_bug.cgi?id=595773
Colin Walters [Fri, 19 Nov 2010 21:59:02 +0000 (16:59 -0500)]
scanner: Only mark structures and unions as out-caller-allocates
These are the only things for which we expect native values to be
preserved; for e.g. flags and integers, we expect bindings to convert.
The particular rationale for this patch is to avoid flagging flags (sic)
as (out caller-allocates).
Colin Walters [Thu, 18 Nov 2010 01:06:30 +0000 (20:06 -0500)]
Update gio annotations from GLib git
Colin Walters [Wed, 17 Nov 2010 21:36:26 +0000 (16:36 -0500)]
gtk-doc: Update for renamed libgirepository-internals.la
Dan Winship [Wed, 17 Nov 2010 16:41:44 +0000 (11:41 -0500)]
glib-2.0.c: annotate the arrays in g_spawn_sync/_async
Colin Walters [Tue, 16 Nov 2010 20:08:33 +0000 (15:08 -0500)]
girepository: Consistently prefix internal functions with _
This should better avoid them being exported. Rename
girepository-parser.la to girepository-internals.la for clarity.
Colin Walters [Tue, 16 Nov 2010 21:05:18 +0000 (16:05 -0500)]
build: Flip around linking order of libraries for tools
It seems in some cases (Debian libtool) we get an injected rpath
first for the jhbuild root, which screws us over since we need
the libraries from .libs.
Colin Walters [Tue, 16 Nov 2010 20:13:41 +0000 (15:13 -0500)]
gitypelib: Extend warning for validation
Colin Walters [Tue, 16 Nov 2010 16:54:46 +0000 (11:54 -0500)]
scanner: Fall back to default uscoring for method pairing if possible
The commit to use the c_symbol_prefix works in every case, except for
gdk_window_object_get_type(), which screws us. Fall back to the old
heuristic in this case.
Colin Walters [Tue, 16 Nov 2010 14:46:00 +0000 (09:46 -0500)]
Fix tests to look in correct directory for typelibs
With nonrecursive they're in $(top_builddir) now
Colin Walters [Tue, 16 Nov 2010 14:16:52 +0000 (09:16 -0500)]
tests: Print an error message
Colin Walters [Tue, 16 Nov 2010 14:15:47 +0000 (09:15 -0500)]
Fix line too long
Jonathan Matthew [Sat, 6 Nov 2010 09:45:29 +0000 (19:45 +1000)]
scanner: use c-symbol-prefix for method pairing where possible
If we have a C symbol prefix for the target type, then use that to
identify methods that should be paired with it. The C symbol prefix
is derived from the name of the _get_type() function, so it's likely
that this is also the prefix given to methods for the type.
https://bugzilla.gnome.org/show_bug.cgi?id=634153
Jonathan Matthew [Tue, 26 Oct 2010 23:56:44 +0000 (09:56 +1000)]
scanner: don't show 'warnings suppressed' if --warn-all in use
https://bugzilla.gnome.org/show_bug.cgi?id=633227
Colin Walters [Tue, 26 Oct 2010 15:12:26 +0000 (11:12 -0400)]
Add support for gunichar in typelib
Some API such as gtk_text_iter_get_char returns an individual
"gunichar"; we should support this.
https://bugzilla.gnome.org/show_bug.cgi?id=633197
Colin Walters [Fri, 12 Nov 2010 20:37:44 +0000 (15:37 -0500)]
build: Explicitly link to libffi for g-ir-compiler
On Debian, libtool won't pull in dependencies from internal libraries when
linking.
Colin Walters [Tue, 26 Oct 2010 15:47:00 +0000 (11:47 -0400)]
Add g_object_info_find_signal
This matches g_object_info_find_method, and allows us to add indexing
later.
https://bugzilla.gnome.org/show_bug.cgi?id=633204
Colin Walters [Thu, 11 Nov 2010 22:51:00 +0000 (17:51 -0500)]
Makefile-gir.am: Fix explicit dependency of DBusGLib on GObject
Because of Makefile.introspection, the .typelibs are still put in
gir/.
Colin Walters [Thu, 11 Nov 2010 22:23:20 +0000 (17:23 -0500)]
Explicitly link g-ir-compiler and g-ir-generate to GIO
girepository only explicitly deps on GObject, so this is correct.
Colin Walters [Wed, 20 Oct 2010 14:42:17 +0000 (10:42 -0400)]
dumper: Differentiate between "external" and "internal" linking
The previous commit
aea515709 broke scanning for libraries not
in the current directory, such as scanning Gio from gobject-introspection.
In this case, it's wrong to add -L., and to move the other -L behind
the library. Instead, we should just do a "normal" link using
pkg-config --libs with few games.
https://bugzilla.gnome.org/show_bug.cgi?id=632701
Colin Walters [Thu, 11 Nov 2010 21:01:39 +0000 (16:01 -0500)]
Makefile-gir.am: Add explicit g-ir-compiler dependency
We need the typelib compiler to be built before we try to
build typelibs for the static gir files.
Alban Browaeys [Thu, 11 Nov 2010 17:50:24 +0000 (12:50 -0500)]
nonrecursive build: Fix typelib installation
Colin Walters [Thu, 11 Nov 2010 14:58:57 +0000 (09:58 -0500)]
Fix previous commit
..but we still should be looking for pre-written girs in gir/.
Colin Walters [Thu, 11 Nov 2010 14:54:35 +0000 (09:54 -0500)]
build: Fix scanner/compiler to look in $(top_builddir) now
Since we're nonrecursive, the build artifacts live in $(top_builddir),
so look there now for files like Gio-2.0.gir.
Colin Walters [Tue, 9 Nov 2010 20:15:00 +0000 (15:15 -0500)]
girepository: Only export ^gi?_ symbols
Otherwise it's really easy to unintentionally export unwanted symbols,
as would happen with the upcoming CMPH import.
Colin Walters [Tue, 9 Nov 2010 22:06:29 +0000 (17:06 -0500)]
Export gi_type_tag_get_ffi_type
This is needed by the offsets code, and is generally useful. We
need to export it for a future patch which won't export symbols
with a leading _.
Colin Walters [Thu, 4 Nov 2010 17:12:12 +0000 (13:12 -0400)]
Switch to nonrecursive make for core (i.e. not tests/)
This is cleaner and faster, and prepares us better for an incoming
import of CMPH.