gnome.gobject-introspection
15 years agoBug 557241 – "throws" flag for functions
Johan Bilien [Tue, 21 Oct 2008 17:04:11 +0000 (17:04 +0000)]
Bug 557241 – "throws" flag for functions

2008-10-21  Johan Bilien  <jobi@via.ecp.fr>

Bug 557241 – "throws" flag for functions

* tests/scanner/drawable-1.0-expected.gir,
tests/scanner/drawable-injected-1.0-expected.gir,
tests/scanner/drawable.[ch]: add simple test for throwing
function (has GError ** as last argument)

* giscanner/ast.py: add a 'throws' flag to Function
* giscanner/glibtransformer.py: if a function's last paramerter is
a GError, set the 'throws' flag and remove that parameter
* giscanner/girwriter.py: write out the 'throws' attribute
* giscanner/girparser.py: support parsing the 'throws' attribute

* tests/repository/gitestthrows.c: add a simple test to check the
throws flag in a typelib and invoke the function

* girepository/ginfo.c, girepository/girnode.[ch],
girepository/girnode.h, girepository/girparser.c,
girepository/girepository.h: Add and parse the GI_FUNCTION_THROWS flag

* girepository/ginvoke.c: if a function throws, add a GError as last
arguments, and propagate the error to the invoker.

svn path=/trunk/; revision=773

15 years agoChangeLog
Tommi Komulainen [Tue, 21 Oct 2008 16:58:23 +0000 (16:58 +0000)]
ChangeLog

svn path=/trunk/; revision=772

15 years agoWarn if we see annotations for unknown parameters
Tommi Komulainen [Tue, 21 Oct 2008 16:58:20 +0000 (16:58 +0000)]
Warn if we see annotations for unknown parameters

* giscanner/transformer.py (_create_parameters): Warn if we see
annotations for unknown parameters. If .h and .c files name
parameters differently, the annotations may be lost.

svn path=/trunk/; revision=771

15 years agoRemove leftover raise SystemExit.
Johan Dahlin [Tue, 21 Oct 2008 15:40:23 +0000 (15:40 +0000)]
Remove leftover raise SystemExit.

svn path=/trunk/; revision=769

15 years agoRename GLib-assertions.txt to GLib-2.0.xpath and include it in EXTRA_DIST
Johan Dahlin [Tue, 21 Oct 2008 15:21:41 +0000 (15:21 +0000)]
Rename GLib-assertions.txt to GLib-2.0.xpath and include it in EXTRA_DIST

svn path=/trunk/; revision=768

15 years agoBug 556358 - don't use libtool internals
Johan Dahlin [Tue, 21 Oct 2008 14:51:33 +0000 (14:51 +0000)]
Bug 556358 - don't use libtool internals

2008-10-21  Johan Dahlin  <johan@gnome.org>

        Bug 556358 - don't use libtool internals

        * giscanner/Makefile.am:
        * giscanner/libtoolimporter.py:
        * giscanner/sourcescanner.py:
        * giscanner/utils.py:
        Add a python meta importer and remove a libtool symlink hack.

svn path=/trunk/; revision=767

15 years agoBug 557147 - fix build; patch from Andreas Rottmann
Colin Walters [Mon, 20 Oct 2008 21:03:13 +0000 (21:03 +0000)]
Bug 557147 - fix build; patch from Andreas Rottmann

svn path=/trunk/; revision=766

15 years agoChangeLog
Colin Walters [Mon, 20 Oct 2008 20:54:32 +0000 (20:54 +0000)]
ChangeLog

svn path=/trunk/; revision=765

15 years agoTests for bug 556777
Colin Walters [Mon, 20 Oct 2008 20:54:30 +0000 (20:54 +0000)]
Tests for bug 556777

svn path=/trunk/; revision=764

15 years agoBug 556777 - validate properties
Colin Walters [Mon, 20 Oct 2008 20:54:28 +0000 (20:54 +0000)]
Bug 556777 - validate properties

svn path=/trunk/; revision=763

15 years agoAdd allow_invalid argument to resolver so we can find bad types
Colin Walters [Mon, 20 Oct 2008 20:54:27 +0000 (20:54 +0000)]
Add allow_invalid argument to resolver so we can find bad types

svn path=/trunk/; revision=762

15 years agoFix __repr__ for Property
Colin Walters [Mon, 20 Oct 2008 20:54:24 +0000 (20:54 +0000)]
Fix __repr__ for Property

svn path=/trunk/; revision=761

15 years agoWe are handling those return types, silly
Colin Walters [Mon, 20 Oct 2008 19:42:12 +0000 (19:42 +0000)]
We are handling those return types, silly

svn path=/trunk/; revision=760

15 years agoTweak changelog
Colin Walters [Mon, 20 Oct 2008 19:09:20 +0000 (19:09 +0000)]
Tweak changelog

svn path=/trunk/; revision=759

15 years agoAlso register g variants of default_array_types.
Colin Walters [Mon, 20 Oct 2008 19:09:17 +0000 (19:09 +0000)]
Also register g variants of default_array_types.

svn path=/trunk/; revision=758

15 years agoBug 557011 - Add g_object_info_get_abstract
Colin Walters [Mon, 20 Oct 2008 17:04:17 +0000 (17:04 +0000)]
Bug 557011 - Add g_object_info_get_abstract

svn path=/trunk/; revision=757

15 years agoChangeLog
Tommi Komulainen [Mon, 20 Oct 2008 13:45:24 +0000 (13:45 +0000)]
ChangeLog

svn path=/trunk/; revision=756

15 years agogiscanner: don't lose 'transfer-ownership' attributes when injecting
Tommi Komulainen [Mon, 20 Oct 2008 13:44:15 +0000 (13:44 +0000)]
giscanner: don't lose 'transfer-ownership' attributes when injecting

* giscanner/girparser.py (_parse_function): don't lose
'transfer-ownership' attributes when injecting, check for the
correct attribute

svn path=/trunk/; revision=755

15 years agoParse and ignore __asm.
Johan Dahlin [Sun, 19 Oct 2008 14:04:10 +0000 (14:04 +0000)]
Parse and ignore __asm.

2008-10-19  Johan Dahlin  <johan@gnome.org>

* giscanner/scannerlexer.l: Parse and ignore __asm.

svn path=/trunk/; revision=754

15 years agoChangeLog
Colin Walters [Sun, 19 Oct 2008 05:54:28 +0000 (05:54 +0000)]
ChangeLog

svn path=/trunk/; revision=753

15 years agoParse array length= to ensure it doesn't get lost from --inject
Colin Walters [Sun, 19 Oct 2008 05:54:24 +0000 (05:54 +0000)]
Parse array length= to ensure it doesn't get lost from --inject

svn path=/trunk/; revision=752

15 years agoChangeLog
Colin Walters [Sat, 18 Oct 2008 01:07:21 +0000 (01:07 +0000)]
ChangeLog

svn path=/trunk/; revision=751

15 years agoBug 556795 - Fix char ** regression
Colin Walters [Sat, 18 Oct 2008 01:07:16 +0000 (01:07 +0000)]
Bug 556795 - Fix char ** regression

svn path=/trunk/; revision=750

15 years agoChangeLog
Colin Walters [Sat, 18 Oct 2008 00:44:27 +0000 (00:44 +0000)]
ChangeLog

svn path=/trunk/; revision=749

15 years agoFix header ifdef
Colin Walters [Sat, 18 Oct 2008 00:44:23 +0000 (00:44 +0000)]
Fix header ifdef

svn path=/trunk/; revision=748

15 years agoAdd GtkFrob test that mirrors GtkSource
Colin Walters [Sat, 18 Oct 2008 00:44:19 +0000 (00:44 +0000)]
Add GtkFrob test that mirrors GtkSource

svn path=/trunk/; revision=747

15 years agoBug 556783 - namespace/prefix rework
Colin Walters [Sat, 18 Oct 2008 00:44:14 +0000 (00:44 +0000)]
Bug 556783 - namespace/prefix rework

svn path=/trunk/; revision=746

15 years agoBug 556732 – generate gir files consistently
Tommi Komulainen [Fri, 17 Oct 2008 14:59:23 +0000 (14:59 +0000)]
Bug 556732 – generate gir files consistently

2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556732 – generate gir files consistently

* girepository/girparser.c (start_parameter):
* tests/boxed.gir:
* tests/invoke/testfns-1.0.gir:
* tools/generate.c (write_callable_info): write
'transfer-ownership' attribute consistently with both
return-value and parameter elements

svn path=/trunk/; revision=745

15 years agoBug 556732 – generate gir files consistently
Tommi Komulainen [Fri, 17 Oct 2008 14:59:07 +0000 (14:59 +0000)]
Bug 556732 – generate gir files consistently

2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556732 – generate gir files consistently

* tools/generate.c (write_callable_info): write 'direction'
attribute only if other than 'in' to be consistent with
girwriter.py
* tests/boxed.gir:
* tests/object.gir: remove direction="in" which is the default

svn path=/trunk/; revision=744

15 years agoBug 556732 – generate gir files consistently
Tommi Komulainen [Fri, 17 Oct 2008 14:58:37 +0000 (14:58 +0000)]
Bug 556732 – generate gir files consistently

2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556732 – generate gir files consistently

