2 ms·
He's making a C API call to essentially compare two integers instead of just comparing them directly in Lua. You can fix that by pushing the enum values to Lua
by jmaygarden 15y ago
He's making a C API call to essentially compare two integers instead of just comparing them directly in Lua. You can fix that by pushing the enum values to Lua as numbers instead of userdata with metatables for comparisons.
- phaedrus 15y agoWell it's Io but you're still correct, I could fix that by letting enums "decay" into Numbers. In fact, I originally had that happen accidentally and I actually considered it a bug. The reason I considered that a bug was that I made a design decision to strongly type everything that goes across the boundary between script and C++.