On Sat, Jun 11, 2011 at 1:02 AM, Ulrich Eckhardt <dooms...@knuut.de> wrote:
> I hope I'm not asking too many stupid questions, but here's another one > that > came up while reading Eina's buffer implementation. In e.g. the function > "eina_strbuf_common_new(size_t csize)", there is this undocumented > parameter > "csize" that is passed to various other functions, too. This seems like the > size of the characters that are stored there by the code that uses this, is > that correct? I have created a patch in case it is. > They indicate character size. char = 1, Eina_Unicode = 4 and etc. Will apply this patch as soon as I can (as I said in my previos email, it's 3am). > > Also, I noticed that the functions eina_strbuf_replace and > eina_strbuf_replace_all are possibly misplaced there. The problem is that > they > use strstr() to search the given string, but this function and the strbuf > functions are ignorant of the character boundaries, i.e. above mentioned > character size. This means that this function must not be used with the > generic code in eina_binbuf_template_c.x, which it also isn't, but maybe > the > two should be moved to eina_strbuf.c instead. > They do infact belong in eina_strbuf.c, but because of some internal symbols needed (can't remember which atm) they were never moved there. This should be fixed, but was never a priority and was done because of laziness. Actually, the correct thing is probably implementing the general ones there and use that. -- Tom. ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel