cvs: pecl /perl php_perl.c /perl/tests perl037.phpt perl038.phpt perl044.phpt
| From: | Dmitry Stogov | Date: | Wed, 03 Mar 2004 08:17:44 +0000 |
| Subject: | cvs: pecl /perl php_perl.c /perl/tests perl037.phpt perl038.phpt perl044.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-998@lists.php.net to get a copy of this message | ||
dmitry Wed Mar 3 03:17:44 2004 EDT
Modified files:
/pecl/perl php_perl.c
/pecl/perl/tests perl037.phpt perl038.phpt perl044.phpt
Log:
Compatibility with current PHP5-CVS
http://cvs.php.net/diff.php/pecl/perl/php_perl.c?r1=1.2&r2=1.3&ty=u
Index: pecl/perl/php_perl.c
diff -u pecl/perl/php_perl.c:1.2 pecl/perl/php_perl.c:1.3
--- pecl/perl/php_perl.c:1.2 Tue Dec 9 05:48:09 2003
+++ pecl/perl/php_perl.c Wed Mar 3 03:17:39 2004
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Author: Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
- $Id: php_perl.c,v 1.2 2003/12/09 10:48:09 dmitry Exp $
+ $Id: php_perl.c,v 1.3 2004/03/03 08:17:39 dmitry Exp $
*/
#ifdef COMPILE_DL_PERL
@@ -43,6 +43,7 @@
#include "php.h"
#include "php_ini.h"
+#include "zend_objects_API.h"
#include "ext/standard/info.h"
#include "SAPI.h"
#include "php_perl.h"
@@ -100,7 +101,7 @@
static zend_object_value php_perl_clone(zval *object TSRMLS_DC);
static zval* php_perl_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC);
static void php_perl_write_property(zval *object, zval *member, zval *value TSRMLS_DC);
-static zval* php_perl_read_dimension(zval *object, zval *offset TSRMLS_DC);
+static zval* php_perl_read_dimension(zval *object, zval *offset, int type TSRMLS_DC);
static void php_perl_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC);
static int php_perl_has_property(zval *object, zval *member, int check_empty TSRMLS_DC);
static void php_perl_unset_property(zval *object, zval *member TSRMLS_DC);
@@ -120,7 +121,6 @@
static zend_object_handlers php_perl_object_handlers = {
zend_objects_store_add_ref, /* add_ref */
zend_objects_store_del_ref, /* del_ref */
- zend_objects_store_delete_obj, /* delete_obj */
php_perl_clone, /* clone_obj */
php_perl_read_property, /* read_property */
@@ -151,8 +151,10 @@
0,
NULL,
1,
+ 1,
NULL,
0,
+ 0,
php_perl_constructor_handler
};
@@ -446,7 +448,7 @@
zv->type = IS_OBJECT;
zv->value.obj.handlers = &php_perl_object_handlers;
zv->value.obj.handle =
- zend_objects_store_put(obj, php_perl_destructor, NULL TSRMLS_CC);
+ zend_objects_store_put(obj, php_perl_destructor, NULL, NULL TSRMLS_CC);
php_perl_remember_object(sv, zv->value.obj.handle TSRMLS_CC);
}
} else if (SvROK(sv)) { /* reference */
@@ -622,7 +624,7 @@
/****************************************************************************/
/* Returns element of array based Perl's object */
-static zval* php_perl_read_dimension(zval *object, zval *offset TSRMLS_DC)
+static zval* php_perl_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
{
PerlInterpreter* my_perl = php_perl_init(TSRMLS_C);
zval *retval = EG(uninitialized_zval_ptr);
@@ -1127,7 +1129,7 @@
new_value.handlers = &php_perl_object_handlers;
new_value.handle =
- zend_objects_store_put(obj, php_perl_destructor, NULL TSRMLS_CC);
+ zend_objects_store_put(obj, php_perl_destructor, NULL, NULL TSRMLS_CC);
php_perl_remember_object(obj->sv, new_value.handle TSRMLS_CC);
@@ -1145,7 +1147,7 @@
new_value.handlers = &php_perl_object_handlers;
new_value.handle =
- zend_objects_store_put(obj, php_perl_destructor, NULL TSRMLS_CC);
+ zend_objects_store_put(obj, php_perl_destructor, NULL, NULL TSRMLS_CC);
return new_value;
}
@@ -1180,7 +1182,7 @@
zval* object =(zval*)iterator->data;
php_perl_object *obj = (php_perl_object*)zend_object_store_get_object(object TSRMLS_CC);
if (obj->properties) {
- return zend_hash_has_more_elements(obj->properties);//?SUCCESS:FAILURE;
+ return zend_hash_has_more_elements(obj->properties);
}
return FAILURE;
}
@@ -1347,13 +1349,12 @@
av_store(av, count-i, POPs);
}
php_perl_sv_to_zval(my_perl, (SV*)av, return_value TSRMLS_CC);
- PUTBACK;
} else {
eval_sv(sv, G_SCALAR|G_KEEPERR);
SPAGAIN;
php_perl_sv_to_zval(my_perl, POPs, return_value TSRMLS_CC);
- PUTBACK;
}
+ PUTBACK;
} else {
PERLG(wantarray) = 0;
eval_sv(sv, G_DISCARD|G_KEEPERR);
@@ -1539,7 +1540,7 @@
PHP_RSHUTDOWN(perl),
PHP_MINFO(perl),
#if ZEND_MODULE_API_NO >= 20010901
- "0.4",
+ "0.5",
#endif
STANDARD_MODULE_PROPERTIES
};
http://cvs.php.net/diff.php/pecl/perl/tests/perl037.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/perl/tests/perl037.phpt
diff -u pecl/perl/tests/perl037.phpt:1.1 pecl/perl/tests/perl037.phpt:1.2
--- pecl/perl/tests/perl037.phpt:1.1 Tue Dec 9 01:43:54 2003
+++ pecl/perl/tests/perl037.phpt Wed Mar 3 03:17:43 2004
@@ -18,7 +18,7 @@
PERL_END
);
$x = new Perl('Foo');
-$y = $x->__clone();
+$y = clone $x;
$x->x = 1;
$y->x = 2;
var_dump($x);
http://cvs.php.net/diff.php/pecl/perl/tests/perl038.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/perl/tests/perl038.phpt
diff -u pecl/perl/tests/perl038.phpt:1.1 pecl/perl/tests/perl038.phpt:1.2
--- pecl/perl/tests/perl038.phpt:1.1 Tue Dec 9 01:43:54 2003
+++ pecl/perl/tests/perl038.phpt Wed Mar 3 03:17:43 2004
@@ -22,7 +22,7 @@
PERL_END
);
$x = new Perl('Foo');
-$y = $x->__clone();
+$y = clone $x;
$x->modify(1);
$y->modify(2);
var_dump($x->x);
http://cvs.php.net/diff.php/pecl/perl/tests/perl044.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/perl/tests/perl044.phpt
diff -u pecl/perl/tests/perl044.phpt:1.1 pecl/perl/tests/perl044.phpt:1.2
--- pecl/perl/tests/perl044.phpt:1.1 Tue Dec 9 01:43:54 2003
+++ pecl/perl/tests/perl044.phpt Wed Mar 3 03:17:43 2004
@@ -22,7 +22,7 @@
PERL_END
);
$x = new Perl('Foo');
-$y = $x->__clone();
+$y = clone $x;
$x->modify(1);
$y->modify(2);
var_dump($x);