From 2e5ab64f1cad2eeff4c770544a769f5af45ef20f Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Tue, 21 May 2024 14:54:35 -0700 Subject: [PATCH] add guard and c++ support to header file --- sqlite-vec.h.tmpl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sqlite-vec.h.tmpl b/sqlite-vec.h.tmpl index a644326..59edd9d 100644 --- a/sqlite-vec.h.tmpl +++ b/sqlite-vec.h.tmpl @@ -1,11 +1,24 @@ +#ifndef SQLITE_VEC_H +#define SQLITE_VEC_H + #include "sqlite3ext.h" #define SQLITE_VEC_VERSION "v${VERSION}" #define SQLITE_VEC_DATE "${DATE}" #define SQLITE_VEC_SOURCE "${SOURCE}" +#ifdef __cplusplus +extern "C" { +#endif int sqlite3_vec_init(sqlite3 *db, char **pzErrMsg, - const sqlite3_api_routines *pApi); + const sqlite3_api_routines *pApi); int sqlite3_vec_fs_read_init(sqlite3 *db, char **pzErrMsg, - const sqlite3_api_routines *pApi); + const sqlite3_api_routines *pApi); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef SQLITE_VEC_H */