summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Eina.am1
-rw-r--r--src/lib/eina/eina_crc.c2
-rw-r--r--src/lib/eina/eina_crc.h4
-rw-r--r--src/lib/eina/eina_inline_crc.x30
4 files changed, 35 insertions, 2 deletions
diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am
index 316542ceaa..aab92e22d4 100644
--- a/src/Makefile_Eina.am
+++ b/src/Makefile_Eina.am
@@ -89,6 +89,7 @@ lib/eina/eina_thread_queue.h \
89lib/eina/eina_matrix.h \ 89lib/eina/eina_matrix.h \
90lib/eina/eina_quad.h \ 90lib/eina/eina_quad.h \
91lib/eina/eina_crc.h \ 91lib/eina/eina_crc.h \
92lib/eina/eina_inline_crc.x \
92lib/eina/eina_evlog.h \ 93lib/eina/eina_evlog.h \
93lib/eina/eina_util.h \ 94lib/eina/eina_util.h \
94lib/eina/eina_quaternion.h 95lib/eina/eina_quaternion.h
diff --git a/src/lib/eina/eina_crc.c b/src/lib/eina/eina_crc.c
index 29ec08c894..e509dc8057 100644
--- a/src/lib/eina/eina_crc.c
+++ b/src/lib/eina/eina_crc.c
@@ -288,7 +288,7 @@ static const unsigned int table[8][256] =
288}; 288};
289 289
290EAPI unsigned int 290EAPI unsigned int
291eina_crc(const char *data, int len, unsigned int seed, Eina_Bool start_stream) 291_eina_crc(const char *data, int len, unsigned int seed, Eina_Bool start_stream)
292{ 292{
293 unsigned int crc; 293 unsigned int crc;
294 unsigned int* curr = (unsigned int*) data; 294 unsigned int* curr = (unsigned int*) data;
diff --git a/src/lib/eina/eina_crc.h b/src/lib/eina/eina_crc.h
index 099a921de1..819ca911dd 100644
--- a/src/lib/eina/eina_crc.h
+++ b/src/lib/eina/eina_crc.h
@@ -40,6 +40,8 @@
40 * 40 *
41 * @since 1.15 41 * @since 1.15
42 */ 42 */
43EAPI unsigned int eina_crc(const char *key, int len, unsigned int seed, Eina_Bool start_stream) EINA_ARG_NONNULL(2, 3); 43static inline unsigned int eina_crc(const char *key, int len, unsigned int seed, Eina_Bool start_stream) EINA_ARG_NONNULL(2, 3);
44
45#include "eina_inline_crc.x"
44 46
45#endif 47#endif
diff --git a/src/lib/eina/eina_inline_crc.x b/src/lib/eina/eina_inline_crc.x
new file mode 100644
index 0000000000..41589f17fc
--- /dev/null
+++ b/src/lib/eina/eina_inline_crc.x
@@ -0,0 +1,30 @@
1/* EINA - EFL data type library
2 * Copyright (C) 20015 Cedric BAIL
3 *
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.
8 *
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.
13 *
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/>.
17 */
18
19#ifndef EINA_INLINE_CRC_X_
20#define EINA_INLINE_CRC_X_
21
22EAPI unsigned int _eina_crc(const char *data, int len, unsigned int seed, Eina_Bool start_stream);
23
24static inline unsigned int
25eina_crc(const char *key, int len, unsigned int seed, Eina_Bool start_stream)
26{
27 return _eina_crc(key, len, seed, start_stream);
28}
29
30#endif