Author: Wim Lavrijsen <[email protected]>
Branch: cling-support
Changeset: r88562:863b481929a7
Date: 2016-11-22 16:53 -0800
http://bitbucket.org/pypy/pypy/changeset/863b481929a7/

Log:    restore dummy backend for some moderate testing w/o Cling

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
@@ -9,8 +9,8 @@
 # the selection of the desired backend (default is Reflex).
 
 # choose C-API access method:
-#from pypy.module.cppyy.capi.loadable_capi import *
-from pypy.module.cppyy.capi.builtin_capi import *
+from pypy.module.cppyy.capi.loadable_capi import *
+#from pypy.module.cppyy.capi.builtin_capi import *
 
 from pypy.module.cppyy.capi.capi_types import C_OBJECT,\
     C_NULL_TYPE, C_NULL_OBJECT
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
@@ -725,7 +725,7 @@
     return result;
 }
 
-char* cppyy_call_s(cppyy_method_t method, cppyy_object_t self, int nargs, 
void* args) {
+char* cppyy_call_s(cppyy_method_t method, cppyy_object_t self, int nargs, 
void* args, size_t* /* length */) {
     char* result = 0;
     const long idx = (long)method;
     if (idx == s_methods["static_example01::staticStrcpy_cchar*"]) {
@@ -759,8 +759,8 @@
     return (cppyy_object_t)result;
 }
 
-cppyy_methptrgetter_t cppyy_get_methptr_getter(cppyy_type_t /* handle */, 
cppyy_index_t /* method_index */) {
-    return (cppyy_methptrgetter_t)0;
+cppyy_funcaddr_t cppyy_get_function_address(cppyy_scope_t /* scope */, 
cppyy_index_t /* idx */) {
+    return (cppyy_funcaddr_t)0;
 }
 
 
@@ -790,7 +790,11 @@
 /* scope reflection information ------------------------------------------- */
 int cppyy_is_namespace(cppyy_scope_t /* handle */) {
     return 0;
-}   
+}
+
+int cppyy_is_abstract(cppyy_type_t /* type) */) {
+    return 0;
+}
 
 int cppyy_is_enum(const char* /* type_name */) {
     return 0;
@@ -942,9 +946,9 @@
     free(ptr);
 }
 
-cppyy_object_t cppyy_charp2stdstring(const char* str) {
-    void* arena = new char[sizeof(std::string)];
-    new (arena) std::string(str);
+cppyy_object_t cppyy_charp2stdstring(const char* str, size_t sz) {
+    void* arena = new char[sz];
+    new (arena) std::string(str, sz);
     return (cppyy_object_t)arena;
 }
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to