* giscanner/ast.py (Field): add readable and writable properties
* giscanner/girparser.py (_parse_field): copy 'readable' and
'writable' attributes
* giscanner/transformer.py (_create_member): create fields as
read-write
* giscanner/glibtransformer.py (_introspect_object,
_pair_class_struct): make object instance and class fields
read-only
* giscanner/girwriter.py (_write_field):
* tools/generate.c (write_field_info): write field 'readable'
and 'writable' attributes only if non-default (read-only)
* girepository/girparser.c (start_field): in the absence of
attributes assume fields are read-only
* tests/boxed.gir:
* tests/struct.gir: remove redundant readable="1" from fields
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir: add writable="1" to
all record and union fields

svn path=/trunk/; revision=743

15 years agoBug 556732 – generate gir files consistently
Tommi Komulainen [Fri, 17 Oct 2008 14:57:38 +0000 (14:57 +0000)]
Bug 556732 – generate gir files consistently

2008-10-17  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556732 – generate gir files consistently

* giscanner/girwriter.py (_write_property): write properties
'construct' attribute if set
* tools/generate.c (write_property_info): write properties
'readable' and 'writable' attributes only if non-default
* tests/object.gir: add writable="0"
* tests/scanner/foo-1.0-expected.gir: add construct="1"

svn path=/trunk/; revision=742

15 years agoadded annotations
Johan Bilien [Fri, 17 Oct 2008 12:48:47 +0000 (12:48 +0000)]
added annotations

2008-10-17  Johan Bilien  <jobi@via.ecp.fr>

* gir/glib-2.0.c: added annotations

svn path=/trunk/; revision=741

15 years agoAlso assume direction=out for size_t*, ssize_t* arguments
Johan Bilien [Fri, 17 Oct 2008 11:01:14 +0000 (11:01 +0000)]
Also assume direction=out for size_t*, ssize_t* arguments

2008-10-16  Johan Bilien  <jobi@via.ecp.fr>

* giscanner/ast.py: Also assume direction=out for size_t*, ssize_t*
arguments

svn path=/trunk/; revision=740

15 years agoForgot these files
Johan Bilien [Fri, 17 Oct 2008 10:08:46 +0000 (10:08 +0000)]
Forgot these files

svn path=/trunk/; revision=739

15 years agoBug 556610 – giscanner/girparser.py drops parameter options
Johan Bilien [Fri, 17 Oct 2008 09:29:34 +0000 (09:29 +0000)]
Bug 556610 – giscanner/girparser.py drops parameter options

2008-10-16  Johan Bilien  <jobi@via.ecp.fr>

Bug 556610 – giscanner/girparser.py drops parameter options

* tests/scanner/drawable-injected-1.0-expected.gir,
tests/scanner/DrawableAdditions.xml: added simple test for injection.
* giscanner/ast.py: allow Parameter to take options in the constructor
* giscanner/girparser.py: parse parameter options (transfer,
direction, allow-none)

svn path=/trunk/; revision=738

15 years agoBug 556185 - [test for] segfault on g_callable_info_get_return_type
Colin Walters [Thu, 16 Oct 2008 22:19:21 +0000 (22:19 +0000)]
Bug 556185 - [test for] segfault on g_callable_info_get_return_type

svn path=/trunk/; revision=737

15 years agoChangeLog
Colin Walters [Thu, 16 Oct 2008 20:49:32 +0000 (20:49 +0000)]
ChangeLog

svn path=/trunk/; revision=736

15 years agoBug 556579 - Don't try to resolve names for structs/unions
Colin Walters [Thu, 16 Oct 2008 20:49:30 +0000 (20:49 +0000)]
Bug 556579 - Don't try to resolve names for structs/unions

svn path=/trunk/; revision=735

15 years agoBug 556432 - transfer annotations and defaults
Colin Walters [Thu, 16 Oct 2008 19:34:44 +0000 (19:34 +0000)]
Bug 556432 - transfer annotations and defaults

svn path=/trunk/; revision=734

15 years agoRemove unused var
Colin Walters [Thu, 16 Oct 2008 19:34:42 +0000 (19:34 +0000)]
Remove unused var

svn path=/trunk/; revision=733

15 years agoDefault GObject transfer to full
Colin Walters [Thu, 16 Oct 2008 19:34:39 +0000 (19:34 +0000)]
Default GObject transfer to full

svn path=/trunk/; revision=732

15 years agoenable bunch of gcc warning CFLAGS
Tommi Komulainen [Thu, 16 Oct 2008 17:37:46 +0000 (17:37 +0000)]
enable bunch of gcc warning CFLAGS

2008-10-16  Tommi Komulainen  <tommi.komulainen@iki.fi>

* configure.ac: enable bunch of gcc warning CFLAGS

svn path=/trunk/; revision=731

15 years agoBug 556543 – reduce compiler warnings
Tommi Komulainen [Thu, 16 Oct 2008 17:07:05 +0000 (17:07 +0000)]
Bug 556543 – reduce compiler warnings

2008-10-16  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556543 – reduce compiler warnings

