platform/upstream/gobject-introspection.git
16 years agoSome statistics
Colin Walters [Mon, 25 Aug 2008 01:51:46 +0000 (01:51 +0000)]
Some statistics

svn path=/trunk/; revision=489

16 years agoFilter out unknown options from pkg-config files.
Colin Walters [Mon, 25 Aug 2008 00:32:30 +0000 (00:32 +0000)]
Filter out unknown options from pkg-config files.

2008-08-24  Colin Walters  <walters@verbum.org>

* tools/g-ir-scanner: Filter out unknown options from
pkg-config files.

svn path=/trunk/; revision=488

16 years agoFail with better error if we can't find library.
Colin Walters [Mon, 25 Aug 2008 00:32:27 +0000 (00:32 +0000)]
Fail with better error if we can't find library.

2008-08-24  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Fail with better
error if we can't find library.

svn path=/trunk/; revision=487

16 years agoUse subprocess instead of commands, works on Windows and avoids the evil
Colin Walters [Sun, 24 Aug 2008 22:36:08 +0000 (22:36 +0000)]
Use subprocess instead of commands, works on Windows and avoids the evil

2008-08-24  Colin Walters  <walters@verbum.org>

* tools/g-ir-scanner: Use subprocess instead of
commands, works on Windows and avoids the evil
shell on Unix.

svn path=/trunk/; revision=486

16 years agoMinor debug tweak
Colin Walters [Sun, 24 Aug 2008 22:36:06 +0000 (22:36 +0000)]
Minor debug tweak

svn path=/trunk/; revision=485

16 years agoSkip over g_object_get_type from GLib trunk.
Colin Walters [Sun, 24 Aug 2008 21:29:09 +0000 (21:29 +0000)]
Skip over g_object_get_type from GLib trunk.

2008-08-24  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Skip over
g_object_get_type from GLib trunk.

svn path=/trunk/; revision=484

16 years agoDon't open shared library here; we already do it in gtypelib.c.
Colin Walters [Sun, 24 Aug 2008 16:55:07 +0000 (16:55 +0000)]
Don't open shared library here; we already do it in gtypelib.c.

2008-08-24  Colin Walters  <walters@verbum.org>

* girepository/girepository.c (g_irepository_require):
Don't open shared library here; we already do it
in gtypelib.c.

svn path=/trunk/; revision=483

16 years agoAdd context stack so when we get an error we can print out nicely where it
Colin Walters [Sun, 24 Aug 2008 16:51:43 +0000 (16:51 +0000)]
Add context stack so when we get an error we can print out nicely where it

2008-08-24  Colin Walters  <walters@verbum.org>

* girepository/gtypelib.c: Add context stack so
when we get an error we can print out nicely
where it is.

svn path=/trunk/; revision=482

16 years agoRefactor a couple of parsing functions to be simpler to follow. Avoid huge
Johan Dahlin [Sun, 24 Aug 2008 11:01:44 +0000 (11:01 +0000)]
Refactor a couple of parsing functions to be simpler to follow. Avoid huge

2008-08-24  Johan Dahlin  <johan@gnome.org>

    * girepository/girparser.c (start_glib_boxed), (start_function),
    (start_field), (start_alias):
    Refactor a couple of parsing functions to be simpler to follow.
    Avoid huge ifs.

svn path=/trunk/; revision=481

16 years agoRemove left-over code, checking type of function.
Johan Dahlin [Sun, 24 Aug 2008 10:43:02 +0000 (10:43 +0000)]
Remove left-over code, checking type of function.

2008-08-24  Johan Dahlin  <johan@gnome.org>

    * girepository/girparser.c (start_function):
    Remove left-over code, checking type of function.

svn path=/trunk/; revision=480

16 years agoDefine DATADIR. Look in DATADIR.
Colin Walters [Sat, 23 Aug 2008 21:58:09 +0000 (21:58 +0000)]
Define DATADIR. Look in DATADIR.

2008-08-23  Colin Walters  <walters@verbum.org>

* giscanner/config.py: Define DATADIR.
* giscanner/transformer.py: Look in DATADIR.

svn path=/trunk/; revision=479

16 years agoChangeLog
Colin Walters [Sat, 23 Aug 2008 21:30:12 +0000 (21:30 +0000)]
ChangeLog

svn path=/trunk/; revision=478

16 years agoCheck constructor returns
Colin Walters [Sat, 23 Aug 2008 21:30:09 +0000 (21:30 +0000)]
Check constructor returns

svn path=/trunk/; revision=477

16 years agoAdd debug bit, tweak to use GUINT as correct.
Colin Walters [Sat, 23 Aug 2008 21:30:06 +0000 (21:30 +0000)]
Add debug bit, tweak to use GUINT as correct.

svn path=/trunk/; revision=476

16 years agoRedo signature_offset to be cleaner and correct for vfuncs
Colin Walters [Sat, 23 Aug 2008 21:30:01 +0000 (21:30 +0000)]
Redo signature_offset to be cleaner and correct for vfuncs

svn path=/trunk/; revision=475

16 years agoRemove duplicate start_boxed.
Colin Walters [Sat, 23 Aug 2008 21:29:58 +0000 (21:29 +0000)]
Remove duplicate start_boxed.

svn path=/trunk/; revision=474

16 years agoDon't take functions returning basic types as ctors
Colin Walters [Sat, 23 Aug 2008 21:12:26 +0000 (21:12 +0000)]
Don't take functions returning basic types as ctors

svn path=/trunk/; revision=473

16 years agoDep on compiler
Colin Walters [Sat, 23 Aug 2008 21:12:23 +0000 (21:12 +0000)]
Dep on compiler

svn path=/trunk/; revision=472

16 years agoAnother debug print
Colin Walters [Sat, 23 Aug 2008 16:46:58 +0000 (16:46 +0000)]
Another debug print

svn path=/trunk/; revision=471

16 years agoAdd debug print, fix includes
Colin Walters [Sat, 23 Aug 2008 16:36:15 +0000 (16:36 +0000)]
Add debug print, fix includes

svn path=/trunk/; revision=470

16 years agoAdd deps on Makefile
Colin Walters [Sat, 23 Aug 2008 16:36:12 +0000 (16:36 +0000)]
Add deps on Makefile

svn path=/trunk/; revision=469

16 years agoAvoid in utility.gir, as it doesn't work
Johan Dahlin [Sat, 23 Aug 2008 16:18:17 +0000 (16:18 +0000)]
Avoid  in utility.gir, as it doesn't work

svn path=/trunk/; revision=468

16 years agoIgnore <include>. Parse them. Generate them. Process <include>
Colin Walters [Sat, 23 Aug 2008 16:11:01 +0000 (16:11 +0000)]
Ignore <include>. Parse them. Generate them. Process <include>

2008-08-22  Colin Walters  <walters@verbum.org>

* girepository/girparser.c: Ignore <include>.
* giscanner/girparser.py: Parse them.
* giscanner/girwriter.py: Generate them.
* giscanner/transformer.py: Process <include>
recursively.  Don't require full path for
includes, look in {$XDG_DATA_DIRS}/gir.
* tools/g-ir-scanner: Pass through includes.
* Makefile.am: Remove extra --include
args for scanner.
* *-expected.gir: Add expected includes.

svn path=/trunk/; revision=467

