Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-03 Thread Stanislav Malyshev
Hi! > as you can see, we use "r" to receive a IS_RESOURCE type, that > means, check the type in ZEND_FETCH_RESOURCE is overhead.. Except that some functions could receive "z" and decide if it's the resource or not afterwards... But I guess you could rely on the code that decides it to check.

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-02 Thread Michael Wallner
> On 02 02 2015, at 09:01, Sara Golemon wrote: > > > >> On 2 Feb 2015, at 06:43, Xinchen Hui wrote: >> furthermore, I'd like to discuss remove the handle in zend_resource struct.. >> >> it may breaks some usage (use resource as long/double/string > > I've seen uses in the wild where file ha

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-02 Thread Michael Wallner
> On 02 02 2015, at 07:51, François Laupretre wrote: > Sorry to say that, but are you sure you understand the difference between > zval types and resource types ? > Thanks, you made my day. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/uns

[PHP-DEV] 回复: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-02 Thread Wei Dai
> > De : Xinchen Hui [mailto:larue...@php.net] > > we used to use lval of zval as a handle to access resource type.. > > > > but now, we introduced a new type IS_RESOURCE, which make the > > handle(id) sort of redundant . > > > > > Wrong. The IS_RESOURCE type has nothing to do with PHP 7. O

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Anatol Belski
Hi Hui, On Mon, February 2, 2015 08:40, Xinchen Hui wrote: > Hey: > > > On Mon, Feb 2, 2015 at 3:35 PM, Anatol Belski > wrote: > >> Hi, >> >> >> On Mon, February 2, 2015 08:11, Xinchen Hui wrote: >> >>> Hey: >>> >>> >>> >>> On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre >>> >>> wrote: >>> >>

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 3:35 PM, Anatol Belski wrote: > Hi, > > On Mon, February 2, 2015 08:11, Xinchen Hui wrote: >> Hey: >> >> >> On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre >> wrote: >> De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of zval as a handle to

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Anatol Belski
Hi, On Mon, February 2, 2015 08:11, Xinchen Hui wrote: > Hey: > > > On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre > wrote: > >>> De : Xinchen Hui [mailto:larue...@php.net] >>> we used to use lval of zval as a handle to access resource type.. >>> >>> but now, we introduced a new type IS_RESOU

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 3:11 PM, Xinchen Hui wrote: > Hey: > > On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre > wrote: >>> De : Xinchen Hui [mailto:larue...@php.net] >>> we used to use lval of zval as a handle to access resource type.. >>> >>> but now, we introduced a new typ

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre wrote: >> De : Xinchen Hui [mailto:larue...@php.net] >> we used to use lval of zval as a handle to access resource type.. >> >> but now, we introduced a new type IS_RESOURCE, which make the >> handle(id) sort of redundant . > > Wro

RE: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread François Laupretre
> De : Xinchen Hui [mailto:larue...@php.net] > we used to use lval of zval as a handle to access resource type.. > > but now, we introduced a new type IS_RESOURCE, which make the > handle(id) sort of redundant . Wrong. The IS_RESOURCE type has nothing to do with PHP 7. Only zend_resourc

[PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: we used to use lval of zval as a handle to access resource type.. but now, we introduced a new type IS_RESOURCE, which make the handle(id) sort of redundant . further more, the common usage when handling resource is like: if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl"