Commit Graph

294 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
34b00c16e2 removed compatibility code with older versions 2018-02-27 15:47:32 -03:00
Roberto Ierusalimschy
c67603fafb using new 'lua_newuserdatauv' instead of 'lua_newuserdata' 2018-02-21 10:48:44 -03:00
Roberto Ierusalimschy
90569630d6 detail
(uses a reserved-format name for an internal type in the registry)
2018-01-29 17:13:27 -02:00
Roberto Ierusalimschy
5a1c8d8ef3 new constant 'LUA_GNAME' for the name of the global table "_G" 2017-06-27 15:32:49 -03:00
Roberto Ierusalimschy
2caecf1b3e type 'L_Umaxalign' replaced by macro 'LUAI_MAXALIGN', which is also added
to the auxlib buffer
2017-04-24 15:06:12 -03:00
Roberto Ierusalimschy
9903dd52a3 Using LUAI_UAC* types more consistently on vararg calls 2016-12-20 16:37:00 -02:00
Roberto Ierusalimschy
b2aa2ba046 using constants for "_LOADED" and "PRELOAD" 2016-12-04 18:17:24 -02:00
Roberto Ierusalimschy
beec5af201 'luaL_tolstring' uses metatable's "__name" when available 2016-12-04 18:09:45 -02:00
Roberto Ierusalimschy
62f6652d53 no more extra space in 'luaL_checkstack'. (It was already useless
for the first call, and function works ok without that space
anyway (just error message misses the 'msg' component)
2016-01-08 13:33:09 -02:00
Roberto Ierusalimschy
bda090b961 comments + small code changes around stack usage when 'luaL_checkstack'
raises an error (and needs the stack to create the error message...)
2015-12-14 09:59:27 -02:00
Roberto Ierusalimschy
d103312661 details (typos in comments) 2015-11-19 17:16:22 -02:00
Roberto Ierusalimschy
8949904783 allow NULL string when length is zero in 'lua_pushlstring' and
'luaL_addlstring'
2015-10-06 13:10:22 -03:00
Roberto Ierusalimschy
e290bd6760 in 'luaL_traceback', print correct number of levels even when
initial level is not 1.
2015-10-02 12:46:49 -03:00
Roberto Ierusalimschy
e7f34ad395 better implementation for buffers (reallocated memory directly
with allocation function; generates much less garbage)
2015-06-18 11:23:14 -03:00
Roberto Ierusalimschy
90d016980f detail ('luaL_getmetatable' does not return a boolean, but a tag) 2015-02-03 15:38:24 -02:00
Roberto Ierusalimschy
151dc5cc5f traverse loaded modules (instead of globals) for a name for a function +
removes prefix '_G.' from names (if present)
2014-12-14 16:32:26 -02:00
Roberto Ierusalimschy
c8da3fbc35 in traceback names, give preference to 'name' over '_G.name' 2014-12-13 15:47:58 -02:00
Roberto Ierusalimschy
6f54b07663 give preference to global names in tracebacks 2014-12-10 09:31:32 -02:00
Roberto Ierusalimschy
ab4a890d04 use 'namewhat' when building a traceback 2014-12-08 13:26:09 -02:00
Roberto Ierusalimschy
db5ac2fa0d detail (buffer in 'LoadF' is related to files) 2014-11-21 10:17:58 -02:00
Roberto Ierusalimschy
cb59019f58 uses return value from luaL_getmetatable 2014-11-12 11:32:27 -02:00
Roberto Ierusalimschy
28fdbcf393 added include for 'lprefix.h', for stuff that must be added before
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
05afee0f50 definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'
moved to 'lauxlib.h' (they do not need to be stable or configurable) +
prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
2014-10-29 14:12:30 -02:00
Roberto Ierusalimschy
bdf566a8a3 `name' in comments changed to 'name' 2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
6b12b82532 added 'l_' prefix for names that can be redefined externally 2014-10-22 09:44:20 -02:00
Roberto Ierusalimschy
f97c64d7bf macros 'LUA_QL'/'LUA_QL' deprecated 2014-10-17 13:28:21 -03:00
Roberto Ierusalimschy
6384475ec4 'luaL_getmetafield' returns type of metafield (instead of a boolean) 2014-09-22 03:42:15 -03:00
Roberto Ierusalimschy
8704fca0c9 in 'luaL_checkversion_' check numeric types first. (Other tests
depend on correct numeric type.)
2014-07-19 11:37:09 -03:00
Roberto Ierusalimschy
8bb272a3e3 new conversion float->integer: conversion is valid only when
float has an exact representation as an integer
2014-07-17 09:30:53 -03:00
Roberto Ierusalimschy
c229ed597f 'requiref' checks 'package.loaded' before loading a module 2014-07-16 11:51:36 -03:00
Roberto Ierusalimschy
a77d263e86 unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
deprecated
2014-06-26 15:38:28 -03:00
Roberto Ierusalimschy
45c430eac0 addition of '.0' to float representation done by the kernel 2014-05-12 18:44:17 -03:00
Roberto Ierusalimschy
4422b97472 keep 'luaL_checkversion_' with its signature in version 5.2, for
correct error messages in case of version mixings
2014-04-15 15:25:49 -03:00
Roberto Ierusalimschy
5aeb57f11f detail (error message for conversion from float to integer) 2014-04-01 15:55:06 -03:00
Roberto Ierusalimschy
a3addae036 lua_gettable and similars return type of gotten value 2014-03-12 17:57:40 -03:00
Roberto Ierusalimschy
a4c6dcf999 detail (better error messages for light userdata) 2014-02-19 10:48:53 -03:00
Roberto Ierusalimschy
4a1ed6e6e5 new field '__name' in metatables to help better error messages 2014-02-11 15:39:15 -02:00
Roberto Ierusalimschy
d438e1379d insertion of ".0" in floats with integer values done by "luaL_tolstring",
not by the core
2014-02-05 17:14:53 -02:00
Roberto Ierusalimschy
438c534ff4 'arg' arguments (previously called 'narg', 'nArg', 'numArg', etc.)
renamed all to 'arg'
2014-01-05 12:04:46 -02:00
Roberto Ierusalimschy
66d046833d no need to check "bad conversion number->int;" in luaL_checkversion,
as now Lua does not use tricks for the conversion, but there is a
need to check the sizes of number types, as they can be different
in two modules
2013-06-27 15:32:33 -03:00
Roberto Ierusalimschy
982aa7058f 'luaL_len' returns lua_Integer instead of 'int' 2013-06-25 11:05:26 -03:00
Roberto Ierusalimschy
c72fb1cf8e detail (removed 'assert') 2013-06-14 17:46:40 -03:00
Roberto Ierusalimschy
138e69cc55 correct error message for floating-point values out of (integer) range 2013-06-14 15:34:49 -03:00
Roberto Ierusalimschy
0394314c7a avoid using a negative value to test 'lua_tounsigned' 2013-06-14 15:12:53 -03:00
Roberto Ierusalimschy
6fb0b11350 string contatenation handles conversion of integers to strings +
floats always format as floats (with decimal dot or exponent)
2013-06-04 16:36:42 -03:00
Roberto Ierusalimschy
9c43d6a24e new format "%I" in 'lua_pushfstring' for lua_Integer 2013-04-25 10:53:13 -03:00
Roberto Ierusalimschy
af8efcc762 detail (avoid unnecessary "unconst" in cast) 2013-03-21 10:54:57 -03:00
Roberto Ierusalimschy
4082c77ff2 error message for 'bad self' includes original 'extramsg' 2012-10-19 12:55:01 -03:00
Roberto Ierusalimschy
7a3de1aba3 typo in comment 2012-09-24 19:57:26 -03:00
Roberto Ierusalimschy
c1a2a646c8 details (no need to use lua_pushfstring for plain strings) 2012-08-16 14:32:20 -03:00