16 years agoAvoid duplication in the Makefile, regenerate with new namespaces (same as
Johan Dahlin [Sat, 23 Aug 2008 12:59:04 +0000 (12:59 +0000)]
Avoid duplication in the Makefile, regenerate with new namespaces (same as

2008-08-23  Johan Dahlin  <johan@gnome.org>

    * tests/scanner/Makefile.am:
    * tests/scanner/annotation-expected.gir:
    * tests/scanner/drawable-expected.gir:
    Avoid duplication in the Makefile, regenerate with new
    namespaces (same as the filename)

svn path=/trunk/; revision=466

16 years agoDon't hardcode integers, use GITypeTag.
Colin Walters [Fri, 22 Aug 2008 22:15:28 +0000 (22:15 +0000)]
Don't hardcode integers, use GITypeTag.

2008-08-22  Colin Walters  <walters@verbum.org>

* girepository/girnode.c: Don't hardcode integers,
use GITypeTag.

svn path=/trunk/; revision=465

16 years agoCheck for ../gobject-introspection-1.0.pc.in to determine if we run
Johan Dahlin [Fri, 22 Aug 2008 21:48:23 +0000 (21:48 +0000)]
Check for ../gobject-introspection-1.0.pc.in to determine if we run

2008-08-22  Johan Dahlin  <johan@gnome.org>

    * giscanner/sourcescanner.py:
    Check for ../gobject-introspection-1.0.pc.in to determine
    if we run installed or uninstalled.

svn path=/trunk/; revision=464

16 years agoSend in undefs/defines via writing it directly to stdin of cpp instead of
Johan Dahlin [Fri, 22 Aug 2008 21:24:47 +0000 (21:24 +0000)]
Send in undefs/defines via writing it directly to stdin of cpp instead of

2008-08-22  Johan Dahlin  <johan@gnome.org>

    * gir/Makefile.am:
    * giscanner/sourcescanner.py:
    Send in undefs/defines via writing it directly to stdin
    of cpp instead of via arguments.

svn path=/trunk/; revision=463

16 years agoDefault to --raw. Update.
Colin Walters [Fri, 22 Aug 2008 21:14:31 +0000 (21:14 +0000)]
Default to --raw. Update.

2008-08-22  Colin Walters  <walters@verbum.org>

* tools/generate.c, tools/compiler.c: Default
to --raw.
* all Makefile.am: Update.

svn path=/trunk/; revision=462

16 years agoInstall config.py, better error handling if we forget --raw
Colin Walters [Fri, 22 Aug 2008 21:08:06 +0000 (21:08 +0000)]
Install config.py, better error handling if we forget --raw

svn path=/trunk/; revision=461

16 years agoRemove G_GNUC_EXTENSION too
Johan Dahlin [Fri, 22 Aug 2008 20:51:22 +0000 (20:51 +0000)]
Remove G_GNUC_EXTENSION too

svn path=/trunk/; revision=460

16 years agoDon't pase _LIBINTL_H
Johan Dahlin [Fri, 22 Aug 2008 20:17:09 +0000 (20:17 +0000)]
Don't pase _LIBINTL_H

svn path=/trunk/; revision=459

16 years agoundef instead of define xxx 0
Johan Dahlin [Fri, 22 Aug 2008 20:06:17 +0000 (20:06 +0000)]
undef instead of define xxx 0

svn path=/trunk/; revision=458

16 years agoPass through recursive types. Avoid overwriting errors. Always write the
Colin Walters [Fri, 22 Aug 2008 20:05:23 +0000 (20:05 +0000)]
Pass through recursive types. Avoid overwriting errors. Always write the

2008-08-22  Colin Walters  <walters@verbum.org>

* girepository/girparser.c: Pass through
recursive types.  Avoid overwriting errors.
* giscanner/xmlwriter.py: Always write the
XML header.
* tests/*.gir: Adjust.
* tests/scanner/Makefile.am: Build typelibs,
and generate XML from those.  Once we
have a good diff mechanism...
* tests/scanner/*-expected.gir: Add XML
header.
* tools/g-ir-scanner: Accept --typelib-xml
option.
* tools/generate.c: Better defaults for transfer.

svn path=/trunk/; revision=457

16 years agoUse the generated glibconfig.h for all scanner invokations. Rename it to
Johan Dahlin [Fri, 22 Aug 2008 19:46:03 +0000 (19:46 +0000)]
Use the generated glibconfig.h for all scanner invokations. Rename it to

2008-08-22  Johan Dahlin  <johan@gnome.org>

    * configure.ac:
    * gir/Makefile.am:
    * giscanner/Makefile.am:
    * giscanner/config.py.in:
    * giscanner/sourcescanner.py:
    Use the generated glibconfig.h for all scanner invokations.
    Rename it to glibconfig-scanner.h and install it.
    Add a config.py which so far contains the include dir.

svn path=/trunk/; revision=456

16 years agoMake it work again, clean up the mess I made
Johan Dahlin [Fri, 22 Aug 2008 19:13:39 +0000 (19:13 +0000)]
Make it work again, clean up the mess I made

svn path=/trunk/; revision=455

16 years agoThrow an error if we try to load None
Colin Walters [Fri, 22 Aug 2008 19:09:16 +0000 (19:09 +0000)]
Throw an error if we try to load None

svn path=/trunk/; revision=454

16 years agoDon't put * in types, suppress transfer="none"
Colin Walters [Fri, 22 Aug 2008 19:09:11 +0000 (19:09 +0000)]
Don't put * in types, suppress transfer="none"

svn path=/trunk/; revision=453

16 years agoAvoid using builddir
Johan Dahlin [Fri, 22 Aug 2008 19:08:50 +0000 (19:08 +0000)]
Avoid using builddir

svn path=/trunk/; revision=452

16 years ago1->0, not 1->1
Johan Dahlin [Fri, 22 Aug 2008 17:53:37 +0000 (17:53 +0000)]
1->0, not 1->1

svn path=/trunk/; revision=451

16 years agoReplace glibconfig.h with our own, do some replacement for CPP/C features
Johan Dahlin [Fri, 22 Aug 2008 17:42:24 +0000 (17:42 +0000)]
Replace glibconfig.h with our own, do some replacement for CPP/C features

2008-08-22  Johan Dahlin  <johan@gnome.org>

    * gir/Makefile.am:
    Replace glibconfig.h with our own, do some replacement
    for CPP/C features we do not support

svn path=/trunk/; revision=450

16 years agoFix unref sequence.
Colin Walters [Fri, 22 Aug 2008 17:34:29 +0000 (17:34 +0000)]
Fix unref sequence.

2008-08-22  Colin Walters  <walters@verbum.org>

* tools/generate.c (write_callable_info): Fix unref
sequence.

svn path=/trunk/; revision=449

16 years agoAdd g-ir-generate. Support $(DEBUG) Do immediate close tags if no
Colin Walters [Fri, 22 Aug 2008 14:43:41 +0000 (14:43 +0000)]
Add g-ir-generate. Support $(DEBUG) Do immediate close tags if no

2008-08-22  Colin Walters  <walters@verbum.org>

* gobject-introspection-1.0.pc.in: Add g-ir-generate.
* tests/Makefile.am: Support $(DEBUG)
* tools/generate.c: Do immediate close tags if no
sub-elements.

svn path=/trunk/; revision=448

16 years agotests/scanner/drawable-expected.gir, tests/scanner/drawable.c, Add a
Colin Walters [Fri, 22 Aug 2008 02:52:27 +0000 (02:52 +0000)]
tests/scanner/drawable-expected.gir, tests/scanner/drawable.c, Add a

2008-08-21  Colin Walters  <walters@verbum.org>

* tests/scanner/drawable-expected.gir,
* tests/scanner/drawable.c,
* tests/scanner/drawable.h:
Add a method.

svn path=/trunk/; revision=447

16 years agoCompute prefix by searching through the symbol for bits rather than going
Colin Walters [Thu, 21 Aug 2008 20:59:24 +0000 (20:59 +0000)]
Compute prefix by searching through the symbol for bits rather than going

2008-08-21  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Compute prefix
by searching through the symbol for bits
rather than going directly from ctype; this fixes
webkit_ namespace.

svn path=/trunk/; revision=446

16 years agoAlso try squashing underscores from namespace, fixes webkit_web_view_new.
Colin Walters [Thu, 21 Aug 2008 20:45:22 +0000 (20:45 +0000)]
Also try squashing underscores from namespace, fixes webkit_web_view_new.

2008-08-21  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Also try squashing
underscores from namespace, fixes webkit_web_view_new.

svn path=/trunk/; revision=445

16 years agoMore ctor work, avoid having gtk_window_group_new end up under GtkWindow.
Colin Walters [Thu, 21 Aug 2008 20:08:28 +0000 (20:08 +0000)]
More ctor work, avoid having gtk_window_group_new end up under GtkWindow.

2008-08-21  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: More ctor work,
avoid having gtk_window_group_new end up under
GtkWindow.

svn path=/trunk/; revision=444

16 years agoMuch simpler approach of mapping uscored names to classes. Remove
Colin Walters [Thu, 21 Aug 2008 18:03:21 +0000 (18:03 +0000)]
Much simpler approach of mapping uscored names to classes. Remove

2008-08-21  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Much simpler approach
of mapping uscored names to classes.
* giscanner/utils.py: Remove unnecessary function.

svn path=/trunk/; revision=443

16 years agoLook up all permutations of class names when scanning methods/ctors based
Colin Walters [Thu, 21 Aug 2008 17:47:00 +0000 (17:47 +0000)]
Look up all permutations of class names when scanning methods/ctors based

2008-08-21  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Look up all permutations
of class names when scanning methods/ctors based on
the prefix instead of using the return value.  This
associates gtk_window_new with the right class.

svn path=/trunk/; revision=442

16 years agoPlug memory leak and avoid using freed memory. Resolve the whole module
Johan Dahlin [Thu, 21 Aug 2008 16:38:03 +0000 (16:38 +0000)]
Plug memory leak and avoid using freed memory. Resolve the whole module

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

    * girepository/girepository.c (g_irepository_require):
    Plug memory leak and avoid using freed memory.
    Resolve the whole module path, here as well.

svn path=/trunk/; revision=441

16 years agoRevert change to increment header_size; we do that in write_string.
Colin Walters [Thu, 21 Aug 2008 16:25:42 +0000 (16:25 +0000)]
Revert change to increment header_size; we do that in write_string.

2008-08-21  Colin Walters  <walters@verbum.org>

* girepository/girmodule.c (g_ir_module_build_typelib):
Revert change to increment header_size; we do that in
write_string.

svn path=/trunk/; revision=440

16 years agoTweak to use UINT instead of INT. Not likely to matter. Add to
Colin Walters [Thu, 21 Aug 2008 16:15:55 +0000 (16:15 +0000)]
Tweak to use UINT instead of INT. Not likely to matter. Add to

2008-08-21  Colin Walters  <walters@verbum.org>

* girepository/girnode.c (write_string): Tweak to
use UINT instead of INT.  Not likely to matter.
* girepository/girmodule.c (g_ir_module_build_typelib):
Add to header_offset as well for header strings
to match what write_string does.
* girepository/gtypelib.c: Replace is_name with
validate_name, which more strongly validates and
handles errors in a better way.  Update all callers.
* giscanner/glibtransformer.py: Handle constructors
better.

svn path=/trunk/; revision=439

16 years agoBuild and install the Gio.typelib too
Johan Dahlin [Thu, 21 Aug 2008 15:10:02 +0000 (15:10 +0000)]
Build and install the Gio.typelib too

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

    * gir/Makefile.am (typelibs_DATA): Build and
    install the Gio.typelib too

svn path=/trunk/; revision=438

16 years agoUse g_module_build_path to resolve the shlib name
Johan Dahlin [Thu, 21 Aug 2008 14:21:00 +0000 (14:21 +0000)]
Use g_module_build_path to resolve the shlib name

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

    * girepository/gtypelib.c (_g_typelib_init):
    Use g_module_build_path to resolve the shlib name

svn path=/trunk/; revision=437

16 years agoCLEANFILES typelibs too.
Colin Walters [Thu, 21 Aug 2008 13:55:06 +0000 (13:55 +0000)]
CLEANFILES typelibs too.

2008-08-21  Colin Walters  <walters@verbum.org>

* gir/Makefile.am: CLEANFILES typelibs too.

svn path=/trunk/; revision=436

16 years agoDo not send .la files through find_library.
Johan Dahlin [Thu, 21 Aug 2008 13:33:08 +0000 (13:33 +0000)]
Do not send .la files through find_library.

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

    * giscanner/glibtransformer.py:
    Do not send .la files through find_library.

svn path=/trunk/; revision=435

16 years agoFix one small leak in error case.
Colin Walters [Thu, 21 Aug 2008 13:26:53 +0000 (13:26 +0000)]
Fix one small leak in error case.

2008-08-21  Colin Walters  <walters@verbum.org>

* girepository/girparser.c (g_irepository_require):
Fix one small leak in error case.

svn path=/trunk/; revision=434

16 years agoParse glibconfig.h as well and install the compiled typelib
Johan Dahlin [Thu, 21 Aug 2008 13:23:29 +0000 (13:23 +0000)]
Parse glibconfig.h as well and install the compiled typelib

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

    * gir/Makefile.am:
    Parse glibconfig.h as well and install the compiled
    typelib

svn path=/trunk/; revision=433

16 years agoDo not hard-core library names in the Makefile, reuse ctypes find_library
Johan Dahlin [Thu, 21 Aug 2008 08:42:11 +0000 (08:42 +0000)]
Do not hard-core library names in the Makefile, reuse ctypes find_library

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

    * gir/Makefile.am:
    * giscanner/glibtransformer.py:
    * tools/g-ir-scanner:
    Do not hard-core library names in the Makefile, reuse
    ctypes find_library instead.

svn path=/trunk/; revision=432

16 years agoRemove compilation warnings
Johan Dahlin [Thu, 21 Aug 2008 08:20:07 +0000 (08:20 +0000)]
Remove compilation warnings

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

    * girepository/girparser.c (resolve_aliases):
    Remove compilation warnings

svn path=/trunk/; revision=431

16 years agoRewrap and fix double free bug by leaking a bit.
Johan Dahlin [Thu, 21 Aug 2008 06:47:49 +0000 (06:47 +0000)]
Rewrap and fix double free bug by leaking a bit.

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

    * girepository/girepository.c (g_irepository_require):
    Rewrap and fix double free bug by leaking a bit.

svn path=/trunk/; revision=430

16 years agoAdd new function g_irepository_get_typelib_path which tells us from where
Colin Walters [Thu, 21 Aug 2008 03:06:13 +0000 (03:06 +0000)]
Add new function g_irepository_get_typelib_path which tells us from where

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/girepository.c: Add new function
g_irepository_get_typelib_path which tells
us from where we loaded a namespace.

svn path=/trunk/; revision=429

16 years agoAdjust for added shared-library. Make pylint happy.
Colin Walters [Thu, 21 Aug 2008 00:45:14 +0000 (00:45 +0000)]
Adjust for added shared-library. Make pylint happy.

2008-08-20  Colin Walters  <walters@verbum.org>

* tests/scanner/*-expected.gir: Adjust for
added shared-library.
* giscanner/giwriter.py: Make pylint happy.

svn path=/trunk/; revision=428

16 years agoCalculate size correctly, avoid use-after-free.
Colin Walters [Thu, 21 Aug 2008 00:42:23 +0000 (00:42 +0000)]
Calculate size correctly, avoid use-after-free.

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/girmodule.c (g_ir_module_build_typelib):
Calculate size correctly, avoid use-after-free.

svn path=/trunk/; revision=427

16 years agoRemove g_irepository_register_file in favor of g_irepository_require.
Colin Walters [Wed, 20 Aug 2008 23:56:40 +0000 (23:56 +0000)]
Remove g_irepository_register_file in favor of g_irepository_require.

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/girepository.c: Remove
g_irepository_register_file in favor of
g_irepository_require.  There are two
possible deployment scenarios for typelibs:
First, separate in $DATADIR/gitypelibs/.  Second,
they may be embedded in shlibs.  However since
the first is now the normal case, the API is
optimized around it.

Refactor internals to look up typelibs for
namespaces just-in-time, but we expect
consumers to call g_irepository_require.

Also, add some docs.  No one has died from that
before.
* gir/Makefile.am: Need --library for glib.
* giscanner/girwriter.py: Write out shared-library.
* tools/g-ir-writer: Take the first --library
argument as the target of shared-library.  In
the future we should make this nicer with pkg-config
probably.

svn path=/trunk/; revision=426

16 years agoAnd parse them.
Colin Walters [Wed, 20 Aug 2008 19:57:10 +0000 (19:57 +0000)]
And parse them.

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/girparser.py: And parse them.

svn path=/trunk/; revision=425

16 years agoAdd gshort/gushort types
Johan Dahlin [Wed, 20 Aug 2008 19:31:23 +0000 (19:31 +0000)]
Add gshort/gushort types

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * giscanner/glibast.py: Add gshort/gushort types

svn path=/trunk/; revision=424

16 years agoInstall GObject.typelib
Johan Dahlin [Wed, 20 Aug 2008 19:26:20 +0000 (19:26 +0000)]
Install GObject.typelib

svn path=/trunk/; revision=423

16 years agoRename .gir files using GI namespace. Use XDG_DATA_DIRS for looking up
Colin Walters [Wed, 20 Aug 2008 19:17:14 +0000 (19:17 +0000)]
Rename .gir files using GI namespace. Use XDG_DATA_DIRS for looking up

2008-08-20  Colin Walters  <walters@verbum.org>

* gir/Makefile.am: Rename .gir files using GI namespace.
* girepository/girepository.c: Use XDG_DATA_DIRS for
looking up typelibs.  Also typelibs are now suffixed
with .typelib.
* tests/invoke/Makefile.am: Only use metadata.
* girepository/Makefile.am: Remove unnecessary include.
* tests/scanner/Makefile.am: Update using GI namespaces
for scanner includes.

svn path=/trunk/; revision=422

16 years agoSuppress aliases whose name is a builtin. Define some more aliases.
Colin Walters [Wed, 20 Aug 2008 19:11:03 +0000 (19:11 +0000)]
Suppress aliases whose name is a builtin. Define some more aliases.

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/transformer.py: Suppress aliases whose
name is a builtin.
* girepository/ast.py: Define some more aliases.

svn path=/trunk/; revision=421

16 years agoAvoid alias infloops.
Colin Walters [Wed, 20 Aug 2008 19:01:20 +0000 (19:01 +0000)]
Avoid alias infloops.

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/girparser.c: Avoid alias infloops.

svn path=/trunk/; revision=420

16 years agoFix expected list type.
Colin Walters [Wed, 20 Aug 2008 18:16:04 +0000 (18:16 +0000)]
Fix expected list type.

2008-08-20  Colin Walters  <walters@verbum.org>

* tests/scanner/foo-expected.gir: Fix expected list type.

svn path=/trunk/; revision=419

16 years agoAdd a workaround for #548689. We can now compile gtk!
Johan Dahlin [Wed, 20 Aug 2008 15:57:22 +0000 (15:57 +0000)]
Add a workaround for #548689. We can now compile gtk!

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * giscanner/glibtransformer.py (GLibTransformer._resolve_type_name):
    Add a workaround for #548689.
    We can now compile gtk!

svn path=/trunk/; revision=418

16 years agoLook up aliases using c:type too
Colin Walters [Wed, 20 Aug 2008 15:30:58 +0000 (15:30 +0000)]
Look up aliases using c:type too

2008-08-20  Colin Walters  <walters@verbum.org>

* giscanner/glibtransformer.py: Try to look up
aliases using the c:type too.

svn path=/trunk/; revision=417

16 years agoUnion field parsing
Colin Walters [Wed, 20 Aug 2008 15:05:46 +0000 (15:05 +0000)]
Union field parsing

2008-08-20  Colin Walters  <walters@verbum.org>

* girepository/girparser.c: Parse union fields.

svn path=/trunk/; revision=416

16 years agoMake time_t an alias for long
Johan Dahlin [Wed, 20 Aug 2008 14:41:19 +0000 (14:41 +0000)]
Make time_t an alias for long

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * giscanner/ast.py: Make time_t an alias for long

svn path=/trunk/; revision=415

16 years agoRegnerate Do not delete Class structures, we need them in gdk/gtk.
Johan Dahlin [Wed, 20 Aug 2008 13:45:12 +0000 (13:45 +0000)]
Regnerate Do not delete Class structures, we need them in gdk/gtk.

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * gir/gio-2.0-good.gir:
    * gir/glib-2.0-good.gir:
    * gir/gobject-2.0-good.gir:
    Regnerate
    * giscanner/glibtransformer.py:
    Do not delete Class structures, we need them in gdk/gtk.
    * tests/scanner/drawable-expected.gir:
    * tests/scanner/foo-expected.gir:
    * tests/scanner/utility-expected.gir:
    Update tests.

svn path=/trunk/; revision=414

16 years agoUpdate array tests
Johan Dahlin [Wed, 20 Aug 2008 12:40:39 +0000 (12:40 +0000)]
Update array tests

svn path=/trunk/; revision=413

16 years agoRe-wrap
Johan Dahlin [Wed, 20 Aug 2008 12:38:12 +0000 (12:38 +0000)]
Re-wrap

svn path=/trunk/; revision=412

16 years agoRe-run against new glib/gobject girs
Johan Dahlin [Wed, 20 Aug 2008 12:36:59 +0000 (12:36 +0000)]
Re-run against new glib/gobject girs

svn path=/trunk/; revision=411

16 years agoSplit out annotation tests out of foo
Johan Dahlin [Wed, 20 Aug 2008 12:33:40 +0000 (12:33 +0000)]
Split out annotation tests out of foo

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * tests/scanner/Makefile.am:
    * tests/scanner/annotation-expected.gir:
    * tests/scanner/annotation.c (annotation_object_class_init),
    (annotation_object_init), (annotation_object_method),
    (annotation_object_in), (annotation_object_out),
    (annotation_object_inout), (annotation_object_inout2),
    (annotation_object_inout3), (annotation_object_calleeowns),
    (annotation_object_calleesowns), (annotation_object_get_strings),
    (annotation_object_with_voidp), (annotation_object_get_objects),
    (annotation_object_create_object), (annotation_object_allow_none):
    * tests/scanner/annotation.h:
    * tests/scanner/foo-expected.gir:
    * tests/scanner/foo.c:
    * tests/scanner/foo.h:
    Split out annotation tests out of foo

svn path=/trunk/; revision=410

16 years agoFoo->foo, foo-object.h -> foo.h
Johan Dahlin [Wed, 20 Aug 2008 12:24:44 +0000 (12:24 +0000)]
Foo->foo, foo-object.h -> foo.h

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * tests/scanner/Foo-expected.gir:
    * tests/scanner/Makefile.am:
    * tests/scanner/foo-expected.gir:
    * tests/scanner/foo-object.h:
    * tests/scanner/foo.c:
    Foo->foo, foo-object.h -> foo.h

svn path=/trunk/; revision=409

16 years agoMove the drawable parts out of Foo to its own test.
Johan Dahlin [Wed, 20 Aug 2008 12:22:56 +0000 (12:22 +0000)]
Move the drawable parts out of Foo to its own test.

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * tests/scanner/Foo-expected.gir:
    * tests/scanner/Makefile.am:
    * tests/scanner/drawable-expected.gir:
    * tests/scanner/drawable.c (test_drawable_class_init),
    (test_drawable_init):
    * tests/scanner/drawable.h:
    * tests/scanner/foo-object.h:
    * tests/scanner/foo.c (foo_boxed_method):
    Move the drawable parts out of Foo to its own test.

svn path=/trunk/; revision=408

16 years agoAdd a based on GdkDrawable which generates a broken gir.
Johan Dahlin [Tue, 19 Aug 2008 22:53:14 +0000 (22:53 +0000)]
Add a based on GdkDrawable which generates a broken gir.

2008-08-20  Johan Dahlin  <johan@gnome.org>

    * tests/scanner/Foo-expected.gir:
    * tests/scanner/foo-object.h:
    * tests/scanner/foo.c (foo_drawable_class_init),
    (foo_drawable_init):
    Add a based on GdkDrawable which generates
    a broken gir.

svn path=/trunk/; revision=407

16 years agoDon't try to strip prefix before namespace.
Colin Walters [Tue, 19 Aug 2008 22:35:46 +0000 (22:35 +0000)]
Don't try to strip prefix before namespace.

2008-08-19  Colin Walters  <walters@verbum.org>

* giscanner/transformer.py: Don't try
to strip prefix before namespace.

svn path=/trunk/; revision=406

16 years agoAdd support for typedef void foo type of aliases.
Johan Dahlin [Tue, 19 Aug 2008 21:59:58 +0000 (21:59 +0000)]
Add support for typedef void foo type of aliases.

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

    * giscanner/transformer.py:
    * tests/scanner/Foo-expected.gir:
    * tests/scanner/foo-object.h:
    Add support for typedef void foo type of
    aliases.

svn path=/trunk/; revision=405

16 years agoAdd basic support for union, base the code much on Struct. Add a testcase.
Johan Dahlin [Tue, 19 Aug 2008 21:55:26 +0000 (21:55 +0000)]
Add basic support for union, base the code much on Struct. Add a testcase.

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

    * giscanner/ast.py:
    * giscanner/girwriter.py:
    * giscanner/glibtransformer.py:
    * giscanner/transformer.py:
    * tests/scanner/Foo-expected.gir:
    Add basic support for union, base the code much
    on Struct. Add a testcase.

svn path=/trunk/; revision=404

16 years agoAdd a union testcase which the compiler currently barfs at.
Johan Dahlin [Tue, 19 Aug 2008 21:44:25 +0000 (21:44 +0000)]
Add a union testcase which the compiler currently barfs at.

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

    * tests/scanner/Foo-expected.gir:
    * tests/scanner/foo-object.h:
    Add a union testcase which the compiler currently
    barfs at.

svn path=/trunk/; revision=403

16 years agoAdd a g_ir_compiler variable
Johan Dahlin [Tue, 19 Aug 2008 21:35:55 +0000 (21:35 +0000)]
Add a g_ir_compiler variable

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

    * gobject-introspection-1.0.pc.in:
    Add a g_ir_compiler variable

svn path=/trunk/; revision=402

16 years agoRework types to be more closely based on GITypeTag. Parse more bits. Write
Colin Walters [Tue, 19 Aug 2008 21:20:14 +0000 (21:20 +0000)]
Rework types to be more closely based on GITypeTag. Parse more bits. Write

2008-08-19  Colin Walters  <walters@verbum.org>

* giscanner/ast.py: Rework types to be more closely
based on GITypeTag.
* giscanner/girparser.py: Parse more bits.
* giscanner/girwriter.py: Write sequences in a new
way that specifies container type.
* giscanner/glibast.py: Adjust for ast.py changes,
add 'ctype' property to GLibObject and GLibInterface
so we can look things up by it later.
* gicanner/transformer.py: Names is new class holding
the various namespaces we manage.  Do not confuse
with Namespace which is toplevel XML node effectively.
Rework all type resolution to go through
_resolve_type_name_1.
* giscanner/glibtransformer.py: Raise UnknownTypeError
instead of ValueError for cleanliness.  Add Unresolved
class to mark types whose parent we haven't seen yet.
Use new Names object from transformer.py.
Correctly look up parent=.
Fix type validation to handle sequences.
* tests/scanner/Foo-expected.gir: Update for sequence
work, int instead of int32.
* tools/g-ir-scanner: Add --noclosure option
* gir/Makefile.am: Use --noclosure by default for
GLib/GObject.

svn path=/trunk/; revision=401

16 years agoType checking rework
Colin Walters [Tue, 19 Aug 2008 21:20:10 +0000 (21:20 +0000)]
Type checking rework

svn path=/trunk/; revision=400

16 years agoRegenerate.
Johan Dahlin [Mon, 18 Aug 2008 20:43:48 +0000 (20:43 +0000)]
Regenerate.

2008-08-18  Johan Dahlin  <johan@gnome.org>

    * gir/gio-2.0-good.gir:
    * gir/glib-2.0-good.gir:
    * gir/gobject-2.0-good.gir:
    Regenerate.

svn path=/trunk/; revision=399

16 years agoRedo type resolving and validation. Add a couple of new tests. Patch
Johan Dahlin [Mon, 18 Aug 2008 20:16:57 +0000 (20:16 +0000)]
Redo type resolving and validation. Add a couple of new tests. Patch

2008-08-18  Johan Dahlin  <johan@gnome.org>

    * giscanner/ast.py:
    * giscanner/girparser.py:
    * giscanner/girwriter.py:
    * giscanner/glibast.py:
    * giscanner/glibtransformer.py:
    * giscanner/transformer.py:
    * tests/scanner/Foo-expected.gir:
    * tests/scanner/foo-object.h:
    * tests/scanner/utility-expected.gir:
    * tests/scanner/utility.h:
    Redo type resolving and validation.
    Add a couple of new tests.
    Patch mostly written by Colin.

svn path=/trunk/; revision=398

16 years agoSet ctype of enums Improve enum parsing for enums without a GType. Make
Johan Dahlin [Mon, 18 Aug 2008 18:01:21 +0000 (18:01 +0000)]
Set ctype of enums Improve enum parsing for enums without a GType. Make

2008-08-18  Johan Dahlin  <johan@gnome.org>

    * gir/Makefile.am:
    * giscanner/girparser.py:
    Set ctype of enums
    * giscanner/transformer.py:
    Improve enum parsing for enums without a GType.
    Make flags/enum references to other girs work
    * giscanner/utils.py:
    Simplify this a bit
    * tests/scanner/Makefile.am:
    * tests/scanner/foo-object.h:
    * tests/scanner/utility-expected.gir:
    * tests/scanner/utility.h:
    Add a new test for external enum references

svn path=/trunk/; revision=397

16 years agoUpdate
Johan Dahlin [Mon, 18 Aug 2008 14:19:56 +0000 (14:19 +0000)]
Update

2008-08-18  Johan Dahlin  <johan@gnome.org>

    * docs/global-module-registry.txt: Update

svn path=/trunk/; revision=396

16 years agoUpdate with new type proposal
Johan Dahlin [Mon, 18 Aug 2008 13:17:06 +0000 (13:17 +0000)]
Update with new type proposal

2008-08-18  Johan Dahlin  <johan@gnome.org>

    * tests/array.gir: Update with new type proposal

svn path=/trunk/; revision=395

16 years agoMake enum serializing functions public. Clean up some whitespace.
Johan Dahlin [Mon, 18 Aug 2008 08:52:47 +0000 (08:52 +0000)]
Make enum serializing functions public. Clean up some whitespace.

2008-08-18  Johan Dahlin  <johan@gnome.org>

    * girepository/girepository.c (g_type_tag_to_string):
    * girepository/girepository.h:
    * girepository/girnode.c (g_ir_node_get_full_size_internal),
    (find_entry_node):
    * girepository/girnode.h:
    Make enum serializing functions public. Clean up some whitespace.

svn path=/trunk/; revision=394

16 years agoAdd a document for an on disk module registry format
Johan Dahlin [Sun, 17 Aug 2008 20:29:08 +0000 (20:29 +0000)]
Add a document for an on disk module registry format

2008-08-17  Johan Dahlin  <johan@gnome.org>

    * docs/global-module-registry.txt:
    Add a document for an on disk module registry format

svn path=/trunk/; revision=393

16 years agoAdd a gio gir.
Johan Dahlin [Sun, 17 Aug 2008 17:01:23 +0000 (17:01 +0000)]
Add a gio gir.

2008-08-17  Johan Dahlin  <johan@gnome.org>

    * gir/Makefile.am:
    * gir/gio-2.0-good.gir:
    Add a gio gir.

svn path=/trunk/; revision=392

16 years agoRegenerate GObject & GType. Avoid warnings when generating
Johan Dahlin [Sun, 17 Aug 2008 16:52:46 +0000 (16:52 +0000)]
Regenerate GObject & GType. Avoid warnings when generating

2008-08-17  Johan Dahlin  <johan@gnome.org>

    * gir/Makefile.am:
    * gir/glib-2.0-good.gir:
    * gir/gobject-2.0-good.gir:
    * giscanner/cgobject.py:
    * giscanner/glibtransformer.py:
    Regenerate GObject & GType.
    Avoid warnings when generating gobject-2.0.gir.
    Introspect a little more, and skip *_get_type functions.

svn path=/trunk/; revision=391

16 years agoMove .gir files to -good.gir, tweak build order.
Colin Walters [Sun, 17 Aug 2008 15:06:49 +0000 (15:06 +0000)]
Move .gir files to -good.gir, tweak build order.

* gir/glib-2.0.gir, gir/gobject-2.0.gir:
Rename to -good, always generate during build.
* gir/Makefile.am: Ensure .gir files dep on
all scanner sources.
* Makefile.am: Switch build order to ensure
the scanner is ready before we do gir/.
* tools/g-ir-scanner: Look for .git too.

svn path=/trunk/; revision=390