[Xapian-discuss] Overloading in the PHP bindings

David Heath david at davidheath.org
Mon Dec 19 10:33:40 GMT 2005


Olly Betts wrote:
> On Thu, Dec 15, 2005 at 10:42:54PM +0000, Olly Betts wrote:
> 
>>On Thu, Dec 15, 2005 at 07:42:45PM +0000, David Heath wrote:
>>
>>>Do you know if the new swig version might fix that crashing issue I 
>>>mentioned earlier? (I think some destructor was getting called twice). 
>>
>>It doesn't crash now (and I can reproduce the crash you had before)
>>but that may be because it fails to find the delete_writabledatabase()
>>function.  Not sure what's going on there, as the generated code looks
>>plausible enough.
> 
> 
> Rereading the SWIG PHP documentation, apparently you aren't meant to
> explicitly call destructors from PHP (just reassign the variable -
> "$db = Null;" and PHP will destroy the C++ object).
> 
> I don't know if this is a change in the SWIP PHP overhaul or not, but if
> you were getting a destructor being called twice then it's probably not
> a change and it's a mistake that the destructors were getting wrapped by
> SWIG at all.  The now aren't, except in the case where the destructor
> is a default one (which must just be a bug).

ok sounds promising. How can I try this out, should I checkout xapian 
and xapian bindings from cvs?

Thanks

Dave



More information about the Xapian-discuss mailing list