summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-02 22:05:22 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-02 22:05:22 +0200
commit9bc0be2978b9c87eaf111d93339378a9e3b5bbc9 (patch)
tree7c0737e67270356b97e699db84ded585f8ab05d3
parent00ba44f1939220af84ad885d1ba2f1f974bd7eb7 (diff)
downloadluatexbase-9bc0be2978b9c87eaf111d93339378a9e3b5bbc9.tar.gz
accept node as argument for function ``get_user_whatsit_name``
-rw-r--r--luatexbase-attr.dtx10
1 files changed, 8 insertions, 2 deletions
diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx
index 7c8f5b9..54c26f7 100644
--- a/luatexbase-attr.dtx
+++ b/luatexbase-attr.dtx
@@ -561,8 +561,14 @@ luatexbase.get_user_whatsit_id = get_user_whatsit_id
% the package identifier it was registered with.
%
% \begin{macrocode}
---- int -> (string, string)
-local get_user_whatsit_name = function (id)
+--- int | node -> (string, string)
+local get_user_whatsit_name = function (asked)
+ local id
+ if type(asked) == "number" then
+ id = asked
+ else --- node
+ id = asked.user_id
+ end
return tableunpack(whatsit_ids[id])
end
luatexbase.get_user_whatsit_name = get_user_whatsit_name