Remove jsconf.h as it is not really useful.

This commit is contained in:
Tor Andersson
2014-01-21 21:13:00 +01:00
parent 7389d25b1a
commit 8f58f61f06
3 changed files with 29 additions and 33 deletions
+22 -1
View File
@@ -1,7 +1,28 @@
#ifndef js_h
#define js_h
#include "jsconf.h"
/* noreturn is a GCC extension */
#ifdef __GNUC__
#define JS_NORETURN __attribute__((noreturn))
#else
#ifdef _MSC_VER
#define JS_NORETURN __declspec(noreturn)
#else
#define JS_NORETURN
#endif
#endif
/* GCC can do type checking of printf strings */
#ifdef __printflike
#define JS_PRINTFLIKE __printflike
#else
#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7
#define JS_PRINTFLIKE(fmtarg, firstvararg) \
__attribute__((__format__ (__printf__, fmtarg, firstvararg)))
#else
#define JS_PRINTFLIKE(fmtarg, firstvararg)
#endif
#endif
typedef struct js_State js_State;
-32
View File
@@ -1,32 +0,0 @@
#ifndef js_conf_h
#define js_conf_h
#define JS_STACKSIZE 256 /* value stack size */
#define JS_MINSTACK 20 /* at least this much available when entering a function */
#define JS_TRYLIMIT 64 /* exception stack size */
#define JS_GCLIMIT 10000 /* run gc cycle every N allocations */
/* noreturn is a GCC extension */
#ifdef __GNUC__
#define JS_NORETURN __attribute__((noreturn))
#else
#ifdef _MSC_VER
#define JS_NORETURN __declspec(noreturn)
#else
#define JS_NORETURN
#endif
#endif
/* GCC can do type checking of printf strings */
#ifdef __printflike
#define JS_PRINTFLIKE __printflike
#else
#if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7
#define JS_PRINTFLIKE(fmtarg, firstvararg) \
__attribute__((__format__ (__printf__, fmtarg, firstvararg)))
#else
#define JS_PRINTFLIKE(fmtarg, firstvararg)
#endif
#endif
#endif
+7
View File
@@ -20,6 +20,13 @@ typedef struct js_Environment js_Environment;
typedef struct js_StringNode js_StringNode;
typedef struct js_Jumpbuf js_Jumpbuf;
/* Limits */
#define JS_STACKSIZE 256 /* value stack size */
#define JS_MINSTACK 20 /* at least this much available when entering a function */
#define JS_TRYLIMIT 64 /* exception stack size */
#define JS_GCLIMIT 10000 /* run gc cycle every N allocations */
/* String interning */
const char *js_intern(js_State *J, const char *s);