aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-03 10:18:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-03 10:18:44 -0300
commit7c5786479c1d617ec7c133f2c2b955726436267a (patch)
tree614cbcd89903fdbb06208a0c17196264da6a4166 /luaconf.h
parentb14609032cf328dea48b0803f3e585e223283b3d (diff)
downloadlua-7c5786479c1d617ec7c133f2c2b955726436267a.tar.gz
lua-7c5786479c1d617ec7c133f2c2b955726436267a.tar.bz2
lua-7c5786479c1d617ec7c133f2c2b955726436267a.zip
A few more improvements in 'luaO_pushvfstring'
- 'L' added to the 'BuffFS' structure - '%c' does not handle control characters (it is not its business. This now is done by the lexer, who is the one in charge of that kind of errors.) - avoid the direct use of 'l_sprintf' in the Lua kernel
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/luaconf.h b/luaconf.h
index 019f2eb6..9240d9c8 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -376,7 +376,7 @@
376@@ lua_number2str converts a float to a string. 376@@ lua_number2str converts a float to a string.
377@@ l_mathop allows the addition of an 'l' or 'f' to all math operations. 377@@ l_mathop allows the addition of an 'l' or 'f' to all math operations.
378@@ l_floor takes the floor of a float. 378@@ l_floor takes the floor of a float.
379@@ lua_str2number converts a decimal numeric string to a number. 379@@ lua_str2number converts a decimal numeral to a number.
380*/ 380*/
381 381
382 382
@@ -568,7 +568,7 @@
568 568
569 569
570/* 570/*
571@@ lua_strx2number converts a hexadecimal numeric string to a number. 571@@ lua_strx2number converts a hexadecimal numeral to a number.
572** In C99, 'strtod' does that conversion. Otherwise, you can 572** In C99, 'strtod' does that conversion. Otherwise, you can
573** leave 'lua_strx2number' undefined and Lua will provide its own 573** leave 'lua_strx2number' undefined and Lua will provide its own
574** implementation. 574** implementation.
@@ -579,7 +579,14 @@
579 579
580 580
581/* 581/*
582@@ lua_number2strx converts a float to a hexadecimal numeric string. 582@@ lua_pointer2str converts a pointer to a readable string in a
583** non-specified way.
584*/
585#define lua_pointer2str(buff,sz,p) l_sprintf(buff,sz,"%p",p)
586
587
588/*
589@@ lua_number2strx converts a float to a hexadecimal numeral.
583** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that. 590** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that.
584** Otherwise, you can leave 'lua_number2strx' undefined and Lua will 591** Otherwise, you can leave 'lua_number2strx' undefined and Lua will
585** provide its own implementation. 592** provide its own implementation.