gnome.gobject-introspection
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

15 years agoBug 555946: Install a test module exercising all types, transfer rules,
Tommi Komulainen [Sat, 11 Oct 2008 22:51:59 +0000 (22:51 +0000)]
Bug 555946: Install a test module exercising all types, transfer rules,

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

Bug 555946: Install a test module exercising all types, transfer
rules, etc.

* configure.ac
* tests/Makefile.am
* tests/types/*: Add and install a test module that has functions
accepting and returning most of the basic types to enable bindings
implementors to more easily test their type conversion routines.

svn path=/trunk/; revision=671

15 years agoBug 552374: Const strings should be identified in the gir.
Jürg Billeter [Sat, 11 Oct 2008 21:54:30 +0000 (21:54 +0000)]
Bug 552374: Const strings should be identified in the gir.

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

Bug 552374: Const strings should be identified in the gir.

* giscanner/transformer.py: support string memory management
* tests/scanner/foo.h: use char * and const char *
* tests/scanner/foo-expected.gir: test that

svn path=/trunk/; revision=670

15 years agoAlso parse enums which are not glib types.
Johan Dahlin [Sat, 11 Oct 2008 21:50:46 +0000 (21:50 +0000)]
Also parse enums which are not glib types.

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

    * giscanner/girparser.py:
    Also parse enums which are not glib types.

svn path=/trunk/; revision=669

15 years agoBug 552370: add one more test for unsigned as a type, not as a type
Lucas Rocha [Sat, 11 Oct 2008 21:32:19 +0000 (21:32 +0000)]
Bug 552370: add one more test for unsigned as a type, not as a type

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

Bug 552370: add one more test for unsigned as a type, not as
a type qualifier.

* giscanner/ast.py: add 'uint' type name for 'unsigned'.
* test/scanner/foo.h: add function which uses unsigned as a type.
* test/scanner/foo-expected.gir: test that.

svn path=/trunk/; revision=668

15 years agoBug 555712: Struct and union issues
Andreas Rottmann [Sat, 11 Oct 2008 21:16:57 +0000 (21:16 +0000)]
Bug 555712: Struct and union issues

2008-10-09  Andreas Rottmann  <a.rottmann@gmx.at>

    Bug 555712: Struct and union issues

    * giscanner/scannerparser.y (struct_declarator): Use information
    provided about the bit width of a field.
    * giscanner/transformer.py (Transformer._create_member): Pass the
    symbol's const_int member to the created field (it represents the
    bit width).
    * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits'
    field attribute, if present.
    * giscanner/ast.py (Field): Add 'bits' member, specifying the
    width in bits of the field (only relevant for bitfields).
    * tests/*: Updated.

    * giscanner/transformer.py (Transformer._create_typedef_struct)
    (Transformer._create_typedef_union): Add calls to _create_struct()
    and _create_union(), respectively. This causes the scanner to
    generate output for fields of struct and union typedefs.
    * tests/*: Updated.

svn path=/trunk/; revision=667

15 years agoBug 552370: unsigned not scanned properly
Jürg Billeter [Sat, 11 Oct 2008 20:43:21 +0000 (20:43 +0000)]
Bug 552370: unsigned not scanned properly

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

Bug 552370: unsigned not scanned properly

* giscanner/scannerparser.y: combine basic types such as unsigned
int and long long when scanning
* tests/scanner/foo-expected.gir:
* tests/scanner/foo.c: (foo_test_unsigned):
* tests/scanner/foo.h: test that

svn path=/trunk/; revision=666

15 years agoBug 554854: The --typelib-xml and --inject options should reuse giscanner
Lucas Rocha [Sat, 11 Oct 2008 18:33:43 +0000 (18:33 +0000)]
Bug 554854: The --typelib-xml and --inject options should reuse giscanner

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

Bug 554854: The --typelib-xml and --inject options should reuse
giscanner parser/writer.

* giscanner/ast.py: add constructor list to Struct and Union.
Add new param in Return's contructor to define transfer.
* giscanner/girparser.py: several additions to the parser in order
to have parsing all nodes of the gir xml files.
* tools/g-ir-scanner (typelib_xml_strip, inject): use gir parser
and writer in --inject and --typelib-xml options.
* giscanner/xmlwriter.py: ignore empty attributes instead of
raising an error as this basically exposes a bug in GIRParser.
This should be reverted as soon as the parser is fixed.

svn path=/trunk/; revision=665

15 years agoBug 552376: scanner generates wrong names for enum members when there's no
Lucas Rocha [Sat, 11 Oct 2008 14:42:32 +0000 (14:42 +0000)]
Bug 552376: scanner generates wrong names for enum members when there's no

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

Bug 552376: scanner generates wrong names for enum members when
there's no defined gtype.

* giscanner/utils.py (strip_common_prefix): Always strip common
prefix exactly up to the last "_", and not beyond.
* tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
here is that the first character after the last '_' should should be
the same as the character in the same position on the type name.
* tests/scanner/foo-expected.gir: test that

svn path=/trunk/; revision=664

15 years agoWhitespace
Johan Dahlin [Sat, 11 Oct 2008 14:19:19 +0000 (14:19 +0000)]
Whitespace

svn path=/trunk/; revision=663

15 years agoBug 555293: append library_paths to LPATH env variable to work around a
Lucas Rocha [Fri, 10 Oct 2008 21:24:32 +0000 (21:24 +0000)]
Bug 555293: append library_paths to LPATH env variable to work around a

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

Bug 555293: append library_paths to LPATH env variable to work
around a bug in find_library when using ldconfig.

* tools/g-ir-scanner (main): ditto.

svn path=/trunk/; revision=662

15 years agofix regression on invoke test case by making sure we load the global
Lucas Rocha [Thu, 9 Oct 2008 16:44:11 +0000 (16:44 +0000)]
fix regression on invoke test case by making sure we load the global

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

* girepository/girepository.c (register_internal): fix regression on
invoke test case by making sure we load the global module in the
typelib when dealing with inline typelibs.
* girepository/gtypelib.c: a couple of coding style fixes.

svn path=/trunk/; revision=661

15 years agoBug 555294: Add support for multiple shared libraries per typelib.
Lucas Rocha [Tue, 7 Oct 2008 21:25:01 +0000 (21:25 +0000)]
Bug 555294: Add support for multiple shared libraries per typelib.

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

Bug 555294: Add support for multiple shared libraries per typelib.

* girepository/ginvoke.c (g_function_info_invoke),
girepository/ginfo.c(g_registered_type_info_get_g_type): use
g_typelib_symbol instead of g_module_symbol.
* girepository/girepository.h: remove g_typelib_set_module and add
g_typelib_symbol.
* girepository/gtypelib.[ch] (find_some_symbol, _g_typelib_init,
g_typelib_new_from_memory, g_typelib_new_from_const_memory,
g_typelib_free, g_typelib_symbol): chnage GTypeLib to hold a list of
modules instead of just one. The symbol lookup is now abstracted
behind g_typelib_symbol which tries to find the passed symbol name in
one of its modules.
* giscanner/girwriter.py, tools/g-ir-scanner: change scanner to read
and write shared_library attribute as a comma-separated list of libs.

svn path=/trunk/; revision=660

15 years agoParse length= annotation as a parameter name, not a raw int.
Colin Walters [Mon, 6 Oct 2008 18:58:46 +0000 (18:58 +0000)]
Parse length= annotation as a parameter name, not a raw int.

svn path=/trunk/; revision=659

15 years agoAdd missing annotation_object_get_type, fix up expected GIR
Colin Walters [Sat, 4 Oct 2008 20:01:19 +0000 (20:01 +0000)]
Add missing annotation_object_get_type, fix up expected GIR

svn path=/trunk/; revision=658

15 years agoChangeLog
Colin Walters [Fri, 3 Oct 2008 19:30:20 +0000 (19:30 +0000)]
ChangeLog

svn path=/trunk/; revision=657

15 years agoExtend coverage of boxed struct/union test cases
Colin Walters [Fri, 3 Oct 2008 19:30:17 +0000 (19:30 +0000)]
Extend coverage of boxed struct/union test cases

svn path=/trunk/; revision=656

15 years agoGLibBoxed is a valid registered type
Colin Walters [Fri, 3 Oct 2008 19:30:16 +0000 (19:30 +0000)]
GLibBoxed is a valid registered type

svn path=/trunk/; revision=655

15 years agoMerge branch 'bug551744-boxed-ctors'
Colin Walters [Fri, 3 Oct 2008 19:30:12 +0000 (19:30 +0000)]
Merge branch 'bug551744-boxed-ctors'

svn path=/trunk/; revision=654

15 years agoChangeLog
Colin Walters [Fri, 3 Oct 2008 17:18:18 +0000 (17:18 +0000)]
ChangeLog

svn path=/trunk/; revision=653

15 years agoAvoid resolving types as we create them, do it all at once at the end
Colin Walters [Fri, 3 Oct 2008 17:18:15 +0000 (17:18 +0000)]
Avoid resolving types as we create them, do it all at once at the end

Also resolve types for object fields

svn path=/trunk/; revision=652

15 years agofix the last parameter of GLibEnumMember constructor as it should be the
Lucas Rocha [Fri, 3 Oct 2008 17:09:40 +0000 (17:09 +0000)]
fix the last parameter of GLibEnumMember constructor as it should be the

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

* giscanner/girwriter.py (_parser_member): fix the last parameter of
GLibEnumMember constructor as it should be the enum member nick.

svn path=/trunk/; revision=651

15 years agoChangeLog
Colin Walters [Thu, 2 Oct 2008 21:24:26 +0000 (21:24 +0000)]
ChangeLog

svn path=/trunk/; revision=650

15 years agoUse g_alloca, suggested by Havoc Pennington
Colin Walters [Thu, 2 Oct 2008 21:24:24 +0000 (21:24 +0000)]
Use g_alloca, suggested by Havoc Pennington

svn path=/trunk/; revision=649

15 years agoMerge; delete object param for varargs too
Colin Walters [Thu, 2 Oct 2008 21:24:23 +0000 (21:24 +0000)]
Merge; delete object param for varargs too

svn path=/trunk/; revision=648

15 years agoMerge branch 'bug552961-methods/wip'
Colin Walters [Thu, 2 Oct 2008 21:24:20 +0000 (21:24 +0000)]
Merge branch 'bug552961-methods/wip'

svn path=/trunk/; revision=647

15 years ago Bug 554490: g-ir-scanner gets confused by '\\'
Dan Winship [Thu, 2 Oct 2008 16:21:40 +0000 (16:21 +0000)]
Bug 554490: g-ir-scanner gets confused by '\\'

* giscanner/scannerlexer.l (chartext, stringtext): fix use of
backslashes so it will correctly parse '\\' and "\\"

* tests/scanner/annotation.c: add a use of '\\' to make sure that
this stays fixed

* giscanner/glibtransformer.py (GLibTransformer.count_type): typo

svn path=/trunk/; revision=646

15 years agoChangeLog
Colin Walters [Thu, 2 Oct 2008 14:07:45 +0000 (14:07 +0000)]
ChangeLog

svn path=/trunk/; revision=645

15 years agoRemove debug print
Colin Walters [Thu, 2 Oct 2008 14:07:42 +0000 (14:07 +0000)]
Remove debug print

svn path=/trunk/; revision=644

15 years agoMerge branch 'bug552393-varargs'
Colin Walters [Thu, 2 Oct 2008 14:07:38 +0000 (14:07 +0000)]
Merge branch 'bug552393-varargs'

svn path=/trunk/; revision=643

15 years agoChangeLog
Colin Walters [Thu, 2 Oct 2008 13:25:52 +0000 (13:25 +0000)]
ChangeLog

svn path=/trunk/; revision=642

15 years agoBug 554632: Create type tag for GType
Colin Walters [Thu, 2 Oct 2008 13:25:46 +0000 (13:25 +0000)]
Bug 554632: Create type tag for GType

svn path=/trunk/; revision=641

15 years ago Bug 554521: scanner generates wrong names for enum members with
Dan Winship [Thu, 2 Oct 2008 13:15:09 +0000 (13:15 +0000)]
Bug 554521: scanner generates wrong names for enum members with
full type name prefix

* giscanner/utils.py (strip_common_prefix): Fix this to strip the
right amount when the entire "first" string is a prefix of
"second"

* tests/scanner/foo.h (FooEnumFullname):
* tests/scanner/foo-expected.gir: test that

svn path=/trunk/; revision=640

15 years agoChangeLog
Colin Walters [Mon, 29 Sep 2008 19:03:47 +0000 (19:03 +0000)]
ChangeLog

svn path=/trunk/; revision=639

15 years agoEnsure we always have types for container nodes
Colin Walters [Mon, 29 Sep 2008 19:03:46 +0000 (19:03 +0000)]
Ensure we always have types for container nodes

svn path=/trunk/; revision=638

15 years agoRework to use recursive XML
Colin Walters [Mon, 29 Sep 2008 19:03:44 +0000 (19:03 +0000)]
Rework to use recursive XML

svn path=/trunk/; revision=637

15 years agoAlso use name as ctype name for resolving array components
Colin Walters [Mon, 29 Sep 2008 19:03:42 +0000 (19:03 +0000)]
Also use name as ctype name for resolving array components

svn path=/trunk/; revision=636

15 years agoMake length= work
Colin Walters [Mon, 29 Sep 2008 19:03:40 +0000 (19:03 +0000)]
Make length= work

svn path=/trunk/; revision=635

15 years agoWrite out list and map types, parse 'array' annotation
Colin Walters [Mon, 29 Sep 2008 19:03:37 +0000 (19:03 +0000)]
Write out list and map types, parse 'array' annotation

svn path=/trunk/; revision=634

15 years agoSome work on arrays
Colin Walters [Mon, 29 Sep 2008 19:03:35 +0000 (19:03 +0000)]
Some work on arrays

svn path=/trunk/; revision=633

15 years agoEnsure constructor returns are always most concrete type
Colin Walters [Sun, 28 Sep 2008 04:05:29 +0000 (04:05 +0000)]
Ensure constructor returns are always most concrete type

This makes things a bit easier for binding writers - the
superclass returns are only a C convenience.

svn path=/trunk/; revision=632

15 years agoAdd g-ir-scanner --inject
Colin Walters [Sat, 27 Sep 2008 22:00:52 +0000 (22:00 +0000)]
Add g-ir-scanner --inject

svn path=/trunk/; revision=631

15 years agoRename similarly-named function just for clarity
Colin Walters [Sat, 27 Sep 2008 22:00:48 +0000 (22:00 +0000)]
Rename similarly-named function just for clarity

svn path=/trunk/; revision=630

15 years agoChangeLog
Colin Walters [Thu, 25 Sep 2008 22:34:00 +0000 (22:34 +0000)]
ChangeLog

svn path=/trunk/; revision=629

15 years agoRemove non-repository types from GIR
Colin Walters [Thu, 25 Sep 2008 22:33:57 +0000 (22:33 +0000)]
Remove non-repository types from GIR

* giscanner/ast.py: The canonical name is 'utf8', not
'string'.
* giscanner/glibast.py: A few more glib type mappings.
* girepository/girparser.c: We only parse repository types.
* tests/*.gir: Update.

svn path=/trunk/; revision=628

15 years agoBug 552564: Map guchar to uint8
Colin Walters [Thu, 25 Sep 2008 20:47:02 +0000 (20:47 +0000)]
Bug 552564: Map guchar to uint8

svn path=/trunk/; revision=627

15 years agoUse symbolic names for type tags instead of hardcoded integers
Colin Walters [Tue, 23 Sep 2008 22:18:06 +0000 (22:18 +0000)]
Use symbolic names for type tags instead of hardcoded integers

svn path=/trunk/; revision=626

15 years agoChangeLog
Colin Walters [Tue, 23 Sep 2008 18:20:28 +0000 (18:20 +0000)]
ChangeLog

svn path=/trunk/; revision=625

15 years agoMerge branch 'bug552566-timet/wip'
Colin Walters [Tue, 23 Sep 2008 18:20:25 +0000 (18:20 +0000)]
Merge branch 'bug552566-timet/wip'

svn path=/trunk/; revision=624

15 years agoRemove dbeug print
Colin Walters [Sat, 20 Sep 2008 00:11:42 +0000 (00:11 +0000)]
Remove dbeug print

svn path=/trunk/; revision=623

15 years agoChangeLog
Colin Walters [Sat, 20 Sep 2008 00:03:42 +0000 (00:03 +0000)]
ChangeLog

svn path=/trunk/; revision=622

15 years agoBug 552390: Handle capitialization like "DBus" more robustly
Colin Walters [Sat, 20 Sep 2008 00:03:38 +0000 (00:03 +0000)]
Bug 552390: Handle capitialization like "DBus" more robustly

The to_underscores function was designed for use against prefixed
names; we need a separate function which will convert names like
DBusFoo into dbus_foo, not d_bus_foo.

svn path=/trunk/; revision=621

15 years agoStrengthen check for interface vs basic types
Colin Walters [Fri, 19 Sep 2008 23:43:38 +0000 (23:43 +0000)]
Strengthen check for interface vs basic types

Previously we were just checking "reserved", but to be more correct
we should check whether reserved2 is zero as well because it is
possible for offsets to have reserved = 0 but reserved2 != 0.

svn path=/trunk/; revision=620

15 years agoExplode immediately if we don't recognize a type
Colin Walters [Fri, 19 Sep 2008 23:43:33 +0000 (23:43 +0000)]
Explode immediately if we don't recognize a type

svn path=/trunk/; revision=619

15 years agoFix indentation
Colin Walters [Fri, 19 Sep 2008 18:54:50 +0000 (18:54 +0000)]
Fix indentation

svn path=/trunk/; revision=618

15 years agoChangeLog
Colin Walters [Fri, 19 Sep 2008 16:16:22 +0000 (16:16 +0000)]
ChangeLog

svn path=/trunk/; revision=617

15 years agoAdd check to make sure we're not hitting out unresolved types
Colin Walters [Fri, 19 Sep 2008 16:16:18 +0000 (16:16 +0000)]
Add check to make sure we're not hitting out unresolved types

svn path=/trunk/; revision=616

15 years agoValidate the "this" argument for methods
Colin Walters [Fri, 19 Sep 2008 14:55:20 +0000 (14:55 +0000)]
Validate the "this" argument for methods

svn path=/trunk/; revision=615

15 years agoRemove heuristic matching of methods to classes based on prefix
Colin Walters [Fri, 19 Sep 2008 14:55:17 +0000 (14:55 +0000)]
Remove heuristic matching of methods to classes based on prefix

It was a broken hack that dated from when we handled underscoring
and capitalization conventions less well.

svn path=/trunk/; revision=614

15 years agoChangeLog
Colin Walters [Fri, 19 Sep 2008 02:24:10 +0000 (02:24 +0000)]
ChangeLog

svn path=/trunk/; revision=613

15 years agoBug 522384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
Colin Walters [Fri, 19 Sep 2008 02:24:05 +0000 (02:24 +0000)]
Bug 522384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin

On Darwin, the suffix for installed shared libraries (.dylib) is
different from loadable modules (.so).  We use a bit of magic shell
script from Behdad Esfahbod to figure out the right suffix.

svn path=/trunk/; revision=612

15 years agoDon't add spurious * if type is pointer; the is_pointer flag is enough
Colin Walters [Tue, 16 Sep 2008 19:44:30 +0000 (19:44 +0000)]
Don't add spurious * if type is pointer; the is_pointer flag is enough

svn path=/trunk/; revision=611

15 years agoPrint out "any" for VOID+pointer, not "none"
Colin Walters [Tue, 16 Sep 2008 19:44:26 +0000 (19:44 +0000)]
Print out "any" for VOID+pointer, not "none"

* tools/generate.c: Print out "any" for VOID+pointer,
not "none"

svn path=/trunk/; revision=610

15 years agoAdd type_qualifier to SourceType.__members__
Johan Dahlin [Mon, 15 Sep 2008 20:09:26 +0000 (20:09 +0000)]
Add type_qualifier to SourceType.__members__

svn path=/trunk/; revision=609

15 years agoAdd a wrapper for type_qualifier as well.
Johan Dahlin [Mon, 15 Sep 2008 20:07:36 +0000 (20:07 +0000)]
Add a wrapper for type_qualifier as well.

2008-09-15  Johan Dahlin  <johan@gnome.org>

    * giscanner/sourcescanner.py (SourceType.type_qualifier): Add
    a wrapper for type_qualifier as well.

svn path=/trunk/; revision=608