1 Dec 2004 08:10
constructors vs factory functions (was Re: TCL Binding working, but db_lock doesn't get removed?)
Olly Betts <olly <at> survex.com>
2004-12-01 07:10:43 GMT
2004-12-01 07:10:43 GMT
On Sat, Nov 06, 2004 at 10:37:58AM -0800, Eric Parusel wrote: > [SWIG Tcl8 not calling WritableDatabase destructor bug] > I joined, and sent an email, but it never made it to the list... > I emailed the list maintainer, and never got a reply. Well, I reduced it down to a really simple testcase and sent it to the swig list (took me 3 attempts to post - it seems to just throw away any mail with attachments): http://article.gmane.org/gmane.comp.programming.swig/5422 But I've not had a single reply, either on or off the list. I guess that this isn't going to get fixed in SWIG any time soon... So I thought about how we could work around this. The problem is that Tcl8 doesn't cope with a factory function which returns an object. But we could give WritableDatabase a normal constructor instead of using a factory function. And in fact thinking about this, it's probably a more natural design for the API user. I'm trying to remember quite why I chose factory functions originally. The change is here: http://cvs.xapian.org/xapian/xapian-core/api/Attic/omdatabaseinternal.cc.diff?r1=1.27&r2=1.28 http://cvs.xapian.org/xapian/xapian-core/include/om/Attic/omdatabase.h.diff?r1=1.51&r2=1.52 Previously the database type and parameters were encapsulated in an(Continue reading)
RSS Feed