>>>>> "MV" == Miklos Vajna <vmiklos@...> writes:
MV> On Mon, May 25, 2009 at 04:27:16PM -0600, David Fletcher <frodo@...> wrote:
MV> Did you read the patch before sending? :)
I'm not sure what you're asking. Would you rephrase your question?
MV> You seem to mix functional changes and cleanups.
Yes, these are functional changes. The destructor emitted by the PHP
interface does not work when intrusive_ptr typemaps are in effect. By
does not work, I mean that code is generated that does not compile.
The changes that I've made correct that problem...
... though the wrapped destructors (which are static functions) are
never referenced within the generated code. I believe this is another
problem, one I haven't had to investigate just yet.
MV> Also, that #if 1 is clearly not something we want to see in SVN,
MV> it's probably a leftover from your #if 0 debug.
Apparently, I wasn't clear when I submitted the patch, perhaps because
my question was split across a couple of different posts. I'll try
1. Repeating what I said above, the current PHP interface generating
code doesn't produce C++ code that will compile when intrusive_ptr
typemaps are in effect. The wrapped destructors are the culprit.
2. The reason the code isn't correct is that typemaps are not taken
into account when a wrapped destructor is generated. The function
that generates the destructor, CreateZendListDestructor(), is
called by the functionWrapper() function. While latter function
seems to take typemaps into account, the former doesn't.
3. My change adds support for this, but I'm not entirely sure that all
corners are covered by my change. I was sending out a "temporary"
patch to see if anyone had issues with the implementation. I'll
also need to investigate why the wrapped destructors aren't
4. I also need to investigate why some output typemaps aren't applied
in certain situations. They're related to these warnings, I'm
kmlbase.i:52: Warning(453): Can't apply (std::string *OUTPUT). No typemaps are defined.
kmlbase.i:53: Warning(453): Can't apply (std::string *OUTPUT). No typemaps are defined.
kmlbase.i:103: Warning(503): Can't wrap 'operator ==' unless renamed to a valid identifier.
I find these messages rather cryptic, by the way, especially given
that the same .i files produce correctly-functioning interfaces for
java, python and perl.
5. For a final patch, I would, of course, remove the "#if 1" construct
you mentioned. And, while it pains me, I'd also change the code to
match the coding style used within SWIG.