Unified · Split
| @@ -384,6 +384,7 @@ Freely available under the terms of the · 383 unmodified lines | |||
| 384 | <A HREF="manual.html#lua_pushfstring">lua_pushfstring</A><BR> | 384 | <A HREF="manual.html#lua_pushfstring">lua_pushfstring</A><BR> |
| 385 | <A HREF="manual.html#lua_pushinteger">lua_pushinteger</A><BR> | 385 | <A HREF="manual.html#lua_pushinteger">lua_pushinteger</A><BR> |
| 386 | <A HREF="manual.html#lua_pushlightuserdata">lua_pushlightuserdata</A><BR> | 386 | <A HREF="manual.html#lua_pushlightuserdata">lua_pushlightuserdata</A><BR> |
| 387 | <A HREF="manual.html#lua_pushliteral">lua_pushliteral</A><BR> | ||
| 387 | <A HREF="manual.html#lua_pushlstring">lua_pushlstring</A><BR> | 388 | <A HREF="manual.html#lua_pushlstring">lua_pushlstring</A><BR> |
| 388 | <A HREF="manual.html#lua_pushnil">lua_pushnil</A><BR> | 389 | <A HREF="manual.html#lua_pushnil">lua_pushnil</A><BR> |
| 389 | <A HREF="manual.html#lua_pushnumber">lua_pushnumber</A><BR> | 390 | <A HREF="manual.html#lua_pushnumber">lua_pushnumber</A><BR> |
| @@ -488,7 +489,7 @@ Freely available under the terms of the · 98 unmodified lines | |||
| 488 | <HR> | 489 | <HR> |
| 489 | <SMALL> | 490 | <SMALL> |
| 490 | Last update: | 491 | Last update: |
| 491 | Fri Jan 18 10:36:25 BRST 2008 | 492 | Sat Jan 19 13:24:29 BRST 2008 |
| 492 | </SMALL> | 493 | </SMALL> |
| 493 | <!-- | 494 | <!-- |
| 494 | Last change: revised for Lua 5.1.3 | 495 | Last change: revised for Lua 5.1.3 |
| @@ -1,15 +1,28 @@ | |||
| 1 | rem script to build Lua under "Visual Studio .NET Command Prompt". | 1 | @rem Script to build Lua under "Visual Studio .NET Command Prompt". |
| 2 | rem do not run it from this directory, run it from the toplevel: etc\luavs.bat | 2 | @rem Do not run from this directory; run it from the toplevel: etc\luavs.bat . |
| 3 | rem it creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src. | 3 | @rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src. |
| 4 | @rem David Manura <dm.lua@math2.org> and Mike Pall <mikelu-0801@mike.de> | ||
| 5 | |||
| 6 | @setlocal | ||
| 7 | @set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE | ||
| 8 | @set MYLINK=link /nologo | ||
| 9 | @set MYMT=mt /nologo | ||
| 4 | 10 | ||
| 5 | cd src | 11 | cd src |
| 6 | cl /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DLUA_BUILD_AS_DLL l*.c | 12 | %MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c |
| 7 | del lua.obj luac.obj | 13 | del lua.obj luac.obj |
| 8 | link /DLL /out:lua51.dll l*.obj | 14 | %MYLINK% /DLL /out:lua51.dll l*.obj |
| 9 | cl /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DLUA_BUILD_AS_DLL lua.c | 15 | if exist lua51.dll.manifest^ |
| 10 | link /out:lua.exe lua.obj lua51.lib | 16 | %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2 |
| 11 | cl /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE l*.c print.c | 17 | %MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c |
| 12 | del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj loslib.obj ltablib.obj lstrlib.obj loadlib.obj | 18 | %MYLINK% /out:lua.exe lua.obj lua51.lib |
| 13 | link /out:luac.exe *.obj | 19 | if exist lua.exe.manifest^ |
| 14 | del *.obj | 20 | %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe |
| 21 | %MYCOMPILE% l*.c print.c | ||
| 22 | del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^ | ||
| 23 | loslib.obj ltablib.obj lstrlib.obj loadlib.obj | ||
| 24 | %MYLINK% /out:luac.exe *.obj | ||
| 25 | if exist luac.exe.manifest^ | ||
| 26 | %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe | ||
| 27 | del *.obj *.manifest | ||
| 15 | cd .. | 28 | cd .. |
| @@ -99,9 +99,9 @@ linux: · 98 unmodified lines | |||
| 99 | $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" | 99 | $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" |
| 100 | 100 | ||
| 101 | macosx: | 101 | macosx: |
| 102 | $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX | 102 | $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" |
| 103 | # use this on Mac OS X 10.4 | 103 | # use this on Mac OS X 10.3- |
| 104 | # $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" MYLIBS="-lreadline" | 104 | # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX |
| 105 | 105 | ||
| 106 | mingw: | 106 | mingw: |
| 107 | $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \ | 107 | $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \ |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.191.1.3 2008/01/03 15:20:39 roberto Exp $ | 2 | ** $Id: lbaselib.c,v 1.191.1.4 2008/01/20 13:53:22 roberto Exp $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -595,9 +595,8 @@ static int luaB_yield (lua_State *L) { · 589 unmodified lines | |||
| 595 | 595 | ||
| 596 | static int luaB_corunning (lua_State *L) { | 596 | static int luaB_corunning (lua_State *L) { |
| 597 | if (lua_pushthread(L)) | 597 | if (lua_pushthread(L)) |
| 598 | return 0; /* main thread is not a coroutine */ | 598 | lua_pushnil(L); /* main thread is not a coroutine */ |
| 599 | else | 599 | return 1; |
| 600 | return 1; | ||
| 601 | } | 600 | } |
| 602 | 601 | ||
| 603 | 602 | ||