aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-04-24 14:01:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-04-24 14:01:20 -0300
commit3da34a5fa70a51f0cf06d677a4f07b470693260c (patch)
tree384aeb18a404a076a57188070f1e155a7cc24b3d /luaconf.h
parent20b161e2859837e4f7fb1c19440ad7efe1588f1f (diff)
downloadlua-3da34a5fa70a51f0cf06d677a4f07b470693260c.tar.gz
lua-3da34a5fa70a51f0cf06d677a4f07b470693260c.tar.bz2
lua-3da34a5fa70a51f0cf06d677a4f07b470693260c.zip
Revamp of 'lua_pushfstring' / 'luaO_pushvfstring'
The function 'luaO_pushvfstring' now uses an internal buffer to concatenate small strings, instead of pushing all pieces on the stack. This avoids the creation of several small Lua strings for each piece of the result. (For instance, a format like "n: '%d'" used to create three intermediate strings: "n: '", the numeral, and "'". Now it creates none.)
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/luaconf.h b/luaconf.h
index 76a61616..019f2eb6 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -579,13 +579,6 @@
579 579
580 580
581/* 581/*
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 numeric string. 582@@ lua_number2strx converts a float to a hexadecimal numeric string.
590** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that. 583** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that.
591** Otherwise, you can leave 'lua_number2strx' undefined and Lua will 584** Otherwise, you can leave 'lua_number2strx' undefined and Lua will