aboutsummaryrefslogtreecommitdiff
path: root/scumm/charset.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-11-10 07:52:15 +0000
committerTorbjörn Andersson2003-11-10 07:52:15 +0000
commit3d012651fd43d83ed67617ac0c5c0e32e6dd2ad4 (patch)
treec09b3c0e43525ea8d355fa6d364a20cee9be6252 /scumm/charset.h
parent439bc8364d248293c1ba7b1d92d2b00b4a6fa609 (diff)
downloadscummvm-rg350-3d012651fd43d83ed67617ac0c5c0e32e6dd2ad4.tar.gz
scummvm-rg350-3d012651fd43d83ed67617ac0c5c0e32e6dd2ad4.tar.bz2
scummvm-rg350-3d012651fd43d83ed67617ac0c5c0e32e6dd2ad4.zip
The script engine frequently needs to pass pointers to various structures
etc. to the different opcodes. Until now it has done so by casting the pointer to an int32 (opcode parameters are represented as arrays of int32) and then the opcode function casts it back to whatever pointer it needs. At least in C there is no guarantee that a pointer can be represented as an integer type (though apparently C99 may define such a type), so this has struck me as unsafe ever since I first noticed it. However, since all such pointers appear to point to the memory block owned by the memory manager, we can easily convert them to integers by treating them as offsets into the memory block. So that's what I have done. I hope I caught all the occurences in the opcode functions, or we're going to have some pretty interesting regressions on our hands... svn-id: r11241
Diffstat (limited to 'scumm/charset.h')
0 files changed, 0 insertions, 0 deletions