Atualizacao para a versao final da "proposta de pacotes" do Roberto.

Substituicao de `pack' por `package'.
This commit is contained in:
tomas 2004-09-17 15:37:30 +00:00
parent ed079572fc
commit bb0b4f85be
5 changed files with 20 additions and 20 deletions

View File

@ -3,7 +3,7 @@
** Authors: Pedro Rabinovitch, Roberto Ierusalimschy, Carlos Cassino
** Tomas Guisasola, Eduardo Quintao
** See Copyright Notice in license.html
** $Id: ls_pg.c,v 1.20 2004/09/15 16:14:24 tomas Exp $
** $Id: ls_pg.c,v 1.21 2004/09/17 15:37:30 tomas Exp $
*/
#include <assert.h>
@ -526,7 +526,7 @@ LUASQL_API int luaopen_luasqlpostgres (lua_State *L) {
create_metatables (L);
/* if Lua 5.0 then Set pack.loaded[name] = luasql */
/* if Lua 5.0 then Set package.loaded[name] = luasql */
if (lua_isstring(L, 1))
name = lua_tostring (L, 1);
else {
@ -535,12 +535,12 @@ LUASQL_API int luaopen_luasqlpostgres (lua_State *L) {
name = lua_tostring (L, -1);
lua_pop (L, 2);
}
lua_getglobal (L, "pack");
lua_getglobal (L, "package");
lua_pushliteral (L, "loaded");
lua_gettable (L, -2);
lua_pushstring (L, name);
lua_pushvalue (L, luasql);
lua_settable (L, -3); /* pack.loaded[name] = luasql */
lua_settable (L, -3); /* package.loaded[name] = luasql */
lua_pop (L, 2);
return 1;

View File

@ -2,7 +2,7 @@
** LuaSQL, MySQL driver
** Authors: Eduardo Quintao
** See Copyright Notice in license.html
** $Id: ls_mysql.c,v 1.13 2004/09/15 16:14:24 tomas Exp $
** $Id: ls_mysql.c,v 1.14 2004/09/17 15:37:30 tomas Exp $
*/
#include <assert.h>
@ -504,7 +504,7 @@ LUASQL_API int luaopen_luasqlmysql (lua_State *L) {
create_metatables (L);
/* if Lua 5.0 then Set pack.loaded[name] = luasql */
/* if Lua 5.0 then Set package.loaded[name] = luasql */
if (lua_isstring(L, 1))
name = lua_tostring (L, 1);
else {
@ -513,12 +513,12 @@ LUASQL_API int luaopen_luasqlmysql (lua_State *L) {
name = lua_tostring (L, -1);
lua_pop (L, 2);
}
lua_getglobal (L, "pack");
lua_getglobal (L, "package");
lua_pushliteral (L, "loaded");
lua_gettable (L, -2);
lua_pushstring (L, name);
lua_pushvalue (L, luasql);
lua_settable (L, -3); /* pack.loaded[name] = luasql */
lua_settable (L, -3); /* package.loaded[name] = luasql */
lua_pop (L, 2);
return 1;

View File

@ -2,7 +2,7 @@
** LuaSQL, Oracle driver
** Authors: Tomas Guisasola, Leonardo Godinho
** See Copyright Notice in license.html
** $Id: ls_oci8.c,v 1.19 2004/09/15 16:14:24 tomas Exp $
** $Id: ls_oci8.c,v 1.20 2004/09/17 15:37:30 tomas Exp $
*/
#include <assert.h>
@ -854,7 +854,7 @@ LUASQL_API int luaopen_luasqloracle (lua_State *L) {
create_metatables (L);
/* if Lua 5.0 then Set pack.loaded[name] = luasql */
/* if Lua 5.0 then Set package.loaded[name] = luasql */
if (lua_isstring(L, 1))
name = lua_tostring (L, 1);
else {
@ -863,12 +863,12 @@ LUASQL_API int luaopen_luasqloracle (lua_State *L) {
name = lua_tostring (L, -1);
lua_pop (L, 2);
}
lua_getglobal (L, "pack");
lua_getglobal (L, "package");
lua_pushliteral (L, "loaded");
lua_gettable (L, -2);
lua_pushstring (L, name);
lua_pushvalue (L, luasql);
lua_settable (L, -3); /* pack.loaded[name] = luasql */
lua_settable (L, -3); /* package.loaded[name] = luasql */
lua_pop (L, 2);
return 1;

View File

@ -3,7 +3,7 @@
** Authors: Pedro Rabinovitch, Roberto Ierusalimschy, Diego Nehab,
** Tomas Guisasola
** See Copyright Notice in license.html
** $Id: ls_odbc.c,v 1.23 2004/09/15 16:14:24 tomas Exp $
** $Id: ls_odbc.c,v 1.24 2004/09/17 15:37:30 tomas Exp $
*/
#include <assert.h>
@ -709,7 +709,7 @@ LUASQL_API int luaopen_luasqlodbc (lua_State *L) {
create_metatables (L);
/* if Lua 5.0 then Set pack.loaded[name] = luasql */
/* if Lua 5.0 then Set package.loaded[name] = luasql */
if (lua_isstring(L, 1))
name = lua_tostring (L, 1);
else {
@ -718,12 +718,12 @@ LUASQL_API int luaopen_luasqlodbc (lua_State *L) {
name = lua_tostring (L, -1);
lua_pop (L, 2);
}
lua_getglobal (L, "pack");
lua_getglobal (L, "package");
lua_pushliteral (L, "loaded");
lua_gettable (L, -2);
lua_pushstring (L, name);
lua_pushvalue (L, luasql);
lua_settable (L, -3); /* pack.loaded[name] = luasql */
lua_settable (L, -3); /* package.loaded[name] = luasql */
lua_pop (L, 2);
return 1;

View File

@ -2,7 +2,7 @@
** LuaSQL, SQLite driver
** Author: Tiago Dionizio, Eduardo Quintao
** See Copyright Notice in license.html
** $Id: ls_sqlite.c,v 1.3 2004/09/15 16:14:24 tomas Exp $
** $Id: ls_sqlite.c,v 1.4 2004/09/17 15:37:30 tomas Exp $
*/
#include <stdio.h>
@ -552,7 +552,7 @@ LUASQL_API int luaopen_luasqlsqlite(lua_State *L)
create_metatables (L);
/* if Lua 5.0 then Set pack.loaded[name] = luasql */
/* if Lua 5.0 then Set package.loaded[name] = luasql */
if (lua_isstring(L, 1))
name = lua_tostring (L, 1);
else {
@ -561,12 +561,12 @@ LUASQL_API int luaopen_luasqlsqlite(lua_State *L)
name = lua_tostring (L, -1);
lua_pop (L, 2);
}
lua_getglobal (L, "pack");
lua_getglobal (L, "package");
lua_pushliteral (L, "loaded");
lua_gettable (L, -2);
lua_pushstring (L, name);
lua_pushvalue (L, luasql);
lua_settable (L, -3); /* pack.loaded[name] = luasql */
lua_settable (L, -3); /* package.loaded[name] = luasql */
lua_pop (L, 2);
return 1;