Re: cast_object handler patch

From: Date: Thu, 12 Oct 2006 21:26:56 +0000
Subject: Re: cast_object handler patch
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-26045@lists.php.net to get a copy of this message
>I discovered that using convert_to_(string|unicode)_with_converter() > on objects still used runtime encoding instead of the specified > converter. Turns out it's because cast_object handler has no clue > about the converter passed to the macro. This patch implements a fix > via adding an extra generic pointer parameter to cast_object that can > be used by various types as necessary. If no one objects, I'll commit > the change soon. > How does this impact userspace __toString() handlers? Would we pass the encoding from the converter to them? function __toString($encoding) { } Do we need __toUnicode($encoding) as well? Would we just let the user pass back *whatever* type then convert as needed in the internal cast handler? -Sara

« previous php.internals (#26045) next »