Bug 392041: js_PutEscapedStringImpl gets JS_FRIEND to permit usage outside js lib. r=brendan
authorigor@mir2.org
Mon, 13 Aug 2007 12:35:07 -0700
changeset 4569 85ea1c4501c3c882059e40cffece5808bc1dff7f
parent 4568 0ffef4005420d4c397359131cb4cd30409f82eac
child 4570 2dfc71975e82a39c742252f54d7db3c551357ace
push idunknown
push userunknown
push dateunknown
reviewersbrendan
bugs392041
milestone1.9a8pre
Bug 392041: js_PutEscapedStringImpl gets JS_FRIEND to permit usage outside js lib. r=brendan
js/src/jsstr.c
js/src/jsstr.h
--- a/js/src/jsstr.c
+++ b/js/src/jsstr.c
@@ -4926,17 +4926,17 @@ Utf8ToOneUcs4Char(const uint8 *utf8Buffe
     }
     return ucs4Char;
 }
 
 #if defined(DEBUG) ||                                                         \
     defined(DUMP_CALL_TABLE) ||                                               \
     defined(DUMP_SCOPE_STATS)
 
-size_t
+JS_FRIEND_API(size_t)
 js_PutEscapedStringImpl(char *buffer, size_t bufferSize, FILE *fp,
                         JSString *str, uint32 quote)
 {
     jschar *chars, *charsEnd;
     size_t n;
     char *escape;
     char c;
     uintN u, hex, shift;
--- a/js/src/jsstr.h
+++ b/js/src/jsstr.h
@@ -522,15 +522,15 @@ js_OneUcs4ToUtf8Char(uint8 *utf8Buffer, 
  * Returns the number of bytes written to file. If quote is not 0, it must
  * be a single or double quote character that will quote the output.
  *
  * The function is only defined for debug builds.
 */
 #define js_FileEscapedString(file, str, quote)                                \
     (JS_ASSERT(file), js_PutEscapedStringImpl(NULL, 0, file, str, quote))
 
-extern size_t
+extern JS_FRIEND_API(size_t)
 js_PutEscapedStringImpl(char *buffer, size_t bufferSize, FILE *fp,
                         JSString *str, uint32 quote);
 
 JS_END_EXTERN_C
 
 #endif /* jsstr_h___ */