Re: [E-devel] E CVS: libs/ecore pfritz

2008-01-26 Thread Peter Wehrfritz
nash schrieb: On Fri, 2008-01-25 at 13:28 -0500, Enlightenment CVS wrote: Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore === RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/Ecore.h,v

Re: [E-devel] E CVS: libs/ecore pfritz

2008-01-25 Thread nash
On Fri, 2008-01-25 at 13:28 -0500, Enlightenment CVS wrote: Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore === RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/Ecore.h,v retrieving revision 1.57

Re: [E-devel] E CVS: libs/ecore pfritz

2008-01-10 Thread Dave
Enlightenment CVS ha scritto: Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore Dir : e17/libs/ecore/src/lib/ecore_file Modified Files: Ecore_File.h Log Message: remove old api macros

Re: [E-devel] E CVS: libs/ecore pfritz

2008-01-10 Thread Dave
Peter Wehrfritz ha scritto: Dave schrieb: Enlightenment CVS ha scritto: Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore Dir : e17/libs/ecore/src/lib/ecore_file Modified Files: Ecore_File.h Log Message: remove old api macros

Re: [E-devel] E CVS: libs/ecore pfritz

2008-01-10 Thread Peter Wehrfritz
Dave schrieb: Enlightenment CVS ha scritto: Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore Dir : e17/libs/ecore/src/lib/ecore_file Modified Files: Ecore_File.h Log Message: remove old api macros

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Stéphane Bauland
Hi! 1) Why ecore_str_vector_free was removed ? 2) Do you think 2/3 optionals string's functions could be good to have in ecore ? - ecore_str_strdup_printf(format, ...) - ecore_str_memcpy(void *, size) see you Peter Wehrfritz wrote: Long and messy. Find better version attached. And as a

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Vincent Torri
On Tue, 13 Mar 2007, Stéphane Bauland wrote: Hi! 1) Why ecore_str_vector_free was removed ? now, you only need to free the returned pointer. There's no need for a function to do that :) I let the others comment the 2nd question :)

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Stéphane Bauland
Vincent Torri wrote: On Tue, 13 Mar 2007, Stéphane Bauland wrote: Hi! 1) Why ecore_str_vector_free was removed ? now, you only need to free the returned pointer. There's no need for a function to do that :) I let the others comment the 2nd question :) Vincent Hehe ! I got a memory

Re: [E-devel] E CVS: libs/ecore pfritz || LEAK PATCH

2007-03-13 Thread Stéphane Bauland
Vincent Torri wrote: On Tue, 13 Mar 2007, Stéphane Bauland wrote: Hi! 1) Why ecore_str_vector_free was removed ? now, you only need to free the returned pointer. There's no need for a function to do that :) I let the others comment the 2nd question :) Vincent Ok ok i solve memory

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Peter Wehrfritz
Stéphane Bauland schrieb: Vincent Torri wrote: On Tue, 13 Mar 2007, Stéphane Bauland wrote: Hi! 1) Why ecore_str_vector_free was removed ? now, you only need to free the returned pointer. There's no need for a function to do that :) I let the others comment the 2nd

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Vincent Torri
On Tue, 13 Mar 2007, Peter Wehrfritz wrote: Stéphane Bauland schrieb: Vincent Torri wrote: On Tue, 13 Mar 2007, Stéphane Bauland wrote: Hi! 1) Why ecore_str_vector_free was removed ? now, you only need to free the returned pointer. There's no need for a function to do that :) I let

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Michael Jennings
On Tuesday, 13 March 2007, at 01:53:57 (+0100), Peter Wehrfritz wrote: Thanks committed. It is indeed much faster. I changed it slightly, because your version had some problems with empty strings. I intentionally left out the sanity checks at the beginning so I could test it without having too

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Stéphane Bauland
Michael Jennings wrote: On Tuesday, 13 March 2007, at 01:53:57 (+0100), Peter Wehrfritz wrote: Thanks committed. It is indeed much faster. I changed it slightly, because your version had some problems with empty strings. I intentionally left out the sanity checks at the beginning

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Sebastian Dransfeld
Michael Jennings wrote: On Tuesday, 13 March 2007, at 10:59:21 (+0100), Sebastian Dransfeld wrote: Wrong fix! The user must free ret[0] ret. No other possibility. The question is whether this function should do a destructive split or not. I take it you missed the s = strdup(str) at

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Michael Jennings
On Tuesday, 13 March 2007, at 20:31:46 (+0100), Sebastian Dransfeld wrote: Of course I read it. My point is that you could drop the strdup and do a destructive split. No. Michael -- Michael Jennings (a.k.a. KainX) http://www.kainx.org/ [EMAIL PROTECTED] n + 1, Inc., http://www.nplus1.net/

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Michael Jennings
On Tuesday, 13 March 2007, at 20:46:20 (+0100), Sebastian Dransfeld wrote: Why do I bother arguing? About making a clean function destructive? Heck if I know... If you wanted to remove the strdup(), the caller would have to accept the destructive nature of the function or remember to pass

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-13 Thread Sebastian Dransfeld
Michael Jennings wrote: On Tuesday, 13 March 2007, at 20:46:20 (+0100), Sebastian Dransfeld wrote: Why do I bother arguing? About making a clean function destructive? Heck if I know... If you wanted to remove the strdup(), the caller would have to accept the destructive nature of the

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-12 Thread Stéphane Bauland
Enlightenment CVS wrote: Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore Dir : e17/libs/ecore/src/lib/ecore Modified Files: Ecore_Str.h ecore_str.c Log Message: add ecore_str_split(), thanks to rookmoot

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-12 Thread Michael Jennings
On Monday, 12 March 2007, at 21:06:46 (+0100), St?phane Bauland wrote: +char** +ecore_str_split(const char *string, const char *delimiter, int max_tokens) +{ + char **str_array = NULL; + char *s; + size_t n = 0; + int max = max_tokens; + const char *remainder; +

Re: [E-devel] E CVS: libs/ecore pfritz

2007-03-12 Thread Peter Wehrfritz
Long and messy. Find better version attached. And as a bonus, you only have to free the array pointer and its first element. Quickie test program supplied also. Michael Thanks committed. It is indeed much faster. I changed it slightly, because your version had some problems with