[pypy-commit] pypy cppyy-packaging: add extra info in dummy_backend for const_int test

wlav pypy.commits at gmail.com
Thu Apr 26 13:34:13 EDT 2018


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: cppyy-packaging
Changeset: r94453:b762bdca4513
Date: 2018-04-26 10:16 -0700
http://bitbucket.org/pypy/pypy/changeset/b762bdca4513/

Log:	add extra info in dummy_backend for const_int test

diff --git a/pypy/module/_cppyy/src/dummy_backend.cxx b/pypy/module/_cppyy/src/dummy_backend.cxx
--- a/pypy/module/_cppyy/src/dummy_backend.cxx
+++ b/pypy/module/_cppyy/src/dummy_backend.cxx
@@ -348,6 +348,7 @@
         PUBLIC_CPPYY_DATA3(short,   short,              h);
         PUBLIC_CPPYY_DATA3(ushort,  unsigned short,     H);
         PUBLIC_CPPYY_DATA3(int,     int,                i);
+        PUBLIC_CPPYY_DATA (const_int, const int);
         PUBLIC_CPPYY_DATA3(uint,    unsigned int,       I);
         PUBLIC_CPPYY_DATA3(long,    long,               l);
         PUBLIC_CPPYY_DATA3(ulong,   unsigned long,      L);
@@ -1032,7 +1033,9 @@
     return s_scopes[handle].m_datambrs[idatambr].m_isstatic;
 }
 
-int cppyy_is_const_data(cppyy_scope_t /* handle */, cppyy_index_t /* idatambr */) {
+int cppyy_is_const_data(cppyy_scope_t handle, cppyy_index_t idatambr) {
+    if (s_scopes[handle].m_datambrs[idatambr].m_name == "m_const_int")
+        return 1;
     return 0;
 }
 


More information about the pypy-commit mailing list