You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SLONG is stored in dsql_nod* (nod_arg[0]).
To put data in it,
nod_arg[0] = (dsql_nod*) (IPTR) number;
is used. I will not talk here about all casts, pure SLONG passes through to reach it's permanent location, it's not important here. But extraction is done in desc style. ie:
SLONG value = * (SLONG*) nod_arg;
This seems to be OK, and it's really OK for any 32-bit machine and for any little endian machine. On 64-bit big endian CPU 32-bit data is placed in one half of a 64-bit pointer, but taken from another one.
This ticket is only about dsql_nod, but there are may be more such places in the engine.
Added new function
dsql_nod* MAKE_const_slong(SLONG)
and method
SLONG dsql_nod::getConstant()
to deal with stored in dsql_nod 32-bit constants in the same way everywhere.
Submitted by: @AlexPeshkoff
SLONG is stored in dsql_nod* (nod_arg[0]).
To put data in it,
nod_arg[0] = (dsql_nod*) (IPTR) number;
is used. I will not talk here about all casts, pure SLONG passes through to reach it's permanent location, it's not important here. But extraction is done in desc style. ie:
SLONG value = * (SLONG*) nod_arg;
This seems to be OK, and it's really OK for any 32-bit machine and for any little endian machine. On 64-bit big endian CPU 32-bit data is placed in one half of a 64-bit pointer, but taken from another one.
This ticket is only about dsql_nod, but there are may be more such places in the engine.
Commits: 543f986 e4271ba
The text was updated successfully, but these errors were encountered: