From 2c2bb26942dd6cf8190aa42c7afecc10fe5f3051 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= <mpg@elzevir.fr>
Date: Sat, 6 Nov 2010 05:21:52 +0100
Subject: fix call_callback()

bug introduced in c1280576f13b5f4f29cb57053340a84d6bda69f0
---
 luatexbase-mcb.dtx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'luatexbase-mcb.dtx')

diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx
index e170a5b..a9b3771 100644
--- a/luatexbase-mcb.dtx
+++ b/luatexbase-mcb.dtx
@@ -856,7 +856,7 @@ function call_callback(name, ...)
     if not l then
         f = lua_callbacks_defaults[name]
     else
-        f = handlers[callbacktypes[name]]
+        f = handlers[callbacktypes[name]](name)
         if not f then
             err("unknown callback type")
             return
@@ -922,12 +922,12 @@ luatexbase.create_callback("fooback", "data", data_one)
 msg("* call it")
 luatexbase.call_callback("fooback", "default")
 msg("* add two functions")
-luatexbase.add_to_callback("fooback", data_two, " function two", 2)
-luatexbase.add_to_callback("fooback", data_three, " function three", 1)
+luatexbase.add_to_callback("fooback", data_two, "function two", 2)
+luatexbase.add_to_callback("fooback", data_three, "function three", 1)
 msg("* call")
 luatexbase.call_callback("fooback", "all")
 msg("* rm one function")
-luatexbase.remove_from_callback("fooback", " function three")
+luatexbase.remove_from_callback("fooback", "function three")
 msg("* call")
 luatexbase.call_callback("fooback", "all but three")
 msg("* reset")
-- 
cgit v1.2.3

