Commit Graph

21 Commits

Author SHA1 Message Date
Vincent Torri ce9cad3a3b Eina: replace Evil.h with evil_private.h and remove Evil.h when not necessary
Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8903
2019-05-16 13:48:59 -04:00
Xavi Artigas 80baf516a3 Revert "eina: provide full string length to vsnprintf to allow for null character"
Summary:
This reverts commit e0f8e65d20 which changed the
behavior of eina_stringshare_nprintf() and was not really needed to fix T6903.

Reviewers: zmike, Jaehyun_Cho, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6903

Differential Revision: https://phab.enlightenment.org/D6431
2018-06-26 12:38:22 -04:00
Marcel Hollerbach 592de0e4b6 eina_stringshare: cast in order to fix a warning
Summary:
casting here is safe, as before we check and return on size < 1.
Depends on D6379

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6380
2018-06-25 14:55:13 +09:00
Xavi Artigas bd5174b600 eina: Turn stringshare printfs into EINA_LOG_DBG
Summary:
eina_share_common contained extremely verbose printfs which rendered
the debug profile (./configure --with-profile=debug) almost unusable.
They have been turned into EINA_LOG_DBG in the eina_stringshare log domain
(when related to stringshares) and without domain when related to other
eina_share facilities.

Also, cleaned up some printfs which have been commented out for 8 years.

Fixes T7006

Test Plan:
The printfs are regular eina logs and can be filtered out by regular means.
The debug profile output is far more usable now.

Reviewers: zmike, devilhorns

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7006

Differential Revision: https://phab.enlightenment.org/D6288
2018-06-14 11:30:07 -04:00
Xavi Artigas bf8ce8ff7a eina: Provide actual len (after possible truncation) to eina_stringshare_add_length
Summary:
vsnprintf() returns "The number of characters that would have been written if n had been sufficiently large",
so if this is larger than the requested length, we pass the requested length to eina_stringshare_add_length,
to avoid reading uninitialised memory.

Fix T6903

Reviewers: zmike

Subscribers: cedric

Maniphest Tasks: T6903

Differential Revision: https://phab.enlightenment.org/D6011
2018-04-27 13:43:12 -04:00
Mike Blumenkrantz e0f8e65d20 eina: provide full string length to vsnprintf to allow for null character
Summary: fix T6903

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric

Maniphest Tasks: T6903

Differential Revision: https://phab.enlightenment.org/D6009
2018-04-26 12:24:16 -04:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Jean Guyomarc'h 537f11278f eina: fix eina_stringshare format warning after commit 912924a
Summary:
Since the type of 'r' changed from unsigned short to unsigned int we
need to change its format as well.

Reviewers: stefan_schmidt, raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2446

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-28 23:51:00 +02:00
Carsten Haitzler 912924a634 eina stringshare - make short internal string refs ints not shorts
this should fix T2088 - at the expense of more memory but a short was
just too little here.
2015-04-28 15:10:32 +09:00
Cedric BAIL 9a74e6aec4 eina: all Eina_Stringshare printf variant now return empty string as expected.
Previously Eina_Stringshare printf variant where returning NULL with ("%s", ""). This
is highly disturbing as you would have gotten "(null)", if you asked for ("s", NULL).
To clarify and make things logical, we now return "".
2015-01-08 12:36:27 +01:00
Amitesh Singh 32d52ff563 eina: fix memory leaks in eina_stringshare_printf/vprintf functions.
Summary: @Fix

Test Plan:
  CK_FORK=no valgrind --leak-check=full {UNIT_TEST_PROGRAM} "String Share"

Reviewers: cedric, seoz, Hermet, raster

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1857
2015-01-08 19:48:01 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Cedric Bail 1281a8369f eina: fix uninitialized data use. 2013-11-12 19:01:10 +09:00
Carsten Haitzler 69e27abdc3 eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Cedric Bail 0aa77d7dde eina: use Eina_Spinlock in Eina_Stringshare instead of Eina_Lock. 2013-10-11 11:08:17 +09:00
Carsten Haitzler f2885306dc eina - stringshare - strlen already would deal with optimization cases 2013-09-05 12:46:06 +09:00
Jérémy Zurcher 1424ac7d4d From: Jérémy Zurcher <jeremy@asynk.ch>
Subject: [E-devel] 2 steps eina_share_common_del speed up

builtin node is never unlinked even if empty, always is the last of the queue,
so that it can be used to get a pointer to head.
      
cost: never unlink or promote builtin node.
benefit: no need to hash and search rbtree to unlink an empty node,
only to remove an empty head.

store full hash in Eina_Share_Common_Head, so we only hash once
use 8 lower bits as node hash, use next 8 bits as bucket index.
    
cost: have to apply 0xFF mask on hash in rbtree callbacks.
benefit: no need to hash when removing an empty head.
        


SVN revision: 82161
2013-01-04 08:41:47 +00:00
Gustavo Sverzut Barbieri 0a2d116119 efl: eina_alloca.h to simplify alloca() usage.
having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
2013-01-03 15:10:34 +00:00
Cedric BAIL 4b14ea628c eina: handle properly case where str != NULL and slen == 0
SVN revision: 78222
2012-10-19 04:38:08 +00:00
Cedric BAIL c93ae85eb4 efl: backport r78209.
SVN revision: 78211
2012-10-19 01:31:22 +00:00
Vincent Torri 785f2a6b3a merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
2012-09-16 10:57:48 +00:00