Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
PyStrings.h
Go to the documentation of this file.
1#ifndef CPYRT_PYSTRINGS_H
2#define CPYRT_PYSTRINGS_H
3
4namespace cppjit::cpyrt {
5
6// python strings kept for performance reasons
7
8// X(variable, string): each entry declares PyStrings::variable, holding the
9// interned python string for "string"
10#define CPYRT_PYSTRINGS(X) \
11 X(gAssign, "__assign__") \
12 X(gBases, "__bases__") \
13 X(gBase, "__base__") \
14 X(gContains, "contains") \
15 X(gCopy, "copy") \
16 X(gCppBool, "__cpp_bool__") \
17 X(gCppName, "__cpp_name__") \
18 X(gAnnotations, "__annotations__") \
19 X(gCastCpp, "__cast_cpp__") \
20 X(gCType, "__ctype__") \
21 X(gDeref, "__deref__") \
22 X(gPreInc, "__preinc__") \
23 X(gPostInc, "__postinc__") \
24 X(gDict, "__dict__") \
25 X(gEmptyString, "") \
26 X(gEq, "__eq__") \
27 X(gFollow, "__follow__") \
28 X(gHasValue, "has_value") \
29 X(gGetItem, "__getitem__") \
30 X(gGetNoCheck, "_getitem__unchecked") \
31 X(gSetItem, "__setitem__") \
32 X(gInit, "__init__") \
33 X(gIter, "__iter__") \
34 X(gLen, "__len__") \
35 X(gLifeLine, "__lifeline") \
36 X(gModule, "__module__") \
37 X(gMRO, "__mro__") \
38 X(gName, "__name__") \
39 X(gNe, "__ne__") \
40 X(gRepr, "__repr__") \
41 X(gCppRepr, "__cpp_repr") \
42 X(gStr, "__str__") \
43 X(gCppStr, "__cpp_str") \
44 X(gTypeCode, "typecode") \
45 X(gCTypesType, "_type_") \
46 \
47 X(gUnderlying, "__underlying") \
48 X(gRealInit, "__real_init") \
49 \
50 X(gAdd, "__add__") \
51 X(gSub, "__sub__") \
52 X(gMul, "__mul__") \
53 X(gDiv, "__truediv__") \
54 \
55 X(gLShift, "__lshift__") \
56 X(gLShiftC, "__lshiftc__") \
57 \
58 X(gAt, "at") \
59 X(gBegin, "begin") \
60 X(gEnd, "end") \
61 X(gFirst, "first") \
62 X(gSecond, "second") \
63 X(gSize, "size") \
64 X(gTemplate, "Template") \
65 X(gVectorAt, "_vector__at") \
66 X(gInsert, "insert") \
67 X(gValueType, "value_type") \
68 X(gValueTypePtr, "_value_type") \
69 X(gValueSize, "value_size") \
70 \
71 X(gCppReal, "__cpp_real") \
72 X(gCppImag, "__cpp_imag") \
73 \
74 X(gThisModule, "cppjit") \
75 \
76 X(gDispInit, "_init_dispatchptr") \
77 X(gDispGet, "_get_dispatch") \
78 \
79 X(gExPythonize, "__cppjit_explicit_pythonize__") \
80 X(gPythonize, "__cppjit_pythonize__") \
81 /* old cppyy names, see the legacy API section in Compatibility.h */ \
82 X(gCppyyExPythonize, "__cppyy_explicit_pythonize__") \
83 X(gCppyyPythonize, "__cppyy_pythonize__") \
84 \
85 X(gArray, "__array__") \
86 X(gDType, "dtype") \
87 X(gFromBuffer, "frombuffer")
88
89namespace PyStrings {
90
91#define CPYRT_DECLARE_PYSTRING(var, str) extern PyObject* var;
93#undef CPYRT_DECLARE_PYSTRING
94
95} // namespace PyStrings
96
97bool CreatePyStrings();
99
100} // namespace cppjit::cpyrt
101
102#endif // !CPYRT_PYSTRINGS_H
_object PyObject
#define CPYRT_PYSTRINGS(X)
Definition PyStrings.h:10
#define CPYRT_DECLARE_PYSTRING(var, str)
Definition PyStrings.h:91
bool CreatePyStrings()
Definition PyStrings.cxx:14
PyObject * DestroyPyStrings()
Definition PyStrings.cxx:27