extending Python with C anywhere (was Re: Extending Python with C/C++ on a win32 platform)

Alex Martelli aleaxit at yahoo.com
Thu May 24 07:12:09 EDT 2001


"John Machin" <machin_john_888 at hotmail.com> wrote in message
news:92ae279c.0105231432.7aab5dde at posting.google.com...
    ...
> [snip]
> > ::: bill.c
> [snip]
> >     if(!value) { // deletion
>
> C? Portable?

Sure, any C compiler compliant with the current standard
(aka C-99) should have no problem with this construct!-).

I don't have a C-99-compliant compiler around, but all
of my compilers do support a subset of the standard, so,
why not use it?-)

Of course, if you do desire the "anywhere" I put in my
subject you'd better backport to some older standard
such as C-89 or K&R, and use /* ... */ for comments:-).

In fact, I used // for comments even in the "Win32 API
in C" tutorial I placed on the net -- if there's one
piece of syntax sugar I can't stand is comments that
are not terminated by end-of-line.  I applaud the C
Standardization Committee for including //...!


> OK, enough nit-picking. The other 99% was good value. I'd just like to

98% -- I also wrongly used a PyMem_Del where I should
have used a PyObject_Del, as another poster noticed...


Alex







More information about the Python-list mailing list