Re: Module globals in a C++ extension

From: Date: Mon, 23 Jan 2012 19:25:48 +0000
Subject: Re: Module globals in a C++ extension
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9066@lists.php.net to get a copy of this message
On 01/23/2012 11:10 PM, Kārlis Repsons wrote:
Hi again, could someone post some info about writing extensions in C++ with object as a module global? (that is, regardless of the used MPM (or something else), make some object instance common for all running instances of the same extension)
Why don't you just pass it when needed? Or create the object, increase zval's refcount in order to keep it and return it when needed? Sound weird to me, but it's not C++ specific at all.
For one, I wonder how many more extensions in pecl are written in C++, not counting SCA_SDO? (looking for real-world examples!)
PECL/rar is in C++ (more or less).
And .. may I? Is that reasonably easy to use CMake instead of auto*hell to manage extension build process? Or why not?
Why on earth would want to replace our nice and tidy config.m4/autotools build system with that horrible CMake nonsense? -- Wbr, Antony Dovgal --- http://pinba.org - realtime profiling for PHP

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