Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/modules/lua Pull up following revision(s) (requested ...
details: https://anonhg.NetBSD.org/src/rev/8bcf46b26d3c
branches: netbsd-7
changeset: 799916:8bcf46b26d3c
user: martin <martin%NetBSD.org@localhost>
date: Sun May 22 10:28:49 2016 +0000
description:
Pull up following revision(s) (requested by salazar in ticket #1171):
sys/modules/lua/lua.c: revision 1.17
fix double require bug
diffstat:
sys/modules/lua/lua.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r cf62f2b5576a -r 8bcf46b26d3c sys/modules/lua/lua.c
--- a/sys/modules/lua/lua.c Sun May 22 10:24:50 2016 +0000
+++ b/sys/modules/lua/lua.c Sun May 22 10:28:49 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lua.c,v 1.13.2.2 2015/02/16 21:25:35 martin Exp $ */
+/* $NetBSD: lua.c,v 1.13.2.3 2016/05/22 10:28:49 martin Exp $ */
/*
* Copyright (c) 2014 by Lourival Vieira Neto <lneto%NetBSD.org@localhost>.
@@ -355,7 +355,10 @@
case LUAREQUIRE: /* 'require' a module in a State */
require = data;
LIST_FOREACH(s, &lua_states, lua_next)
- if (!strcmp(s->lua_name, require->state))
+ if (!strcmp(s->lua_name, require->state)) {
+ LIST_FOREACH(m, &s->lua_modules, mod_next)
+ if (!strcmp(m->mod_name, require->module))
+ return ENXIO;
LIST_FOREACH(m, &lua_modules, mod_next)
if (!strcmp(m->mod_name,
require->module)) {
@@ -379,6 +382,7 @@
mod_next);
return 0;
}
+ }
return ENXIO;
case LUALOAD:
load = data;
Home |
Main Index |
Thread Index |
Old Index