[Pyrex] Better comment lines in C source?

Phillip J. Eby pje at telecommunity.com
Fri Aug 13 16:56:38 CEST 2004


At 07:49 AM 8/13/04 -0500, Edward K. Ream wrote:
>Many thanks to Greg Ewing for pyrex: it's beautiful work.
>
>C listings are commented by line number:
>
>/* "ProjectsA:Python:Pyrex:Demos:primes.pyx":9 */
>
>The pyrex source might be more informative:
>
>/* while k < kmax: */
>
>Is there a way to do this?  It should be simple for pyrex to do this: just
>strip block comments out of the line first.

Or don't, in which case one could write inline C code in your Pyrex source, 
using inverted comment markers...  ;)

For that matter, it might also be nice to replace the line number comments 
with #line directives, in case one happens to be using tools that support 
source level debugging in such a fashion.





More information about the Pyrex mailing list