[fpc-devel] hacking strings/dyn array...
lazarus at mfriebe.de
Thu Dec 6 22:45:12 CET 2012
Not the best thing to do, I know the risks (or I think I do). Also got
some alternative ideas in mind... But in case.
I am currently fixing some of the PascalScript issues. When working with
strings, it sometimes needs to inc/dec the refcount (or access the length)
Current code does calculate the position of that data as either 1 or 2
times sizeof(Pointer) in front of the actual data. (Not guaranteed for
the future, but currently it is there)
Then it accesses the refcount/length using a 32bit type.
This raises 2 questions:
- 1 does on a 64bit target the length/ref count ever exceed the 32bit range?
- If not is it endian safe? I would guess not....
More information about the fpc-devel