aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysidestaticstrings.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-11-06 14:53:53 +0100
committerChristian Tismer <tismer@stackless.com>2020-11-11 17:29:38 +0000
commit12c93597dd09c68e2d619e03f9867afbc56dcf48 (patch)
tree8fdf4cff22b88b1dbab209f744568923fc963c98 /sources/pyside6/libpyside/pysidestaticstrings.cpp
parentce8dcd2c7755aa5272f484c0e475a1b65b8a01c3 (diff)
__feature__: provide useful error message when feature is active
Features seem to work quite good so far, but they clearly need much more testing. One of the problems is that error messages are produced, but the function name is not found and we get an ugly default error message. This is an efficient implementation that does all name mangling in the C code. A helper dict avoids linear search for properties. Task-number: PYSIDE-1019 Change-Id: Ic87c4a6e7dc2b2a251e809d6df0eb7fb9ca8021c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysidestaticstrings.cpp')
-rw-r--r--sources/pyside6/libpyside/pysidestaticstrings.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pysidestaticstrings.cpp b/sources/pyside6/libpyside/pysidestaticstrings.cpp
index 760d77632..7705fd058 100644
--- a/sources/pyside6/libpyside/pysidestaticstrings.cpp
+++ b/sources/pyside6/libpyside/pysidestaticstrings.cpp
@@ -60,4 +60,11 @@ STATIC_STRING_IMPL(name, "name")
STATIC_STRING_IMPL(property, "property")
STATIC_STRING_IMPL(select_id, "select_id")
} // namespace PyName
+namespace PyMagicName
+{
+STATIC_STRING_IMPL(doc, "__doc__")
+STATIC_STRING_IMPL(func, "__func__")
+STATIC_STRING_IMPL(name, "__name__")
+STATIC_STRING_IMPL(property_methods, "__property_methods__")
+} // namespace PyMagicName
} // namespace PySide