gobject-introspection r496 - in trunk: . gir giscanner
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r496 - in trunk: . gir giscanner
- Date: Tue, 26 Aug 2008 11:21:51 +0000 (UTC)
Author: johan
Date: Tue Aug 26 11:21:51 2008
New Revision: 496
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=496&view=rev
Log:
2008-08-26 Johan Dahlin <johan gnome org>
* gir/Makefile.am:
* giscanner/Makefile.am:
* giscanner/cgobject.py:
* giscanner/config.py.in:
* giscanner/sourcescanner.py:
Avoid undeffing __GNUC__, instead define
__attribute__ & friends. Remove glibconfig.h hack.
Modified:
trunk/ChangeLog
trunk/gir/Makefile.am
trunk/giscanner/Makefile.am
trunk/giscanner/cgobject.py
trunk/giscanner/config.py.in
trunk/giscanner/sourcescanner.py
Modified: trunk/gir/Makefile.am
==============================================================================
--- trunk/gir/Makefile.am (original)
+++ trunk/gir/Makefile.am Tue Aug 26 11:21:51 2008
@@ -18,8 +18,7 @@
-I$(GLIB_LIBDIR)/glib-2.0/include \
-DGETTEXT_PACKAGE=Dummy \
-D__G_I18N_LIB_H__ \
- -D__G_LIBCONFIG_H__ \
- $(top_builddir)/giscanner/glibconfig-scanner.h \
+ $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
$(GLIB_INCLUDEDIR)/glib/*.h
BUILT_SOURCES += GLib.gir
Modified: trunk/giscanner/Makefile.am
==============================================================================
--- trunk/giscanner/Makefile.am (original)
+++ trunk/giscanner/Makefile.am Tue Aug 26 11:21:51 2008
@@ -2,14 +2,12 @@
INCLUDES = -I$(top_srcdir)/girepository
BUILT_SOURCES = \
- glibconfig-scanner.h \
scannerparser.c \
scannerparser.h \
scannerlexer.c \
scannerlexer.h
CLEANFILES = \
- glibconfig-scanner.h \
scannerparser.c \
scannerparser.h \
scannerlexer.c \
@@ -68,16 +66,4 @@
_giscanner.so: _giscanner.la
ln -sf .libs/_giscanner.so .
-GLIBCONFIG=`pkg-config --variable=libdir glib-2.0`/glib-2.0/include/glibconfig.h
-glibconfig-scanner.h:
- cat $(GLIBCONFIG) \
- | sed s/__G_LIBCONFIG_H__/__G_LIBCONFIG_SCANNER_H__/g \
- | sed s/define\ G_HAVE_ISO_VARARGS\ 1/undef\ G_HAVE_ISO_VARARGS/g \
- | sed s/define\ G_HAVE_GNUC_VARARGS\ 1/undef\ G_HAVE_GNUC_VARARGS/g \
- | sed s/G_GNUC_EXTENSION\ //g \
- > $(top_builddir)/giscanner/$@
-
-gidir = $(includedir)/gobject-introspection-1.0/
-gi_HEADERS = glibconfig-scanner.h
-
include $(top_srcdir)/gcov.mak
Modified: trunk/giscanner/cgobject.py
==============================================================================
--- trunk/giscanner/cgobject.py (original)
+++ trunk/giscanner/cgobject.py Tue Aug 26 11:21:51 2008
@@ -127,7 +127,7 @@
_library_path = find_library('gobject-2.0')
if not _library_path:
raise ImportError("Could not find gobject-2.0 library")
-_gobj = ctypes.cdll.LoadLibrary(_library_path)
+_gobj = ctypes.CDLL(_library_path, ctypes.RTLD_GLOBAL)
_gobj.g_type_init()
Modified: trunk/giscanner/config.py.in
==============================================================================
--- trunk/giscanner/config.py.in (original)
+++ trunk/giscanner/config.py.in Tue Aug 26 11:21:51 2008
@@ -21,7 +21,3 @@
DATADIR = "@datadir@"
DATADIR = DATADIR.replace(
"${prefix}", "@prefix@")
-
-INCLUDEDIR = "@includedir@/gobject-introspection-1.0"
-INCLUDEDIR = INCLUDEDIR.replace(
- "${prefix}", "@prefix@")
Modified: trunk/giscanner/sourcescanner.py
==============================================================================
--- trunk/giscanner/sourcescanner.py (original)
+++ trunk/giscanner/sourcescanner.py Tue Aug 26 11:21:51 2008
@@ -23,7 +23,6 @@
import tempfile
from . import _giscanner
-from .config import INCLUDEDIR
(CSYMBOL_TYPE_INVALID,
CSYMBOL_TYPE_CONST,
@@ -224,29 +223,20 @@
return
defines = ['__GI_SCANNER__']
- undefs = ['__GNUC__']
- cpp_args = ['cpp', '-C', '-I.']
-
- # libintl.h has no types we care about and breaks
- # cpp on some systems
- defines.append('_LIBINTL_H')
-
- # Do not parse the normal glibconfig.h, use the
- # one we provide instead
- defines.append('__G_LIBCONFIG_H__')
-
- dirname = os.path.dirname(os.path.abspath(__file__))
- if os.path.exists(
- os.path.join(dirname, '..', 'gobject-introspection-1.0.pc.in')):
- includedir = os.path.join(dirname, '..', 'giscanner')
- else:
- includedir = INCLUDEDIR
- filenames.insert(0, os.path.join(includedir, 'glibconfig-scanner.h'))
+ undefs = []
+ cpp_args = ['gcc', '-E', '-C', '-I.', '-']
cpp_args += self._cpp_options
proc = subprocess.Popen(cpp_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
+
+ proc.stdin.write('#define __attribute__(x)\n')
+ proc.stdin.write('#define __const\n')
+ proc.stdin.write('#define __extension__\n')
+ proc.stdin.write('#define __inline\n')
+ proc.stdin.write('#define __restrict\n')
+
for define in defines:
proc.stdin.write('#ifndef %s\n' % (define, ))
proc.stdin.write('# define %s\n' % (define, ))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]