Description
PySide and Shiboken make a lot of use of Python strings. The simple way to use Python strings is for instance
PyObject *attr = PyObject_GetAttrString(obj, "sys"); PyObject *attr = PyObject_GetAttrString(obj, "__module__");
We give an alternative implementation instead, that lets you write
PyObject *attr = PyObject_GetAttr(obj, PyName::sys()); PyObject *attr = PyObject_GetAttr(obj, PyMagicName::module());
This solution works without any macros and uses the namespace feature as a benefit.
The solution is no longer a prototype and implements the feature for all ...String() functions, including the generated source code. The necessary string functions are half-automatically generated by running tools/scrape-names.py. There are 1580 generated static string functions at the moment.