stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6bc1dc6d83e4f898e9a1147332c1d2edda788cec
commit 6bc1dc6d83e4f898e9a1147332c1d2edda788cec Author: Stefan Schmidt <[email protected]> Date: Mon Sep 5 10:39:24 2016 +0200 cxx: follow EINA_ERROR_OUT_OF_MEMORY deprecation Follow the rest of efl and use ENOMEM from now on. This avoids ugly deprecation warnings. --- src/bindings/cxx/ecore_cxx/Ecore.hh | 2 +- src/tests/ecore_cxx/ecore_cxx_test_safe_call.cc | 4 ++-- src/tests/eina_cxx/eina_cxx_test_error.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bindings/cxx/ecore_cxx/Ecore.hh b/src/bindings/cxx/ecore_cxx/Ecore.hh index c671287..75ebc3e 100644 --- a/src/bindings/cxx/ecore_cxx/Ecore.hh +++ b/src/bindings/cxx/ecore_cxx/Ecore.hh @@ -32,7 +32,7 @@ void _ecore_main_loop_thread_safe_call_async_callback(void* data) } catch(std::bad_alloc const& e) { - eina_error_set( ::EINA_ERROR_OUT_OF_MEMORY); + eina_error_set(ENOMEM); } catch(std::system_error const& e) { diff --git a/src/tests/ecore_cxx/ecore_cxx_test_safe_call.cc b/src/tests/ecore_cxx/ecore_cxx_test_safe_call.cc index 7202087..b321018 100644 --- a/src/tests/ecore_cxx/ecore_cxx_test_safe_call.cc +++ b/src/tests/ecore_cxx/ecore_cxx_test_safe_call.cc @@ -61,7 +61,7 @@ START_TEST(ecore_cxx_safe_call_async) std::cout << "waited" << std::endl; } - ck_assert( ::eina_error_get() == ::EINA_ERROR_OUT_OF_MEMORY); + ck_assert( ::eina_error_get() == ENOMEM); ::eina_error_set(0); std::cout << "end of ecore_cxx_safe_call_async" << std::endl; } @@ -163,7 +163,7 @@ void call_sync_int() ( [] () -> int { - ::eina_error_set( ::EINA_ERROR_OUT_OF_MEMORY); + ::eina_error_set(ENOMEM); return 0; } ); diff --git a/src/tests/eina_cxx/eina_cxx_test_error.cc b/src/tests/eina_cxx/eina_cxx_test_error.cc index 273f130..c0ba083 100644 --- a/src/tests/eina_cxx/eina_cxx_test_error.cc +++ b/src/tests/eina_cxx/eina_cxx_test_error.cc @@ -26,7 +26,7 @@ START_TEST(eina_cxx_get_error) ck_assert(ec2.message() == "Message 1"); - ::eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + ::eina_error_set(ENOMEM); efl::eina::error_code ec3 = efl::eina::get_error_code(); ck_assert(!!ec3); --
