[Python-Dev] ANSIfication problems: warnings in marshal.c

Thomas Wouters thomas@xs4all.net
Sun, 23 Jul 2000 22:31:47 +0200

On Sun, Jul 23, 2000 at 03:43:33PM -0400, Tim Peters wrote:

>    Note:  this kind of thing is much easier to do in C++, because of
>    inline functions and being able to templatize those on the types
>    involved (i.e., the compiler can figure out which specific checker to
>    expand at compile-time, rather than making you redundantly-- and hence
>    possibly incorrectly --name the types "by hand" again).

Is that a veiled suggestion to compile Python as C++ ? ;) I actually tried
to do that, and it almost worked. Some of the current code uses a few C++
reserved words ('new', 'class') that need to be renamed, and a couple of
expressions need some additional parentheses. (The Py_INCREF/DECREF macros,
for instance, produced some incomprehensible g++ error.)

(I tried compiling with g++ to find any lingering K&R C prototypes. And it
worked, it found a few for me I hadn't realized were wrong.)

Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!