From 48d0674c2e85ef7bb447a8a45fbc6af80508f10e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 3 Apr 2015 15:41:57 -0300 Subject: more consistent use of locale radix character across Lua --- luaconf.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'luaconf.h') diff --git a/luaconf.h b/luaconf.h index f948bb5f..b5966a4d 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.248 2015/03/06 19:49:50 roberto Exp roberto $ +** $Id: luaconf.h,v 1.249 2015/03/31 12:00:07 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -569,7 +569,7 @@ /* ** {================================================================== -** Dependencies with C99 +** Dependencies with C99 and other C details ** =================================================================== */ @@ -626,6 +626,16 @@ #endif #endif + +/* +@@ lua_getlocaledecpoint gets the locale "radix character" (decimal point). +** Change that if you do not want to use C locales. (Code using this +** macro must include header 'locale.h'.) +*/ +#if !defined(lua_getlocaledecpoint) +#define lua_getlocaledecpoint() (localeconv()->decimal_point[0]) +#endif + /* }================================================================== */ -- cgit v1.2.3-55-g6feb