mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Add 'extern' statements to public headers for C++ compatibility
This commit is contained in:
parent
f9d1029ea3
commit
af084de6f9
5 changed files with 41 additions and 1 deletions
8
cutils.h
8
cutils.h
|
@ -29,6 +29,10 @@
|
|||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
@ -527,4 +531,8 @@ int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout);
|
|||
|
||||
#endif /* !defined(EMSCRIPTEN) && !defined(__wasi__) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* CUTILS_H */
|
||||
|
|
8
libbf.h
8
libbf.h
|
@ -27,6 +27,10 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if INTPTR_MAX >= INT64_MAX && !defined(_WIN32) && !defined(__TINYC__)
|
||||
#define LIMB_LOG2_BITS 6
|
||||
#else
|
||||
|
@ -532,4 +536,8 @@ static inline int bfdec_resize(bfdec_t *r, limb_t len)
|
|||
}
|
||||
int bfdec_normalize_and_round(bfdec_t *r, limb_t prec1, bf_flags_t flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* LIBBF_H */
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
|
||||
#include "libunicode.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LRE_BOOL int /* for documentation purposes */
|
||||
|
||||
#define LRE_FLAG_GLOBAL (1 << 0)
|
||||
|
@ -84,4 +88,8 @@ static inline int lre_js_is_ident_next(int c)
|
|||
|
||||
#undef LRE_BOOL
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* LIBREGEXP_H */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include <stddef.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LRE_BOOL int /* for documentation purposes */
|
||||
|
||||
#define LRE_CC_RES_LEN_MAX 3
|
||||
|
@ -115,4 +119,8 @@ int unicode_prop(CharRange *cr, const char *prop_name);
|
|||
|
||||
#undef LRE_BOOL
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNICODE_H */
|
||||
|
|
8
list.h
8
list.h
|
@ -28,6 +28,10 @@
|
|||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct list_head {
|
||||
struct list_head *prev;
|
||||
struct list_head *next;
|
||||
|
@ -96,4 +100,8 @@ static inline int list_empty(struct list_head *el)
|
|||
for(el = (head)->prev, el1 = el->prev; el != (head); \
|
||||
el = el1, el1 = el->prev)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* LIST_H */
|
||||
|
|
Loading…
Reference in a new issue