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. Some

[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. Only

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

2015-02-02 Thread Michael Wallner
On 02 02 2015, at 07:51, François Laupretre franc...@tekwire.net 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:

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

2015-02-02 Thread Michael Wallner
On 02 02 2015, at 09:01, Sara Golemon p...@golemon.com wrote: On 2 Feb 2015, at 06:43, Xinchen Hui larue...@php.net 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

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 anatol@belski.net 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 franc...@tekwire.net wrote: De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of

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 anatol@belski.net 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 franc...@tekwire.net wrote:

[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,

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 franc...@tekwire.net 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

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 larue...@php.net wrote: Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre franc...@tekwire.net 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

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 franc...@tekwire.net 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

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_resource is