platform/upstream/gobject-introspection.git
12 years agomallardwriter: Use the same code to lookup fundamentals as the rest
Jasper St. Pierre [Wed, 30 Jan 2013 14:50:43 +0000 (09:50 -0500)]
mallardwriter: Use the same code to lookup fundamentals as the rest

Also, put <code> blocks around fundamentals.

12 years agomallardwriter: Use mkdtemp
Jasper St. Pierre [Thu, 31 Jan 2013 17:58:15 +0000 (12:58 -0500)]
mallardwriter: Use mkdtemp

We should not litter /tmp

12 years agogirparser: Serialize and read back the instance_parameter
Jasper St. Pierre [Thu, 31 Jan 2013 14:36:07 +0000 (09:36 -0500)]
girparser: Serialize and read back the instance_parameter

g-ir-doc-tool wants to use the instance parameter to read docs
and the parameter name, so it needs to be shuttled through the
GIR.

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

12 years agogirparser: Clean up passthrough handling
Jasper St. Pierre [Fri, 1 Feb 2013 04:02:02 +0000 (23:02 -0500)]
girparser: Clean up passthrough handling

Instead of remembering to have to set unknown_depth, smarten up
state_switch to do it for us.

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

12 years agogirparser: Move <doc> handling to passthrough
Jasper St. Pierre [Fri, 1 Feb 2013 03:59:23 +0000 (22:59 -0500)]
girparser: Move <doc> handling to passthrough

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

12 years agogiscanner: Apply standard annotations to constant values
Jasper St. Pierre [Fri, 1 Feb 2013 02:42:32 +0000 (21:42 -0500)]
giscanner: Apply standard annotations to constant values

While there's no particular reason I need to do this, there
really isn't any reason to not do this, and it helps with doctool
or whatever in the future if we want to document when a constant
showed up. g-ir-compiler also keeps track of constant deprecations,
so this fixes constants not ever being deprecated.

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

12 years agoast: Track enum/bitfield member parents
Jasper St. Pierre [Wed, 30 Jan 2013 15:02:41 +0000 (10:02 -0500)]
ast: Track enum/bitfield member parents

We need this for the doctool so that we can link to an enum
definition when we reference one of the member values.

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

12 years agoast: Track enum members by symbol
Jasper St. Pierre [Wed, 30 Jan 2013 14:57:18 +0000 (09:57 -0500)]
ast: Track enum members by symbol

The doctool eventually wants to parse inline references to
constant values like %GTK_TEXT_DIRECTION_LTR, so we need to
have a way to look up the original symbol value for an enum
member.

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

12 years agotests: %NULL-terminated is wrong
Jasper St. Pierre [Wed, 9 Jan 2013 19:26:26 +0000 (14:26 -0500)]
tests: %NULL-terminated is wrong

This translates into "None-terminated" in Python, which is bad.
We should eventually strip this phrase entirely for certain languages
with a prefilter.

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

12 years agoRemove the insane pre-commit hook
Jasper St. Pierre [Wed, 30 Jan 2013 15:09:55 +0000 (10:09 -0500)]
Remove the insane pre-commit hook

I'm sick and tired of this.

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

12 years agoUpdate .gitignore
Jasper St. Pierre [Wed, 30 Jan 2013 15:52:20 +0000 (10:52 -0500)]
Update .gitignore

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

12 years agogirparser: Remove unused method
Jasper St. Pierre [Wed, 30 Jan 2013 14:45:48 +0000 (09:45 -0500)]
girparser: Remove unused method

pylint was complaining about the non-existent instance member,
self._filename

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

12 years agogimarshallingtests: Add test helpers for marshaling of object arguments
Simon Feltman [Wed, 2 Jan 2013 10:14:08 +0000 (02:14 -0800)]
gimarshallingtests: Add test helpers for marshaling of object arguments

Add a number of vfuncs and methods which can be used for testing
marshaling of objects with different combinations of ownership
transference. An important part of these test vfuncs and methods is
they do not pass object returns and arguments through them. Instead
the methods return reference counts and floating attributes. This allows
isolation and ensures any problem with round trip object marshaling
does not obscure what should be tested from the perspective of C as the
caller of a vfunc. Tests and vfuncs can then be written in any language
with gi bindings.

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

12 years agoVisual C++ builds: "Install" gdump.c
Chun-wei Fan [Tue, 22 Jan 2013 04:59:26 +0000 (12:59 +0800)]
Visual C++ builds: "Install" gdump.c

The gdump.c source/data file was missed from the "install" process, which
is required for a proper installation of G-I.  Make up for that.

12 years agobuild/win32/gengir.bat: Process the bundled .gir files
Chun-wei Fan [Mon, 21 Jan 2013 06:04:24 +0000 (14:04 +0800)]
build/win32/gengir.bat: Process the bundled .gir files

This will compile the .typelib files for FreeType, GL and libxml2, and
copy the these .gir and their resulting .typelib files to the appropriate
folder to prepare for the "install" phase.

Note that the ones that aren't normally used in Windows are not processed.

12 years agoUpdate Visual C++ README.txt files.
Chun-wei Fan [Mon, 21 Jan 2013 03:51:20 +0000 (11:51 +0800)]
Update Visual C++ README.txt files.

Be a little bit more clear on how certain environmental variables are to
be set.

12 years agoFix _giscanner Python module Visual C++ projects
Chun-wei Fan [Mon, 21 Jan 2013 03:41:21 +0000 (11:41 +0800)]
Fix _giscanner Python module Visual C++ projects

We need to force-include io.h as there is no longer a prototype for
isatty() in the generated scannerlexer.c source file, which broke the
build. (possibly due to a flex program or calling change/update?)

12 years agoVisual C++ 2010 projects: Prepare for VS 2012 support
Chun-wei Fan [Mon, 21 Jan 2013 02:53:42 +0000 (10:53 +0800)]
Visual C++ 2010 projects: Prepare for VS 2012 support

Add the PlatformToolset tag to the project configs so that we can use
a simple script later to the autotools files to copy the projects and
change the value of that tag (v100 -> v110, and other simple changes)
in order that we can quickly provide and maintain support for Visual
Studio 2012 with minimal effort.

Note that at the moment G-I does not yet support the API/SDK requirements
for Windows 8 Modern UI (formerly known as Metro), but this paves the very
initial step.

12 years agoVisual C++ projects: Update .sln/README.txt line endings
Chun-wei Fan [Mon, 21 Jan 2013 02:40:02 +0000 (10:40 +0800)]
Visual C++ projects: Update .sln/README.txt line endings

...So that they will have Windows line endings.

Specifically, this is something that affects how Windows detect the Visual
Studio version from the .sln files, and the README.txt's should have
Windows line endings.

12 years agotests: Avoid handing out uninitialized memory
Torsten Schönfeld [Sat, 19 Jan 2013 15:03:08 +0000 (16:03 +0100)]
tests: Avoid handing out uninitialized memory

gi_marshalling_tests_boxed_struct_out and
gi_marshalling_tests_boxed_struct_inout allocated memory without completely
initializing it.

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

12 years agoFix install location of Mallard templates
Martin Pitt [Wed, 16 Jan 2013 17:06:35 +0000 (18:06 +0100)]
Fix install location of Mallard templates

http://git.gnome.org/browse/gobject-introspection/commit/?id=8b23c6c changed
the lookup path of the g-ir-doc-tool templates at runtime, but did not change
the install location of the templates. Install them into the expected place.

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

12 years agoPost-release version bump
Colin Walters [Tue, 15 Jan 2013 21:00:12 +0000 (16:00 -0500)]
Post-release version bump

12 years agoRelease 1.35.4 GOBJECT_INTROSPECTION_1_35_4 upstream/1.35.4
Colin Walters [Tue, 15 Jan 2013 15:22:43 +0000 (10:22 -0500)]
Release 1.35.4

12 years agotests: Fix compiler warnings
Martin Pitt [Tue, 15 Jan 2013 09:05:20 +0000 (10:05 +0100)]
tests: Fix compiler warnings

Fix (void) function declarations that occur with -Wstrict-prototypes, and the
g_param_spec_get_name() which drops the const from its argument.

12 years agogimarshallingtests: Add method taking a GParamSpec argument
Martin Pitt [Mon, 14 Jan 2013 11:34:06 +0000 (12:34 +0100)]
gimarshallingtests: Add method taking a GParamSpec argument

Add gi_marshalling_tests_param_spec_in_bool(), supplementing the already
existing tests for a GParamSpec out argument and return value.

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

12 years agoUpdate annotations from glib git
Martin Pitt [Mon, 14 Jan 2013 10:37:27 +0000 (11:37 +0100)]
Update annotations from glib git

12 years agogimarshallingtests: Add boxed GList property
Martin Pitt [Mon, 14 Jan 2013 07:48:03 +0000 (08:48 +0100)]
gimarshallingtests: Add boxed GList property

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

12 years agogimarshallingtests: Add string_ to boxed structure
Vadim Rutkovsky [Fri, 11 Jan 2013 11:17:53 +0000 (12:17 +0100)]
gimarshallingtests: Add string_ to boxed structure

Co-Authored-By: Martin Pitt <martinpitt@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=678401

12 years agogirepository: gchar is a signed type
Martin Pitt [Fri, 11 Jan 2013 07:42:27 +0000 (08:42 +0100)]
girepository: gchar is a signed type

gchar is signed, not unsigned. Add "guchar" alias as unsigned for completeness
(but usually it appears as guint8).

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

12 years agogimarshallingtests: Add vfunc with an array output
Paolo Borelli [Thu, 10 Jan 2013 21:23:36 +0000 (22:23 +0100)]
gimarshallingtests: Add vfunc with an array output

Add vfunc_array_out_param to GIMarshallingTestsObjectClass.

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

12 years agogiscanner: emit a warning when we fail to parse a GTK-Doc comment block
Dieter Verfaillie [Wed, 9 Jan 2013 21:45:40 +0000 (22:45 +0100)]
giscanner: emit a warning when we fail to parse a GTK-Doc comment block

Instead of going down with a for the user inexplicable backtrace,
emit a warning asking said user to file a bug including the
comment block in question.

Thanks to Alexandre Rostovtsev <tetromino@gentoo.org> for
proposing something similar in bug #690850

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

12 years agotests: add invalid identifier test case
Dieter Verfaillie [Thu, 3 Jan 2013 07:03:48 +0000 (08:03 +0100)]
tests: add invalid identifier test case

This comment block, as found in the wild via
https://bugzilla.gnome.org/show_bug.cgi?id=690850
has a couple of elements to make it an interesting
test case:
- a colon on the first line
- stuff between parens on the first line
but it still isn't a valid identifier. Add it here
anyway to make sure we don't regress.

12 years agogiscanner: Don't fail on empty GTK-Doc comment blocks
Dieter Verfaillie [Thu, 3 Jan 2013 07:01:10 +0000 (08:01 +0100)]
giscanner: Don't fail on empty GTK-Doc comment blocks

A completely empty GTK-Doc comment block (/**\n*/) resulted
in an unfriendly backtrace, complaining about an
"AttributeError: 'NoneType' object has no attribute 'comment'"

This fixes the issue and adds a test case.

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

12 years agomallardwriter: Improve type formatting for Python
Jasper St. Pierre [Wed, 9 Jan 2013 15:38:01 +0000 (10:38 -0500)]
mallardwriter: Improve type formatting for Python

Rather than use the glib names like gint/gchar and friends, use the
Python type names. Right now, this is Python 2, but we'll soon be
introducing a special Python 3 formatter.

12 years agodoc: Put documentation templates into their own directories
Jasper St. Pierre [Wed, 9 Jan 2013 08:11:06 +0000 (03:11 -0500)]
doc: Put documentation templates into their own directories

Instead of cluttering up the giscanner directory, put templates
into their own files, with each language having its own templates
in its own directory for comfort.

12 years agodoc: Clean up signature generation a bit more
Jasper St. Pierre [Wed, 9 Jan 2013 07:46:38 +0000 (02:46 -0500)]
doc: Clean up signature generation a bit more

Use join and a genexp instead of manual comma tracking to make
our lives just a little easier.

12 years agodoc: Add self to methods in the Python declarations
Jasper St. Pierre [Wed, 9 Jan 2013 07:43:38 +0000 (02:43 -0500)]
doc: Add self to methods in the Python declarations

12 years agodoc: Make the Python declarations look a tiny bit nicer
Jasper St. Pierre [Wed, 9 Jan 2013 07:42:39 +0000 (02:42 -0500)]
doc: Make the Python declarations look a tiny bit nicer

Add a colon after the def, and add a comment describing what this
is a wrapper for.

12 years agomallardwriter: Use a TemplateLookup for grabbing templates
Jasper St. Pierre [Wed, 9 Jan 2013 08:04:28 +0000 (03:04 -0500)]
mallardwriter: Use a TemplateLookup for grabbing templates

This removes us from the need to do path manipulation, and also
allows templates to include or import helpers from another with
the <%include/> or <%namespace/> helper control tags.

12 years agomallardwriter: Add support for parameters
Jasper St. Pierre [Wed, 9 Jan 2013 07:31:22 +0000 (02:31 -0500)]
mallardwriter: Add support for parameters

Support the inline @my_parameter syntax, and translate it to
<code>my_parameter</code>, as Mallard doesn't have anything
more fancy than that. For Python, where we omit the first parameter
of methods like that automatically, force to "self".

12 years agomallardwriter: Rearrange definitions to match scanner order
Jasper St. Pierre [Wed, 9 Jan 2013 07:20:55 +0000 (02:20 -0500)]
mallardwriter: Rearrange definitions to match scanner order

12 years agomallardwriter: Pass the parent node around for inline formatting
Jasper St. Pierre [Wed, 9 Jan 2013 07:12:13 +0000 (02:12 -0500)]
mallardwriter: Pass the parent node around for inline formatting

This will be used for @param detection.

12 years agomallardwriter: Consolidate xref building and page naming code
Jasper St. Pierre [Wed, 9 Jan 2013 06:56:41 +0000 (01:56 -0500)]
mallardwriter: Consolidate xref building and page naming code

Simple code cleanups.

12 years agomallardwriter: Remove the namespace argument from the processors
Jasper St. Pierre [Wed, 9 Jan 2013 06:51:15 +0000 (01:51 -0500)]
mallardwriter: Remove the namespace argument from the processors

This can be more accurately retrieved off of the node itself in all cases.

12 years agomallardwriter: Put process_other with the rest of the processors
Jasper St. Pierre [Wed, 9 Jan 2013 06:50:09 +0000 (01:50 -0500)]
mallardwriter: Put process_other with the rest of the processors

Simple cleanup

12 years agomallardwriter: Use the node's namespace
Jasper St. Pierre [Wed, 9 Jan 2013 06:49:29 +0000 (01:49 -0500)]
mallardwriter: Use the node's namespace

This should now be correct in all cases.

12 years ago.gitignore: Ignore most .page files
Jasper St. Pierre [Wed, 9 Jan 2013 07:12:28 +0000 (02:12 -0500)]
.gitignore: Ignore most .page files

While testing g-ir-doctool, it's common to generate a directory
full of a large number of small .page files inside the source
directory, which slows down git a lot while searching for untracked
files. Ignore the .page files for now, so git doesn't have to look
in its database for every one.

12 years ago.gitignore: Add WarnLib
Jasper St. Pierre [Wed, 9 Jan 2013 08:12:14 +0000 (03:12 -0500)]
.gitignore: Add WarnLib

12 years agobuild: Fix previous commit
Colin Walters [Mon, 7 Jan 2013 18:41:09 +0000 (13:41 -0500)]
build: Fix previous commit

12 years agoClean up cairo handling somewhat
Colin Walters [Mon, 7 Jan 2013 17:57:17 +0000 (12:57 -0500)]
Clean up cairo handling somewhat

I'm building on RHEL6 which doesn't have cairo-gobject.  Now, we
tried to support this in that 'make' would succeed, but 'make check'
would blow up.

