projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5856f2f
)
eina: make it possible to return an EINA_VALUE_EMPTY by just requesting a new value...
author
Cedric BAIL
<cedric@osg.samsung.com>
Thu, 10 May 2018 23:42:08 +0000
(16:42 -0700)
committer
Wonki Kim
<wonki_.kim@samsung.com>
Fri, 1 Jun 2018 03:52:02 +0000
(12:52 +0900)
src/lib/eina/eina_value.c
patch
|
blob
|
history
diff --git
a/src/lib/eina/eina_value.c
b/src/lib/eina/eina_value.c
index
ddb02af
..
dbf6f48
100644
(file)
--- a/
src/lib/eina/eina_value.c
+++ b/
src/lib/eina/eina_value.c
@@
-5589,6
+5589,13
@@
eina_value_new(const Eina_Value_Type *type)
{
Eina_Value *value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));
if (!value) return NULL;
+ if (!type)
+ {
+ const Eina_Value empty = EINA_VALUE_EMPTY;
+
+ memcpy(value, &empty, sizeof (empty));
+ return value;
+ }
if (!eina_value_setup(value, type))
{
eina_mempool_free(_eina_value_mp, value);