aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Aspell-user] store_replacement() in API


From: Bill Moseley
Subject: [Aspell-user] store_replacement() in API
Date: Fri, 14 Nov 2003 09:02:01 -0800
User-agent: Mutt/1.5.4i

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
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]