mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 01:41:37 +08:00
Fix public header so it can be used with C++.
This commit is contained in:
10
mujs.h
10
mujs.h
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <setjmp.h> /* required for setjmp in fz_try macro */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* noreturn is a GCC extension */
|
||||
#ifdef __GNUC__
|
||||
#define JS_NORETURN __attribute__((noreturn))
|
||||
@@ -147,7 +151,7 @@ void js_newstring(js_State *J, const char *v);
|
||||
void js_newcfunction(js_State *J, js_CFunction fun, const char *name, int length);
|
||||
void js_newcconstructor(js_State *J, js_CFunction fun, js_CFunction con, const char *name, int length);
|
||||
void js_newuserdata(js_State *J, const char *tag, void *data, js_Finalize finalize);
|
||||
void js_newuserdatax(js_State *J, const char *tag, void *data, js_HasProperty has, js_Put put, js_Delete delete, js_Finalize finalize);
|
||||
void js_newuserdatax(js_State *J, const char *tag, void *data, js_HasProperty has, js_Put put, js_Delete del, js_Finalize finalize);
|
||||
void js_newregexp(js_State *J, const char *pattern, int flags);
|
||||
|
||||
void js_pushiterator(js_State *J, int idx, int own);
|
||||
@@ -203,4 +207,8 @@ int js_equal(js_State *J);
|
||||
int js_strictequal(js_State *J);
|
||||
int js_instanceof(js_State *J);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user