Commit Graph

15 Commits

Author SHA1 Message Date
Colin Walters
295fc99a40 More context information in validate
* girepository/gtypelib.c: Add more context
	during validate.

svn path=/trunk/; revision=525
2008-08-29 18:49:22 +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
7805ca101f Also use G_MODULE_SUFFIX instead of hardcoding .so.
2008-08-26  Colin Walters  <walters@verbum.org>

	* girepository/gtypelib.c (_g_typelib_init): Also
	use G_MODULE_SUFFIX instead of hardcoding .so.

svn path=/trunk/; revision=501
2008-08-26 21:05:32 +00:00
Colin Walters
d6139fcb45 Free string in the right place.
2008-08-26  Colin Walters  <walters@verbum.org>

	* girepository/gtypelib.c (_g_typelib_init): Free
	string in the right place.

svn path=/trunk/; revision=500
2008-08-26 21:01:36 +00:00
Colin Walters
7f30a2502c Fix small memory leak
svn path=/trunk/; revision=499
2008-08-26 20:06:42 +00:00
Colin Walters
00fb846ad8 Handle both .la and .so names; this works better in the uninstalled
2008-08-26  Colin Walters  <walters@verbum.org>

	* girepository/gtypelib.c (_g_typelib_init): Handle
	both .la and .so names; this works better in the
	uninstalled library case.

svn path=/trunk/; revision=498
2008-08-26 20:04:38 +00:00
Colin Walters
1ebc6cfb7a 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
2008-08-24 16:51:43 +00:00
Colin Walters
88f221c38e Check constructor returns
svn path=/trunk/; revision=477
2008-08-23 21:30:09 +00:00
Colin Walters
60adefcef2 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
2008-08-21 16:15:55 +00:00
Johan Dahlin
a47d659cd1 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
2008-08-21 14:21:00 +00:00
Johan Dahlin
fc01170517 Remove resolve_possible_typedefs, it was unused. Allow multiple enum
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-16 22:26:55 +00:00
Colin Walters
0ed07b5934 Remove usage of (GAPI-oriented) TypeTag in favor of GITypeTag from
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-08-12 15:34:27 +00:00
Johan Dahlin
33455bc3ef Rename metadata to typelib in variable names, comments and apis.
2008-08-09  Johan Dahlin  <johan@gnome.org>

    * *.[ch]:
    Rename metadata to typelib in variable names,
    comments and apis.


svn path=/trunk/; revision=339
2008-08-09 12:55:32 +00:00
Johan Dahlin
e1c3498df8 Merge in the gir-compiler branch. Thanks to Philip and Colin for their
2008-08-08  Johan Dahlin  <johan@gnome.org>

    * girepository/gtypelib.c (validate_header):
    * girepository/gtypelib.h:
    * giscanner/ast.py:
    * giscanner/girwriter.py:
    * giscanner/sourcescanner.c (gi_source_symbol_ref),
    (gi_source_symbol_unref):
    * tests/array.test:
    * tests/boxed.test:
    * tests/constant.test:
    * tests/enum.test:
    * tests/errors.test:
    * tests/function.test:
    * tests/gobject.test:
    * tests/interface.test:
    * tests/invoke/Makefile.am:
    * tests/invoke/testfns.xml:
    * tests/object.test:
    * tests/parser/Makefile.am:
    * tests/roundtrips.sh:
    * tests/struct.test:
    * tests/types.test:
    * tests/union.test:
    * tests/xref1.test:
    * tests/xref2.test:
    * tools/Makefile.am:
    * tools/compiler.c (main):
    * tools/generate.c (write_callable_info), (write_function_info),
    (write_repository):
    * tools/gidlmodule.c:
    * tools/gidlmodule.h:
    * tools/gidlnode.c:
    * tools/gidlnode.h:
    * tools/gidlparser.c:
    * tools/gidlparser.h:
    * tools/gidlwriter.c:
    * tools/gidlwriter.h:
    * tools/scanner.c (create_node_from_gtype),
    (create_node_from_ctype), (g_igenerator_process_properties),
    (g_igenerator_process_signals), (g_igenerator_create_object),
    (g_igenerator_create_interface), (g_igenerator_create_boxed),
    (g_igenerator_create_enum), (g_igenerator_create_flags),
    (g_igenerator_process_function_symbol),
    (g_igenerator_process_unregistered_struct_typedef),
    (g_igenerator_process_struct_typedef),
    (g_igenerator_process_union_typedef),
    (g_igenerator_process_enum_typedef),
    (g_igenerator_process_function_typedef),
    (g_igenerator_process_constant), (g_igenerator_process_symbols),
    (g_igenerator_add_module), (g_igenerator_add_include_idl):
    Merge in the gir-compiler branch.
    Thanks to Philip and Colin for their help.


svn path=/trunk/; revision=325
2008-08-08 19:09:17 +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