eina: remove eina_promise_data_set.
authorCedric BAIL <cedric.bail@free.fr>
Sat, 5 Jan 2019 01:38:40 +0000 (17:38 -0800)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Jan 2019 05:20:17 +0000 (14:20 +0900)
eina_promise_data_set is a misleading API and result in conflicted use by
multiple independent piece of code leading to bug and crash. It is also not
necessary and we can avoid using it completely.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7575

src/lib/eina/eina_promise.c
src/lib/eina/eina_promise.h

index 222f7d5..e9d4461 100644 (file)
@@ -1103,15 +1103,6 @@ eina_promise_data_get(const Eina_Promise *p)
    return (void *)p->data;
 }
 
-EAPI void
-eina_promise_data_set(Eina_Promise *p,
-                      void *data)
-{
-   EINA_SAFETY_ON_NULL_RETURN(p);
-   p->data = data;
-}
-
-
 static Eina_Value
 _eina_future_cb_easy(void *data, const Eina_Value value,
                      const Eina_Future *dead_future)
index 14e550d..9a148e4 100644 (file)
@@ -620,15 +620,6 @@ EAPI Eina_Promise *eina_promise_continue_new(const Eina_Future *dead_future, Ein
 EAPI void *eina_promise_data_get(const Eina_Promise *p) EINA_ARG_NONNULL(1);
 
 /**
- * Sets the data attached to the promise.
- *
- * Set the data passed to eina_promise_new().
- * @see eina_promise_new()
- * @see eina_promise_data_get()
- */
-EAPI void eina_promise_data_set(Eina_Promise *p, void *data) EINA_ARG_NONNULL(1);
-
-/**
  * Resolves a promise.
  *
  * This function schedules a resolve event in a