raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=46d256feee21f0d96789265be3f04a51ff8b7124

commit 46d256feee21f0d96789265be3f04a51ff8b7124
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Sep 1 15:29:07 2014 +0900

    el - ELM_MAIN() cleanup. don't need shutdown in elm_main() anymore
    
    this shouldnt be an abi or api break. it simply makes elm_shutdown
    iside elm_main() optional. this is cleaner and more symmetric
---
 src/bin/config.c              | 1 -
 src/bin/test.c                | 1 -
 src/lib/elm_general.h         | 4 ++--
 src/lib/elm_getting_started.h | 3 +--
 src/lib/elm_win.c             | 2 +-
 5 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/bin/config.c b/src/bin/config.c
index 4b46d70..6661546 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -3750,7 +3750,6 @@ elm_main(int    argc,
      }
    elm_run(); /* and run the program now and handle all events, etc. */
    /* if the mainloop that elm_run() runs exists, we exit the app */
-   elm_shutdown(); /* clean up and shut down */
    /* exit code */
    return 0;
 }
diff --git a/src/bin/test.c b/src/bin/test.c
index 72c80ef..cc0f896 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -927,7 +927,6 @@ elm_main(int argc, char **argv)
    EINA_LIST_FREE(tests, t)
      free(t);
 
-   elm_shutdown(); /* clean up and shut down */
    /* exit code */
    return 0;
 }
diff --git a/src/lib/elm_general.h b/src/lib/elm_general.h
index 2af9d9f..03adee7 100644
--- a/src/lib/elm_general.h
+++ b/src/lib/elm_general.h
@@ -141,13 +141,13 @@ typedef Eina_Bool             (*Elm_Event_Cb)(void *data, 
Evas_Object *obj, Evas
 extern EAPI double _elm_startup_time;
 
 #ifndef ELM_LIB_QUICKLAUNCH
-#define ELM_MAIN() int main(int argc, char **argv) { int ret; 
_elm_startup_time = ecore_time_unix_get(); elm_init(argc, argv); ret = 
elm_main(argc, argv); return ret; } /**< macro to be used after the elm_main() 
function */
+#define ELM_MAIN() int main(int argc, char **argv) { int ret; 
_elm_startup_time = ecore_time_get(); elm_init(argc, argv); ret = 
elm_main(argc, argv); elm_shutdown(); return ret; } /**< macro to be used after 
the elm_main() function */
 #else
 /** @deprecated macro to be used after the elm_main() function.
  * Do not define ELM_LIB_QUICKLAUNCH
  * Compile your programs with -fpie and -pie -rdynamic instead, to generate a 
single binary (linkable executable).
  */
-#define ELM_MAIN() int main(int argc, char **argv) { _elm_startup_time = 
ecore_time_unix_get(); return elm_quicklaunch_fallback(argc, argv); }
+#define ELM_MAIN() int main(int argc, char **argv) { int ret; 
_elm_startup_time = ecore_time_get(); ret = elm_quicklaunch_fallback(argc, 
argv); elm_shutdown(); return ret; }
 #endif
 
 /**************************************************************************/
diff --git a/src/lib/elm_getting_started.h b/src/lib/elm_getting_started.h
index a70f6f5..7cb325c 100644
--- a/src/lib/elm_getting_started.h
+++ b/src/lib/elm_getting_started.h
@@ -11,8 +11,7 @@
  * {
  *    // create window(s) here and do any application init
  *    elm_run(); // run main loop
- *    elm_shutdown(); // after mainloop finishes running, shutdown
- *    return 0; // exit 0 for exit code
+*    return 0; // exit 0 for exit code
  * }
  * ELM_MAIN()
  * @endcode
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 25f1766..a5f93ed 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -297,7 +297,7 @@ EAPI double _elm_startup_time = 0;
 static void
 _elm_win_first_frame_do(void *data, Evas *e EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
-   double end = ecore_time_unix_get();
+   double end = ecore_time_get();
    char *first = data;
 
    switch (*first)

-- 


Reply via email to