[Xapian-devel] Re: [Xapian-discuss] Fixing issue with PHP5/Windows

Olly Betts olly at survex.com
Thu Apr 5 10:24:42 BST 2007


On Thu, Apr 05, 2007 at 11:19:46AM +0200, Daniel M?nard wrote:
> Olly Betts a écrit :
> >Oops, I lost the cast.  Make that:
> >
> >    string term = *i;
> >    const char *p = const_cast<char*>(term.data());
> >    add_next_index_stringl($result, p, term.length(), 1);
> >  
> I guess you meant "return_value" and not $result...

Yes (it's $result in the typemap, which turns into return_value in the
generated wrapper).

> Anyway, still no luck:
> php5\xapian_wrap.cc(11630) : error C2664: 'add_next_index_stringl' : 
> impossible de convertir le paramètre 2 de 'const char *' en 'char *'

Sigh, it's really not going well today:

    string term = *i;
    char *p = const_cast<char*>(term.data());
    add_next_index_stringl(return_value, p, term.length(), 1);

Cheers,
    Olly



More information about the Xapian-devel mailing list