Open GWRon opened 3 years ago
Apparently, the NG implementation of HandleFromObject
just returns the address of the object... so yeah, if these commands still use Ints, then this could definitely create problems in 64bit builds.
This aside - and "ignoring" backwards compatibility I would think that the command should better be named ReleaseHandle
That may be true, but honestly, backwards compatibility is the only valid reason for this handle stuff to still exist, and a weak one at that. It's one of those features that were already obsolete when BlitzMax was released, but got included for people who wanted to pretend they were still using BlitzBasic for some reason. Imo the only big change worth making to it at this point is to remove it.
When using the "release" command it expects an integer parameter.
BCC relays it to
TReleaseStmt
(stmt.bmx) which relays to_trans.TransReleaseStmt
which then callsbbHandleRelease
.bbHandleRelease
is defined in blitz.mod/blitz_handle.c (and .h) and it is defines as:As NG now has "size_t" support ... shouldn't the
release
command now expect asize_t
too?This aside - and "ignoring" backwards compatibility I would think that the command should better be named
ReleaseHandle
- as it fits better to the blitz.mod/blitz.bmx commandsHandleFromObject
andHandleToObject
.