BytecodeBuilder.cpp: fix invalid assumption that int32_t aliases int #1347
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found that Luau failed to build on the devkitPro toolchain for 3DS.
This target uses an ILP32 model, and
int32_t
is an alias oflong
.BytecodeBuilder.cpp
includes a line where anint
is passed by reference to a function expecting anint32_t
.This PR fixes that line. It'd be nice to get the fix upstream. Thanks for your consideration!
As a sidenote, I also found an issue in the toolchain affecting
Parser.cpp
, wherelimits.h
did not includeULLONG_MAX
. That's probably a toolchain issue, but includingclimits
rather thanlimits.h
fixes it. It's possible that the C++ standard and C standard were out of sync in the toolchain, becauselimits.h
definesULLONG_MAX
for C99 and above.climits
is guaranteed to define it for C++11 and above. If you're open to switching the include toclimits
, that'd be convenient for us, but this is a small patch and not a big deal for us to maintain downstream.