17 Commits

Author SHA1 Message Date
Xinchen Hui
6a2bf0e8af Update README 2015-10-26 21:11:12 -07:00
Xinchen Hui
aaf49be301 trigger triavis 2015-10-26 21:05:41 -07:00
Xinchen Hui
d3323aa9fe enable travis 2015-10-26 20:54:55 -07:00
Xinchen Hui
50d32564d2 Master is only for PHP5.X now 2015-02-25 22:23:05 +08:00
Xinchen Hui
0c265c5e7d Merge pull request #7 from remicollet/issue-php533
Fix build against PHP 5.3.3
2013-11-29 10:15:57 -08:00
Remi Collet
d893cd58c2 zval_copy_property_ctor have been added in 5.3.4 (so not in 5.3.3) 2013-11-06 14:11:45 +01:00
Xinchen Hui
96d77a1c7a Merge pull request #6 from remicollet/issue-110
Various fix for 1.1.0
2013-10-24 00:36:17 -07:00
Remi Collet
99e95d1bf5 fix [-Wpointer-sign] 2013-10-24 08:27:36 +02:00
Remi Collet
10b0cf59cd skip test if json not enabled (or build as shared and so not loaded during make test) 2013-10-24 08:22:57 +02:00
Remi Collet
561f632f62 fix test for 5.1, error string have changed 2013-10-24 08:22:01 +02:00
Remi Collet
22d5b508e7 LUA_ERRGCMM is 5.2 only 2013-10-24 08:19:02 +02:00
Remi Collet
4c8fff9af5 LUA_OK is 5.2 2013-10-24 08:17:43 +02:00
Remi Collet
bef3b82b47 quick fix to allow build against shared system library 2013-10-24 08:16:46 +02:00
Remi Collet
5489007dc8 missing test 2013-10-24 08:12:32 +02:00
Remi Collet
c4f51f3b43 fix role for doc 2013-10-24 08:12:05 +02:00
Remi Collet
b56130d45b drop package2.xml, no more supported 2013-10-24 08:11:15 +02:00
Xinchen Hui
098a5ef470 back to dev(1.1.1-dev) 2013-10-23 12:21:30 +08:00
12 changed files with 274 additions and 283 deletions

26
.travis.yml Normal file
View File

@@ -0,0 +1,26 @@
language: php
addons:
apt:
packages:
- liblua5.2-dev
php:
- 5.3
- 5.4
- 5.5
- 5.6
notifications:
email: false
irc: "irc.efnet.org#php.yaf"
env:
- REPORT_EXIT_STATUS=1 NO_INTERACTION=1
#Compile
before_script:
- ./travis/compile.sh
# Run PHPs run-tests.php
script: make test

View File

@@ -1,2 +1,6 @@
"Lua is a powerful, fast, light-weight, embeddable scripting language." ##PHP Lua
[![Build Status](https://secure.travis-ci.org/laruence/php-lua.png)](https://travis-ci.org/laruence/php-lua)
This extension embeds the lua interpreter and offers an OO-API to lua variables and functions. This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.
"Lua is a powerful, fast, light-weight, embeddable scripting language."

34
config.m4 Normal file → Executable file
View File

@@ -2,33 +2,49 @@ dnl $Id: config.m4 321796 2012-01-05 17:23:48Z laruence $
PHP_ARG_WITH(lua, for lua support, PHP_ARG_WITH(lua, for lua support,
[ --with-lua=[DIR] Include php lua support]) [ --with-lua=[DIR] Include php lua support])
PHP_ARG_WITH(lua-version, to specify a custom lua version, [ --with-lua-version=[VERSION]] Use the specified lua version.)
if test "$PHP_LUA" != "no"; then if test "$PHP_LUA" != "no"; then
if test -r $PHP_LUA/include/lua.h; then if test -r $PHP_LUA/include/lua.h; then
LUA_DIR=$PHP_LUA LUA_INCLUDE_DIR=$PHP_LUA/include
else else
AC_MSG_CHECKING(for lua in default path) AC_MSG_CHECKING(for lua in default path)
for i in /usr/local /usr; do for i in /usr/local /usr; do
if test -r $i/include/lua/lua.h; then if test -r $i/include/lua/lua.h; then
LUA_DIR=$i LUA_INCLUDE_DIR=$i/include/lua
AC_MSG_RESULT(found in $i) AC_MSG_RESULT(found in $i)
break break
fi fi
if test "$PHP_LUA_VERSION" != "yes"; then
if test -r $i/include/lua$PHP_LUA_VERSION/lua.h; then
LUA_INCLUDE_DIR=$i/include/lua$PHP_LUA_VERSION
AC_MSG_RESULT(found in a version-specific subdirectory of $i)
break
fi
fi
done done
fi fi
if test -z "$LUA_DIR"; then if test -z "$LUA_INCLUDE_DIR"; then
AC_MSG_RESULT(not found) AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/) AC_MSG_ERROR(Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/)
fi fi
LUA_LIB_NAME=liblua.a if test "$PHP_LUA_VERSION" != "yes" -a "$PHP_LUA_VERSION" != "no"; then
LUA_LIB_SUFFIX=lua$PHP_LUA_VERSION
else
LUA_LIB_SUFFIX=lua
fi
if test -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}; then LUA_LIB_NAME=lib$LUA_LIB_SUFFIX
if test -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}.${SHLIB_SUFFIX_NAME} -o -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}.a; then
LUA_LIB_DIR=$PHP_LUA/$PHP_LIBDIR LUA_LIB_DIR=$PHP_LUA/$PHP_LIBDIR
else else
AC_MSG_CHECKING(for lua library in default path) AC_MSG_CHECKING(for lua library in default path)
for i in /usr/lib /usr/lib64; do for i in /usr/$PHP_LIBDIR /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu; do
if test -r $i/${LUA_LIB_NAME}; then if test -r $i/${LUA_LIB_NAME}.${SHLIB_SUFFIX_NAME} -o -r $i/${LUA_LIB_NAME}.a; then
LUA_LIB_DIR=$i LUA_LIB_DIR=$i
AC_MSG_RESULT(found in $i) AC_MSG_RESULT(found in $i)
break break
@@ -41,8 +57,8 @@ if test "$PHP_LUA" != "no"; then
AC_MSG_ERROR(Please reinstall the lua distribution - lua library should be in <lua-dir>/lib/) AC_MSG_ERROR(Please reinstall the lua distribution - lua library should be in <lua-dir>/lib/)
fi fi
PHP_ADD_INCLUDE($LUA_DIR/include) PHP_ADD_INCLUDE($LUA_INCLUDE_DIR)
PHP_ADD_LIBRARY_WITH_PATH(lua, $LUA_LIB_DIR, LUA_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH($LUA_LIB_SUFFIX, $LUA_LIB_DIR, LUA_SHARED_LIBADD)
PHP_SUBST(LUA_SHARED_LIBADD) PHP_SUBST(LUA_SHARED_LIBADD)
PHP_NEW_EXTENSION(lua, lua.c lua_closure.c, $ext_shared) PHP_NEW_EXTENSION(lua, lua.c lua_closure.c, $ext_shared)
fi fi

8
lua.c
View File

@@ -212,7 +212,7 @@ static zend_object_value php_lua_create_object(zend_class_entry *ce TSRMLS_DC) {
#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4) #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4)
zend_hash_copy(lua_obj->obj.properties, &ce->default_properties, zend_hash_copy(lua_obj->obj.properties, &ce->default_properties,
#if (PHP_MINOR_VERSION < 3) #if (PHP_MINOR_VERSION < 4)
(copy_ctor_func_t) zval_add_ref, (copy_ctor_func_t) zval_add_ref,
#else #else
zval_copy_property_ctor(ce), zval_copy_property_ctor(ce),
@@ -511,8 +511,8 @@ int php_lua_send_zval_to_lua(lua_State *L, zval *val TSRMLS_DC) {
zend_hash_get_current_data(ht, (void **)&ppzval) == SUCCESS; zend_hash_get_current_data(ht, (void **)&ppzval) == SUCCESS;
zend_hash_move_forward(ht)) { zend_hash_move_forward(ht)) {
char *key = NULL; char *key = NULL;
int len = 0; uint len = 0;
long idx = 0; ulong idx = 0;
zval *zkey= NULL; zval *zkey= NULL;
switch(zend_hash_get_current_key_ex(ht, &key, &len, &idx, 0, NULL)) { switch(zend_hash_get_current_key_ex(ht, &key, &len, &idx, 0, NULL)) {
@@ -892,7 +892,9 @@ PHP_MINIT_FUNCTION(lua) {
REGISTER_LONG_CONSTANT("LUA_ERRRUN", LUA_ERRRUN, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRRUN", LUA_ERRRUN, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LUA_ERRSYNTAX", LUA_ERRSYNTAX, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRSYNTAX", LUA_ERRSYNTAX, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LUA_ERRMEM", LUA_ERRMEM, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRMEM", LUA_ERRMEM, CONST_PERSISTENT | CONST_CS);
#ifdef LUA_ERRGCMM
REGISTER_LONG_CONSTANT("LUA_ERRGCMM", LUA_ERRGCMM, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRGCMM", LUA_ERRGCMM, CONST_PERSISTENT | CONST_CS);
#endif
REGISTER_LONG_CONSTANT("LUA_ERRERR", LUA_ERRERR, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRERR", LUA_ERRERR, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LUA_ERRFILE", LUA_ERRFILE, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LUA_ERRFILE", LUA_ERRFILE, CONST_PERSISTENT | CONST_CS);

View File

@@ -203,7 +203,7 @@ static zend_object_value php_lua_closure_create_object(zend_class_entry *ce TSRM
zend_object_std_init(lua_closure_obj, ce TSRMLS_CC); zend_object_std_init(lua_closure_obj, ce TSRMLS_CC);
#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4) #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4)
zend_hash_copy(lua_closure_obj->properties, &ce->default_properties, zend_hash_copy(lua_closure_obj->properties, &ce->default_properties,
#if (PHP_MINOR_VERSION < 3) #if (PHP_MINOR_VERSION < 4)
(copy_ctor_func_t) zval_add_ref, (copy_ctor_func_t) zval_add_ref,
#else #else
zval_copy_property_ctor(ce), zval_copy_property_ctor(ce),

View File

@@ -1,68 +1,201 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.4.7" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<package version="1.0" packagerversion="1.9.4">
<name>lua</name> <name>lua</name>
<channel>pecl.php.net</channel>
<summary>Embedded lua interpreter</summary> <summary>Embedded lua interpreter</summary>
<description>&quot;Lua is a powerful, fast, light-weight, embeddable scripting language.&quot; <description>"Lua is a powerful, fast, light-weight, embeddable scripting language."
This extension embeds the lua interpreter and offers an OO-API to lua variables and functions. This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.</description>
</description> <lead>
<maintainers>
<maintainer>
<user>johannes</user>
<name>Johannes Schlüter</name> <name>Johannes Schlüter</name>
<user>johannes</user>
<email>johannes@php.net</email> <email>johannes@php.net</email>
<role>lead</role> <active>yes</active>
</maintainer> </lead>
<maintainer> <lead>
<user>laruence</user>
<name>Xinchen Hui</name> <name>Xinchen Hui</name>
<user>laruence</user>
<email>laruence@php.net</email> <email>laruence@php.net</email>
<role>lead</role> <active>yes</active>
</maintainer> </lead>
<maintainer> <developer>
<user>msaraujo</user>
<name>Marcelo Araujo</name> <name>Marcelo Araujo</name>
<user>msaraujo</user>
<email>msaraujo@php.net</email> <email>msaraujo@php.net</email>
<role>developer</role> <active>yes</active>
</maintainer> </developer>
</maintainers>
<release>
<version>0.9.5</version>
<date>2013-10-23</date> <date>2013-10-23</date>
<license>PHP</license> <time>12:04:27</time>
<state>beta</state> <version>
<notes>- Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) <release>1.1.0</release>
- Trigger E_STRICT when pass an array with index &apos;0&apos; to lua instead of ignoring it <api>1.1.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com)
- Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it
- added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org) - added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org)
</notes> </notes>
<deps> <contents>
<dep type="php" rel="ge" version="5.1.0"/> <dir name="/">
</deps> <file name="config.m4" role="src" />
<filelist> <file name="php_lua.h" role="src" />
<file name="lua.c" role="src" />
<file name="lua_closure.h" role="src" />
<file name="lua_closure.c" role="src" />
<file name="config.w32" role="src" />
<file name="CREDITS" role="doc" />
<file name="EXPERIMENTAL" role="doc" />
<file name="LICENSE" role="doc" />
<dir name="tests"> <dir name="tests">
<file role="test" name="001.phpt"/> <file name="001.phpt" role="test" />
<file role="test" name="002.phpt"/> <file name="002.phpt" role="test" />
<file role="test" name="003.phpt"/> <file name="003.phpt" role="test" />
<file role="test" name="004.phpt"/> <file name="004.phpt" role="test" />
<file role="test" name="005.phpt"/> <file name="005.phpt" role="test" />
<file role="test" name="006.phpt"/> <file name="006.phpt" role="test" />
<file role="test" name="007.phpt"/> <file name="007.phpt" role="test" />
<file role="test" name="008.phpt"/> <file name="008.phpt" role="test" />
<file role="test" name="009.phpt"/> <file name="009.phpt" role="test" />
<file role="test" name="010.phpt"/> <file name="010.phpt" role="test" />
<file role="test" name="011.phpt"/> <file name="011.phpt" role="test" />
<file role="test" name="012.phpt"/> <file name="012.phpt" role="test" />
<file role="test" name="013.phpt"/> <file name="013.phpt" role="test" />
</dir> <!-- /tests --> <file name="bug65097.phpt" role="test" />
<file role="src" name="config.m4"/> </dir>
<file role="src" name="config.w32"/> </dir>
<file role="src" name="CREDITS"/> </contents>
<file role="src" name="EXPERIMENTAL"/> <dependencies>
<file role="src" name="LICENSE"/> <required>
<file role="src" name="lua.c"/> <php>
<file role="src" name="lua_closure.c"/> <min>5.1.0</min>
<file role="src" name="lua_closure.h"/> </php>
<file role="src" name="php_lua.h"/> <pearinstaller>
</filelist> <min>1.4.0</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>lua</providesextension>
<extsrcrelease />
<changelog>
<release>
<date>2012-10-23</date>
<version>
<release>1.1.0</release>
<api>1.1.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com)
- Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it
- added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org)
</notes>
</release> </release>
<release>
<date>2012-06-24</date>
<version>
<release>1.0.0</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Release stable version
</notes>
</release>
<release>
<date>2012-03-19</date>
<version>
<release>0.9.4</release>
<api>0.9.4</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Compatible with lua 5.2
</notes>
</release>
<release>
<date>2012-01-12</date>
<version>
<release>0.9.3</release>
<api>0.9.3</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fix build on windows
- Fix build when building lua with static
</notes>
</release>
<release>
<date>2012-01-06</date>
<version>
<release>0.9.2</release>
<api>0.9.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed bug #60641 PECL install lua with lua5.1 packages
</notes>
</release>
<release>
<date>2011-11-24</date>
<version>
<release>0.9.1</release>
<api>0.9.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Compatible with PHP5.3+
- Fix ZTS build
- Fix mem leak when get value from lua
</notes>
</release>
<release>
<date>2011-08-03</date>
<version>
<release>0.9.0</release>
<api>0.9.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Merge Plua into Lua
- Api changes
- Add supporting for LUA_TFUNCTION
</notes>
</release>
</changelog>
</package> </package>
<!--
vim:et:ts=1:sw=1
-->

View File

@@ -1,200 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.4.7" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>lua</name>
<channel>pecl.php.net</channel>
<summary>Embedded lua interpreter</summary>
<description>"Lua is a powerful, fast, light-weight, embeddable scripting language."
This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.</description>
<lead>
<name>Johannes Schlüter</name>
<user>johannes</user>
<email>johannes@php.net</email>
<active>yes</active>
</lead>
<lead>
<name>Xinchen Hui</name>
<user>laruence</user>
<email>laruence@php.net</email>
<active>yes</active>
</lead>
<developer>
<name>Marcelo Araujo</name>
<user>msaraujo</user>
<email>msaraujo@php.net</email>
<active>yes</active>
</developer>
<date>2013-10-23</date>
<time>12:04:27</time>
<version>
<release>1.1.0</release>
<api>1.1.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
- Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com)
- Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it
- added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org)
</notes>
<contents>
<dir name="/">
<file name="config.m4" role="src" />
<file name="php_lua.h" role="src" />
<file name="lua.c" role="src" />
<file name="lua_closure.h" role="src" />
<file name="lua_closure.c" role="src" />
<file name="config.w32" role="src" />
<file name="CREDITS" role="src" />
<file name="EXPERIMENTAL" role="src" />
<file name="LICENSE" role="src" />
<dir name="tests">
<file name="001.phpt" role="test" />
<file name="002.phpt" role="test" />
<file name="003.phpt" role="test" />
<file name="004.phpt" role="test" />
<file name="005.phpt" role="test" />
<file name="006.phpt" role="test" />
<file name="007.phpt" role="test" />
<file name="008.phpt" role="test" />
<file name="009.phpt" role="test" />
<file name="010.phpt" role="test" />
<file name="011.phpt" role="test" />
<file name="012.phpt" role="test" />
<file name="013.phpt" role="test" />
</dir>
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.1.0</min>
</php>
<pearinstaller>
<min>1.4.0</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>lua</providesextension>
<extsrcrelease />
<changelog>
<release>
<date>2012-10-23</date>
<version>
<release>1.1.0</release>
<api>1.1.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com)
- Trigger E_STRICT when pass an array with index '0' to lua instead of ignoring it
- added support for callable functions and closures as values returned injected into lua engine (harald at octris dot org)
</notes>
</release>
<release>
<date>2012-06-24</date>
<version>
<release>1.0.0</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Release stable version
</notes>
</release>
<release>
<date>2012-03-19</date>
<version>
<release>0.9.4</release>
<api>0.9.4</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Compatible with lua 5.2
</notes>
</release>
<release>
<date>2012-01-12</date>
<version>
<release>0.9.3</release>
<api>0.9.3</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fix build on windows
- Fix build when building lua with static
</notes>
</release>
<release>
<date>2012-01-06</date>
<version>
<release>0.9.2</release>
<api>0.9.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Fixed bug #60641 PECL install lua with lua5.1 packages
</notes>
</release>
<release>
<date>2011-11-24</date>
<version>
<release>0.9.1</release>
<api>0.9.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Compatible with PHP5.3+
- Fix ZTS build
- Fix mem leak when get value from lua
</notes>
</release>
<release>
<date>2011-08-03</date>
<version>
<release>0.9.0</release>
<api>0.9.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Merge Plua into Lua
- Api changes
- Add supporting for LUA_TFUNCTION
</notes>
</release>
</changelog>
</package>
<!--
vim:et:ts=1:sw=1
-->

View File

@@ -24,6 +24,11 @@
#include "lauxlib.h" #include "lauxlib.h"
#include "lualib.h" #include "lualib.h"
/* LUA_OK is defined sinc 5.2 */
#ifndef LUA_OK
#define LUA_OK 0
#endif
extern zend_module_entry lua_module_entry; extern zend_module_entry lua_module_entry;
#define phpext_lua_ptr &lua_module_entry #define phpext_lua_ptr &lua_module_entry
@@ -49,7 +54,7 @@ extern zend_module_entry lua_module_entry;
#define Z_DELREF_P ZVAL_DELREF #define Z_DELREF_P ZVAL_DELREF
#endif #endif
#define PHP_LUA_VERSION "1.1.0" #define PHP_LUA_VERSION "1.1.1-dev"
#define Z_LUAVAL_P(obj) ((php_lua_object*)(zend_object_store_get_object(obj TSRMLS_CC)))->L #define Z_LUAVAL_P(obj) ((php_lua_object*)(zend_object_store_get_object(obj TSRMLS_CC)))->L
struct _php_lua_object { struct _php_lua_object {

View File

@@ -18,4 +18,4 @@ try {
--EXPECTF-- --EXPECTF--
12 12
-0.53657291800043 -0.53657291800043
[string "line"]:1: syntax error near 'code' [string "line"]:1: %s near 'code'

View File

@@ -32,7 +32,7 @@ Testing fine
Hello PHP Hello PHP
Testing broken Testing broken
%s:%d: syntax error near 'fdrg' %s:%d: %s near 'fdrg'
Testing return Testing return
Array Array
( (

View File

@@ -1,7 +1,10 @@
--TEST-- --TEST--
Bug #65097 (nApplyCount release missing) Bug #65097 (nApplyCount release missing)
--SKIPIF-- --SKIPIF--
<?php if (!extension_loaded("lua")) print "skip"; ?> <?php
if (!extension_loaded("lua")) print "skip lua extension missing";
if (!extension_loaded("json")) print "skip json extension missing";
?>
--INI-- --INI--
error_reporting=E_ALL&~E_STRICT error_reporting=E_ALL&~E_STRICT
--FILE-- --FILE--

2
travis/compile.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
phpize && ./configure --with-lua-version=5.2 && make