[pypy-commit] pypy reflex-support: function to identify the back-end (to be used for testing only)

wlav noreply at buildbot.pypy.org
Thu Feb 23 01:41:46 CET 2012


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r52784:bffd3860d4ee
Date: 2012-02-22 13:39 -0800
http://bitbucket.org/pypy/pypy/changeset/bffd3860d4ee/

Log:	function to identify the back-end (to be used for testing only)

diff --git a/pypy/module/cppyy/capi/__init__.py b/pypy/module/cppyy/capi/__init__.py
--- a/pypy/module/cppyy/capi/__init__.py
+++ b/pypy/module/cppyy/capi/__init__.py
@@ -4,6 +4,8 @@
 import reflex_capi as backend
 #import cint_capi as backend
 
+identify = backend.identify
+
 _C_OPAQUE_PTR = rffi.VOIDP
 _C_OPAQUE_NULL = lltype.nullptr(_C_OPAQUE_PTR.TO)
 
diff --git a/pypy/module/cppyy/capi/cint_capi.py b/pypy/module/cppyy/capi/cint_capi.py
--- a/pypy/module/cppyy/capi/cint_capi.py
+++ b/pypy/module/cppyy/capi/cint_capi.py
@@ -4,7 +4,7 @@
 from pypy.rpython.lltypesystem import rffi
 from pypy.rlib import libffi, rdynload
 
-__all__ = ['eci', 'c_load_dictionary']
+__all__ = ['identify', 'eci', 'c_load_dictionary']
 
 pkgpath = py.path.local(__file__).dirpath().join(os.pardir)
 srcpath = pkgpath.join("src")
@@ -17,6 +17,9 @@
     rootincpath = []
     rootlibpath = []
 
+def identify():
+    return 'CINT'
+
 # force loading in global mode of core libraries, rather than linking with
 # them as PyPy uses various version of dlopen in various places; note that
 # this isn't going to fly on Windows (note that locking them in objects and
diff --git a/pypy/module/cppyy/capi/reflex_capi.py b/pypy/module/cppyy/capi/reflex_capi.py
--- a/pypy/module/cppyy/capi/reflex_capi.py
+++ b/pypy/module/cppyy/capi/reflex_capi.py
@@ -3,12 +3,15 @@
 from pypy.rlib import libffi
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 
-__all__ = ['eci', 'c_load_dictionary']
+__all__ = ['identify', 'eci', 'c_load_dictionary']
 
 pkgpath = py.path.local(__file__).dirpath().join(os.pardir)
 srcpath = pkgpath.join("src")
 incpath = pkgpath.join("include")
 
+def identify():
+    return 'Reflex'
+
 if os.environ.get("ROOTSYS"):
     rootincpath = [os.path.join(os.environ["ROOTSYS"], "include")]
     rootlibpath = [os.path.join(os.environ["ROOTSYS"], "lib")]


More information about the pypy-commit mailing list