Dag Sverre Seljebotn wrote: > Can anyone think of a reason why C string literals are allocated as > variables in C source?
I can't remember all the reasons I did it that way in Pyrex, but one of them may have been so that I could leave calculating the length of the string to the C compiler. It's not entirely trivial to do that when escape sequences are involved. Another reason is so that I can refer to the C version of the string in the generated code concisely, instead of having to insert the whole string literal at that point, making it easier to audit the generated code. I don't think there should be any great difficulty in moving all the bookkeeping to code generation time, though, since you already seem to have a mechanism for out-of-order code generation. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
