cxx: follow EINA_ERROR_OUT_OF_MEMORY deprecation
authorStefan Schmidt <stefan@osg.samsung.com>
Mon, 5 Sep 2016 08:39:24 +0000 (10:39 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Mon, 5 Sep 2016 08:39:24 +0000 (10:39 +0200)
Follow the rest of efl and use ENOMEM from now on. This avoids ugly deprecation
warnings.

src/bindings/cxx/ecore_cxx/Ecore.hh
src/tests/ecore_cxx/ecore_cxx_test_safe_call.cc
src/tests/eina_cxx/eina_cxx_test_error.cc

index c671287..75ebc3e 100644 (file)
@@ -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)
     {
index 7202087..b321018 100644 (file)
@@ -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;
          }
          );
index 273f130..c0ba083 100644 (file)
@@ -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);