Re: [E-devel] [EGIT] [core/efl] master 01/01: eina: path get actually allocate memory and can't be pure.

2018-05-24 Thread Gustavo Sverzut Barbieri
ohh... then my mind tricked me, and I didn't notice the lack of "const" in there. I was remembering it as "const char *" return, that would be stored in a global until it finishes... if you need to free, then sure, PURE is wrong :-) On Thu, May 24, 2018 at 11:21 AM, Marcel Hollerbach wrote: > H

Re: [E-devel] [EGIT] [core/efl] master 01/01: eina: path get actually allocate memory and can't be pure.

2018-05-24 Thread Marcel Hollerbach
Hello, this is not correct. It returns a different pointer on each call. The content behind the pointer is the same, correct. The pointer is NOT. Your example is missing one thing, you are not using the value, think of a case where you give the returned value to a function that calls free. The

Re: [E-devel] [EGIT] [core/efl] master 01/01: eina: path get actually allocate memory and can't be pure.

2018-05-24 Thread Gustavo Sverzut Barbieri
I disagree with that signature. it does a malloc to populate a cache, which is later used... then *all calls returns the same, given the same parameters* (pure). the cache is only cleared on eina shutdown, which is unlikely to affect use cases (would break "while (1) { eina_init(); eina_module_sy