namazu-users-en
[Top] [All Lists]

Re: Access Violation on nmz_get_field_data

2002-03-07 01:20:29
In article <3C862F28(_dot_)7080603(_at_)rovia(_dot_)com>
carlos(_at_)rovia(_dot_)com writes:

Thank you very much for the quick response.  I tried the functions you 
suggested, and still had the problem.  I did get it to work, though, by 
passing heap-allocated buffers of size BUFSIZE (defined in libnamazu.h) 
for the fieldname and data parameters of nmz_get_field_data.  I suspect 
there must be an overwrite of sorts in the function.

Your suspection is roughly right, but not for field name. According to
nmz/field.c, nmz_get_field_data is defined like the following:

void
nmz_get_field_data(int idxid, int docid, const char *field, char *data)

So you can use constant string as field argument. I maintain
Search::Namazu perl module and it also uses constant string.
You can see it via ViewCVS:
http://cvs.namazu.org/Search-Namazu/Namazu.xs?rev=1.18&content-type=text/vnd.viewcvs-markup

Sorry for lack of documents about the library. I need more description
about it but I have my hands full...
-- 
NOKUBI Takatsugu
E-mail: knok(_at_)daionet(_dot_)gr(_dot_)jp
        knok(_at_)namazu(_dot_)org / knok(_at_)debian(_dot_)org


<Prev in Thread] Current Thread [Next in Thread>