Kim Alvefur
8136aa749a
util: Add compat for prosody module name change to C sources
2023-03-17 18:03:07 +01:00
Kim Alvefur
dff4beae02
util-src: Remove Lua 5.1 compat macros
...
Part of #1600
2022-07-01 21:21:21 +02:00
Kim Alvefur
787835d693
util.strbitop: Reduce scope of functions
...
Equivalent to 'local' in Lua, these functions are exported via the
luaopen_ function, which is the only one needing to be visible outside
of the file.
Pointed out by Link Mauve at some point, but there wasn't really any
rush here.
2022-04-23 14:29:43 +02:00
Kim Alvefur
20fc0c9c15
Back out changeset 2c1583bb0e0f
...
Same reason as 712b2e6a09d9
2020-10-15 17:21:58 +02:00
Kim Alvefur
bad47be8f9
Back out 6dde2c9fa272: Doesn't work on Lua 5.1
2020-10-15 17:12:33 +02:00
Kim Alvefur
9b8a54345f
util.strbitop: Remove redundant init function
...
When you have 3 almost identical functions, you tend to edit one and
then copypaste. Forgot to remove this line from the other two.
2020-10-15 17:05:53 +02:00
Kim Alvefur
da8eca639a
util.strbitop: Create buffer in the correct size (optimization)
...
This avoids dynamically growing the buffer as Lua does when luaL_addchar
is used, thus saving on realloc calls.
2020-10-15 16:43:30 +02:00
Kim Alvefur
539255c692
util.strbitop: Reformat code
...
astyle \
--indent=tab \
--attach-classes \
--indent-switches \
--break-blocks \
--pad-oper \
--unpad-paren \
--add-braces \
--align-pointer=name \
--lineend=linux \
*.c
2020-10-15 16:26:56 +02:00
Kim Alvefur
fb1808b185
util.strbitop: Library for bitwise operations on strings
2019-09-07 13:37:47 +02:00