Bug 391423 - Reposition JS_(BEGIN|END)_EXTERN_C to avoid nesting #includes. Patch by Edward Lee <edilee@mozilla.com>, r=jorendorff, r=bsmedberg

git-svn-id: svn://10.0.0.236/trunk@231856 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jwalden%mit.edu
2007-08-10 21:27:08 +00:00
parent 64fb755530
commit c4f450fd4d
3 changed files with 10 additions and 6 deletions

View File

@@ -40,14 +40,14 @@
#ifndef jsiter_h___
#define jsiter_h___
JS_BEGIN_EXTERN_C
/*
* JavaScript iterators.
*/
#include "jsprvtd.h"
#include "jspubtd.h"
JS_BEGIN_EXTERN_C
#define JSITER_ENUMERATE 0x1 /* for-in compatible hidden default iterator */
#define JSITER_FOREACH 0x2 /* return [key, value] pair rather than key */
#define JSITER_KEYVALUE 0x4 /* destructuring for-in wants [key, value] */

View File

@@ -39,8 +39,6 @@
#ifndef jslock_h__
#define jslock_h__
JS_BEGIN_EXTERN_C
#ifdef JS_THREADSAFE
#include "jstypes.h"
@@ -52,6 +50,8 @@ JS_BEGIN_EXTERN_C
#include "jsprvtd.h" /* for JSScope, etc. */
#include "jspubtd.h" /* for JSRuntime, etc. */
JS_BEGIN_EXTERN_C
#define Thin_GetWait(W) ((jsword)(W) & 0x1)
#define Thin_SetWait(W) ((jsword)(W) | 0x1)
#define Thin_RemoveWait(W) ((jsword)(W) & ~0x1)
@@ -112,7 +112,9 @@ typedef struct JSFatLockTable {
* to be fixed by moving JS_LOCK_SCOPE to jsscope.h, JS_LOCK_OBJ to jsobj.h,
* and so on.
*/
JS_END_EXTERN_C
#include "jsscope.h"
JS_BEGIN_EXTERN_C
#define JS_LOCK_RUNTIME(rt) js_LockRuntime(rt)
#define JS_UNLOCK_RUNTIME(rt) js_UnlockRuntime(rt)
@@ -212,6 +214,8 @@ extern JS_INLINE void js_Unlock(JSThinLock *tl, jsword me);
#else /* !JS_THREADSAFE */
JS_BEGIN_EXTERN_C
#define JS_ATOMIC_INCREMENT(p) (++*(p))
#define JS_ATOMIC_DECREMENT(p) (--*(p))
#define JS_ATOMIC_ADD(p,v) (*(p) += (v))

View File

@@ -39,11 +39,11 @@
#ifndef jsxml_h___
#define jsxml_h___
JS_BEGIN_EXTERN_C
#include "jsstddef.h"
#include "jspubtd.h"
JS_BEGIN_EXTERN_C
extern const char js_AnyName_str[];
extern const char js_AttributeName_str[];
extern const char js_isXMLName_str[];