Roberto Ierusalimschy
0a6a6b9d9d
no more sentinel to detect loops in module dependencies;
...
usual message for infinite recursion is good enough.
2010-11-10 18:00:04 -02:00
Roberto Ierusalimschy
c97aa9485c
new function 'luaL_setmetatable'
2010-11-10 16:05:36 -02:00
Roberto Ierusalimschy
ba8dca00ac
detail (ununsed parameter)
2010-10-29 12:35:09 -02:00
Roberto Ierusalimschy
0df2238063
name "_ENV" configurable through 'luaconf.h'
2010-09-07 16:21:39 -03:00
Roberto Ierusalimschy
fd4b4a2a68
detail: registry._PRELOAD must be a table, no need to check
2010-08-02 14:14:48 -03:00
Roberto Ierusalimschy
d447945685
'module'/'luaL_register' and associates are deprecated
2010-07-28 12:51:59 -03:00
Roberto Ierusalimschy
73b0a3451d
environment variables consulted by Lua may be version-specific
2010-07-25 12:03:37 -03:00
Roberto Ierusalimschy
7192afafee
new module policy: C modules do not create globals and do not register
...
themselves with 'require' (let 'require' do its work); new auxiliary
functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref.
Old luaL_register will be deprecated.
2010-07-02 08:38:13 -03:00
Roberto Ierusalimschy
a139e2e003
old (and complex) luaL_findtable now used only in compatibility code
...
inside lauxlib.c
2010-06-30 14:40:27 -03:00
Roberto Ierusalimschy
bef5980744
no more support for old Mac OS systems
2010-06-18 14:23:02 -03:00
Roberto Ierusalimschy
9f48712c15
use ANSI versions of DLL functions in Windows
2010-06-13 16:36:17 -03:00
Roberto Ierusalimschy
2c1a5d678d
factoring out common code in 'module' and 'luaL_openlib'
2010-05-31 13:34:19 -03:00
Roberto Ierusalimschy
5ca7cdd709
for compatibility only: 'module' changes the first upvalue of
...
calling function to affect its environment
2010-03-19 12:02:34 -03:00
Roberto Ierusalimschy
1514e49d43
avoid using function environments in C libraries (as it probably will
...
be deprecated)
2010-03-17 18:37:37 -03:00
Roberto Ierusalimschy
b678f246a4
HINSTANCE -> HMODULE (they are the same thing, but the MS documentation
...
uses the latter) + LoadLibrary -> LoadLibraryEx with optional arguments,
to allow the option LOAD_WITH_ALTERED_SEARCH_PATH
2010-01-13 14:30:27 -02:00
Roberto Ierusalimschy
900b7d4514
on 64-bit machines, an address may not fit into a 'long', so it
...
is better to convert from pointer to void to pointer to function
directly, even if ANSI C does not like it.
2010-01-13 14:09:05 -02:00
Roberto Ierusalimschy
e4b4623abc
'searchpath' changes dots into directory separators
2010-01-11 15:55:25 -02:00
Roberto Ierusalimschy
d320c908d0
conversion from pointer to void to pointer to function seems more
...
"correct" if done through an integral type (because conversions
between pointers and numbers are allowed, only "implementation
defined").
2010-01-11 15:34:59 -02:00
Roberto Ierusalimschy
572b94bbcb
include of 'windows.h' moved to where it is needed
2010-01-11 15:11:24 -02:00
Roberto Ierusalimschy
692209fa8d
Dynamic C functions should be created with the global table as their
...
initial environments
2010-01-11 15:06:31 -02:00
Roberto Ierusalimschy
a541ada194
"-"-trick in C packages now accept name-v13...
2010-01-11 14:10:47 -02:00
Roberto Ierusalimschy
8cd395564c
no need to use two different defines (LUA_DL_DLOPEN and LUA_USE_DLOPEN)
2010-01-06 12:35:17 -02:00
Roberto Ierusalimschy
35e729fa6d
comments + small details
2010-01-04 14:36:39 -02:00
Roberto Ierusalimschy
f84b575cfa
no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
...
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
2108754e46
macro name change: LUA_PATH->LUA_PATH_VAR, LUA_CPATH->LUA_CPATH_VAR,
...
LUA_PATHSEP->LUA_PATH_SEP, LUA_EXECDIR->LUA_EXEC_DIR
2009-12-17 11:06:47 -02:00
Roberto Ierusalimschy
de6fc75d63
several configuration options that do not change often moved out of
...
luaconf.h and into more internal files
2009-12-17 10:26:09 -02:00
Roberto Ierusalimschy
a6f465f558
new mark LUAMOD_API for all luaopen_* functions
2009-11-24 10:05:44 -02:00
Roberto Ierusalimschy
95020afb63
'module' returns the new module (to be used with lexical environments)
2009-11-16 13:51:19 -02:00
Roberto Ierusalimschy
a5382b763c
new function lua_copy
2009-10-05 13:44:33 -03:00
Roberto Ierusalimschy
4b44793dc5
"bug": lua_createtable with sizes changed (array <-> record)
2009-09-07 11:24:12 -03:00
Roberto Ierusalimschy
a5f68589c0
avoid using 'UNUSED' (not defined outside the kernel)
2009-07-15 14:49:48 -03:00
Roberto Ierusalimschy
5cdec7d124
added "\n" at the end of 'package.config' (so that the string
...
is a sequence of complete lines)
2009-06-04 16:34:24 -03:00
Roberto Ierusalimschy
7e9bc41fe7
'loadlib(lib, "*")' loads 'lib' with global names exported to all
2009-03-26 19:25:05 -03:00
Roberto Ierusalimschy
afe849c9b4
change in error message
2008-08-06 10:38:32 -03:00
Roberto Ierusalimschy
bb48f456d9
bug: 'module' now checks that is caller is a Lua function
2008-08-05 16:25:42 -03:00
Roberto Ierusalimschy
bc82b4d78a
new function 'package.searchpath'
2007-12-12 12:36:12 -02:00
Roberto Ierusalimschy
8d3dd04137
clearing some old compatibility code
2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy
df50c84ee0
BUG: loadlib should not use Lua internals (lobject.h)
2007-03-26 12:57:35 -03:00
Roberto Ierusalimschy
afa0d0ac0d
new constant LUA_OK
2006-10-10 14:40:17 -03:00
Roberto Ierusalimschy
a7c9e45c64
avoid trailing white spaces
2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
c7b89dd280
small bug: should not use string after popping it
2006-07-03 17:16:49 -03:00
Roberto Ierusalimschy
ee41bc03ab
details
2006-06-22 13:12:59 -03:00
Roberto Ierusalimschy
672bb67ee6
environment variable names should be configurable
2006-04-10 15:27:23 -03:00
Roberto Ierusalimschy
bfdcbbcd76
small optimizations (lua_newtable -> lua_createtable)
2005-12-29 14:23:32 -02:00
Roberto Ierusalimschy
0561f71f0f
(much) better error messages for 'require'
2005-12-19 18:56:39 -02:00
Roberto Ierusalimschy
6cd461633d
clearer error message for uninstalled loadlib
2005-12-07 13:42:32 -02:00
Roberto Ierusalimschy
5511bf6b9d
avoid comparisons between (void *) and (int *)
2005-10-17 16:01:51 -02:00
Roberto Ierusalimschy
522481a788
avoid some warnings
2005-10-06 17:46:10 -03:00
Roberto Ierusalimschy
e41fb9a604
registry._LOADED created "on demand"
2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
9e88b336b4
unused assignment
2005-09-30 10:50:05 -03:00
Roberto Ierusalimschy
2bcbd3c725
avoid 'PathRemoveFileSpec' (not very portable)
2005-09-06 14:20:25 -03:00
Roberto Ierusalimschy
351f7dad6b
default for 'module' is opaque (with option 'seeall')
2005-08-31 20:17:29 -03:00
Roberto Ierusalimschy
3390f9a35a
detail
2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy
9273fbd131
no more 'luaL_get/setfield' (replaced by more direct luaL_findtable)
2005-08-26 14:32:05 -03:00
Roberto Ierusalimschy
39cdbce23e
no more '-w' option + new way to check module existence
2005-08-25 12:39:16 -03:00
Roberto Ierusalimschy
2f2b4a42a9
luaL_checkudata raises an error if value is not correct
...
(like other luaL_check functions)
2005-08-17 16:05:04 -03:00
Roberto Ierusalimschy
5e8a9e324c
luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar
2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
c7b4f44772
correct name to open package library
2005-08-10 15:06:58 -03:00
Roberto Ierusalimschy
ab3dfa5594
store some configuration information
2005-08-09 14:58:09 -03:00
Roberto Ierusalimschy
e82bdb24f3
new loader for "all-in-one" C packages
2005-08-01 01:21:17 -03:00
Roberto Ierusalimschy
d6ff5d9f46
searchpath is "private affair" of loadlib
2005-07-13 16:02:42 -03:00
Roberto Ierusalimschy
a05190fa3b
elimination of common code + better error message
2005-07-12 18:17:46 -03:00
Roberto Ierusalimschy
e4324f54b9
';;' in a path is replaced by default path + '!' (in Windows) is
...
replaced by executable's directory
2005-07-11 13:41:57 -03:00
Roberto Ierusalimschy
7f97ec286e
parent modules are also imported toghether with the module itself
2005-07-05 16:29:03 -03:00
Roberto Ierusalimschy
2f0955b99b
detail
2005-06-27 14:24:40 -03:00
Roberto Ierusalimschy
38da9d568a
better use defined/undefined as flag values for macros
2005-05-20 16:09:05 -03:00
Roberto Ierusalimschy
67578ec51f
several small details
2005-05-17 16:49:15 -03:00
Roberto Ierusalimschy
c2bb9abcec
better quotes for strings in error messages
2005-05-16 18:19:00 -03:00
Roberto Ierusalimschy
04f657c7f8
new protocol to open standard libraries
2005-04-13 14:24:20 -03:00
Roberto Ierusalimschy
445eda7ead
details
2005-03-30 16:50:29 -03:00
Roberto Ierusalimschy
e6e543a534
better control for compatibility code
2005-03-29 13:20:48 -03:00
Roberto Ierusalimschy
1c9c886974
standard configuration should run out-of-the-box in "any" system
2005-03-29 11:30:16 -03:00
Roberto Ierusalimschy
bfe2905618
avoid too much configuration options
2005-03-18 13:38:43 -03:00
Roberto Ierusalimschy
370d31a559
luac´ ->
luai' (to avoid confusion with other luac stuff)
2005-03-09 13:28:07 -03:00
Roberto Ierusalimschy
f8df21bd20
`luaconf.h´ exports all its definitions always (so all of them
...
must have a lua/LUA prefix).
2005-03-08 17:10:05 -03:00
Roberto Ierusalimschy
1e48b20ce0
loadlib' not global anymore (packaged inside
package')
2005-03-07 15:07:34 -03:00
Roberto Ierusalimschy
d6143b1d7b
avoid access to undefined global variables
2005-02-28 12:58:48 -03:00
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
d2bda8046c
new implementation for loaders
2005-01-14 12:17:18 -02:00
Roberto Ierusalimschy
e22cdf7752
better error messages when require fails for C module
2004-12-29 16:56:34 -02:00
Roberto Ierusalimschy
a5eb48a3e6
redesigned loadlib (Windows version not tested yet)
2004-12-27 13:58:15 -02:00
Roberto Ierusalimschy
96727c61b8
several improvements/corrections
2004-12-22 15:43:27 -02:00
Roberto Ierusalimschy
a56d889f72
corrections for `absent' implementation
2004-12-13 10:14:21 -02:00
Roberto Ierusalimschy
cdcb236747
needs to include stdlib.h' to access
getenv'
2004-11-19 13:52:12 -02:00
Roberto Ierusalimschy
9be5844713
first full implementation of new package system
2004-11-18 17:53:49 -02:00
Roberto Ierusalimschy
2ed07ea8c1
towards "requiring" C libraries
2004-11-11 13:42:57 -02:00
Roberto Ierusalimschy
3e1a1f2836
better configuration for loadlib + tested Mac OS X version
2004-10-18 15:07:31 -03:00
Roberto Ierusalimschy
3bec76abe3
first version of loadlib for Mac OS X (not tested yet!!)
2004-10-07 14:27:20 -03:00
Roberto Ierusalimschy
b4cd38ba6c
new scheme for configuration through `luaconf.h'
2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
f93051155c
ok to use #elif' and
#if defined()'
2003-05-14 18:01:53 -03:00
Roberto Ierusalimschy
de57dc2653
new scheme to control `loadlib' configuration (default for dlopen
...
implementation is not to include it)
2003-04-07 17:11:53 -03:00
Roberto Ierusalimschy
05d35d8f3c
comments
2003-04-02 10:09:14 -03:00
Roberto Ierusalimschy
9b7af7e45b
tests for Windows version
2003-03-18 09:25:01 -03:00
Roberto Ierusalimschy
b0c40e2405
first version of `loadlib'
2003-03-17 10:04:58 -03:00