2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
* tools/quote-file.sh
* tools/compiler.c
* tools/generate.c
Move to using the 'C' struct compiler code.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=135
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
* 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
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginvoke.c
* girepository/girepository.h
* girepository/gmetadata.c
* girepository/gmetadata.h
* tools/generate.c
* tools/gidlparser.c
Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
to avoid confusion with the interface blob.
* tools/generate.c
* tools/gidlparser.c
Remove magic numbers and replace with type-tag
enumeration symbols.
* girepository/gmetadata.c
Add validate declaration.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=129
Adapt gi-compile-repository sources to compile against the updated
libgirepository that is included with GLib.
This also renames "g-ir-compiler" to "gi-compile-repository" to avoid
overwriting the existing binary and to simplify the binary name going
forward.
The "--code" option was removed years ago in d5b8d8d523c3bc26aa9fe6c364d3a17d325b55b6
so remove references to it from README and g-ir-compiler(1)
Remove the "--no-init" option from g-ir-compiler and g-ir-compiler(1)
as it was documented to "can only be used if --code is also specified",
so no reason to keep it around.
Return a non-zero result when opening the output file fails and
don't use g_error() for other failures when writing out the file,
since such errors should not produce a core dump.
We never actually include multiple modules in the compiler,
so just nuke that. Also rather than passing around GIrModule
consistently pass around a GIrTypelibBuild structure which
has various things.
This lets us maintain a stack there which we can walk for
better error messages.
Also, fix up the node lookup in giroffsets.c; previously
it didn't really handle includes correctly. We really need to
switch to always using Foo.Bar (i.e. GIName) names internally...
It can't really work right now because we rely on dumping data at runtime,
which requires the library. If in the future we support static scanning,
we can reinvestigate embedded typelibs.
Take a GError * for typelib loading code, validate the header. This
fixes bizarre errors from gjs where g_irepository_require would happily
load old typelibs.
Add a toplevel GirParser object to hold state that is global across
a compilation. Currently just holds the include path, but will
eventually also keep a cached list of parsed modules.
svn path=/trunk/; revision=901
* gir/Makefile.am: Dep on Makefile
* girepository/ginfo.c: Print out a nicer error
message if we failed to load something.
* girepository/girepository.c: Clean up
default typelib handling; remove global
default_typelib variable. Ensure we handle
NULL repository in more places.
Support dependency resolution.
* tests/Makefile.am: Kill off gobject.gir,
it conflicts with the real one.
* tests/Object.gir: Depend on GObject.
* tools/generate.c: Take --includedir
argument to say which directories to search
for typelibs. Print out dependencies.
svn path=/trunk/; revision=541
* gir/Makefile.am: Use --includedir
* girepository/girparser.c: Recursively parse
includes to pull in aliases and expand them.
We need this to avoid putting unknown names in
the typelibs.
* tools/compiler.c: Add --includedir option.
svn path=/trunk/; revision=512
2008-08-28 Tor Lillqvist <tml@novell.com>
* tools/compiler.c (write_out_typelib): Use binary mode for output
file on Windows.
* girepository/girnode.c: Don't print NULL strings.
* tests/invoke/Makefile.am
* tests/scanner/Makefile.am: Use -no-undefined on Windows to
convince libtool to build shared libraries.
* tests/invoke/invoke.c: Don't needlessly include <dlfcn.h>. Use
g_assert() instead of printing out expected errors.
svn path=/trunk/; revision=509
2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
* tools/quote-file.sh
* tools/compiler.c
* tools/generate.c
Move to using the 'C' struct compiler code.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=135