Skip to content

Conversation

@53845052
Copy link

@53845052 53845052 commented Jan 1, 2026

Changes:

  • Macro arguments now use names from the documentation
  • Added LPH_LINE macro equal to 0
  • Added LPH_OBFUSCATED macro equal to false
  • Added better error messages

Error messages:

  • Before
LPH_ENCNUM() -- LPH_ENCNUM only accepts a single constant double or integer as an argument.
LPH_ENCSTR() -- LPH_ENCSTR only accepts a single constant string as an argument.
--
LPH_ENCFUNC() -- LPH_ENCFUNC accepts a constant function, constant string, and string variable as arguments.
LPH_ENCFUNC(function() end) -- LPH_ENCFUNC accepts a constant function, constant string, and string variable as arguments.
LPH_ENCFUNC(function() end, "") -- LPH_ENCFUNC accepts a constant function, constant string, and string variable as arguments.
--
LPH_JIT() -- LPH_JIT only accepts a single constant function as an argument.
--
LPH_NO_VIRTUALIZE() -- LPH_NO_VIRTUALIZE only accepts a single constant function as an argument.
-- 
LPH_NO_UPVALUES() -- LPH_NO_UPVALUES only accepts a single constant function as an argument.
  • After
LPH_ENCNUM() -- invalid argument #1 to 'LPH_ENCNUM' (number expected, got nil)
LPH_ENCSTR() -- invalid argument #1 to 'LPH_ENCSTR' (string expected, got nil)
--
LPH_ENCFUNC() -- invalid argument #1 to 'LPH_ENCFUNC' (function expected, got nil)
LPH_ENCFUNC(function() end) -- invalid argument #2 to 'LPH_ENCFUNC' (string expected, got nil)
LPH_ENCFUNC(function() end, "") -- invalid argument #3 to 'LPH_ENCFUNC' (string expected, got nil)
--
LPH_JIT() -- invalid argument #1 to 'LPH_JIT' (function expected, got nil)
--
LPH_NO_VIRTUALIZE() -- invalid argument #1 to 'LPH_NO_VIRTUALIZE' (function expected, got nil)
-- 
LPH_NO_UPVALUES() -- invalid argument #1 to 'LPH_NO_UPVALUES' (function expected, got nil)

Adds better error messages, LPH_OBFUSCATED and LPH_LINE
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