1 /* EINA - EFL data type library
2 * Copyright (C) 2008 Cedric Bail
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
25 /*============================================================================*
27 *============================================================================*/
29 /*============================================================================*
31 *============================================================================*/
33 static int _eina_main_count = 0;
38 if (_eina_main_count) goto finish_init;
42 eina_stringshare_init();
46 eina_benchmark_init();
47 eina_magic_string_init();
50 return ++_eina_main_count;
56 if (_eina_main_count != 1) goto finish_shutdown;
58 eina_magic_string_shutdown();
59 eina_benchmark_shutdown();
60 eina_counter_shutdown();
61 eina_array_shutdown();
63 eina_stringshare_shutdown();
65 eina_error_shutdown();
68 return --_eina_main_count;