platform/upstream/gobject-introspection.git
11 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

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

11 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

11 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.

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

11 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

11 years agodocs: don't mark non GTK-Doc as being a GTK-Doc comment block
Dieter Verfaillie [Thu, 15 Nov 2012 19:56:54 +0000 (20:56 +0100)]
docs: don't mark non GTK-Doc as being a GTK-Doc comment block

This patch silences another gtkdoc-mkdb warning.

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

11 years agodocs: remove reference to object_grouped.sgml.
Dieter Verfaillie [Thu, 15 Nov 2012 19:56:41 +0000 (20:56 +0100)]
docs: remove reference to object_grouped.sgml.

This most likely sneaked in as a copy paste error from GTK+
reference docs as g-i never had a object_grouped.sgml...

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

11 years agodocs: make gtkdoc-mkdb ignore cmph doxygen comment blocks.
Dieter Verfaillie [Thu, 15 Nov 2012 19:56:21 +0000 (20:56 +0100)]
docs: make gtkdoc-mkdb ignore cmph doxygen comment blocks.

When building g-i reference documentation, girepository/cmph/*
was being scanned for GTK-Doc comment blocks by gtkdoc-mkdb.
Unfortunately, cmph uses doxygen comment blocks which also
start with /**. This patch prevents gtkdoc-mkdb from complaining.

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

11 years agoGIMarshallingTests: Add GVariant property
Martin Pitt [Wed, 14 Nov 2012 06:27:50 +0000 (07:27 +0100)]
GIMarshallingTests: Add GVariant property

11 years agogiscanner: unbreak g-ir-annotationtool...
Dieter Verfaillie [Mon, 12 Nov 2012 16:18:41 +0000 (17:18 +0100)]
giscanner: unbreak g-ir-annotationtool...

... and by extension misc/update-glib-annotations.py.

Commit 5c70ef2eb32949f8889e9ae654d50bfbf838951f broke
these by assuming create_source_scanner() is always
called with 'options' and 'args' built by the
OptionParser() defined in scannermain.py's
_get_option_parser().

This is not the case with g-ir-annotationtool, where
annotationmain.py's annotation_main() creates it's
own OptionParser() accepting a different set of
'options' and 'args' as compared to scannermain.py

11 years agoUpdate annotations from glib git
Martin Pitt [Fri, 9 Nov 2012 08:40:45 +0000 (09:40 +0100)]
Update annotations from glib git

11 years agogimarshallingtests: Fix return data type
Martin Pitt [Fri, 9 Nov 2012 07:03:21 +0000 (08:03 +0100)]
gimarshallingtests: Fix return data type

gi_marshalling_tests_genum_returnv() should (and does) return a
GIMarshallingTestsGEnum, not  a GIMarshallingTestsEnum. The latter is already
covered by gi_marshalling_tests_enum_returnv().

11 years agogimarshallingtests: Add some GBytes tests
Colin Walters [Mon, 5 Nov 2012 23:13:24 +0000 (18:13 -0500)]
gimarshallingtests: Add some GBytes tests

Will be used by gjs for new byte array work.

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

11 years agoscanner: Emit correct type for unsigned integer constants
Colin Walters [Tue, 6 Nov 2012 16:48:36 +0000 (11:48 -0500)]
scanner: Emit correct type for unsigned integer constants

Otherwise bindings will break.

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

11 years agoUpdate annotations from glib git
Martin Pitt [Sat, 3 Nov 2012 13:08:36 +0000 (14:08 +0100)]
Update annotations from glib git

11 years agotests: work around make check warning
Dieter Verfaillie [Wed, 31 Oct 2012 15:01:16 +0000 (16:01 +0100)]
tests: work around make check warning

The tests in tests/repository/ depend on libregress.so
from tests/scanner which cannot be loaded during make check.
Fixing this properly would require migrating to non-recursive
automake for the tests, but for now we can just work around
and set LD_LIBRARY_PATH (for linux) and PATH (for win32).

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

11 years agotests/offsets: Remove leftover g_type_init() call
Colin Walters [Wed, 31 Oct 2012 14:35:33 +0000 (10:35 -0400)]
tests/offsets: Remove leftover g_type_init() call

11 years agocmph: Remove leftover statement-without-effect
Colin Walters [Tue, 30 Oct 2012 22:23:09 +0000 (18:23 -0400)]
cmph: Remove leftover statement-without-effect

Compiler warning introduced from MSVC patches.

11 years agoscanner: Correctly handle large 64 bit integer constants
Colin Walters [Fri, 26 Oct 2012 20:46:05 +0000 (16:46 -0400)]
scanner: Correctly handle large 64 bit integer constants

In C, positive integer constants are by default unsigned.  This means
an expression like 0x8000000000000000 will be "unsigned long long".

In the actual scanner code, we were parsing them as "gint64", and
storing them as gint64.  This was incorrect; we need to parse them
as guint64, and store the bits we get from that.  This gives us
an equivalent result to what the C compiler does.

However, when we actually return the value as a Python "long"
(arbitrary length integer), we need to treat the value as unsigned if
the result indicated it was.

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

11 years agoExpand on the documentation tests
Giovanni Campagna [Tue, 28 Aug 2012 01:38:46 +0000 (03:38 +0200)]
Expand on the documentation tests

Add tests for complex function signatures (including arrays and
callbacks), for enumerations and for static methods.
Add JS reference files.

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

11 years agoMallardWriter: support cross-references across namespaces
Giovanni Campagna [Tue, 28 Aug 2012 00:51:04 +0000 (02:51 +0200)]
MallardWriter: support cross-references across namespaces

Look in included namespaces when resolving a cross-reference.

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

11 years agoAdd documentation for enumeration members
Giovanni Campagna [Mon, 27 Aug 2012 22:11:40 +0000 (00:11 +0200)]
Add documentation for enumeration members

Enum members were Annotated in the AST, and most code already assumed
they could have docs. What was missing was reading the docs from the
comment blocks and writing them in the XML.

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

11 years agoAst: Add parent to Fields
Giovanni Campagna [Tue, 28 Aug 2012 00:55:52 +0000 (02:55 +0200)]
Ast: Add parent to Fields

Properties have it, there is no reason for Field not to, and in this
way mallard docs can treat a field almost like a property.

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

11 years agoNamespace: fix appending of nodes
Giovanni Campagna [Tue, 28 Aug 2012 00:46:23 +0000 (02:46 +0200)]
Namespace: fix appending of nodes

Traverse appended nodes for methods, so that namespace.symbols contains
all known symbols and not just global functions.
Also, ensure that all relevant nodes are appended when parsing GIRs.

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

11 years agoregress: Add a test case for skipping a function with an unannotated callback
Colin Walters [Sat, 27 Oct 2012 17:54:44 +0000 (13:54 -0400)]
regress: Add a test case for skipping a function with an unannotated callback

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

11 years agogimarshallingtests: Attempt to avoid using reserved words
Colin Walters [Sat, 27 Oct 2012 16:54:34 +0000 (12:54 -0400)]
gimarshallingtests: Attempt to avoid using reserved words

"int8" apparently blows up on AIX.  It was kind of lame how we would
just ad-hoc append a _.  Since we only have one value for a lot of
these, let's just go with the couldn't-be-any-simpler "v".

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

11 years agogmarshallingtests: Fix prototype () -> (void)
Colin Walters [Sat, 27 Oct 2012 16:53:52 +0000 (12:53 -0400)]
gmarshallingtests: Fix prototype () -> (void)

Dear Python programmers, () doesn't mean what you think it means in C.

11 years agogirepository: Use girepository.symbols for Unix builds too
Colin Walters [Sat, 27 Oct 2012 16:24:12 +0000 (12:24 -0400)]
girepository: Use girepository.symbols for Unix builds too

Rather than having a regex for both builds, but *also* use a symbol
file for the MSVC build which would bitrot quickly, force us to update
the .symbols file by using it for Unix too.

Add some missing symbols.

11 years agog-ir-scanner.1: English fix
Colin Walters [Sat, 27 Oct 2012 16:23:56 +0000 (12:23 -0400)]
g-ir-scanner.1: English fix

11 years agoAdd a Windows .bat to generate typelibs
Chun-wei Fan [Mon, 27 Aug 2012 10:32:42 +0000 (18:32 +0800)]
Add a Windows .bat to generate typelibs

This will enable one to generate the .gir and .typelib files for GLib,
GModule, GObject, GIO and G-I without using a bash-style shell on Windows.

This is also the .bat that is used during the Visual C++ build process to
generate the .gir and .typelib files

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

11 years agogiscanner/dumper.py: Support Visual C++
Chun-wei Fan [Mon, 27 Aug 2012 10:31:33 +0000 (18:31 +0800)]
giscanner/dumper.py: Support Visual C++

-Pass the --msvc-syntax flag to pkg-config when Visual C++ is used.
-Use .obj instead of .o filename extension when running on Visual C++, as
 that is the default object file name extension on visual C++.
-Specify compiler output flags for Visual C++.
-Avoid using -Wl and -rpath on Visual C++, and link to .lib files instead
 when generating a .gir file within the package.
-Avoid unecessary linking under Visual C++ to the .dll files since we
 already linked to the corresponding .lib files.

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

11 years agoUpdate autotools for Visual C++ projects creation
Chun-wei Fan [Tue, 14 Aug 2012 08:17:31 +0000 (16:17 +0800)]
Update autotools for Visual C++ projects creation

-Add Makefile-msvcproj.am to fill in the cmph, girepository and
 g-ir-compiler projects
-Add various Makefile.am's under build/ to distribute the
 Visual C++-related files.

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

11 years agoAdd Visual Studio 2008/2010 Solution files
Chun-wei Fan [Tue, 14 Aug 2012 08:07:22 +0000 (16:07 +0800)]
Add Visual Studio 2008/2010 Solution files

These are the master solution files that will load the Visual C++ projects
for building/generating gobject-introspection and its related tools and
files.

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

11 years agoAdd Visual Studio projects
Chun-wei Fan [Tue, 14 Aug 2012 08:05:44 +0000 (16:05 +0800)]
Add Visual Studio projects

These are the Visual C++ 2008/2010 project files that can be used to build
gobject-introspection.  The main girepository dll (along with cmph), tools
(in C), certain test/sample programs dlls are built with this project file
set.

Due to a bug in the Visual C++ 2008 linker, the g-ir-compiler and
g-ir-generator tools have the libgirepository-internals sources built
along side with the sources of these respective tool programs.

In order to ease future maintenance, the cmph, girepository,
g-ir-compiler and property sheets (for the "install" part) are done as
templates where header/source listings are filled in during "make dist",
so that the headers/sources listings are kept up to date between releases.

The GLib and girepository .gir and .typelib files are also generated and
"compiled" as part of the build process, using gengir.bat that
was committed earlier.

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

11 years agoAdd README.txt files for Visual C++ builds
Chun-wei Fan [Mon, 13 Aug 2012 08:14:29 +0000 (16:14 +0800)]
Add README.txt files for Visual C++ builds

Add instructions to tell people how to build gobject-introspection with
Visual C++, especially as there are special steps and additional
requirements for a successful build.

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

11 years agoAdd a test_gir_cmd.txt file
Chun-wei Fan [Tue, 14 Aug 2012 07:57:07 +0000 (15:57 +0800)]
Add a test_gir_cmd.txt file

This is to show how one may be able to generate the .gir files from the
various DLL files in tests\ in a standard Windows cmd.exe prompt, which
will also attempt to demonstrate how .gir files are generated without a
shell.

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

11 years agosourcescannermain.py: Add --filelist option
Chun-wei Fan [Fri, 10 Aug 2012 04:40:10 +0000 (12:40 +0800)]
sourcescannermain.py: Add --filelist option

Add a function to put the files to pass to g-ir-scanner in a filelist
file, with one source/header file on a single line.  This is done to
work around the limitation of Windows cmd.exe (and MSYS) where the command
line cannot exceed 8192 characters.

When this option is used, g-ir-scanner will only look for the header/source
files that are specified in the filelist file, which is not too hard to
generate.

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

11 years agogiscanner/sourcescanner.py: Update for Visual C++ usage
Chun-wei Fan [Tue, 14 Aug 2012 07:37:14 +0000 (15:37 +0800)]
giscanner/sourcescanner.py: Update for Visual C++ usage

Since the Visual C++ (cl.exe) preprocessor does not accept source input
from stdin (the '-' preprocessor flag, we need to use the GCC preprocessor
as a helper here.

Note that the generated dumper program is still compiled and run by
Visual C++.

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

11 years agoAdd .def files for building the various DLLs (.la's) in test\
Chun-wei Fan [Tue, 14 Aug 2012 07:33:38 +0000 (15:33 +0800)]
Add .def files for building the various DLLs (.la's) in test\

This will enable the exports of functions to create the .lib files needed
to create the .gir files.

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

11 years agoAdd girepository.symbols
Chun-wei Fan [Fri, 10 Aug 2012 02:47:56 +0000 (10:47 +0800)]
Add girepository.symbols

This is the listing of symbols to export from the main libgirepository
.dll/.so.  This is used for example to generate the .lib file from the
Windows DLL.

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

11 years agoAdd a pre-configured config.h.(win32.in)
Chun-wei Fan [Fri, 10 Aug 2012 04:56:44 +0000 (12:56 +0800)]
Add a pre-configured config.h.(win32.in)

This adds a pre-defined config.h for Windows builds, but versioning info
are updated by autotools.

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

11 years agogiscannermodule.c: Updates for Windows
Chun-wei Fan [Fri, 10 Aug 2012 04:22:16 +0000 (12:22 +0800)]
giscannermodule.c: Updates for Windows

-Incorporate and extend Dieter's patch regarding possible different CRTs
 used in Windows Python (msvcrt71.dll for Python 2.5, msvcrt90.dll for
 Python 2.6- 3.2, and msvcrt100.dll for Python 3.3+) vs. the CRT used to
 build g-i (msvcrt.dll for MinGW/WinDDK, msvcrt90.dll for stock MSVC 2008
 and msvcrt100.dll for stock MSVC 2010)
-Avoid C99ism for NEW_CLASS as we are having an array without a
 pre-determined length.  There might be better ways to get around this
 though.

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

11 years agogiscanner/dumper.py: Use os.name instead of os.uname()[0]
Chun-wei Fan [Fri, 10 Aug 2012 04:41:22 +0000 (12:41 +0800)]
giscanner/dumper.py: Use os.name instead of os.uname()[0]

os.uname is not available universally, so use something that exists
universally.

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

11 years agogirepository: Remove C99ism and other updates
Chun-wei Fan [Tue, 24 Jul 2012 08:09:38 +0000 (16:09 +0800)]
girepository: Remove C99ism and other updates

-Make code using libgirepository_internals relocatable on Windows,
 like what is done in the GTK+ stack, and the girepository DLL.
-Remove C99isms
-"interface" is a reserved keyword on certain compilers, so change that to
 "giinterface"

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

11 years agogiscanner/scannerparser.y: Avoid C99ism
Chun-wei Fan [Fri, 10 Aug 2012 04:26:29 +0000 (12:26 +0800)]
giscanner/scannerparser.y: Avoid C99ism

Move variable declarations to the start of block.

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

11 years agogirffi.c: Don't include unistd.h unconditionally
Chun-wei Fan [Tue, 24 Jul 2012 07:56:59 +0000 (15:56 +0800)]
girffi.c: Don't include unistd.h unconditionally

It does not exist on all platforms

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

11 years agocmph: Remove C99ism and other fixes
Chun-wei Fan [Fri, 10 Aug 2012 03:43:02 +0000 (11:43 +0800)]
cmph: Remove C99ism and other fixes

...So that it will compile on non-C99 compilers.  The changes are mainly
moving the variable declarations to the start of the resecptive blocks.

Also, replace the use of buflen in chd.c as it might not be defined for all
platforms, instead using packed_cr_size as it seems to represent the value
that is to be printed/displayed by the debugging output.

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

11 years agodocs: Show correct path used by g-ir-scanner
Pierre-Louis Bonicoli [Wed, 18 Jan 2012 16:18:58 +0000 (17:18 +0100)]
docs: Show correct path used by g-ir-scanner

Signed-off-by: Colin Walters <walters@verbum.org>
https://bugzilla.gnome.org/show_bug.cgi?id=668193

11 years agoscanner: Ignore #defines starting with _
Colin Walters [Fri, 13 Apr 2012 19:28:49 +0000 (15:28 -0400)]
scanner: Ignore #defines starting with _

This matches our behavior for symbols (and we should probably fix this
more globally...I think we still scan _-prefixed enums).

Noticed from gudev which had #define _GUDEV_INSIDE_H 1

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

11 years agoPython3-friendly python.m4
Joanmarie Diggs [Sun, 24 Jun 2012 18:09:23 +0000 (14:09 -0400)]
Python3-friendly python.m4

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

11 years agocommon: Ensure we use $(CC) from environment when compiling scanned binaries
Colin Walters [Fri, 26 Oct 2012 18:55:54 +0000 (14:55 -0400)]
common: Ensure we use $(CC) from environment when compiling scanned binaries

GNU make will default to "gcc" if "cc" isn't found; we need to
replicate that behavior here.

Patch-suggested-by: ojab <ojab@ojab.ru>
https://bugzilla.gnome.org/show_bug.cgi?id=678678

11 years agoUpdate annotations from glib git
Martin Pitt [Thu, 25 Oct 2012 13:17:10 +0000 (15:17 +0200)]
Update annotations from glib git

11 years agoUpdate annotations from glib git
Martin Pitt [Thu, 25 Oct 2012 05:59:31 +0000 (07:59 +0200)]
Update annotations from glib git

11 years agogiscanner: Don't prefer identifier prefixes over namespaces in deps
Stef Walter [Tue, 23 Oct 2012 19:38:48 +0000 (21:38 +0200)]
giscanner: Don't prefer identifier prefixes over namespaces in deps

Use namespaces in dependencies before falling back to the deprecated
--identifier-prefix prefixes.

11 years agoscanner: Deprecate using identifier prefixes in GINames
Colin Walters [Sat, 20 Oct 2012 19:10:45 +0000 (21:10 +0200)]
scanner: Deprecate using identifier prefixes in GINames

Instead of crashing.  For more details, see the attached bug.

Based on a patch by Stef Walter <stefw@gnome.org>.

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

11 years agoUpdate annotations from glib git
Rico Tzschichholz [Wed, 17 Oct 2012 05:58:03 +0000 (07:58 +0200)]
Update annotations from glib git

11 years agoDrop calls to g_type_init()
Colin Walters [Tue, 16 Oct 2012 14:58:08 +0000 (10:58 -0400)]
Drop calls to g_type_init()

And bump our GLib requirement.

11 years ago[gobject-introspection] Add test method for GDestroy with no user data
Simon Feltman [Wed, 10 Oct 2012 23:20:50 +0000 (16:20 -0700)]
[gobject-introspection] Add test method for GDestroy with no user data

Added regress_test_callback_destroy_notify_no_user_data.
Updated Regress-1.0-expected.gir

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

11 years agogimarshallingtests: Add array/GList uint32/64 in/out API
Martin Pitt [Thu, 11 Oct 2012 14:05:37 +0000 (16:05 +0200)]
gimarshallingtests: Add array/GList uint32/64 in/out API

Add in/out API for testing arrays containing uint64, as well as GList
containing uint32 (GList and GHash can't contain 64 bit values as they store
them in pointers).

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

11 years agoMake gtk-doc not a hard dependency of gobject-introspection
Javier Jardón [Tue, 25 Sep 2012 16:17:07 +0000 (01:17 +0900)]
Make gtk-doc not a hard dependency of gobject-introspection

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

11 years agoRelease 1.34.0 GOBJECT_INTROSPECTION_1_34_0 upstream/1.34.0
Colin Walters [Mon, 24 Sep 2012 17:56:03 +0000 (13:56 -0400)]
Release 1.34.0

11 years agoUpdate annotations to glib 2.34.0
Rico Tzschichholz [Mon, 24 Sep 2012 07:24:36 +0000 (09:24 +0200)]
Update annotations to glib 2.34.0

11 years agoconfigure: Post-release version bump
Colin Walters [Tue, 18 Sep 2012 20:35:26 +0000 (16:35 -0400)]
configure: Post-release version bump

11 years agoRelease 1.33.14 GOBJECT_INTROSPECTION_1_33_14
Colin Walters [Tue, 18 Sep 2012 20:32:19 +0000 (16:32 -0400)]
Release 1.33.14

11 years agoUpdate annotations from glib git
Rico Tzschichholz [Mon, 17 Sep 2012 15:20:42 +0000 (17:20 +0200)]
Update annotations from glib git

11 years agoregress: Add API to test signals with (u)int64 params
Nicolas Dufresne [Tue, 11 Sep 2012 20:07:11 +0000 (16:07 -0400)]
regress: Add API to test signals with (u)int64 params

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

Co-Authored-By: Martin Pitt <martinpitt@gnome.org>
11 years agoUpdate annotations from glib git
Martin Pitt [Tue, 11 Sep 2012 12:51:07 +0000 (14:51 +0200)]
Update annotations from glib git

11 years agogimarshallingtests: Add in/out int64 GValue method arguments
Martin Pitt [Mon, 10 Sep 2012 14:19:41 +0000 (16:19 +0200)]
gimarshallingtests: Add in/out int64 GValue method arguments

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