[Xapian-tickets] [Xapian] #401: Weight cannot be subclassed in bindings

Xapian nobody at xapian.org
Fri Sep 18 00:23:23 BST 2009


#401: Weight cannot be subclassed in bindings
-----------------------------+----------------------------------------------
 Reporter:  james            |       Owner:  olly    
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  1.2.0   
Component:  Xapian-bindings  |     Version:          
 Severity:  normal           |    Keywords:          
Blockedby:                   |    Platform:  All     
 Blocking:                   |  
-----------------------------+----------------------------------------------

Comment(by richard):

 I think you need to specify a specific exception handler for the Weight::
 methods which are not being ignored, as is done for PostingSource, and the
 attached patch does this.  With the patch, the compilation passes, but
 linking fails at import time with:

 {{{
 PYTHONPATH="xapian:$PYTHONPATH" /usr/bin/python -c "import _xapian"
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
 ImportError: /home/richard/private/Working/xapian/working/xapian-
 bindings/python/xapian/_xapian.so: undefined symbol:
 _ZN6Xapian6WeightC2ERKS0_
 }}}

 c++filt says that this symbol is:
 {{{
 Xapian::Weight::Weight(Xapian::Weight const&)
 }}}

 Not sure what's going on here: the xapian.i file says:
 {{{
 %ignore Xapian::Weight::Weight(const Weight &);
 }}}

 which should have the effect of ignoring the copy constructor I think, but
 doesn't seem to be working.

-- 
Ticket URL: <http://trac.xapian.org/ticket/401#comment:3>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list