I have two C macros, the first one is basically concatenating two tokens
#define _PY_CLASS_NAME(name) Py##name
The second macro is stringifying input argument
#define STR(text) #text
Because of the way C preprocessor work when I try something like
STR(_PY_CLASS_NAME(name))
I actually get "_PY_CLASS_NAME(name)". So the question is, how to avoid it?
I tried something like
#define CONCAT(A, B) #A###B
and it works. But maybe it is a better way to do it?