37 Commits

Author SHA1 Message Date
Egor
3c729ec869
fix: lua export (#19)
* fix: lua export
2025-01-19 19:12:55 +01:00
Thijs Schreijer
9eced53a8d fix(open): return an error on open/new
The method would not return an error message, now it does,
typically if a conversion is not supported.
2023-10-30 14:49:22 +01:00
Alexey Melnichuk
11545d0533
fix: Enable compiling with MSVC (#4) 2023-10-17 08:54:21 +03:00
Alexandre Erwin Ittner
2205a0fe27 Some code style changes and typo fixes 2013-10-23 00:12:24 -02:00
Alexandre Erwin Ittner
d41e0d345d Optimize memory handling in conversion function
Handling memory in this function is almost a Catch-22 between too many
mallocs and frees fragmenting memory in systems with bad allocators and
string concatenations abusing the Lua garbage collector. To avoid this,
now it uses a static buffer in the stack and a luaL_Buffer to handle
the concatenations. This remove all direct calls to memory allocators
from the library and lets Lua use its own.
2013-10-23 00:08:28 -02:00
Alexandre Erwin Ittner
6f265ded5d Fix invalid error report
cd:iconv returned an invalid ERROR_UNKNOW code instead of 'nil' on
successful conversions. This usually passes unnoticed since the return
string is what the user actually expects.
2012-05-22 00:39:41 -03:00
Alexandre Erwin Ittner
1fc031875f Make the library comptible with both Lua 5.1 and Lua 5.2 2011-12-05 19:40:34 -02:00
Alexandre Erwin Ittner
044877f838 Replace deprecated 'luaL_reg' by 'luaL_Reg'
'luaL_reg' was deprecated in Lua 5.1; Ensures that this version is
free of deprecated constructions.
2010-11-20 10:41:47 -02:00
Alexandre Erwin Ittner
32c7b20967 Merge branch 'fix-double-free'
Conflicts:
	luaiconv.c
2010-11-18 16:06:45 -02:00
Alexandre Erwin Ittner
6b46ea5706 Prevent crashes with double-freed conversion descriptors
It was possible to crash the interpreter by forcefully calling the
__gc metamethod twice. This commit fixes the bug.
2010-11-18 16:03:08 -02:00
Alexandre Erwin Ittner
0879d77e1a Some cosmetic changes to improve the code readability 2010-11-17 10:13:58 -02:00
Alexandre Erwin Ittner
1a183d84c2 Put the conversion buffer size in a macro 2010-11-17 01:44:41 -02:00
Alexandre Erwin Ittner
ff90f3f75e Convert library to Lua 5.2
Lua 5.2 brings some API changes; This commit converts the library to
the new version and removes the backward compatibility code between
Lua 5.0 and 5.1 (which makes no sense anymore).
2010-11-17 01:28:02 -02:00
Alexandre Erwin Ittner
e394f70df0 Replace call to luaL_typerror with a custom error message
The function luaL_typerror was removed from public API in Lua 5.2. This
commit replaces it with calls to luaL_argerror and a custom error
message.
2010-11-16 23:45:44 -02:00
Alexandre Erwin Ittner
fc22d5b632 Put all macros in uppercase 2010-11-16 23:36:24 -02:00
Alexandre Erwin Ittner
f80402c452 Update email address 2010-09-05 13:58:36 -03:00
Alexandre Erwin Ittner
80bfe373a3 Repository converted to Git
Adding ignore file and removing revision tags.
2010-02-19 20:40:44 -02:00
Alexandre Erwin Ittner
5fdb4e6ebe Fixing makefile and version bump
git-svn-id: file:///var/svn/lua-iconv/trunk@65 9538949d-8f27-0410-946f-ce01ef448559
2009-08-06 16:30:06 +00:00
Alexandre Erwin Ittner
f250397346 Changing versioning scheme to avoid problems with Debian packages
git-svn-id: file:///var/svn/lua-iconv/trunk@62 9538949d-8f27-0410-946f-ce01ef448559
2009-08-03 21:43:21 +00:00
Alexandre Erwin Ittner
9fba6938b2 Version r5. Fixes a bad linking option that makes lua-iconv unstable when used across different virtual machines
git-svn-id: file:///var/svn/lua-iconv/trunk@54 9538949d-8f27-0410-946f-ce01ef448559
2008-05-19 00:37:56 +00:00
Alexandre Erwin Ittner
49ea4854ff Changing e-mail address
git-svn-id: file:///var/svn/lua-iconv/trunk@45 9538949d-8f27-0410-946f-ce01ef448559
2008-05-11 14:15:54 +00:00
Alexandre Erwin Ittner
4909aa5f80 Changes to fix Debian packaging.
git-svn-id: file:///var/svn/lua-iconv/trunk@39 9538949d-8f27-0410-946f-ce01ef448559
2007-02-22 22:32:11 +00:00
Alexandre Erwin Ittner
bccfc233fe Better indentation.
git-svn-id: file:///var/svn/lua-iconv/trunk@37 9538949d-8f27-0410-946f-ce01ef448559
2007-02-08 23:46:58 +00:00
Alexandre Erwin Ittner
ec5bf22d3a Updating for Lua 5.1
git-svn-id: file:///var/svn/lua-iconv/trunk@26 9538949d-8f27-0410-946f-ce01ef448559
2006-04-21 14:34:44 +00:00
Alexandre Erwin Ittner
328c591f2b *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@21 9538949d-8f27-0410-946f-ce01ef448559
2005-09-18 19:52:14 +00:00
Alexandre Erwin Ittner
6b2b43d283 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@18 9538949d-8f27-0410-946f-ce01ef448559
2005-09-18 17:46:53 +00:00
Alexandre Erwin Ittner
26fdb35550 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@17 9538949d-8f27-0410-946f-ce01ef448559
2005-09-18 16:01:42 +00:00
Alexandre Erwin Ittner
c4709924a3 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@15 9538949d-8f27-0410-946f-ce01ef448559
2005-07-08 02:10:40 +00:00
Alexandre Erwin Ittner
37c7cd2fda *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@14 9538949d-8f27-0410-946f-ce01ef448559
2005-07-08 00:48:26 +00:00
Alexandre Erwin Ittner
e301c6a068 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@13 9538949d-8f27-0410-946f-ce01ef448559
2005-07-07 03:40:45 +00:00
Alexandre Erwin Ittner
2155d1b315 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@11 9538949d-8f27-0410-946f-ce01ef448559
2005-07-06 03:17:28 +00:00
Alexandre Erwin Ittner
0be1828c41 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@10 9538949d-8f27-0410-946f-ce01ef448559
2005-07-06 01:38:29 +00:00
Alexandre Erwin Ittner
c03c381b14 *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@9 9538949d-8f27-0410-946f-ce01ef448559
2005-07-06 01:24:54 +00:00
Alexandre Erwin Ittner
a226dc348c *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@8 9538949d-8f27-0410-946f-ce01ef448559
2005-07-06 01:17:02 +00:00
Alexandre Erwin Ittner
feb8e6545f *** empty log message ***
git-svn-id: file:///var/svn/lua-iconv/trunk@7 9538949d-8f27-0410-946f-ce01ef448559
2005-07-06 00:28:36 +00:00
Alexandre Erwin Ittner
e1445ad0d6 Adicionadno arquivos
git-svn-id: file:///var/svn/lua-iconv/trunk@6 9538949d-8f27-0410-946f-ce01ef448559
2005-07-06 00:23:39 +00:00
Alexandre Erwin Ittner
bb90e7e8eb Initial revision
git-svn-id: file:///var/svn/lua-iconv/trunk@2 9538949d-8f27-0410-946f-ce01ef448559
2005-07-05 23:55:43 +00:00