diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-01-11 15:34:15 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-01-17 14:20:55 +0900 |
commit | 4550b4cf832b256d6bca49a5e536c2327bbd5e8c (patch) | |
tree | fc8a78df24a6b3e108bd80609e13836c9fd106e1 /src/Makefile_Eina.am | |
parent | 4f5e64fdea88ba7362d77a6d42ea22cf13d3323f (diff) | |
download | efl-4550b4cf832b256d6bca49a5e536c2327bbd5e8c.tar.gz |
eina: Introduce Eina_Slstr for short-lived strings
Built on top of the new 'postponed' free queue, the short-lived
strings API allows users to return new strings without caring
about freeing them. EFL main loop will do this automatically for
them you at a later point in time (at the end of an iteration).
The APIs provided will either duplicate (copy) or more generally
steal an existing string (char *, stringshare, tmpstr, strbuf),
taking ownership of it and controling its lifetime. Those strings
can then be safely returned by an API. From a user point of view,
those strings must be considered like simple const char *, ie.
no need to free() them and their validity is limited to the
local scope.
There is no function to remove such a string from the freeq.
The short lived strings API is not thread-safe: do not send a
short-lived object from one thread to another.
@feature
Diffstat (limited to 'src/Makefile_Eina.am')
-rw-r--r-- | src/Makefile_Eina.am | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am index 56b195910f..ae3d94ba2f 100644 --- a/src/Makefile_Eina.am +++ b/src/Makefile_Eina.am @@ -103,7 +103,8 @@ lib/eina/eina_inline_safepointer.x \ lib/eina/eina_slice.h \ lib/eina/eina_inline_slice.x \ lib/eina/eina_inline_modinfo.x \ -lib/eina/eina_freeq.h +lib/eina/eina_freeq.h \ +lib/eina/eina_slstr.h lib_eina_libeina_la_SOURCES = \ @@ -177,7 +178,8 @@ lib/eina/eina_strbuf_common.h \ lib/eina/eina_quaternion.c \ lib/eina/eina_bezier.c \ lib/eina/eina_safepointer.c \ -lib/eina/eina_freeq.c +lib/eina/eina_freeq.c \ +lib/eina/eina_slstr.c if HAVE_WIN32 @@ -348,7 +350,8 @@ tests/eina/eina_test_vector.c \ tests/eina/eina_test_bezier.c \ tests/eina/eina_test_safepointer.c \ tests/eina/eina_test_slice.c \ -tests/eina/eina_test_freeq.c +tests/eina/eina_test_freeq.c \ +tests/eina/eina_test_slstr.c tests_eina_eina_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ -DTESTS_WD=\"`pwd`\" \ |