Commit Graph

283 Commits

Author SHA1 Message Date
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
Roberto Ierusalimschy
4dd0622d0c bug in luaL_getsubtable (calling lua_absindex not with original stack) 2012-05-31 17:28:45 -03:00
Roberto Ierusalimschy
4cca1a436d details (using lua_setglobal/lua_getglobal instead of explicit
use of the global table)
2012-04-20 14:05:17 -03:00
Roberto Ierusalimschy
3e66d3b4be cleaner code (avoids loop with empty body) 2012-03-19 19:57:14 -03:00
Roberto Ierusalimschy
29a28693e5 'luaL_checkversion' called by 'luaL_setfuncs' 2012-03-18 13:52:49 -03:00
Roberto Ierusalimschy
e320b5b672 small bug: format '%d' for lua_Number argument 2011-12-06 14:33:55 -02:00
Roberto Ierusalimschy
e2feb886d6 macro 'luaL_getmetatable' seems more appropriate when getting
metatables in registry
2011-12-02 11:25:57 -02:00
Roberto Ierusalimschy
7bcb2462e4 comments 2011-11-30 10:58:57 -02:00
Roberto Ierusalimschy
3617e04e97 'lua_load' has an extra argument 'mode' 2011-11-29 13:55:08 -02:00
Roberto Ierusalimschy
6cce5c0601 new function 'luaL_loadfilex' 2011-11-14 15:10:24 -02:00
Roberto Ierusalimschy
eda87f1156 in 'luaL_checkstack', include extra stack space in test to allow
correct execution of error routines, if necessary
2011-11-09 17:08:55 -02:00
Roberto Ierusalimschy
2557107e91 removed unused variable 'found' (in 'findfield') + removed legacy
test for 'what' being "tail"
2011-07-25 14:18:49 -03:00