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

2015-02-03 Thread François Laupretre
> De : Xinchen Hui [mailto:larue...@php.net] > > I don't understand how you can delete the resource if you remove the > handle from the zend_resource struct. Or would you store the index > elsewhere ? > > if you use HashTable , yes, it's hard to get rid of it, but we can > hidden it from user lan

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

2015-02-03 Thread Xinchen Hui
Hey: On Tue, Feb 3, 2015 at 12:37 AM, François Laupretre wrote: >> De : Xinchen Hui [mailto:larue...@php.net] >> furthermore, I'd like to discuss remove the handle in zend_resource struct.. >> >> it may breaks some usage (use resource as long/double/string) >> >>case IS_RESOURCE: { >>

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

2015-02-03 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 1:34 PM, Xinchen Hui wrote: > 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 r

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

2015-02-02 Thread François Laupretre
> De : Xinchen Hui [mailto:larue...@php.net] > furthermore, I'd like to discuss remove the handle in zend_resource struct.. > > it may breaks some usage (use resource as long/double/string) > >case IS_RESOURCE: { > char buf[sizeof("Resource id #") + MAX_LENGTH_OF_LONG]; >

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

2015-02-02 Thread Xinchen Hui
Hey: if no objections, I will commit it.. (no bc breaks, no handle removing , only APIs change) dmitry suggest we change zend_fetch_resource to zend_verify_resource, I think it make sense.. will do it. thanks On Mon, Feb 2, 2015 at 1:34 PM, Xinchen Hui wrote: > Hey: > > we used to u

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

2015-02-02 Thread Xinchen Hui
Hey Sara: On Mon, Feb 2, 2015 at 4:01 PM, 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

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

2015-02-02 Thread Sara Golemon
> 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 handles are used as array keys (yes, I know, ugly and wrong). If

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

2015-02-01 Thread Xinchen Hui
On Mon, Feb 2, 2015 at 1:34 PM, Xinchen Hui wrote: > 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 resourc