[Patches] Extension building on Win32 using Gnu C

Mark Hammond mhammond@skippinet.com.au
Sat, 17 Jun 2000 08:47:20 +1000


> If if doesn't apply, why crashs C++ if I don't have in there?

Who knows?  Why does it work for MSVC?

> But I remember some things. (All in C mode)
>
> 	Py_INCREF(Py_None);
> 	return Py_None;
> => ( pointer lacks cast ?, I don't remember which line it was.)

This is wierd.  What is the sig of the function this appeared in?

> ---Python's object.h-----------------------
> #define Py_INCREF(op) ((op)->ob_refcnt++)
> extern DL_IMPORT(PyObject) _Py_NoneStruct; /* Don't use this directly */
> #define Py_None (&_Py_NoneStruct)
> ----------------------------
> You access here
> > some associated data, which needs to have linkage information
> associated
> > with it.
> ?????????? (Your own words, could it be you know what's wrong and don't
> know
> that you know it.)

This isnt any clearer.  In these cases, you are looking at an _instance_ of
the struct.  There is still no need I can see for the struct definition to
be exported - that is a compile time issue.  The _instance_ of the struct
(eg, in the example above, the specific _Py_NoneStruct instance of the
struct) is what the imports are needed for.

> Also if you use type checks.
> => ( incompatible pointer type ? )

You are going to need to be exact here.  This doesnt help at all.

> Maybe I mixed up the warning messages, but I think you can see the
> point.

Afraid not :-(

Mark.