This patch allows more of 'make check' to succeed - I just need to
figure out how to make the diff against the -expected.gir work.

What's more important though, is this will allow gjs to also #define
_GI_DISABLE_CAIRO.

12 years agobuild: Properly export g_interface_info_find_signal
Torsten Schönfeld [Mon, 7 Jan 2013 16:35:47 +0000 (17:35 +0100)]
build: Properly export g_interface_info_find_signal

It was missing from girepository.symbols.

12 years agoUpdate annotations from glib git
Rico Tzschichholz [Fri, 4 Jan 2013 18:26:04 +0000 (19:26 +0100)]
Update annotations from glib git

12 years agoRegress: Add signal returning a GArray
Martin Pitt [Fri, 4 Jan 2013 08:32:45 +0000 (09:32 +0100)]
Regress: Add signal returning a GArray

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

12 years agoMakefile-gir: Fix indentation
Jasper St. Pierre [Wed, 2 Jan 2013 19:03:41 +0000 (14:03 -0500)]
Makefile-gir: Fix indentation

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

12 years agotests/annotationparser: Drop Python API usage down to 2.6, not 2.7
Colin Walters [Mon, 17 Dec 2012 16:08:05 +0000 (11:08 -0500)]
tests/annotationparser: Drop Python API usage down to 2.6, not 2.7

.iterfind() is new in 2.7, but we claim 2.6 support, as I use on
RHEL6.

12 years agogimarshallingtests: Add test for value array of boxed structs
Martin Pitt [Tue, 18 Dec 2012 21:43:25 +0000 (22:43 +0100)]
gimarshallingtests: Add test for value array of boxed structs

We already have tests for "array of simple structs"
(gi_marshalling_tests_array_simple_struct_in) and "array of pointers to
boxed structs" (gi_marshalling_tests_array_struct_in), but were missing
"array of boxed structs", which reproduces
https://bugzilla.gnome.org/show_bug.cgi?id=656312

12 years agoAutomatically install pre-commit hook
Martin Pitt [Tue, 18 Dec 2012 08:35:02 +0000 (09:35 +0100)]
Automatically install pre-commit hook

Instead of telling the user to do so and failing, we can just install the hook
ourselves. This saves the user some trouble and more importantly avoids
breaking tests in jhbuild continuous integration setups.

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

12 years agoRelease 1.35.3 GOBJECT_INTROSPECTION_1_35_3 upstream/1.35.3
Colin Walters [Tue, 18 Dec 2012 16:36:57 +0000 (11:36 -0500)]
Release 1.35.3

12 years agogimarshallingtests:: Add test for returning a caller-allocated GArray
Gonzalo Odiard [Tue, 11 Dec 2012 13:54:00 +0000 (10:54 -0300)]
gimarshallingtests:: Add test for returning a caller-allocated GArray

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

12 years agorepo: Drop deprecated GStaticMutex usage
Colin Walters [Mon, 17 Dec 2012 14:50:28 +0000 (09:50 -0500)]
repo: Drop deprecated GStaticMutex usage

In favor of GOnce, since we just want initialize-once semantics.

12 years agoUse python-config instead of assuming include and library paths
Martin Pitt [Mon, 17 Dec 2012 14:03:48 +0000 (15:03 +0100)]
Use python-config instead of assuming include and library paths

Call $PYTHON-config to determine include and library paths and linker flags
instead of making assumptions about them.

Also drop the unused PYTHON_LIB_LOC macro.

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

12 years agoUpdate annotations from glib git
Rico Tzschichholz [Sun, 16 Dec 2012 10:47:54 +0000 (11:47 +0100)]
Update annotations from glib git

12 years agocommon.mk: escape $CC in quotes
Peter Hutterer [Tue, 11 Dec 2012 23:15:22 +0000 (09:15 +1000)]
common.mk: escape $CC in quotes

If CC is defined at "ccache gcc", the expanded command ends up as:
  env PATH=... CC=ccache gcc PYTHONPATH=... ./g-ir-scanner
causing compilation errors.

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

12 years agoscanner: Warn if we're missing (element-type) for GPtrArray
Colin Walters [Mon, 10 Dec 2012 18:12:13 +0000 (13:12 -0500)]
scanner: Warn if we're missing (element-type) for GPtrArray

For background,
See https://bugzilla.gnome.org/show_bug.cgi?id=629682
See https://bugzilla.gnome.org/show_bug.cgi?id=689871

Basically we should emit a warning here.

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

12 years agoUpdate annotations from glib git
Rico Tzschichholz [Wed, 5 Dec 2012 21:56:02 +0000 (22:56 +0100)]
Update annotations from glib git

12 years agobuild: Include tests/scanner/annotationparser/* to EXTRA_DIST
Rico Tzschichholz [Wed, 5 Dec 2012 20:56:05 +0000 (21:56 +0100)]
build: Include tests/scanner/annotationparser/* to EXTRA_DIST

12 years agotests: Fix up WarnLib build, remove accidental additions to regress.c
Colin Walters [Wed, 5 Dec 2012 20:40:15 +0000 (15:40 -0500)]
tests: Fix up WarnLib build, remove accidental additions to regress.c

Previous WarnLib commit was broken.

12 years agobuild: Use -Bsymbolic-functions by default if available
Colin Walters [Sat, 1 Dec 2012 19:49:49 +0000 (14:49 -0500)]
build: Use -Bsymbolic-functions by default if available

While we have much larger performance problems right now, using
-Bsymbolic-functions to avoid internal PLT indirection is an easy win.

This is the same code that both GLib and GTK+ have.

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

12 years agotests: don't fake Automake silent mode
Dieter Verfaillie [Wed, 28 Nov 2012 09:52:19 +0000 (10:52 +0100)]
tests: don't fake Automake silent mode

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

12 years agotests: fix incremental build
Dieter Verfaillie [Wed, 28 Nov 2012 09:36:19 +0000 (10:36 +0100)]
tests: fix incremental build

Running make multiple times caused "mkdir" to complain
that it could not create those directories because they
where already there...

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

12 years agoWarnLib: New library for testing API that emits warnings
Colin Walters [Sun, 2 Dec 2012 17:15:53 +0000 (12:15 -0500)]
WarnLib: New library for testing API that emits warnings

Both GIMarshallingTests and Regress right now use --warn-error; but
in some cases (e.g. GErrors without a corresponding enum), we still
want bindings to support the functionality.

So add this new library where we can add C API that emits
introspection warnings.

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

12 years agoscanner: Parse comments with */ not on a new line, but emit a warning
Dieter Verfaillie [Sat, 1 Dec 2012 15:02:01 +0000 (16:02 +0100)]
scanner: Parse comments with */ not on a new line, but emit a warning

We don't know how many apps do this, but at least ibus had one.

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

12 years agogimarshallingtests: Add a utf8-in-bytearray test
Colin Walters [Thu, 29 Nov 2012 19:54:01 +0000 (14:54 -0500)]
gimarshallingtests: Add a utf8-in-bytearray test

Will be used by gjs

12 years agogiscanner: don't continue parsing after multiline descriptions
Dieter Verfaillie [Thu, 22 Nov 2012 16:58:46 +0000 (17:58 +0100)]
giscanner: don't continue parsing after multiline descriptions

This doesn't change anything, really, except that you don't have
to read a whole page of code just to realize that nothing else
happens with that line and we go on processing the next.

Putting the continue statements there makes it a bit more readable.

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

12 years agogiscanner: fix DocBlock().comment
Dieter Verfaillie [Mon, 29 Oct 2012 07:32:08 +0000 (08:32 +0100)]
giscanner: fix DocBlock().comment

If there is no comment block description, DocBlock().comment
should be None. This results in the removal of unneeded blank
lines in the output of DocBlock().to_gtk_doc and hence the .c
files generated by misc/update-glib-annotations.py

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

12 years agogiscanner: update annotationparser to most recent gtkdoc-mkdb bug fixes.
Dieter Verfaillie [Tue, 17 Jul 2012 15:19:14 +0000 (17:19 +0200)]
giscanner: update annotationparser to most recent gtkdoc-mkdb bug fixes.