* girepository/ginfo.c:
* girepository/girepository.c (register_internal,
count_interfaces, find_interface, find_namespace_version,
parse_version, g_irepository_require):
* girepository/girmodule.c (g_ir_module_build_typelib):
* girepository/girnode.c (init_stats, dump_stats,
_g_irnode_init_stats, _g_irnode_dump_stats,
g_ir_node_can_have_member):
* girepository/girparser.c (firstpass_end_element_handler,
locate_gir, parse_basic, parse_type_internal, resolve_aliases,
start_alias, start_type, end_type_top, parse_include, cleanup,
post_filter):
* girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
* giscanner/giscannermodule.c (directive_get_options,
type_get_child_list):
* giscanner/scannerlexer.l (parse_gtkdoc):
* giscanner/scannerparser.y (ctype_free):
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
* tests/types/gitesttypes.c:
* tools/compiler.c (main):
* tools/generate.c (write_repository): Remove unused variables
and code, add missing includes, declarations and case
statements.

svn path=/trunk/; revision=730

15 years agoBug 556541 – access union members through UnionBlob rather than
Tommi Komulainen [Thu, 16 Oct 2008 17:07:00 +0000 (17:07 +0000)]
Bug 556541 – access union members through UnionBlob rather than

2008-10-16  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556541 – access union members through UnionBlob rather than
StructBlob

* girepository/ginfo.c (g_union_info_find_method): access union
members through UnionBlob rather than StructBlob

svn path=/trunk/; revision=729

15 years agoInclude gir dir when running g-ir-generate so we work uninstalled
Colin Walters [Thu, 16 Oct 2008 17:00:21 +0000 (17:00 +0000)]
Include gir dir when running g-ir-generate so we work uninstalled

svn path=/trunk/; revision=728

15 years agoDon't use --typelib-xml, use g-ir-generate
Colin Walters [Thu, 16 Oct 2008 15:00:21 +0000 (15:00 +0000)]
Don't use --typelib-xml, use g-ir-generate

svn path=/trunk/; revision=727

15 years agoFix up g-ir-generate for new include= syntax
Colin Walters [Thu, 16 Oct 2008 13:16:30 +0000 (13:16 +0000)]
Fix up g-ir-generate for new include= syntax

svn path=/trunk/; revision=726

15 years agoChangeLog
Colin Walters [Thu, 16 Oct 2008 01:40:35 +0000 (01:40 +0000)]
ChangeLog

svn path=/trunk/; revision=725

15 years agoMerge branch 'bug556331-includecleanup'
Colin Walters [Thu, 16 Oct 2008 01:40:29 +0000 (01:40 +0000)]
Merge branch 'bug556331-includecleanup'

svn path=/trunk/; revision=724

15 years agoDisable check-local for now
Johan Dahlin [Wed, 15 Oct 2008 23:01:57 +0000 (23:01 +0000)]
Disable check-local for now

svn path=/trunk/; revision=723

15 years agoBug 556434 – unhandled interface/object/... member types
Tommi Komulainen [Wed, 15 Oct 2008 22:28:53 +0000 (22:28 +0000)]
Bug 556434 – unhandled interface/object/... member types

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556434 – unhandled interface/object/... member types

* girepository/girnode.c (g_ir_node_check_unhandled_members,
g_ir_node_build_typelib): Check all
interface/object/boxed/struct/union members are processed and
abort if they are not. (Mostly callbacks in structs, but also
fields in interfaces.)

svn path=/trunk/; revision=722

15 years agorefactor common code for processing members to a function
Tommi Komulainen [Wed, 15 Oct 2008 22:28:41 +0000 (22:28 +0000)]
refactor common code for processing members to a function

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* a/girepository/girnode.c (g_ir_node_build_members,
g_ir_node_build_typelib): refactor common code for processing
members to a function

svn path=/trunk/; revision=721

15 years agocheck that typelib -> gir -> typelib transformation is lossless (it's not)
Tommi Komulainen [Wed, 15 Oct 2008 22:18:37 +0000 (22:18 +0000)]
check that typelib -> gir -> typelib transformation is lossless (it's not)

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* gir/Makefile.am (check-local): check that typelib -> gir -> typelib
transformation is lossless (it's not)

svn path=/trunk/; revision=720

15 years agofix tests to compare xml to xml instead of typelib to xml, and stop on
Tommi Komulainen [Wed, 15 Oct 2008 22:08:53 +0000 (22:08 +0000)]
fix tests to compare xml to xml instead of typelib to xml, and stop on

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tests/Makefile.am: fix tests to compare xml to xml instead of
typelib to xml, and stop on error

svn path=/trunk/; revision=719

15 years agoreduce code duplication
Tommi Komulainen [Wed, 15 Oct 2008 22:08:40 +0000 (22:08 +0000)]
reduce code duplication

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (write_type_name, write_type_info,
write_type_info, write_object_info, write_object_info,
write_interface_info, write_error_domain_info): reduce code
duplication

svn path=/trunk/; revision=718

15 years agoBug 556174 – parse types for lists etc.
Tommi Komulainen [Wed, 15 Oct 2008 22:08:26 +0000 (22:08 +0000)]
Bug 556174 – parse types for lists etc.

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556174 – parse types for lists etc.

* girepository/girparser.c (end_type_recurse):
* tests/boxed.gir:
* tools/generate.c (write_type_info, write_field_info,
write_callable_info, write_callable_info, write_constant_info,
write_property_info): use nested <type>s for lists and hashes

svn path=/trunk/; revision=717

15 years agoremove trailing whitespace from inside elements to match g-ir-generate
Tommi Komulainen [Wed, 15 Oct 2008 22:08:11 +0000 (22:08 +0000)]
remove trailing whitespace from inside elements to match g-ir-generate

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tests/enum.gir:
* tests/object.gir: remove trailing whitespace from inside
elements to match g-ir-generate output

svn path=/trunk/; revision=716

15 years agoquote printf arguments so that we don't generate invalid XML by writing
Tommi Komulainen [Wed, 15 Oct 2008 22:07:57 +0000 (22:07 +0000)]
quote printf arguments so that we don't generate invalid XML by writing

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (xml_printf): quote printf arguments so that
we don't generate invalid XML by writing unescaped double quotes
and such in attributes

svn path=/trunk/; revision=715

15 years agoremove unused indent parameters, xmlwriter keeps track of necessary
Tommi Komulainen [Wed, 15 Oct 2008 22:07:33 +0000 (22:07 +0000)]
remove unused indent parameters, xmlwriter keeps track of necessary

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (write_field_info, write_callable_info,
write_function_info, write_callback_info, write_struct_info,
write_constant_value, write_signal_info, write_vfunc_info,
write_object_info, write_interface_info, write_union_info,
write_repository): remove unused indent parameters, xmlwriter
keeps track of necessary indentation

svn path=/trunk/; revision=714

15 years agoKeep track of generated XML tree and handle indentation and closing tags
Tommi Komulainen [Wed, 15 Oct 2008 22:06:52 +0000 (22:06 +0000)]
Keep track of generated XML tree and handle indentation and closing tags

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (xml_element_new, xml_element_free,
xml_start_element, xml_end_element, xml_end_element_unchecked,
xml_open, xml_close): Keep track of generated XML tree and
handle indentation and closing tags properly.
(write_field_info, write_callable_info, write_function_info,
write_callback_info, write_struct_info, write_value_info,
write_constant_info, write_enum_info, write_signal_info,
write_vfunc_info, write_property_info, write_object_info,
write_interface_info, write_error_domain_info, write_union_info,
write_repository): Use xml_start_element and xml_end_element to
open/close tags.

svn path=/trunk/; revision=713

15 years agowrap all FILE access to go through simple xmlwriter
Tommi Komulainen [Wed, 15 Oct 2008 22:06:37 +0000 (22:06 +0000)]
wrap all FILE access to go through simple xmlwriter

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (xml_printf, xml_open, xml_close, xml_free):
(write_type_name, write_type_info, write_field_info,
write_callable_info, write_function_info, write_callback_info,
write_struct_info, write_value_info, write_constant_value,
write_constant_info, write_enum_info, write_signal_info,
write_vfunc_info, write_property_info, write_object_info,
write_interface_info, write_error_domain_info, write_union_info,
write_repository): wrap all FILE access to go through simple xmlwriter

svn path=/trunk/; revision=712

15 years agoBug 556400 – Fails to build on OS X 10.4
Tommi Komulainen [Wed, 15 Oct 2008 20:44:29 +0000 (20:44 +0000)]
Bug 556400 – Fails to build on OS X 10.4

2008-10-15  Tommi Komulainen  <tommi.komulainen@iki.fi>

Bug 556400 – Fails to build on OS X 10.4

* configure.ac: check for functions backtrace and backtrace_symbols
* girepository/girparser.c (backtrace_stderr): Comment out
implementation if the functions are not available.
* gcov.mak (clean-gcov, clean-gcno): always call 'find' with a
directory for better portability

svn path=/trunk/; revision=711

15 years agoBug 556433 – assume direction = out for int * parameters
Johan Bilien [Wed, 15 Oct 2008 17:47:08 +0000 (17:47 +0000)]
Bug 556433 – assume direction = out for int * parameters

2008-10-15  Johan Bilien  <jobi@via.ecp.fr>

Bug 556433 – assume direction = out for int * parameters

* giscanner/ast.py: define a list of types for which, if passed as
reference, we assume a default direction of 'out'
* giscanner/transformer.py: if a type has type pointer to one of the
previously defined types, and no direction is set, assume out.
* tests/scanner/drawable.[ch]: added tests for guessed direction=out

svn path=/trunk/; revision=710

15 years agoOne last typo in tests/scanner/annotation.c
Johan Bilien [Wed, 15 Oct 2008 16:19:05 +0000 (16:19 +0000)]
One last typo in tests/scanner/annotation.c

svn path=/trunk/; revision=709

15 years agofixed a few copy-paste errors
Johan Bilien [Wed, 15 Oct 2008 15:45:23 +0000 (15:45 +0000)]
fixed a few copy-paste errors

2008-10-15  Johan Bilien  <jobi@via.ecp.fr>

* tests/scanner/annotation.c: fixed a few copy-paste errors

svn path=/trunk/; revision=708

15 years agoBug 556323 – transfer-ownership is wrong for functions returning const
Johan Bilien [Tue, 14 Oct 2008 22:51:28 +0000 (22:51 +0000)]
Bug 556323 – transfer-ownership is wrong for functions returning const

2008-10-14  Johan Bilien  <jobi@via.ecp.fr>

Bug 556323 – transfer-ownership is wrong for functions returning const
char *

* giscanner/transformer.py: check for a const string as return value,
not just const char*. Suggested by Colin Walters
* tests/scanner/annotation-1.0-expected.gir: updated expected output

svn path=/trunk/; revision=707

15 years agoadd g_union_info_find_method
Johan Bilien [Tue, 14 Oct 2008 22:25:13 +0000 (22:25 +0000)]
add g_union_info_find_method

2008-10-14  Johan Bilien  <jobi@via.ecp.fr>

* girepository/ginfo.c, girepository/girepository.h: add
g_union_info_find_method

svn path=/trunk/; revision=706

15 years agoPrepend search path for $(top_builddir)/gir dir
Colin Walters [Tue, 14 Oct 2008 18:22:19 +0000 (18:22 +0000)]
Prepend search path for $(top_builddir)/gir dir

svn path=/trunk/; revision=705

15 years agoRepository tests requires installed Gio - punt on this for now
Colin Walters [Tue, 14 Oct 2008 18:22:16 +0000 (18:22 +0000)]
Repository tests requires installed Gio - punt on this for now

svn path=/trunk/; revision=704

15 years agoSupport fields in GObject structs
Jürg Billeter [Mon, 13 Oct 2008 20:58:14 +0000 (20:58 +0000)]
Support fields in GObject structs

2008-10-13  Jürg Billeter  <j@bitron.ch>

* giscanner/glibtransformer.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/drawable-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir:

Support fields in GObject structs

svn path=/trunk/; revision=703

15 years agoadd signed integer and off_t to type_names
Jürg Billeter [Mon, 13 Oct 2008 20:50:28 +0000 (20:50 +0000)]
add signed integer and off_t to type_names

2008-10-13  Jürg Billeter  <j@bitron.ch>

* giscanner/ast.py: add signed integer and off_t to type_names

svn path=/trunk/; revision=702

15 years agoDocument g_irepository_get_dependencies
Colin Walters [Mon, 13 Oct 2008 16:59:09 +0000 (16:59 +0000)]
Document g_irepository_get_dependencies

svn path=/trunk/; revision=701

15 years agoParse bits attribute of fields
Jürg Billeter [Sun, 12 Oct 2008 22:44:27 +0000 (22:44 +0000)]
Parse bits attribute of fields

2008-10-12  Jürg Billeter  <j@bitron.ch>

* giscanner/girparser.py: Parse bits attribute of fields

svn path=/trunk/; revision=700

15 years agorun 'gitestrepo' in 'make check' instantiate 'GCancellable' to ensure the
Tommi Komulainen [Sun, 12 Oct 2008 21:57:32 +0000 (21:57 +0000)]
run 'gitestrepo' in 'make check' instantiate 'GCancellable' to ensure the

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tests/repository/Makefile.am: run 'gitestrepo' in 'make check'
* tests/repository/gitestrepo.c (main): instantiate
'GCancellable' to ensure the GType is registered before using
g_type_from_name()

svn path=/trunk/; revision=699

15 years agoactually add the parsed constant nodes
Johan Bilien [Sun, 12 Oct 2008 21:38:21 +0000 (21:38 +0000)]
actually add the parsed constant nodes

2008-10-12  Johan Bilien  <jobi@via.ecp.fr>

* giscanner/girparser.py: actually add the parsed constant nodes

svn path=/trunk/; revision=698

15 years agoChangeLog
Colin Walters [Sun, 12 Oct 2008 21:22:47 +0000 (21:22 +0000)]
ChangeLog

svn path=/trunk/; revision=697

15 years agoDon't cast DirEntry to Blob, actually look it up by offset
Colin Walters [Sun, 12 Oct 2008 21:22:44 +0000 (21:22 +0000)]
Don't cast DirEntry to Blob, actually look it up by offset

svn path=/trunk/; revision=696

15 years agoparse constant nodes in gir files
Johan Bilien [Sun, 12 Oct 2008 21:12:46 +0000 (21:12 +0000)]
parse constant nodes in gir files

2008-10-12  Johan Bilien  <jobi@via.ecp.fr>

* giscanner/girparser.py: parse constant nodes in gir files

svn path=/trunk/; revision=695

15 years agoprefix for constants have an underscore, so remove them as if they were
Johan Bilien [Sun, 12 Oct 2008 21:11:18 +0000 (21:11 +0000)]
prefix for constants have an underscore, so remove them as if they were

2008-10-12  Johan Bilien  <jobi@via.ecp.fr>

* giscanner/transformer.py: prefix for constants have an underscore,
so remove them as if they were functions, not objects.

svn path=/trunk/; revision=694

15 years agoadd constants to expected gir file
Johan Bilien [Sun, 12 Oct 2008 21:09:36 +0000 (21:09 +0000)]
add constants to expected gir file

2008-10-12  Johan Bilien  <jobi@via.ecp.fr>

* tests/scanner/foo-1.0-expected.gir: add constants to expected gir
file

svn path=/trunk/; revision=693

15 years agouse "transfer-ownership" attribute for return values
Tommi Komulainen [Sun, 12 Oct 2008 21:07:44 +0000 (21:07 +0000)]
use "transfer-ownership" attribute for return values

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (write_callable_info): use "transfer-ownership"
attribute for return values

svn path=/trunk/; revision=692

15 years agomove "transfer" and "null-ok" attributes from <function> to <return-value>
Tommi Komulainen [Sun, 12 Oct 2008 21:07:39 +0000 (21:07 +0000)]
move "transfer" and "null-ok" attributes from <function> to <return-value>

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (write_callable_info): move "transfer" and
"null-ok" attributes from <function> to <return-value> element

svn path=/trunk/; revision=691

15 years agohandle "transfer-ownership" attribute
Tommi Komulainen [Sun, 12 Oct 2008 21:07:33 +0000 (21:07 +0000)]
handle "transfer-ownership" attribute

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* girepository/girparser.c (start_return_value): handle
"transfer-ownership" attribute

svn path=/trunk/; revision=690

15 years agouse "container" for container/shallow ownership transfer (not "shallow")
Tommi Komulainen [Sun, 12 Oct 2008 21:07:28 +0000 (21:07 +0000)]
use "container" for container/shallow ownership transfer (not "shallow")

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* girepository/girparser.c (parse_param_transfer):
* tools/generate.c (write_callable_info): use "container" for
container/shallow ownership transfer (not "shallow")

svn path=/trunk/; revision=689

15 years agoRefactor handling of transfer=none/shallow/full to separate function
Tommi Komulainen [Sun, 12 Oct 2008 21:07:22 +0000 (21:07 +0000)]
Refactor handling of transfer=none/shallow/full to separate function

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* girepository/girparser.c (parse_param_transfer,
start_parameter): Refactor handling of transfer=none/shallow/full
to separate function

svn path=/trunk/; revision=688

15 years agoFix inverted test for success in version parsing.
Colin Walters [Sun, 12 Oct 2008 21:03:41 +0000 (21:03 +0000)]
Fix inverted test for success in version parsing.

svn path=/trunk/; revision=687

15 years agoBug 556048 – Crash in g_irepository_find_by_gtype
Tommi Komulainen [Sun, 12 Oct 2008 20:53:26 +0000 (20:53 +0000)]
Bug 556048 – Crash in g_irepository_find_by_gtype

* girepository/gtypelib.h (BLOB_IS_REGISTERED_TYPE): added
* girepository/girepository.c (find_interface): Fix
find_by_gtype case to get the type name from right offset

svn path=/trunk/; revision=686

15 years agoFix parsing transfer-ownership attribute of <return-value>
Jürg Billeter [Sun, 12 Oct 2008 19:57:14 +0000 (19:57 +0000)]
Fix parsing transfer-ownership attribute of <return-value>

2008-10-12  Jürg Billeter  <j@bitron.ch>

* giscanner/girparser.py: Fix parsing transfer-ownership attribute
of <return-value>

svn path=/trunk/; revision=685

15 years agomake 'unregistered' one bit wide as everywhere else
Tommi Komulainen [Sun, 12 Oct 2008 19:30:22 +0000 (19:30 +0000)]
make 'unregistered' one bit wide as everywhere else

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* girepository/gtypelib.h (RegisteredTypeBlob): make
'unregistered' one bit wide as everywhere else

svn path=/trunk/; revision=684

15 years agoAdd tests/repository which has some repository regression tests
Colin Walters [Sun, 12 Oct 2008 16:36:29 +0000 (16:36 +0000)]
Add tests/repository which has some repository regression tests

svn path=/trunk/; revision=683

15 years agoReadd class records as workaround to not break Gtk typelib
Jürg Billeter [Sun, 12 Oct 2008 15:39:58 +0000 (15:39 +0000)]
Readd class records as workaround to not break Gtk typelib

2008-10-12  Jürg Billeter  <j@bitron.ch>

* giscanner/glibtransformer.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/drawable-1.0-expected.gir:
* tests/scanner/drawable.h:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir:

Readd class records as workaround to not break Gtk typelib

svn path=/trunk/; revision=681

15 years agofix typo in gitesttypes namespace
Tommi Komulainen [Sun, 12 Oct 2008 15:29:39 +0000 (15:29 +0000)]
fix typo in gitesttypes namespace

2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tests/types/Makefile.am: fix typo in gitesttypes namespace

svn path=/trunk/; revision=680

15 years agoDon't generate <record> elements for class structs. Update test cases
Jürg Billeter [Sun, 12 Oct 2008 14:40:48 +0000 (14:40 +0000)]
Don't generate <record> elements for class structs. Update test cases

2008-10-12  Jürg Billeter  <j@bitron.ch>

* giscanner/glibtransformer.py: Don't generate <record> elements
for class structs.
* tests/scanner/*: Update test cases

svn path=/trunk/; revision=679

15 years agorestore testfns-1.0.gir lost in previous commit
Tommi Komulainen [Sun, 12 Oct 2008 14:21:52 +0000 (14:21 +0000)]
restore testfns-1.0.gir lost in previous commit

svn path=/trunk/; revision=678

15 years agoBug 552858: versioning
Colin Walters [Sun, 12 Oct 2008 04:51:48 +0000 (04:51 +0000)]
Bug 552858: versioning

This is a big patch.  You should probably remove your installation
tree to be cleaner.

* docs/typelib-format.txt: Add nsversion entry which holds
version of namespace.
* girepository/girepository.h: Add 'version' parameter to
g_irepository_require.  This may be NULL.  Normally
bindings should pass an explicit version though.
* girepository/girepository.c: Lots of infrastructure to
support versioning.  Add some more documentation.  Disallow
some usage of NULL namespaces.
* girepository/girmodule.c: Add version parameter.
* girepository/gtypelib.c: Update header size.
* giscanner/ast.py: Add version to Namespace.
* giscanner/girparser.py: Parse version attribute from
XML, pass to Namespace.
* giscanner/girwriter.py: Write out version parameter.
* giscanner/transformer.py: Clean up include registration.
* tests/*: Add version attribute.
* tests/invoke/invoke.c: Don't try looking up test before
it's loaded in repository.
* tools/generate.c: Output version parameter.
* gir/Makefile.am: Add 2.0 version to .gir files.

svn path=/trunk/; revision=677

15 years agoDon't lose if we have mismatched parens.
Colin Walters [Sun, 12 Oct 2008 03:33:11 +0000 (03:33 +0000)]
Don't lose if we have mismatched parens.

2008-10-11  Colin Walters  <walters@verbum.org>

* giscanner/scannerlexer.l (parse_gtkdoc): Don't lose
if we have mismatched parens.

svn path=/trunk/; revision=676

15 years agofix typo on 'members' variable.
Lucas Rocha [Sun, 12 Oct 2008 03:29:13 +0000 (03:29 +0000)]
fix typo on 'members' variable.

2008-10-11  Lucas Rocha  <lucasr@gnome.org>

* giscanner/girparser.py (_parse_enumeration_bitfield): fix typo
on 'members' variable.

svn path=/trunk/; revision=675

15 years agoBug 555947 - update annotations syntax
Colin Walters [Sat, 11 Oct 2008 23:36:24 +0000 (23:36 +0000)]
Bug 555947 - update annotations syntax

svn path=/trunk/; revision=674

15 years agoignore non-UTF-8 string constants
Johan Bilien [Sat, 11 Oct 2008 23:19:59 +0000 (23:19 +0000)]
ignore non-UTF-8 string constants

2008-10-11  Johan Bilien  <jobi@litl.com>

* giscanner/scannerparser.y: ignore non-UTF-8 string constants

2008-10-11  Johan Bilien  <jobi@litl.com>

Bug 552347: Parse #defines constants

* girepository/gtypelib.c: update the list of value_size
with recently defined type tags
* giscanner/scannerparser.y: brought back parsing of #defined, as
present in older version
* giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
* giscanner/girwriter.py: write out constant tags in the gir
* giscanner/sourcescanner.py: add accessor for const_string
* giscanner/transformer.py, giscanner/glibtransformer.py: handle
constant

svn path=/trunk/; revision=673

15 years agoAdded test files.
Lucas Almeida Rocha [Sat, 11 Oct 2008 22:54:04 +0000 (22:54 +0000)]
Added test files.

svn path=/trunk/; revision=672