int64 over size_t for views - #1276
Conversation
Would it not be possible to add the dynamic conversion for this type? size_t seems to be the more natural and correct type for this, and it matches the convention of the c++ std. It is also more portable across architectures. |
|
That was my initial thought and I do think it would be the better approach, but implementing that seems like it might be a bit tricker due to the varying size of size_t. Many of the macros to add all the dynamic support for a type seem to except a fixed size, but to support size_t we'd need to add a bunch of extra conditionals for the size_t case. Or just go for the pessimistic approach and always box size_t as an int64, even if it's a 32bit build. This should get the CI green for now atleast. |
|
Huh... CI was green here, but after merging there's now this failure on 32bit linux latest: |
|
Hmm, that is odd. I just did a HXCPP_M32 build of the haxe test suite locally in WSL and that passed fine. Those failing tests don't indicate anything either, just one of many 32bit linux haxe tests were also passed fine with the initial merge. |
|
It's green after restarting the run. No idea what happened there, I guess we'll see if it happens again! |
This reverts commit 4b2991f.
Seems like there were two problems here.
One is something only msvc flagged up, the
getandsetfunctions on the value type reference has an ambigious conversion if the function it calls acceptsint64_t.The other is that the type apple clang uses for size_t doesn't have a dynamic conversion, so I've just switched the last few size_t references to int64_t (I'll also update the haxe extern).