lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> As for the core Lua lib, it's mostly string width independent
> I believe, although a quick search across the source produces a 
> number of calls to things like strlen in routines like 
> lua_pushstring, lua_dostring, luaO_chunkid, luaS_new, and 
> luaV_strcomp. (Maybe these should be memcmp's instead??) 
> Hopefully if you stay away from some of the ASCII api calls like
> lua_pushstring, lua_dostring everything works on a system that 
> use Unicode or UTF16? 

Actually, memcmp isn't going to fix this. :) What is this call
luaV_strcomp used for? Looks like it is called by luaV_lessthan, 
which is called from a number of places. Are these routines acting 
on user defined string data? If so, this would break on a Unicode

I also see the use of strcpy in a number of places. I was 
under the impression Lua was string width independent but maybe
I was wrong.