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: { >>

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]; >

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