Menu

Question about ps_add_word

Help
Anonymous
2011-12-05
2012-09-22
  • Anonymous

    Anonymous - 2011-12-05

    Hi,

    Not sure whether this should be considered a bug.

    When a dictionary is initialized, a maximum number of words is assigned, by
    default 4096 + number of words in init dic file.

    When using ps_add_word, if that limit is reached, the memory allocated is
    increased and the max number of words is also increased, but the word is not
    added, and an error code is returned. If ps_add_word is called again, then the
    word is added correctly.

    I don't understand why it returns an error if the word can still be added once
    memory allocation is done. Should ps_add_word (or maybe dict_add_word) be a
    little be "smarter" and attempts adding the word again once more memory is
    allocated?

    Thanks a lot in advance,

    Sylvain

     
  • Nickolay V. Shmyrev

    This is a bug which is fixed in trunk just now. Thanks for the report.

     

Log in to post a comment.