On Sat, 9 May 2020 10:10:39 +0200
Mattias Andrée <[email protected]> wrote:

Dear Mattias,

> > I don't like this change, because it destroys reentrancy, which is
> > very importent for multithreaded applications, and complicates
> > things unnecessarily.  
> 
> malloc(3) and free(3) are thread-safe, so there shouldn't be any
> problem:
> 
>       GRAPHEME_STATE *state = grapheme_create_state(void);
>       ... = grapheme_boundary(..., state);
>       grapheme_free_state(state);

sorry, my bad, I thought it was an internal function that set up the
state internally.

> 
> > However, I think we should just risk it and assume that further
> > versions of the Unicode-Grapheme-Boundary-algorithm will only rely
> > on such a state.  
> 
> I agree.

Yeah, I didn't like the create_state() and free_state() functions
anyway.

Your patch was marked in my inbox for a while (20 days more or less),
but I now took the time to incorporate the API-changes you suggested,
with small changes. Thanks for taking your time to bring up the
suggestions!

With best regards

Laslo

Reply via email to