ouch, SPANK SPANK SPANK... me :-( wrong function attributes.

I forgot that EINA_CONST refer to the pointer itself, not to its
contents, as such the pointer did not changed, so gcc was optimizing
subsequent fetches of the value.

There should be another optimization to check for this... but then I
guess it's just c++



SVN revision: 46580
This commit is contained in:
Gustavo Sverzut Barbieri 2010-02-27 14:51:52 +00:00
parent 498dec5154
commit 8daa98f42e
1 changed files with 2 additions and 2 deletions

View File

@ -31,9 +31,9 @@ EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf *buf, char c, size_t pos) EIN
EAPI Eina_Bool eina_strbuf_remove(Eina_Strbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1);
EAPI const char *eina_strbuf_string_get(const Eina_Strbuf *buf) EINA_CONST EINA_ARG_NONNULL(1);
EAPI const char *eina_strbuf_string_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
EAPI char *eina_strbuf_string_steal(Eina_Strbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
EAPI size_t eina_strbuf_length_get(const Eina_Strbuf *buf) EINA_CONST EINA_ARG_NONNULL(1);
EAPI size_t eina_strbuf_length_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
EAPI Eina_Bool eina_strbuf_replace(Eina_Strbuf *buf, const char *str, const char *with, unsigned int n) EINA_ARG_NONNULL(1, 2, 3);
#define eina_strbuf_replace_first(buf, str, with) \
eina_strbuf_replace(buf, str, with, 1)