"Shadab Sayani" <[EMAIL PROTECTED]> wrote
I can't help with the compile issues but a couple of quick points...
> I have a C program mm.c calling python function as
> follows::
> #include "Python.h"
> #include <stdio.h>
>
> int main(int argc, char* argv[])
> {
> double answer = 0;
> PyObject *modname, *mod, *mdict, *func,
> *stringarg, *args, *rslt;
Please, initialise your variables!
The single most common cause of 'random' bugs in C code is
uninitialised pointers. Even though you use them safely below
it's oh so easy to make a change later that tests a pointer
value before its been set. Much better to *always* initialise
pointers to NULL.
Alan G.
(3 years a C maintenance team lead ;-( )
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor