Commit 0e09e623 authored by Ondrej Sury's avatar Ondrej Sury

New upstream version 2.1.0+1.0.2

parent 30facbb0
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.10.1" version="2.0" 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" 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 packagerversion="1.10.5" version="2.0" 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" 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>propro</name>
<channel>pecl.php.net</channel>
<summary>Property proxy</summary>
......@@ -10,10 +10,10 @@
<email>mike@php.net</email>
<active>yes</active>
</lead>
<date>2016-05-25</date>
<time>11:55:16</time>
<date>2018-04-09</date>
<time>10:31:25</time>
<version>
<release>2.0.1</release>
<release>2.1.0</release>
<api>2.0.0</api>
</version>
<stability>
......@@ -22,15 +22,15 @@
</stability>
<license uri="http://copyfree.org/content/standard/licenses/2bsd/license.txt">BSD-2-Clause</license>
<notes>
* Fixed leak in write_dimension
* PHP-7.2 compatibility
</notes>
<contents>
<dir name="/">
<file md5sum="84303a48edfca5b602a511e3c6a53ad6" name="src/php_propro_api.h" role="src" />
<file md5sum="026db69da0eaee27bc92e3c8492fc2de" name="src/php_propro_api.c" role="src" />
<file md5sum="6904a3e416bb80438f4244bfef958060" name="scripts/gen_travis_yml.php" role="src" />
<file md5sum="3eef7cb4c739cdae1d6d2fc897726273" name="tests/001.phpt" role="test" />
<file md5sum="48556f5710c642ba1f84e79666f8c9ca" name="tests/002.phpt" role="test" />
<file md5sum="2f72f84ccf36934682dc84313cda3c5d" name="src/php_propro_api.h" role="src" />
<file md5sum="2762f915fd579b2ab6c86ce0f2436e41" name="src/php_propro_api.c" role="src" />
<file md5sum="aafbd42aa49ae8faeb258bf65baa5583" name="scripts/gen_travis_yml.php" role="src" />
<file md5sum="88d27e90df52022b33ea6a72131a81c4" name="tests/001.phpt" role="test" />
<file md5sum="f224dc6cb4b59830ada17e2be3f59f34" name="tests/002.phpt" role="test" />
<file md5sum="2bb8c15b188cd24aa1c5ff58370f9db4" name="tests/003.phpt" role="test" />
<file md5sum="f00d3c40b7d279e4f72b8464c2ac08b5" name="AUTHORS" role="doc" />
<file md5sum="4e80a777613575ef042d64749d01573b" name="BUGS" role="doc" />
......@@ -45,7 +45,7 @@
<file md5sum="04b2c32acf793a618ee406716a968973" name="config0.m4" role="src" />
<file md5sum="45d1494594280ad6c631f01ef281b02a" name="config.w32" role="src" />
<file md5sum="2099e3fb49f3d4d841e4722cea953ff3" name="Makefile.frag" role="src" />
<file md5sum="f90bcf7e775f4d5c864593c597c0fde5" name="php_propro.h" role="src" />
<file md5sum="3d6f1b92ca88f9919ec55842b8cf6aca" name="php_propro.h" role="src" />
</dir>
</contents>
<dependencies>
......
......@@ -16,7 +16,7 @@
extern zend_module_entry propro_module_entry;
#define phpext_propro_ptr &propro_module_entry
#define PHP_PROPRO_VERSION "2.0.1"
#define PHP_PROPRO_VERSION "2.1.0"
#ifdef PHP_WIN32
# define PHP_PROPRO_API __declspec(dllexport)
......
......@@ -15,7 +15,7 @@ env:
$gen = include "./travis/pecl/gen-matrix.php";
$env = $gen([
"PHP" => ["7.0", "master"],
"PHP" => ["7.0", "7.1", "7.2", "master"],
"enable_debug",
"enable_maintainer_zts",
]);
......
......@@ -21,7 +21,7 @@
* Container for the object/array holding the proxied property.
*/
struct php_property_proxy {
/** The container holding the property */
/** The reference to the container holding the property */
zval container;
/** The name of the proxied property */
zend_string *member;
......@@ -46,13 +46,17 @@ typedef struct php_property_proxy php_property_proxy_t;
* return_value = zend_get_std_object_handlers()->read_property(object, member, type, cache_slot, tmp);
*
* if (handler) {
* handler->read(object, tmp);
*
* zval_ptr_dtor(return_value);
* ZVAL_COPY_VALUE(return_value, tmp);
* handler->read(object, return_value);
* }
* } else {
* return_value = php_property_proxy_zval(object, member_name);
* php_property_proxy_t *proxy;
* php_property_proxy_object_t *proxy_obj;
*
* proxy = php_property_proxy_init(object, member_name);
* proxy_obj = php_property_proxy_object_new_ex(NULL, proxy);
*
* ZVAL_OBJ(tmp, &proxy_obj->zo);
* return_value = tmp;
* }
*
* zend_string_release(member_name);
......
......@@ -27,7 +27,9 @@ $a = 123;
echo "get\n";
echo $a,"\n";
//echo "foo\n";
$p["foo"] = 123;
//echo "bar.baz.a.b\n";
$p["bar"]["baz"]["a"]["b"]=987;
var_dump($c);
......
......@@ -10,7 +10,9 @@ echo "Test\n";
class c {
private $storage = array();
function __get($p) {
return new php\PropertyProxy($this->storage, $p);
$pp = new php\PropertyProxy(null, $p,
new php\PropertyProxy($this, "storage"));
return $pp;
}
function __set($p, $v) {
$this->storage[$p] = $v;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment