Robert Bradshaw wrote:
Name mangling is done for the standard reasons--to avoid possible conflicts with all other symbols that may be defined.
The main reason for mangling names is that top-level declarations in Cython belong to a module namespace, whereas C just has a single namespace for all globals. So some way is needed to distinguish things with the same name in different modules. Also, a single Cython declaration often leads to several different related things being declared in C, e.g. a class has a PyType instance, a struct declaration, and possibly a vtable, all of which need distinct names in the C code, so prefixes are used to distinguish them. It might be possible to get away without mangling a few things, such as local variables, but for simplicity they're treated the same as everything else. -- Greg _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel