From 0091dc882f28ea5eae632f15bb8e4c040d2092aa Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Fri, 29 Jan 2021 19:12:28 +1000 Subject: [PATCH] libcroc: add missing __cplusplus checks --- libcroc/include/libcroc/chunk.h | 10 +++++++++- libcroc/include/libcroc/tex.h | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libcroc/include/libcroc/chunk.h b/libcroc/include/libcroc/chunk.h index 8c6037b..25b8a15 100644 --- a/libcroc/include/libcroc/chunk.h +++ b/libcroc/include/libcroc/chunk.h @@ -22,8 +22,16 @@ #include #include "chunkdef.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef int (*CrocChunkEnumerator)(CrocChunkType type, const uint8_t *buf, size_t data, void *user); int croc_chunk_enumerate(FILE *f, CrocChunkEnumerator proc, void *user); -#endif /* _LIBCROC_CHUNK_H */ \ No newline at end of file +#ifdef __cplusplus +} +#endif + +#endif /* _LIBCROC_CHUNK_H */ diff --git a/libcroc/include/libcroc/tex.h b/libcroc/include/libcroc/tex.h index d6c8e4b..0016ae8 100644 --- a/libcroc/include/libcroc/tex.h +++ b/libcroc/include/libcroc/tex.h @@ -22,6 +22,10 @@ #include "coldef.h" #include "texdef.h" +#ifdef __cplusplus +extern "C" { +#endif + CrocTexture *croc_texture_allocate(uint16_t width, uint16_t height, CrocTextureFormat format); void croc_texture_free(CrocTexture *texture); int croc_texture_read_many(FILE *f, CrocTexture **textures, size_t *num); @@ -48,4 +52,8 @@ int croc_texture_xrgb1555_to_rgb565(CrocTexture *tex); */ CrocTexture *croc_texture_deindex8(const CrocTexture *tex, const CrocColour *key); +#ifdef __cplusplus +} +#endif + #endif /* _LIBCROC_TEX_H */