Re: Hiding a resource in a separate ZVAL

From: Date: Tue, 25 Oct 2011 20:46:07 +0000
Subject: Re: Hiding a resource in a separate ZVAL
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-8772@lists.php.net to get a copy of this message
2011/10/25 Pieter de Zwart <pdezwart@rubiconproject.com>: > This would mean hiding the persistent resource behind the AMQPConnection object zval, and > calling all the right dtors at all the right times. I don't know about the persistent connection thing, but if you want to put a resource inside an object, you should probably consider putting the C struct that represents your connection directly inside your zval. If this is what you want, I suggest reading Kristina Chodorow's article on extension writing [1]. Take a look at the "Attaching Structs" section. [1] http://www.snailinaturtleneck.com/blog/2011/08/11/php-extensions-made-eldrich-classes/ -- Pedro Padron

« previous php.pecl.dev (#8772) next »