Martin v. Loewis wrote: >>#define __init __attribute__ ((__section__ (".text.init"))) >> > [...] > >>After surrounding doc strings with a macro, this will be easy to achieve. >> > > Unfortunately, not with the doc string you propose. Apparently, your > macro is going to be used as > > char foo__doc__[] = Py_DocString("this is foo"); > > However, with the attribute, the resulting code should read > > char foo__doc__[] __attribute__((__section__("docstring")) = > "this is foo"; > > You cannot define the macro so that it comes out as expanding to > __attribute__, atleast not with that specific macro. Why don't you use macro which only takes the name of the static array and the doc-string itself as argument ? This could then be expanded to whatever needs to be done for a particular case/platform, e.g. Py_DefineDocString(foo__doc__, "foo does bar"); (I use such an approach in the mx stuff and it works great.) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4