eina_unicode: fix header inclusion.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Fri, 20 Jan 2012 12:52:15 +0000 (12:52 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Fri, 20 Jan 2012 12:52:15 +0000 (12:52 +0000)
library files should ALWAYS include config.h, they should not include
Eina.h using "<Eina.h>" to avoid messing with system's version.

Last but definitely not least: include safety checks BEFORE your local
header, otherwise the macros EINA_ARG_NONNULL() will remove every
check for null pointers! eina_safety_checks.h redefines it to empty so
compiler does not optimize these things.

SVN revision: 67392

legacy/eina/src/lib/eina_unicode.c

index 342e3cb..67b835d 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library;
  * if not, see <http://www.gnu.org/licenses/>.
-
  */
 
-#include <Eina.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "eina_config.h"
+#include "eina_private.h"
+
+/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
+#include "eina_safety_checks.h"
 #include "eina_unicode.h"
 
 /* FIXME: check if sizeof(wchar_t) == sizeof(Eina_Unicode) if so,