ouch, SPANK SPANK SPANK... me :-( wrong function attributes.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 27 Feb 2010 14:51:52 +0000 (14:51 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 27 Feb 2010 14:51:52 +0000 (14:51 +0000)
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++

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@46580 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/include/eina_strbuf.h

index a529ec1..0d65f65 100644 (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)