[Pythonmac-SIG] Help: compiling a module with MPW

M. Papillon azeldis@mail.wesleyan.edu
Thu, 16 Mar 2000 11:01:05 -0500


>> However, I am getting a DebugStr: "Attempt to free unallocated or corrupt 
>> block @ xxxx".  If I ignore this, things seem to work fine.
>
>This looks very much like a malloc mixup: you have allocated a block with 
>Python malloc() and you're trying to free it with MPW malloc, or the other 
>way 
>around.
>
>If you make sure you put the PythonCore library before the StdCLib (or any 
>other MPW libraries) in your link order you should be fine. At least, that's 
>the trick that works under CodeWarrior, so let's hope it also works for MPW.

You'd think, wouldn't you?  But I've done that.  That's what it looks 
like to me as well, I did a little snooping in MacsBug -- which I hardly 
understand at all -- and it looks like it's definitely coming from python 
doing free(), not one of the libraries.

I don't suppose MetroWerks allows it's libraries to be distributed...?

Or, is there a way to simply disable DebugStr's?  This is only for 
development, the final thing will be run on Solaris, but's *really* 
annoying to have to always hit cmd-g and have the screen-flipping shock.

In any case I'd say it's a testament to the skill of those involved that 
this works at all.  ;)  THANKS