Hi all,
while looking at some issues we're having with InkAPI plugins, the issue
of 32-bit APIs on top of 64-bit data has come up again. I'd like to
bring this up for discussion again, and get suggestions and ideas what
we should do. It's quite unfortunate we didn't get these APIs changed
for v2.0 honestly, but I think we'll have to come up with some plan.
Some ideas:
1) Don't do anything (other than fixing the bugs where we use INT64_MAX
to mean something, that gets foobared when returned as an INT).
2) Retrofit the InkAPIs to be int64 instead of int where necessary. This
breaks API compatibility.
3) Add new APIs where necessary, and keep the old 32-bit APIs as is.
E.g. today we have
int INKVIONBytesGet(INKVIO viop);
and we'd add something like
int INKVIONBytesGet64(INKVIO viop);
We would also have to fix the 32-bit APIs to at least work with the
64-bit INT64_MAX value and other overflow scenarios (just as #1).
Of these, #2 is the cleanest, while #3 is the least invasive (but, means
duplicating APIs).
Thoughts?
-- leif