%D \module
%D   [       file=cldf-int,
%D        version=2019.01.01,
%D          title=\CONTEXT\ Data Macros,
%D       subtitle=Integer,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Multilingual Macros / Lua}

\registerctxluafile{cldf-int}{autosuffix}

%D These are user commands so we don't add any protection against overloading
%D here.

\unprotect

\permanent\protected\def\newluatable#1{\clf_newluatable#1\atendofgrouped{\disposeluatable#1}}
\permanent\protected\def\useluatable#1{\clf_useluatable#1\atendofgrouped{\disposeluatable#1}}

\installcorenamespace{datavalue}

\permanent\protected\def\setdatavalue#1#2% #2 is a number (expression)
  {\expandafter\integerdef\csname\??datavalue#1\endcsname\numexpr#2\relax}

\permanent\def\getdatavalue#1{\begincsname\??datavalue#1\endcsname}
\permanent\def\thedatavalue#1{\the\begincsname\??datavalue#1\endcsname}

\protect \endinput

