Commit Graph

18 Commits

Author SHA1 Message Date
Johan Dahlin
314ad462dc Add utility functions for invocing closures given a GICallableInfo using
2009-02-04  Johan Dahlin  <jdahlin@async.com.br>

    * girepository/Makefile.am:
    * girepository/girffi.c (g_callable_info_get_ffi_arg_types),
    (g_callable_info_get_ffi_return_type),
    (g_callable_info_prepare_closure), (g_callable_info_free_closure):
    * girepository/girffi.h:
    Add utility functions for invocing closures given a GICallableInfo
    using libffi.


svn path=/trunk/; revision=1084
2009-02-05 00:40:14 +00:00
Johan Dahlin
9bf5ee61a4 Bug 567813 – Everything should be versioned
2009-01-15  Johan Dahlin  <jdahlin@async.com.br>

        Bug 567813 – Everything should be versioned

        * gir/Makefile.am:
        * girepository/Makefile.am:
        * girepository/girepository.c (init_globals):
        * girepository/girparser.c (locate_gir):
        * giscanner/dumper.py:
        * giscanner/transformer.py:
        * gobject-introspection-1.0.pc.in:
        * tests/everything/Makefile.am:
        * tests/invoke/Makefile.am:
        * tests/offsets/Makefile.am:
        * tests/repository/Makefile.am:
        * tests/scanner/Makefile.am:
        * tools/Makefile.am:


svn path=/trunk/; revision=1046
2009-01-15 22:31:07 +00:00
Colin Walters
a573a1c741 Bug 561137 - support multiple repositories
This change makes us stop calling g_irepository_get_default inside ginfo.c,
which won't work for non-default repositories.

Change GIBaseInfo to not only keep track of its source repository,
we hold a reference.  This makes memmgt much clearer.

svn path=/trunk/; revision=970
2008-11-25 21:48:34 +00:00
Owen Taylor
c7ae662dbe Bug 552371 – implement struct field get/set
Add convenience functions g_field_info_set_field() and
g_field_info_get_field() to set and get fields based on the offsets
in GIFieldInfo.

svn path=/trunk/; revision=929
2008-11-16 21:14:19 +00:00
Colin Walters
1ffeeab3d4 g_irepository_dump implementation
svn path=/trunk/; revision=911
2008-11-13 19:57:09 +00:00
Owen Taylor
31a7f413d6 Bug 560252 - Compute field offsets before writing typelib
girnode.h: Store the total size and alignment for
 GIrNodeStruct/Boxed/Union.

giroffset.c: New file implementing computation of structure
 field offsets.

girnode.c: Compute structure field offsets before writing types
 into the typelib.

docs/typelib-format.txt: Document that a field offset of 0xFFFF
means "unknown". Also fix description of the discriminator_offset
field for unions.

svn path=/trunk/; revision=876
2008-11-11 05:10:36 +00:00
Owen Taylor
d041deae59 Split g_ir_ffi_get_ffi_type() out from ginvoke.c
Extract a function to convert GITypeTag to ffi_type from the internals
of ginvoke.c. This will be useful in figure out structure alignment.

Also fix handling of gsize and time_t to be portable. (Add a check
to configure.ac to figure out the width of time_t.)

svn path=/trunk/; revision=873
2008-11-11 00:04:45 +00:00
Tor Lillqvist
2bb80a1209 Make g-ir-scanner work on Windows. Still problems with the typelib code.
2008-08-27  Tor Lillqvist  <tml@novell.com>

	Make g-ir-scanner work on Windows. Still problems with the typelib
	code. Changes okayed by jdahlin.

	* configure.ac: Check for Windows, set Automake conditional
	OS_WIN32. Change backslashes to forward slashes in pyexecdir to
	avoid shell quoting issues
	
	* girepository/Makefile.am: Use -no-undefined so that libtool
	agrees to build a shared library on Windows.

	* girepository/girparser.c (backtrace_stderr): No backtrace() on
	Windows. Empty implementation on Windows so far.

	* girepository/gtypelib.c (g_typelib_check_sanity): Give more
	informative error message for the assertion failures. Tell also
	what the expected size of the struct is. Check all sizes first and
	fail afterwards if at least one size was different from expected.

	* tools/Makefile.am: Reorder libraries into proper logical
	dependency order.

	* tools/generate.c: Don't include <dlfcn.h>, not used.

	* giscanner/Makefile.am: On Windows, link with the Python library,
	and install the module DLL as _giscanner.pyd. Remove the
	unnecessary import library and libtool library that libtool has
	installed.

	* giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
	and just skip it. Recognize also two "l" suffixes for long long
	constants. Recognize also __inline__.

	* giscanner/grealpath.h (g_realpath): Implement on Windows, using
	GetFullPathName(). As such, GetFullPathName() does more than the
	UNIX realpath(). It also changes relative paths into absolute
	paths. But for our purposes that shouldn't matter.

	* giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
	Windows the file descriptor passed to us is from Python. Python
	Python2.5 uses the msvcr71.dll C library, while mingw-built code
	uses msvcrt.dll. On Windows, file descriptors are specific to
	which C library is used. So we must find out what underlying OS
	handle corresponds to the file descriptor Python passes us, and
	then make that into a file descriptor valid for the C library this
	code uses.

	* giscanner/sourcescanner.py (_parse): Don't need to bypass
	__attribute__ as the lexer now handles it. The definition as empty
	was ineffective for mingw anyway, as mingw's _mingw.h undefines
	__attribute__. Close the temp file before unlinking it.

	* giscanner/cgobject.py: Use correct library name for the gobject
	DLL on Windows.

	* gir/Makefile.am: Must pass the full basename of the DLLs on
	Windows to g-ir-scanner. It's a bit ugly that we have to "know"
	that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
	reality they won't change, until there is a GLib 3, and then also
	the Unix code here needs changing.

	Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
	libintl.h is found.


svn path=/trunk/; revision=503
2008-08-27 13:33:21 +00:00
Colin Walters
89e881b47b 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
2008-08-20 19:17:14 +00:00
Johan Dahlin
282a6c644e Move shared *.[ch] files to girepository from tools
2008-08-09  Johan Dahlin  <johan@gnome.org>

    * girepository/Makefile.am:
    * tools/Makefile.am:
    * tools/girmodule.c:
    * tools/girmodule.h:
    * tools/girnode.c:
    * tools/girnode.h:
    * tools/girparser.c:
    * tools/girparser.h:
    * tools/girwriter.c:
    * tools/girwriter.h:
    Move shared *.[ch] files to girepository from tools


svn path=/trunk/; revision=337
2008-08-09 12:46:48 +00:00
Colin Walters
abf9c86431 Add environment variable G_IREPOSITORY_VERBOSE so we can print out what
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-07-24 19:20:40 +00:00
Philip Van Hoof
776ee5f79e tools/gidlnode.c
2008-06-08  Philip Van Hoof  <pvanhoof@gnome.org>

        * girepository/girepository.c:
        * girepository/gtypelib.c:
        * girepository/ginfo.c:
        * girepository/ginvoke.c:
        * girepository/girepository.h:
        * girepository/gtypelib.h:
        * girepository/gmetadata.c:
        * girepository/Makefile.am:
        * girepository/gmetadata.h:
        * tools/compiler.c:
        * tools/gidlmodule.c:
        * tools/gidlnode.c
        * tools/generate.c:
        * tools/gidlmodule.h:
        * tools/gidlparser.c:

        Renamed GMetadata to GTypelib


svn path=/trunk/; revision=288
2008-06-08 14:37:30 +00:00
Johan Dahlin
df21818925 Rename pkg-config name to gobject-introspection-1.0, Do not installed
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-05-31 20:49:42 +00:00
Havoc Pennington
2fb6877346 Take advantage of a libffi.pc if one exists, as it does on Fedora 8. Make
2008-03-05  Havoc Pennington  <hp@redhat.com>

	* configure.ac: Take advantage of a libffi.pc if one exists, as it
	does on Fedora 8. Make libffi a hard requirement, since it was in
	practice anyway (was not really conditional in the code or
	makefile, only in configure).


svn path=/trunk/; revision=121
2008-03-05 17:10:28 +00:00
Rob Taylor
1d764c63cc Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.
2008-02-13  Rob Taylor  <rob.taylor@codethink.co.uk>

	* gcov.mak:
	* girepository/Makefile.am:
	* tools/Makefile.am:
	Rename GCOV_SOURCES to GCOVSOURCES to top automake complaining.

svn path=/trunk/; revision=113
2008-02-13 17:31:59 +00:00
Johan Dahlin
dbdadab624 Make 'make distcheck' work again.
2008-02-10  Johan Dahlin  <johan@gnome.org>

	* Makefile.am:
	* configure.ac:
	* girepository/Makefile.am:
	Make 'make distcheck' work again.


svn path=/trunk/; revision=110
2008-02-10 19:19:15 +00:00
Rob Taylor
abcc72d5ef Added:
2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>

	* Makefile.am:
	* configure.ac:
	* gcov.mak: Added:
	* girepository/Makefile.am:
	* m4/Makefile.am: Added:
	* m4/as-compiler-flag.m4: Added:
	* m4/gcov.m4: Added:
	* tools/Makefile.am:
	Add ability to generate a coverage report.
	Adds configure option --enable-gcov and make rule 'check-coverage'.

svn path=/trunk/; revision=105
2008-02-08 18:09:05 +00:00
Rob Taylor
ac69c8f5a4 Added: Added: Renamed to tools/Makefile.am: Renamed to tools/compiler.c:
2008-02-08  Rob Taylor  <rob.taylor@codethink.co.uk>

	* Makefile.am:
	* configure.ac:
	* gidl/Makefile.am: Added:
	* girepository/Makefile.am: Added:
	* src/Makefile.am: Renamed to tools/Makefile.am:
	* src/compiler.c: Renamed to tools/compiler.c:
	* src/g-idl-offsets.pl: Renamed to tools/g-idl-offsets.pl:
	* src/generate.c: Renamed to tools/generate.c:
	* src/gidlmodule.c: Renamed to tools/gidlmodule.c:
	* src/gidlmodule.h: Renamed to tools/gidlmodule.h:
	* src/gidlnode.c: Renamed to tools/gidlnode.c:
	* src/gidlnode.h: Renamed to tools/gidlnode.h:
	* src/gidlparser.c: Renamed to tools/gidlparser.c:
	* src/gidlparser.h: Renamed to tools/gidlparser.h:
	* src/gidlwriter.c: Renamed to tools/gidlwriter.c:
	* src/gidlwriter.h: Renamed to tools/gidlwriter.h:
	* src/ginfo.c: Renamed to girepository/ginfo.c:
	* src/ginvoke.c: Renamed to girepository/ginvoke.c:
	* src/girepository.c: Renamed to girepository/girepository.c:
	* src/girepository.h: Renamed to girepository/girepository.h:
	* src/gmetadata.c: Renamed to girepository/gmetadata.c:
	* src/gmetadata.h: Renamed to girepository/gmetadata.h:
	* src/scanner.c: Renamed to tools/scanner.c:
	* src/scanner.h: Renamed to tools/scanner.h:
	* src/scannerlexer.l: Renamed to tools/scannerlexer.l:
	* src/scannerparser.y: Renamed to tools/scannerparser.y:
	* tests/invoke/Makefile.am:
	Split src/ into girepository/ and tools/

	* Makefile.am:
	* configure.ac:
	* girepository/Makefile.am:
	* tests/Makefile.am:
	* tests/invoke/Makefile.am:
	* tests/parser/Makefile.am:
	* tests/roundtrips.sh:
	* tools/Makefile.am:
	Make distcheck work.

svn path=/trunk/; revision=104
2008-02-08 15:31:03 +00:00