shithub: libmujs

Download patch

ref: 8f58f61f06f8b1de1ea91ae134b1665a9cc9e899
parent: 7389d25b1a710fbb7a0a28e6e1ab14d05783f41d
author: Tor Andersson <tor@ccxvii.net>
date: Tue Jan 21 16:13:00 EST 2014

Remove jsconf.h as it is not really useful.

--- a/js.h
+++ b/js.h
@@ -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;
 
--- a/jsconf.h
+++ /dev/null
@@ -1,32 +1,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
--- a/jsi.h
+++ b/jsi.h
@@ -20,6 +20,13 @@
 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);