Re: problems compiling new PECL module

From: Date: Sat, 08 Jan 2011 23:01:32 +0000
Subject: Re: problems compiling new PECL module
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7927@lists.php.net to get a copy of this message
On 01/09/2011 01:33 AM, Tim Gustafson wrote: > $perlin = new Noise_Perlin(); > $abs = new Noise_Abs(); > $abs->setSourceModule(0, $perlin); > echo $abs->getValue(1,2,3); If you want to get objects/classes, then it's not clear why you're using resources instead: if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lr", &i, &z) == FAILURE) { RETURN_NULL(); } 'r' means a reasource, not an object. To accept an object you need to use 'o' or 'O' if you want to accept only instances of particular class. Take a look at, say, PECL/sphinx. It's not a C++ extension, but it's simple enough to be used as an example. -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP

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