Extention Woes
Fredrik Lundh
fredrik at pythonware.com
Thu Oct 20 03:27:53 EDT 2005
"Tuvas" wrote:
> Well, the point of declaring it as a char was to have it as an 8 bit
> integer, as is requested later on in the program.
since ParseTuple writes an integer to the address you pass in,
that's likely to overwrite some random stuff on the stack. like-
wise, passing in a character buffer where ParseTuple expects
a pointer to a char pointer isn't going to work either (but that
only writes garbage into the buffer).
> Anyways, I tried making the changes, similar results.
post the new code and the output it's giving you.
> BTW, it doesn't give me one single warning, so I don't think it's a
> casting problem...
the C compiler doesn't understand the ParseTuple format string,
so that doesn't mean anything. it's up to you to make sure that
the format specifiers and the pointers you pass in match.
</F>
More information about the Python-list
mailing list