Author: Wim Lavrijsen <[email protected]>
Branch: cppyy-dev
Changeset: r97990:78794b47737d
Date: 2019-11-07 15:20 -0800
http://bitbucket.org/pypy/pypy/changeset/78794b47737d/
Log: fix string naming (basic_string<char> -> string)
diff --git a/pypy/module/_cppyy/capi/loadable_capi.py
b/pypy/module/_cppyy/capi/loadable_capi.py
--- a/pypy/module/_cppyy/capi/loadable_capi.py
+++ b/pypy/module/_cppyy/capi/loadable_capi.py
@@ -26,7 +26,7 @@
backend_library = 'libcppyy_backend'
# this is not technically correct, but will do for now
-std_string_name = 'std::basic_string<char>'
+std_string_name = 'std::string'
class _Arg: # poor man's union
_immutable_ = True
diff --git a/pypy/module/_cppyy/converter.py b/pypy/module/_cppyy/converter.py
--- a/pypy/module/_cppyy/converter.py
+++ b/pypy/module/_cppyy/converter.py
@@ -993,7 +993,7 @@
_converters["void*&"] = VoidPtrRefConverter
# special cases (note: 'string' aliases added below)
-_converters["std::basic_string<char>"] = StdStringConverter
+_converters["std::string"] = StdStringConverter
_converters["const std::basic_string<char>&"] = StdStringConverter #
TODO: shouldn't copy
_converters["std::basic_string<char>&"] = StdStringRefConverter
_converters["std::basic_string<char>&&"] = StdStringMoveConverter
@@ -1126,7 +1126,8 @@
("char", "signed char"), # TODO: check
("const char*", "char*"),
- ("std::basic_string<char>", "string"),
+ ("std::string", "string"),
+ ("std::string", "std::basic_string<char>"),
("const std::basic_string<char>&", "const string&"),
("std::basic_string<char>&", "string&"),
("std::basic_string<char>&&", "string&&"),
diff --git a/pypy/module/_cppyy/executor.py b/pypy/module/_cppyy/executor.py
--- a/pypy/module/_cppyy/executor.py
+++ b/pypy/module/_cppyy/executor.py
@@ -384,7 +384,7 @@
# special cases (note: 'string' aliases added below)
_executors["constructor"] = ConstructorExecutor
-_executors["std::basic_string<char>"] = StdStringExecutor
+_executors["std::string"] = StdStringExecutor
_executors["const std::basic_string<char>&"] = StdStringRefExecutor
_executors["std::basic_string<char>&"] = StdStringRefExecutor
@@ -453,7 +453,8 @@
aliases = (
("const char*", "char*"),
- ("std::basic_string<char>", "string"),
+ ("std::string", "string"),
+ ("std::string", "std::basic_string<char>"),
("const std::basic_string<char>&", "const string&"),
("std::basic_string<char>&", "string&"),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit