Problem: languages/lua doesn't compile on Win32, with the following
error message.
luanumber.c
luanumber.c(1152) : error C2143: syntax error : missing ';' before
'type'
luanumber.c(1154) : error C2065: 'my_enum_class_LuaString' :
undeclared identifier
luanumber.c(1195) : error C2143: syntax error : missing '{' before
'*'
luanumber.c(1197) : error C2371: 'Parrot_lib_luanumber_load' :
redefinition; different basic types
luanumber.c(1195) : see declaration of
'Parrot_lib_luanumber_load'
compile luanumber.c failed (512)
The reason for this is the following initialization, in the middle of
function Parrot_LuaNumber_class_init.
int my_enum_class_LuaString = pmc_type(interp,
string_from_const_cstring(interp, "LuaString", 0));
Possible Solution: Attached patch adds a block around the MMD
initializer code, which should bring the generated code back to valid C.
Changed Files: lib/Parrot/Pmc2c.pm
Thanks, applied - r13329.
leo