Skip to content

DRV-20: Fix math.frexp/ldexp Lua 5.3+ compatibility#10

Merged
svc-finitelabs[bot] merged 2 commits intomainfrom
agent/DRV-20-fix-math-compat
Mar 24, 2026
Merged

DRV-20: Fix math.frexp/ldexp Lua 5.3+ compatibility#10
svc-finitelabs[bot] merged 2 commits intomainfrom
agent/DRV-20-fix-math-compat

Conversation

@svc-finitelabs
Copy link
Copy Markdown
Contributor

Add conditional polyfills for math.frexp and math.ldexp which were removed in Lua 5.3+ (without LUA_COMPAT_MATHLIB).

Uses native functions when available, falls back to pure Lua implementations on 5.3+.

4 occurrences in src/protobuf/init.lua (IEEE 754 float/double encode/decode).

Part of DRV-15 (Lua 5.3+ compat audit). Fixes DRV-20

…atibility

math.frexp and math.ldexp were removed in Lua 5.3 (without LUA_COMPAT_MATHLIB).
Add conditional polyfills that use the native functions when available and fall
back to pure Lua implementations on 5.3+.

Fixes DRV-20
derek-miller
derek-miller previously approved these changes Mar 24, 2026
@derek-miller
Copy link
Copy Markdown
Contributor

@svc-finitelabs this is good to merge

@svc-finitelabs svc-finitelabs bot merged commit c972a71 into main Mar 24, 2026
8 checks passed
@svc-finitelabs svc-finitelabs bot deleted the agent/DRV-20-fix-math-compat branch March 24, 2026 23:18
@svc-finitelabs
Copy link
Copy Markdown
Contributor Author

Merged via squash. Branch deleted. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant