[INFER] Fix build break for uses of C++ constructs in jsarena.h
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 03 Apr 2011 16:19:05 -0700
changeset 74898 514f2a3478e4c497a91b8020f95629f5feae55ac
parent 74897 c6bed35e308d1a408582d3af463a8d221b2ad2b1
child 74899 23faefaeb4a81eb8f7f2065440747db2de1b98d9
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
milestone2.2a1pre
[INFER] Fix build break for uses of C++ constructs in jsarena.h
js/src/jsarena.h
--- a/js/src/jsarena.h
+++ b/js/src/jsarena.h
@@ -284,16 +284,18 @@ JS_DumpArenaStats(FILE *fp);
 #define JS_ArenaCountGrowth(ap, size, incr)             /* nothing */
 #define JS_ArenaCountRelease(ap, mark)                  /* nothing */
 #define JS_ArenaCountRetract(ap, mark)                  /* nothing */
 
 #endif /* !JS_ARENAMETER */
 
 JS_END_EXTERN_C
 
+#ifdef __cplusplus
+
 namespace js {
 
 template <typename T>
 inline T *
 ArenaArray(JSArenaPool &pool, unsigned count)
 {
     void *v;
     JS_ARENA_ALLOCATE(v, &pool, count * sizeof(T));
@@ -351,9 +353,11 @@ ArenaNew(JSArenaPool &pool, const A &a, 
 {
     void *v;
     JS_ARENA_ALLOCATE(v, &pool, sizeof(T));
     return v ? new (v) T(a, b, c, d, e) : NULL;
 }
 
 } /* namespace js */
 
+#endif /* __cplusplus */
+
 #endif /* jsarena_h___ */