lua-users home
lua-l archive

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

I am using tolua++-1.0.92 to bind fixed length char arrays. However it
generates apparently incorrect type checking code in the generated set
function. For example:
	char name[20];
generates the following type checking code:
	if (!tolua_istable(tolua_S,2,0,&tolua_err))
 		tolua_error(tolua_S,"#vinvalid type in variable
Which produces an error on the following lua code: = "newName"

This problem is 100% reproducible.

I traced the problem to the function classDeclaration:outchecktype in
declaration.lua in the toluapp source, made a change and it now
correctly generates "tolua_isstring" rather than "tolua_istable" for
char arrays.

Would the maintainers of tolua++ like me to post or mail a patch for

- DC