The ccall'ing version is a tad different, passing in the return
address of the caller to the auto-generated C stub (which enters
- via the stable pointer.) (The auto-generated C stub is on this
+ via the stable pointer.) (The auto-generated C stub is in on this
game, don't worry :-)
The adjustor makes the assumption that any return value
/* Free the stable pointer first..*/
if (*(unsigned char*)ptr == 0x68) { /* Aha, a ccall adjustor! */
- freeStablePointer(*((StgStablePtr*)((unsigned char*)ptr + 0x01)));
+ freeStablePtr(*((StgStablePtr*)((unsigned char*)ptr + 0x01)));
} else {
- freeStablePointer(*((StgStablePtr*)((unsigned char*)ptr + 0x02)));
+ freeStablePtr(*((StgStablePtr*)((unsigned char*)ptr + 0x02)));
}
*((unsigned char*)ptr) = '\0';