Hi,

On Fri, 2014-03-07 at 14:52 -0400, JGM wrote:
> I'm trying to implement a virtual method on wxphp that in C++ looks like:
> 
> size_t wxInputStream::OnSysRead(void* buffer, size_t bufsize)
> 
> so in php this method is implemented as:
> 
> public function OnSysRead(&$buffer, $bufsize)

Why do you need a reference here? You can return the buffer by value.
Copy on write will prevent unneeded copies and reference trouble and as
PHP strings are binary safe there is no need to transport the length
independently.

johannes



-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to