Commit Graph

33 Commits

Author SHA1 Message Date
Mikhail Galanin 24fd1baf19 Fixed issue #40
Using absolute index could be error-prone, updated code to use relative indices as it commonly done with Lua
2019-05-24 12:41:07 +03:00
Xinchen Hui f588c88528 Fixed hash recursive detecting 2018-12-21 11:09:57 +08:00
Xinchen Hui 15f58c43fb releasing 2.0.5 2017-12-31 12:33:16 +08:00
Xinchen Hui c4c61f05bf Revert the last merge 2017-10-18 13:05:38 +08:00
Xinchen Hui 9ef044896a Merge pull request #31 from sgolemon/callback.refcount
Explicitly release held references to PHP callbacks
2017-10-18 12:56:28 +08:00
Xinchen Hui 4438a88e85 Merge pull request #33 from sgolemon/object.alloc
Fix allocation of lua object.
2017-10-18 12:55:49 +08:00
Xinchen Hui 0c6a60d21b Merge pull request #34 from sgolemon/php_printf
Prefer php_printf() over printf()
2017-10-18 12:55:26 +08:00
Xinchen Hui db95520d2f Merge pull request #35 from sgolemon/non-string.accessor
Fix non-string member access in read/write prop.
2017-10-18 12:55:10 +08:00
Sara Golemon 486de80ebf Refactor LuaClosure
Use proper internal object storage rather than private props.
Favor NULL clone_obj handler over empty private __clone method.
Favor free_obj handler over __destruct() method.
2017-10-03 10:09:53 -04:00
Sara Golemon 1813b36307 Fix non-string member access in read/write prop.
These both have a null pointer deref waiting to happen
and are coincidentally more complex than they need to be.

zval_get_string() will incref any IS_STRING zval,
or copy/convert any non-string zval.

zend_string_release() will then decref or free as appropriate.
2017-10-03 08:51:02 -04:00
Sara Golemon a2be2c935b Prefer php_printf() over printf()
On CLI the distinction doesn't matter, but in a web sapi this
will ensure the output goes to the right place.
2017-10-03 08:37:13 -04:00
Sara Golemon 6690ee0c70 Fix allocation of lua object.
Size the malloc using zend's helper.
Use ecalloc over emalloc to make sure uninit'd structs are clear.
No need to check return value as e*alloc() funcs can't fail.
2017-10-03 08:32:51 -04:00
Sara Golemon d6c7850afa Explicitly release held references to PHP callbacks 2017-10-02 18:52:01 -04:00
Xinchen Hui 527f927ead Fixed bug #73964 (Segmentation fault (11)) 2017-02-12 10:53:36 +08:00
Xinchen Hui cbe65b9ad6 Fixed issue #20 (PHP 7: Lua::eval(): unsupported type `unknown' for lua) 2016-05-30 11:44:12 +08:00
Xinchen Hui 17cbba8b77 Fixed issue #22 (Boolean FALSE is always TRUE) 2016-05-20 11:54:37 +08:00
Xinchen Hui 12c53f28eb Fixed nApplyCount checking 2016-04-11 10:37:11 +08:00
Antony Dovgal dc226c345d fix send_zval_to_lua() 2016-03-31 12:56:15 +03:00
Xinchen Hui 49b95a64f3 All tests passed 2015-02-26 12:05:45 +08:00
Xinchen Hui 8bccbdc5db clean up (not finish yet) 2015-02-26 00:11:42 +08:00
Helmut Januschka 5e5fefcdbf * this fixes memleak in php_lua_call_callback
* no more outstanding memory leaks
2015-02-04 12:56:41 +00:00
Helmut Januschka 6205c5c4ff add me to authors 👍 2015-02-02 15:06:46 +00:00
Helmut Januschka 061f22aac0 fix for latest php7 head 2015-02-02 13:27:33 +00: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
Remi Collet 99e95d1bf5 fix [-Wpointer-sign] 2013-10-24 08:27:36 +02:00
Remi Collet 22d5b508e7 LUA_ERRGCMM is 5.2 only 2013-10-24 08:19:02 +02:00
Xinchen Hui 5f0c471ea6 Releasing lua-1.1.0 2013-10-23 12:20:42 +08:00
Harald Lapp f6c6a7fb9e added support for callable functions and closures as values returned / injected into lua engine 2013-08-26 15:28:16 +02:00
Harald Lapp d9238bdd53 moved code inside of source file to prevent compilation error on later commit 2013-08-26 15:26:43 +02:00
Xinchen Hui 5a63f129b1 Fixed #65097 (nApplyCount release missing) (emptyhua at gmail dot com) 2013-06-25 14:30:03 +08:00
Xinchen Hui a91e08303f Don't ignore array[0], E_STRICT instead 2013-06-25 14:22:04 +08:00
Xinchen Hui 7e3623a956 Sync with svn 2012-04-08 20:31:47 +08:00
laruence 5534b3252d initial commit 2011-12-13 17:04:44 +08:00