From 603e197d37e2ae216382aced58de128de2e4e1f8 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 12 Sep 2016 16:51:23 +0300 Subject: [PATCH] get memcpy type as param --- include/cglm-common.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/cglm-common.h b/include/cglm-common.h index 71882c5..abcf5da 100644 --- a/include/cglm-common.h +++ b/include/cglm-common.h @@ -16,15 +16,15 @@ # define CGLM_INLINE static inline __attribute((always_inline)) #endif -#define glm__memcpy(dest, src, size) \ +#define glm__memcpy(type, dest, src, size) \ do { \ - int32_t *srci; \ - int32_t *srci_end; \ - int32_t *desti; \ + type *srci; \ + type *srci_end; \ + type *desti; \ \ - srci = (int32_t *)src; \ - srci_end = (int32_t *)((char *)srci + size); \ - desti = (int32_t *)dest; \ + srci = (type *)src; \ + srci_end = (type *)((char *)srci + size); \ + desti = (type *)dest; \ \ while (srci != srci_end) \ *desti++ = *srci++; \