From 4fa30078065998dbdda892f199373140a3c7b7bf Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 19 Apr 2011 21:38:24 +0000 Subject: [PATCH] +ecore_exe_data_set SVN revision: 58737 --- legacy/ecore/ChangeLog | 4 ++++ legacy/ecore/src/lib/ecore/Ecore.h | 1 + legacy/ecore/src/lib/ecore/ecore_exe.c | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/legacy/ecore/ChangeLog b/legacy/ecore/ChangeLog index a163bb9..3b196a7 100644 --- a/legacy/ecore/ChangeLog +++ b/legacy/ecore/ChangeLog @@ -131,3 +131,7 @@ 2011-04-13 Doyun Kang * Ecore_X + Ecore_Evas: Add more support for shape input setting + +2011-04-19 Mike Blumenkrantz + + * +ecore_exe_data_set diff --git a/legacy/ecore/src/lib/ecore/Ecore.h b/legacy/ecore/src/lib/ecore/Ecore.h index 02e1f71..1a7e9ab 100644 --- a/legacy/ecore/src/lib/ecore/Ecore.h +++ b/legacy/ecore/src/lib/ecore/Ecore.h @@ -397,6 +397,7 @@ extern "C" { EAPI const char *ecore_exe_tag_get(const Ecore_Exe *exe); EAPI const char *ecore_exe_cmd_get(const Ecore_Exe *exe); EAPI void *ecore_exe_data_get(const Ecore_Exe *exe); + EAPI void *ecore_exe_data_set(Ecore_Exe *exe, void *data); EAPI Ecore_Exe_Flags ecore_exe_flags_get(const Ecore_Exe *exe); EAPI void ecore_exe_pause(Ecore_Exe *exe); EAPI void ecore_exe_continue(Ecore_Exe *exe); diff --git a/legacy/ecore/src/lib/ecore/ecore_exe.c b/legacy/ecore/src/lib/ecore/ecore_exe.c index aaed793..d5a626d 100644 --- a/legacy/ecore/src/lib/ecore/ecore_exe.c +++ b/legacy/ecore/src/lib/ecore/ecore_exe.c @@ -1134,6 +1134,28 @@ ecore_exe_data_get(const Ecore_Exe *exe) } /** + * Sets the data attached to the given process handle. + * @param exe The given process handle. + * @param data The pointer to attach + * @return The data pointer previously attached to @p exe with + * ecore_exe_run(), ecore_exe_pipe_run(), or ecore_exe_data_set() + * @since 1.1 + */ +EAPI void * +ecore_exe_data_set(Ecore_Exe *exe, void *data) +{ + void *ret; + if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE)) + { + ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, __func__); + return NULL; + } + ret = exe->data; + exe->data = data; + return ret; +} + +/** * Retrieves the flags attached to the given process handle. * @param exe The given process handle. * @return The flags attached to @p exe. -- 2.7.4