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
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
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
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
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
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
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
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
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
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
2008-08-17 Johan Dahlin <johan@gnome.org>
* girepository/gtypelib.c (validate_enum_blob):
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Remove resolve_possible_typedefs, it was unused.
Allow multiple enum values of the sample value in an enum,
since it's actually pretty common.
Register enums so they can be resolved too.
svn path=/trunk/; revision=389
2008-08-14 Colin Walters <walters@verbum.org>
* giscanner/transformer.py: Comment data structures.
Also squash pointers in resolve_type_name to correspond
with what we do for params.
* giscanner/glibtransformer.py: Print warnings in more
situations. Rework checks for method/constructor to
look up in our GType database instead of just checking
for *. Avoid generating <record> for GObject which
duplicate the <class>.
* gir/Makefile.am: Generate glib-2.0.gir and gobject-2.0.gir
in here.
svn path=/trunk/; revision=373
2008-08-13 Johan Dahlin <johan@gnome.org>
* girepository/girnode.c (g_ir_node_get_full_size_internal):
* girepository/girparser.c (start_class):
* giscanner/glibtransformer.py:
Allow get_type to be None, set a get_type for GInitiallyUnowned too.
svn path=/trunk/; revision=362
2008-08-12 Colin Walters <walters@verbum.org>
* giscanner/transformer.py: Record typedefs as <alias> elements.
Also attempt to look up types in external namespaces.
* giscanner/girwriter.py: Write them.
* giscanner/glibtransformer.py: Rework resolver using real instanceof
checks. Resolve interface methods and properties.
* tests/scanner/foo-object.h: Add a method with typedef.
* tests/scanner/Foo-expected.gir: Update.
* girepository/girnode.c: Debug tweaks.
* girepository/girparser.c: Make a first pass through the XML where we
record all the aliases. This lets us resolve them as we go through the
second pass.
* gir/Makefile.am: Don't install gobject-2.0.gir; we want that to come
from gir-repository.
svn path=/trunk/; revision=355
2008-08-12 Colin Walters <walters@verbum.org>
* girepository/girparser.c, girepository/gtypelib.c,
girepository/gtypelib.h, girepository/girnode.c:
Remove usage of (GAPI-oriented) TypeTag in favor of
GITypeTag from girepository.h.
svn path=/trunk/; revision=347
2008-07-24 Colin Walters <walters@verbum.org>
* girepository/girepository.c (g_irepository_register): Add
environment variable G_IREPOSITORY_VERBOSE so we can print
out what we're doing.
* girepository/girepository.c (g_irepository_register_file):
Add GError error message to g_debug call.
svn path=/trunk/; revision=296
2008-05-31 Johan Dahlin <jdahlin@async.com.br>
* Makefile.am:
* configure.ac:
* girepository/Makefile.am:
* giscanner/transformer.py:
* gobject-introspection-1.0.pc.in:
* gobject-introspection.pc.in:
* tools/Makefile.am:
Rename pkg-config name to gobject-introspection-1.0,
Do not installed anything which is not using the gir format.
Disable compililation the old C scanner, but still keep the source
until all the remaning functionallity has been ported.
svn path=/trunk/; revision=277
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginvoke.c (g_function_info_invoke): If a symbol is
not in metadata->module, look for it in the global module, in case
some other object or the app itself provides the symbol.
svn path=/trunk/; revision=221
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/gmetadata.c (_g_metadata_init): hack to avoid
dlopening a library that is already in the main app, by checking
whether one of the lib's symbols is already loaded.
svn path=/trunk/; revision=220
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/gmetadata.c (_g_metadata_init): remove
G_MODULE_BIND_LOCAL flag when loading libraries, since some libs
(Glade and Clutter for example) rely on being loaded globally.
svn path=/trunk/; revision=217
2008-04-22 Havoc Pennington <hp@pobox.com>
* girepository/ginfo.c (g_registered_type_info_get_g_type): new
function to get the GType given a RegisteredTypeInfo
svn path=/trunk/; revision=216
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginfo.c
* tools/generate.c
Change the way that external references with no namespace
are dealt with. External references with no namespace
are placed into the XML as-if they are a local reference.
This is temporary, but helps with roundtrip tests.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=134
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginfo.c
Add the ability to get the value of a constant of
type TYPE_TAG_SYMBOL. In the case of a symbol the value
is provided as a string.
This would deal properly with:
typedef char* random;
const random = "A string";
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=133
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginfo.c
* girepository/girepository.h
* tools/generate.c
Add a function to check if an enum is registered or not.
Previously anything testing this relied on the g-type
string offset having a value of 0.
* girepository/gmetadata.c
* girepository/gmetadata.h
* tools/generate.c
Remove unneccesary or erroneous checks. There were two
metadata validation checks which made sure that the blob
sizes were the same as some magic numbers compiled into the code.
This is wrong as it breaks any forwards compatibility that may
be possible.
Checks were also present that made sure that unregistered type
blobs had a value of 0 in the g-type offset field. This is
unneccessary. If a type blob is unregistered then any value
in its g-type field is simply invalid.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=132