[prev in list] [next in list] [prev in thread] [next in thread]
List: aspell-user
Subject: [Aspell-user] store_replacement() in API
From: Bill Moseley <moseley () hank ! org>
Date: 2003-11-14 17:02:01
Message-ID: 20031114170201.GA13133 () hank ! org
[Download RAW message or body]
Hi Kevin,
I've got a bug report on my Text::Aspell module when trying to use the
store_replacement() function.
I'm not able to reproduce on my own machine, so I want to review with
you to make sure I'm coding my part correctly.
By the way, I see that I'm using
aspell_speller_store_replacement()
instead of
aspell_speller_store_repl().
Is there a difference in those two functions?
Here's my Perl xs interface code for the function. Is it correct to
check for an error after the call and would I expect to see an error
message? The error report states that no error message is being
returned.
int
store_replacement(self,word,replacement)
Aspell_object *self
char * word
char * replacement
CODE:
self->lastError[0] = '\0';
self->errnum = 0;
if (!self->speller && !_create_speller(self) )
XSRETURN_UNDEF;
RETVAL = aspell_speller_store_replacement(self->speller, word, -1, replacement, -1);
if ( !RETVAL )
{
self->errnum = aspell_speller_error_number( (const AspellSpeller *)self->speller );
strncpy(self->lastError, (char*) aspell_speller_error_message(self->speller), MAX_ERRST$
XSRETURN_UNDEF;
}
OUTPUT:
RETVAL
int
--
Bill Moseley
moseley@hank.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic