From 6bda70baf5728f0a03f0ec86a158c5f582669ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 24 May 2010 13:41:42 +0200 Subject: Fix typo that broke mutliple loading. --- Changes | 2 ++ luatexbase-modutils.dtx | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 5816f95..745c417 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ attr - allocate from 1 to avoid problems with some external code - provide a Lua interface: new_attribute() and unset_attribute(). + modutils + - fix bug with module require_module()-ed many times. Summary of backwards-incompatible interface changes between 0.1 and 0.2: - Lua objects are now in table luatexbase, not luatextra. diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx index 25758ab..2c2458d 100644 --- a/luatexbase-modutils.dtx +++ b/luatexbase-modutils.dtx @@ -486,7 +486,7 @@ function provides_module(mod) end requiredversion = requiredversions[mod.name] if requiredversion then - if requiredversion.type == date + if requiredversion.type == date and requiredversion.version > datetonumber(mod.date) then err("loading module %s in version %s, " .."but version %s was required", @@ -498,7 +498,7 @@ function provides_module(mod) mod.name, mod.version, requiredversion.orig) end end - modules[mod.name] = module + modules[mod.name] = mod texio.write_nl('log', string.format("Lua module: %s %s v%.02f %s\n", mod.name, mod.date, mod.version, mod.description)) end @@ -531,6 +531,7 @@ luatexbase.provides_module { %\input luatexbase-modutils.sty %\RequirePackage{luatexbase-modutils} %<*testplain,testlatex> +\luatexUseModule{test-modutils} \luatexRequireModule %[1970/01/01] {test-modutils} -- cgit v1.2.3