This patch adds a test for and implements a more generic solution to
GTK-Doc commit 47abcd53b8489ebceec9e394676512a181c1f1f6

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

12 years agogiscanner: remove re.MULTILINE usage from annotationparser
Dieter Verfaillie [Wed, 4 Jul 2012 05:53:29 +0000 (07:53 +0200)]
giscanner: remove re.MULTILINE usage from annotationparser

These are remnants from the original prototype and are no
longer used.

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

12 years agogiscanner: Correctly detect invalid GTK-Doc comment block end markers
Dieter Verfaillie [Wed, 4 Jul 2012 07:10:51 +0000 (09:10 +0200)]
giscanner: Correctly detect invalid GTK-Doc comment block end markers

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

12 years agogiscanner: treat the GTK-Doc Description: tag like any other tag
Dieter Verfaillie [Tue, 17 Jul 2012 15:30:47 +0000 (17:30 +0200)]
giscanner: treat the GTK-Doc Description: tag like any other tag

and add paragraph break tests.

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

12 years agogiscanner: construct list of possible tag names for TAG_RE from _ALL_TAGS...
Dieter Verfaillie [Wed, 4 Jul 2012 05:50:14 +0000 (07:50 +0200)]
giscanner: construct list of possible tag names for TAG_RE from _ALL_TAGS...

... instead of having a secondary hard-coded list. This results
in the removal of giscanner/annotationpatterns.py to prevent a
circular import.

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

12 years agogiscanner: move unit tests from giscanner/annotationpatters.py...
Dieter Verfaillie [Wed, 28 Nov 2012 18:48:47 +0000 (19:48 +0100)]
giscanner: move unit tests from giscanner/annotationpatters.py...

... to tests/scanner/annotationparser/test_patterns.py because the
following patch will remove giscanner/annotationpatters.py

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

12 years agogiscanner: add AnnotationParser tests
Dieter Verfaillie [Wed, 4 Jul 2012 09:58:13 +0000 (11:58 +0200)]
giscanner: add AnnotationParser tests

The tests in giscanner/annotationpatters.py only test the regular
expression programs used when parsing GTK-Doc comment blocks but
do not test the structure of the resulting "parse tree".

This patch adds 193 GTK-Doc comment blocks and the expected
results AnnotationParser should return (with it's current level
of understanding of GTK-Doc comment block syntax). These are
compared by tests/scanner/annotationparser/test_parser.py which
complains with a diff on failure.

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

12 years agogiscanner: use re.match() instead of re.search()
Dieter Verfaillie [Fri, 29 Jun 2012 15:03:23 +0000 (17:03 +0200)]
giscanner: use re.match() instead of re.search()

From Python's documentation:
Python offers two different primitive operations based on
regular expressions: match checks for a match only at the
beginning of the string, while search checks for a match
anywhere in the string (this is what Perl does by default).

The different behavior between match() and search() doesn't
matter in our case and conceptually we are checking if a
piece of text matches a certain pattern, so match() is a
better fit.

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

12 years agogiscanner: drop dead code
Dieter Verfaillie [Wed, 21 Nov 2012 16:50:55 +0000 (17:50 +0100)]
giscanner: drop dead code

DocOptions already has a position attribute, no need to overwrite it
when the position of DocBlock or DocTag is set, hence the
set_position methods are no longer needed.

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

12 years agogiscanner: make it clear DocOptions() also has a position attribute
Dieter Verfaillie [Fri, 29 Jun 2012 14:57:54 +0000 (16:57 +0200)]
giscanner: make it clear DocOptions() also has a position attribute

Lost a couple of hours hunting down a failed test case (from the
annotationparser work about to land) due to this not being clear...

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

12 years agogiscanner: implement DocOption() in terms of odict instead of dict
Dieter Verfaillie [Wed, 21 Nov 2012 16:42:41 +0000 (17:42 +0100)]
giscanner: implement DocOption() in terms of odict instead of dict

The order of the "options" key/value pairs returned by
DocOption().all() should be identical to the order in
which they where stored. Hence replace the dict usage
with odict.

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

12 years agogiscanner: remove unused variables
Dieter Verfaillie [Fri, 29 Jun 2012 12:43:33 +0000 (14:43 +0200)]
giscanner: remove unused variables

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

12 years agogiscanner: remove duplicate "os" import...
Dieter Verfaillie [Fri, 29 Jun 2012 12:40:31 +0000 (14:40 +0200)]
giscanner: remove duplicate "os" import...

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

12 years agogiscanner: use collections.OrderedDict when available
Dieter Verfaillie [Thu, 5 Jul 2012 19:30:01 +0000 (21:30 +0200)]
giscanner: use collections.OrderedDict when available

Starting with Python 2.7 we can use the batteries included
collections.OrderedDict class. However, configure.ac claims
we still support Python 2.5 and 2.6, so don't remove our
custom odict implementation just yet...

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

12 years agogiscanner: use dict.values() in favor of dict.itervalues()
Dieter Verfaillie [Wed, 28 Nov 2012 18:05:58 +0000 (19:05 +0100)]
giscanner: use dict.values() in favor of dict.itervalues()

This makes it possible to run the upcoming annotationparser.py
tests with both Python 2 and Python 3.

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

12 years agogiscanner: use dict.items()...
Dieter Verfaillie [Wed, 28 Nov 2012 18:05:07 +0000 (19:05 +0100)]
giscanner: use dict.items()...

... in favor of "for key in dict: value=dict[key]"
and "dict.iteritems()". This makes it possible to
run the upcoming annotationparser.py tests with both
Python 2 and Python 3.

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

12 years agogiscanner: use "if in [a, b]" instead of "if == a or if == b"
Dieter Verfaillie [Tue, 20 Nov 2012 06:54:43 +0000 (07:54 +0100)]
giscanner: use "if in [a, b]" instead of "if == a or if == b"

It simply looks better...

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

12 years agogiscanner: improve wording of inline documentation
Dieter Verfaillie [Tue, 17 Jul 2012 15:04:36 +0000 (17:04 +0200)]
giscanner: improve wording of inline documentation

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

12 years agotests: add g-ir-doc-tool generated output to .gitignore
Dieter Verfaillie [Tue, 30 Oct 2012 15:59:58 +0000 (16:59 +0100)]
tests: add g-ir-doc-tool generated output to .gitignore

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

12 years agoUpdate GLib annotations to master
Dieter Verfaillie [Wed, 21 Nov 2012 15:59:55 +0000 (16:59 +0100)]
Update GLib annotations to master

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

12 years agoGIMarshallingTests: Add more virtual methods with out arguments
Martin Pitt [Wed, 21 Nov 2012 09:25:13 +0000 (10:25 +0100)]
GIMarshallingTests: Add more virtual methods with out arguments

Add virtuals method which takes both an (in) and and (out) argument, and
variants with both caller and callee allocation.

This came up in https://bugzilla.gnome.org/show_bug.cgi?id=688783

12 years agoRegress: Update expected gir for previous changes
Rico Tzschichholz [Wed, 21 Nov 2012 07:47:36 +0000 (08:47 +0100)]
Regress: Update expected gir for previous changes

Changes introduced by 5153efd29e9a813a97d58905340c0ec4af04c5bd

12 years agoAdd more tests for boxed types
Giovanni Campagna [Mon, 19 Nov 2012 23:20:46 +0000 (00:20 +0100)]
Add more tests for boxed types

gjs needs a boxed type that cannot be trivially allocated but has also
a complex constructor.

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

12 years agoBump version to 1.35.2 GOBJECT_INTROSPECTION_1_35_2 upstream/1.35.2
Martin Pitt [Mon, 19 Nov 2012 12:57:49 +0000 (13:57 +0100)]
Bump version to 1.35.2

Our configure.ac still said 1.34.0, which is even older than the stable
gnome-3-6 branch. Bump it to 1.35.2 so that pygobject can depend on >= 1.34.2.

12 years agodocs: add GTK-Doc generated output to .gitignore
Dieter Verfaillie [Thu, 15 Nov 2012 19:57:07 +0000 (20:57 +0100)]
docs: add GTK-Doc generated output to .gitignore

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