|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-01 15:48 UTC] johannes at schlueters dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 02:00:01 2025 UTC |
Description: ------------ Compilation of lua.c breaks with strict compilers like CodeWarrior for NetWare. See patch below which fixes these issues. Reproduce code: --------------- --- lua.c.orig Mon Jul 13 15:21:15 2009 +++ lua.c Mon Jul 13 16:20:59 2009 @@ -180,6 +180,7 @@ { char *value; size_t value_len; + zval *akey,*aval; switch (lua_type(L, index)) { case LUA_TBOOLEAN: @@ -191,7 +192,7 @@ break; case LUA_TSTRING: - value = lua_tolstring(L, index, &value_len); + value = (char *)lua_tolstring(L, index, &value_len); ZVAL_STRINGL(ret, value, value_len, 1); break; @@ -200,10 +201,9 @@ /* notify lua to traverse the table */ lua_pushnil(L); - zval *akey,*aval; ALLOC_INIT_ZVAL(akey); ALLOC_INIT_ZVAL(aval); - + /* table has been moved by one because of the pushnil */ while (lua_next(L, index-1) != 0) { @@ -211,8 +211,8 @@ MAKE_STD_ZVAL(aval); /* `key' is at index -2 and `value' at index -1 */ - php_lua_get_zval_from_stack(L,-2,akey); - php_lua_get_zval_from_stack(L,-1,aval); + php_lua_get_zval_from_stack(L,-2,akey TSRMLS_CC); + php_lua_get_zval_from_stack(L,-1,aval TSRMLS_CC); switch(Z_TYPE_P(akey)) { @@ -282,7 +282,7 @@ if (Z_TYPE_P(prop) == IS_STRING) { MAKE_STD_ZVAL(retval); - lua_getfield(L, LUA_GLOBALSINDEX, Z_STRVAL_P(prop) TSRMLS_CC); + lua_getfield(L, LUA_GLOBALSINDEX, Z_STRVAL_P(prop)); php_lua_get_zval_from_stack(L, -1, retval TSRMLS_CC); retval->refcount--; } else {