mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 15:26:07 +00:00
fixup the exported api declarations to use JS_PUBLIC_API in a consistent fashion r=mccabe
This commit is contained in:
parent
100221faa2
commit
e5417278ef
@ -184,7 +184,7 @@ JS_ConvertArguments(JSContext *cx, uintN argc, jsval *argv, const char *format,
|
||||
...);
|
||||
|
||||
#ifdef va_start
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_ConvertArgumentsVA(JSContext *cx, uintN argc, jsval *argv,
|
||||
const char *format, va_list ap);
|
||||
#endif
|
||||
@ -372,10 +372,10 @@ JS_DestroyContextNoGC(JSContext *cx);
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_DestroyContextMaybeGC(JSContext *cx);
|
||||
|
||||
JS_EXTERN_API(void*)
|
||||
extern JS_PUBLIC_API(void*)
|
||||
JS_GetContextPrivate(JSContext *cx);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_SetContextPrivate(JSContext *cx, void *data);
|
||||
|
||||
extern JS_PUBLIC_API(JSRuntime *)
|
||||
@ -454,7 +454,7 @@ JS_AddRoot(JSContext *cx, void *rp);
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_RemoveRoot(JSContext *cx, void *rp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_RemoveRootRT(JSRuntime *rt, void *rp);
|
||||
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
|
@ -61,7 +61,7 @@ static JSArenaStats *arena_stats_list;
|
||||
|
||||
#define JS_ARENA_DEFAULT_ALIGN sizeof(double)
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_InitArenaPool(JSArenaPool *pool, const char *name, JSUint32 size, JSUint32 align)
|
||||
{
|
||||
if (align == 0)
|
||||
@ -80,7 +80,7 @@ JS_InitArenaPool(JSArenaPool *pool, const char *name, JSUint32 size, JSUint32 al
|
||||
#endif
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void *)
|
||||
JS_PUBLIC_API(void *)
|
||||
JS_ArenaAllocate(JSArenaPool *pool, JSUint32 nb)
|
||||
{
|
||||
JSArena **ap, *a, *b;
|
||||
@ -136,7 +136,7 @@ JS_ArenaAllocate(JSArenaPool *pool, JSUint32 nb)
|
||||
return p;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void *)
|
||||
JS_PUBLIC_API(void *)
|
||||
JS_ArenaGrow(JSArenaPool *pool, void *p, JSUint32 size, JSUint32 incr)
|
||||
{
|
||||
void *newp;
|
||||
@ -198,7 +198,7 @@ FreeArenaList(JSArenaPool *pool, JSArena *head, JSBool reallyFree)
|
||||
pool->current = head;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaRelease(JSArenaPool *pool, char *mark)
|
||||
{
|
||||
JSArena *a;
|
||||
@ -212,14 +212,14 @@ JS_ArenaRelease(JSArenaPool *pool, char *mark)
|
||||
}
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_FreeArenaPool(JSArenaPool *pool)
|
||||
{
|
||||
FreeArenaList(pool, &pool->first, JS_FALSE);
|
||||
COUNT(pool, ndeallocs);
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_FinishArenaPool(JSArenaPool *pool)
|
||||
{
|
||||
FreeArenaList(pool, &pool->first, JS_TRUE);
|
||||
@ -240,7 +240,7 @@ JS_FinishArenaPool(JSArenaPool *pool)
|
||||
#endif
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_CompactArenaPool(JSArenaPool *pool)
|
||||
{
|
||||
#if 0 /* XP_MAC */
|
||||
@ -254,7 +254,7 @@ JS_CompactArenaPool(JSArenaPool *pool)
|
||||
#endif
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaFinish()
|
||||
{
|
||||
JSArena *a, *next;
|
||||
@ -276,7 +276,7 @@ JS_ArenaFinish()
|
||||
}
|
||||
|
||||
#ifdef JS_ARENAMETER
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaCountAllocation(JSArenaPool *pool, JSUint32 nb)
|
||||
{
|
||||
pool->stats.nallocs++;
|
||||
@ -286,13 +286,13 @@ JS_ArenaCountAllocation(JSArenaPool *pool, JSUint32 nb)
|
||||
pool->stats.variance += nb * nb;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaCountInplaceGrowth(JSArenaPool *pool, JSUint32 size, JSUint32 incr)
|
||||
{
|
||||
pool->stats.ninplace++;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaCountGrowth(JSArenaPool *pool, JSUint32 size, JSUint32 incr)
|
||||
{
|
||||
pool->stats.ngrows++;
|
||||
@ -304,13 +304,13 @@ JS_ArenaCountGrowth(JSArenaPool *pool, JSUint32 size, JSUint32 incr)
|
||||
pool->stats.variance += size * size;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaCountRelease(JSArenaPool *pool, char *mark)
|
||||
{
|
||||
pool->stats.nreleases++;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ArenaCountRetract(JSArenaPool *pool, char *mark)
|
||||
{
|
||||
pool->stats.nfastrels++;
|
||||
@ -319,7 +319,7 @@ JS_ArenaCountRetract(JSArenaPool *pool, char *mark)
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_DumpArenaStats(FILE *fp)
|
||||
{
|
||||
JSArenaStats *stats;
|
||||
|
@ -182,7 +182,7 @@ struct JSArenaPool {
|
||||
* Initialize an arena pool with the given name for debugging and metering,
|
||||
* with a minimum size per arena of size bytes.
|
||||
*/
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_InitArenaPool(JSArenaPool *pool, const char *name, JSUint32 size,
|
||||
JSUint32 align);
|
||||
|
||||
@ -191,59 +191,59 @@ JS_InitArenaPool(JSArenaPool *pool, const char *name, JSUint32 size,
|
||||
* after calling this function. There is no need to call JS_InitArenaPool()
|
||||
* again unless JS_FinishArenaPool(pool) has been called.
|
||||
*/
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_FreeArenaPool(JSArenaPool *pool);
|
||||
|
||||
/*
|
||||
* Free the arenas in pool and finish using it altogether.
|
||||
*/
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_FinishArenaPool(JSArenaPool *pool);
|
||||
|
||||
/*
|
||||
* Compact all of the arenas in a pool so that no space is wasted.
|
||||
*/
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_CompactArenaPool(JSArenaPool *pool);
|
||||
|
||||
/*
|
||||
* Finish using arenas, freeing all memory associated with them.
|
||||
*/
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaFinish(void);
|
||||
|
||||
/*
|
||||
* Friend functions used by the JS_ARENA_*() macros.
|
||||
*/
|
||||
JS_EXTERN_API(void *)
|
||||
extern JS_PUBLIC_API(void *)
|
||||
JS_ArenaAllocate(JSArenaPool *pool, JSUint32 nb);
|
||||
|
||||
JS_EXTERN_API(void *)
|
||||
extern JS_PUBLIC_API(void *)
|
||||
JS_ArenaGrow(JSArenaPool *pool, void *p, JSUint32 size, JSUint32 incr);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaRelease(JSArenaPool *pool, char *mark);
|
||||
|
||||
#ifdef JS_ARENAMETER
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaCountAllocation(JSArenaPool *pool, JSUint32 nb);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaCountInplaceGrowth(JSArenaPool *pool, JSUint32 size, JSUint32 incr);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaCountGrowth(JSArenaPool *pool, JSUint32 size, JSUint32incr);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaCountRelease(JSArenaPool *pool, char *mark);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ArenaCountRetract(JSArenaPool *pool, char *mark);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_DumpArenaStats(FILE *fp);
|
||||
|
||||
#else /* !JS_ARENAMETER */
|
||||
|
@ -53,12 +53,12 @@ typedef unsigned long jsbitmap_t;
|
||||
/*
|
||||
** Compute the log of the least power of 2 greater than or equal to n
|
||||
*/
|
||||
JS_EXTERN_API(JSIntn) JS_CeilingLog2(JSUint32 i);
|
||||
extern JS_PUBLIC_API(JSIntn) JS_CeilingLog2(JSUint32 i);
|
||||
|
||||
/*
|
||||
** Compute the log of the greatest power of 2 less than or equal to n
|
||||
*/
|
||||
JS_EXTERN_API(JSIntn) JS_FloorLog2(JSUint32 i);
|
||||
extern JS_PUBLIC_API(JSIntn) JS_FloorLog2(JSUint32 i);
|
||||
|
||||
/*
|
||||
** Macro version of JS_CeilingLog2: Compute the log of the least power of
|
||||
|
@ -237,7 +237,7 @@ typedef struct JSFile {
|
||||
|
||||
/* a few forward declarations... */
|
||||
static JSClass file_class;
|
||||
JS_EXPORT_API(JSObject*) js_NewFileObject(JSContext *cx, char *filename);
|
||||
JS_PUBLIC_API(JSObject*) js_NewFileObject(JSContext *cx, char *filename);
|
||||
static JSBool file_open(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
static JSBool file_close(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
|
||||
|
||||
@ -2009,7 +2009,7 @@ file_init(JSContext *cx, JSObject *obj, char *bytes)
|
||||
}
|
||||
|
||||
/* Returns a JSObject. This function is globally visible */
|
||||
JS_EXPORT_API(JSObject*)
|
||||
JS_PUBLIC_API(JSObject*)
|
||||
js_NewFileObject(JSContext *cx, char *filename)
|
||||
{
|
||||
JSObject *obj;
|
||||
@ -2544,7 +2544,7 @@ static JSClass file_class = {
|
||||
};
|
||||
|
||||
/* -------------------- Functions exposed to the outside -------------------- */
|
||||
JS_EXPORT_API(JSObject*)
|
||||
JS_PUBLIC_API(JSObject*)
|
||||
js_InitFileClass(JSContext *cx, JSObject* obj, JSBool initStandardStreams)
|
||||
{
|
||||
JSObject *file, *ctor, *afile;
|
||||
|
@ -36,10 +36,10 @@
|
||||
#define _jsfile_h__
|
||||
|
||||
#if JS_HAS_FILE_OBJECT
|
||||
JS_EXTERN_API(JSObject*)
|
||||
extern JS_PUBLIC_API(JSObject*)
|
||||
js_InitFileClass(JSContext *cx, JSObject* obj, JSBool initStandardStreams);
|
||||
|
||||
JS_EXTERN_API(JSObject*)
|
||||
extern JS_PUBLIC_API(JSObject*)
|
||||
js_NewFileObject(JSContext *cx, char *bytes);
|
||||
#endif /* JS_HAS_FILE_OBJECT */
|
||||
#endif /* _jsfile_h__ */
|
||||
|
@ -88,7 +88,7 @@ static JSHashAllocOps defaultHashAllocOps = {
|
||||
DefaultAllocEntry, DefaultFreeEntry
|
||||
};
|
||||
|
||||
JS_EXPORT_API(JSHashTable *)
|
||||
JS_PUBLIC_API(JSHashTable *)
|
||||
JS_NewHashTable(uint32 n, JSHashFunction keyHash,
|
||||
JSHashComparator keyCompare, JSHashComparator valueCompare,
|
||||
JSHashAllocOps *allocOps, void *allocPriv)
|
||||
@ -134,7 +134,7 @@ JS_NewHashTable(uint32 n, JSHashFunction keyHash,
|
||||
return ht;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_HashTableDestroy(JSHashTable *ht)
|
||||
{
|
||||
uint32 i, n;
|
||||
@ -162,7 +162,7 @@ JS_HashTableDestroy(JSHashTable *ht)
|
||||
/*
|
||||
** Multiplicative hash, from Knuth 6.4.
|
||||
*/
|
||||
JS_EXPORT_API(JSHashEntry **)
|
||||
JS_PUBLIC_API(JSHashEntry **)
|
||||
JS_HashTableRawLookup(JSHashTable *ht, JSHashNumber keyHash, const void *key)
|
||||
{
|
||||
JSHashEntry *he, **hep, **hep0;
|
||||
@ -192,7 +192,7 @@ JS_HashTableRawLookup(JSHashTable *ht, JSHashNumber keyHash, const void *key)
|
||||
return hep;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSHashEntry *)
|
||||
JS_PUBLIC_API(JSHashEntry *)
|
||||
JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **hep,
|
||||
JSHashNumber keyHash, const void *key, void *value)
|
||||
{
|
||||
@ -249,7 +249,7 @@ JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **hep,
|
||||
return he;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSHashEntry *)
|
||||
JS_PUBLIC_API(JSHashEntry *)
|
||||
JS_HashTableAdd(JSHashTable *ht, const void *key, void *value)
|
||||
{
|
||||
JSHashNumber keyHash;
|
||||
@ -271,7 +271,7 @@ JS_HashTableAdd(JSHashTable *ht, const void *key, void *value)
|
||||
return JS_HashTableRawAdd(ht, hep, keyHash, key, value);
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_HashTableRawRemove(JSHashTable *ht, JSHashEntry **hep, JSHashEntry *he)
|
||||
{
|
||||
uint32 i, n;
|
||||
@ -313,7 +313,7 @@ JS_HashTableRawRemove(JSHashTable *ht, JSHashEntry **hep, JSHashEntry *he)
|
||||
}
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSBool)
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_HashTableRemove(JSHashTable *ht, const void *key)
|
||||
{
|
||||
JSHashNumber keyHash;
|
||||
@ -329,7 +329,7 @@ JS_HashTableRemove(JSHashTable *ht, const void *key)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void *)
|
||||
JS_PUBLIC_API(void *)
|
||||
JS_HashTableLookup(JSHashTable *ht, const void *key)
|
||||
{
|
||||
JSHashNumber keyHash;
|
||||
@ -348,7 +348,7 @@ JS_HashTableLookup(JSHashTable *ht, const void *key)
|
||||
** entry found. Stop if "f" says to (return value & JS_ENUMERATE_STOP).
|
||||
** Return a count of the number of elements scanned.
|
||||
*/
|
||||
JS_EXPORT_API(int)
|
||||
JS_PUBLIC_API(int)
|
||||
JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg)
|
||||
{
|
||||
JSHashEntry *he, **hep;
|
||||
@ -389,7 +389,7 @@ out:
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
JS_EXPORT_API(void)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_HashTableDumpMeter(JSHashTable *ht, JSHashEnumerator dump, FILE *fp)
|
||||
{
|
||||
double mean, variance;
|
||||
@ -435,7 +435,7 @@ JS_HashTableDumpMeter(JSHashTable *ht, JSHashEnumerator dump, FILE *fp)
|
||||
}
|
||||
#endif /* HASHMETER */
|
||||
|
||||
JS_EXPORT_API(int)
|
||||
JS_PUBLIC_API(int)
|
||||
JS_HashTableDump(JSHashTable *ht, JSHashEnumerator dump, FILE *fp)
|
||||
{
|
||||
int count;
|
||||
@ -447,7 +447,7 @@ JS_HashTableDump(JSHashTable *ht, JSHashEnumerator dump, FILE *fp)
|
||||
return count;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSHashNumber)
|
||||
JS_PUBLIC_API(JSHashNumber)
|
||||
JS_HashString(const void *key)
|
||||
{
|
||||
JSHashNumber h;
|
||||
@ -459,7 +459,7 @@ JS_HashString(const void *key)
|
||||
return h;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(int)
|
||||
JS_PUBLIC_API(int)
|
||||
JS_CompareValues(const void *v1, const void *v2)
|
||||
{
|
||||
return v1 == v2;
|
||||
|
@ -99,47 +99,47 @@ struct JSHashTable {
|
||||
* Create a new hash table.
|
||||
* If allocOps is null, use default allocator ops built on top of malloc().
|
||||
*/
|
||||
JS_EXTERN_API(JSHashTable *)
|
||||
extern JS_PUBLIC_API(JSHashTable *)
|
||||
JS_NewHashTable(uint32 n, JSHashFunction keyHash,
|
||||
JSHashComparator keyCompare, JSHashComparator valueCompare,
|
||||
JSHashAllocOps *allocOps, void *allocPriv);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_HashTableDestroy(JSHashTable *ht);
|
||||
|
||||
/* Low level access methods */
|
||||
JS_EXTERN_API(JSHashEntry **)
|
||||
extern JS_PUBLIC_API(JSHashEntry **)
|
||||
JS_HashTableRawLookup(JSHashTable *ht, JSHashNumber keyHash, const void *key);
|
||||
|
||||
JS_EXTERN_API(JSHashEntry *)
|
||||
extern JS_PUBLIC_API(JSHashEntry *)
|
||||
JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **hep, JSHashNumber keyHash,
|
||||
const void *key, void *value);
|
||||
|
||||
JS_EXTERN_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_HashTableRawRemove(JSHashTable *ht, JSHashEntry **hep, JSHashEntry *he);
|
||||
|
||||
/* Higher level access methods */
|
||||
JS_EXTERN_API(JSHashEntry *)
|
||||
extern JS_PUBLIC_API(JSHashEntry *)
|
||||
JS_HashTableAdd(JSHashTable *ht, const void *key, void *value);
|
||||
|
||||
JS_EXTERN_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_HashTableRemove(JSHashTable *ht, const void *key);
|
||||
|
||||
JS_EXTERN_API(intN)
|
||||
extern JS_PUBLIC_API(intN)
|
||||
JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg);
|
||||
|
||||
JS_EXTERN_API(void *)
|
||||
extern JS_PUBLIC_API(void *)
|
||||
JS_HashTableLookup(JSHashTable *ht, const void *key);
|
||||
|
||||
JS_EXTERN_API(intN)
|
||||
extern JS_PUBLIC_API(intN)
|
||||
JS_HashTableDump(JSHashTable *ht, JSHashEnumerator dump, FILE *fp);
|
||||
|
||||
/* General-purpose C string hash function. */
|
||||
JS_EXTERN_API(JSHashNumber)
|
||||
extern JS_PUBLIC_API(JSHashNumber)
|
||||
JS_HashString(const void *key);
|
||||
|
||||
/* Stub function just returns v1 == v2 */
|
||||
JS_EXTERN_API(intN)
|
||||
extern JS_PUBLIC_API(intN)
|
||||
JS_CompareValues(const void *v1, const void *v2);
|
||||
|
||||
JS_END_EXTERN_C
|
||||
|
@ -37,7 +37,7 @@
|
||||
/*
|
||||
** Compute the log of the least power of 2 greater than or equal to n
|
||||
*/
|
||||
JS_EXPORT_API(JSIntn) JS_CeilingLog2(JSUint32 n)
|
||||
JS_PUBLIC_API(JSIntn) JS_CeilingLog2(JSUint32 n)
|
||||
{
|
||||
JSIntn log2 = 0;
|
||||
|
||||
@ -60,7 +60,7 @@ JS_EXPORT_API(JSIntn) JS_CeilingLog2(JSUint32 n)
|
||||
** Compute the log of the greatest power of 2 less than or equal to n.
|
||||
** This really just finds the highest set bit in the word.
|
||||
*/
|
||||
JS_EXPORT_API(JSIntn) JS_FloorLog2(JSUint32 n)
|
||||
JS_PUBLIC_API(JSIntn) JS_FloorLog2(JSUint32 n)
|
||||
{
|
||||
JSIntn log2 = 0;
|
||||
|
||||
|
@ -47,9 +47,9 @@ JSInt64 __pascal __loadds __export
|
||||
JSInt64 __pascal __loadds __export
|
||||
JSLL_MinInt(void) { return ll_minint; }
|
||||
#else
|
||||
JS_EXPORT_API(JSInt64) JSLL_Zero(void) { return ll_zero; }
|
||||
JS_EXPORT_API(JSInt64) JSLL_MaxInt(void) { return ll_maxint; }
|
||||
JS_EXPORT_API(JSInt64) JSLL_MinInt(void) { return ll_minint; }
|
||||
JS_PUBLIC_API(JSInt64) JSLL_Zero(void) { return ll_zero; }
|
||||
JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void) { return ll_maxint; }
|
||||
JS_PUBLIC_API(JSInt64) JSLL_MinInt(void) { return ll_minint; }
|
||||
#endif
|
||||
|
||||
#ifndef JS_HAVE_LONG_LONG
|
||||
@ -110,7 +110,7 @@ static JSUint32 CountLeadingZeros(JSUint32 a)
|
||||
return r;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a, JSUint64 b)
|
||||
JS_PUBLIC_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a, JSUint64 b)
|
||||
{
|
||||
JSUint32 n0, n1, n2;
|
||||
JSUint32 q0, q1;
|
||||
|
@ -63,9 +63,9 @@ JSInt64 __pascal __loadds __export
|
||||
JSInt64 __pascal __loadds __export
|
||||
JSLL_Zero(void);
|
||||
#else
|
||||
JS_EXTERN_API(JSInt64) JSLL_MaxInt(void);
|
||||
JS_EXTERN_API(JSInt64) JSLL_MinInt(void);
|
||||
JS_EXTERN_API(JSInt64) JSLL_Zero(void);
|
||||
extern JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void);
|
||||
extern JS_PUBLIC_API(JSInt64) JSLL_MinInt(void);
|
||||
extern JS_PUBLIC_API(JSInt64) JSLL_Zero(void);
|
||||
#endif
|
||||
|
||||
#define JSLL_MAXINT JSLL_MaxInt()
|
||||
@ -264,7 +264,7 @@ JS_EXTERN_API(JSInt64) JSLL_Zero(void);
|
||||
|
||||
#define JSLL_UDIVMOD(qp, rp, a, b) jsll_udivmod(qp, rp, a, b)
|
||||
|
||||
JS_EXTERN_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a, JSUint64 b);
|
||||
extern JS_PUBLIC_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a, JSUint64 b);
|
||||
|
||||
#define JSLL_DIV(r, a, b) { \
|
||||
JSInt64 _a, _b; \
|
||||
|
@ -1036,7 +1036,7 @@ static int FuncStuff(SprintfState *ss, const char *sp, JSUint32 len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSUint32) JS_sxprintf(JSStuffFunc func, void *arg,
|
||||
JS_PUBLIC_API(JSUint32) JS_sxprintf(JSStuffFunc func, void *arg,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@ -1048,7 +1048,7 @@ JS_EXPORT_API(JSUint32) JS_sxprintf(JSStuffFunc func, void *arg,
|
||||
return rv;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSUint32) JS_vsxprintf(JSStuffFunc func, void *arg,
|
||||
JS_PUBLIC_API(JSUint32) JS_vsxprintf(JSStuffFunc func, void *arg,
|
||||
const char *fmt, va_list ap)
|
||||
{
|
||||
SprintfState ss;
|
||||
@ -1102,7 +1102,7 @@ static int GrowStuff(SprintfState *ss, const char *sp, JSUint32 len)
|
||||
/*
|
||||
** sprintf into a malloc'd buffer
|
||||
*/
|
||||
JS_EXPORT_API(char *) JS_smprintf(const char *fmt, ...)
|
||||
JS_PUBLIC_API(char *) JS_smprintf(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *rv;
|
||||
@ -1116,12 +1116,12 @@ JS_EXPORT_API(char *) JS_smprintf(const char *fmt, ...)
|
||||
/*
|
||||
** Free memory allocated, for the caller, by JS_smprintf
|
||||
*/
|
||||
JS_EXPORT_API(void) JS_smprintf_free(char *mem)
|
||||
JS_PUBLIC_API(void) JS_smprintf_free(char *mem)
|
||||
{
|
||||
JS_DELETE(mem);
|
||||
}
|
||||
|
||||
JS_EXPORT_API(char *) JS_vsmprintf(const char *fmt, va_list ap)
|
||||
JS_PUBLIC_API(char *) JS_vsmprintf(const char *fmt, va_list ap)
|
||||
{
|
||||
SprintfState ss;
|
||||
int rv;
|
||||
@ -1161,7 +1161,7 @@ static int LimitStuff(SprintfState *ss, const char *sp, JSUint32 len)
|
||||
** sprintf into a fixed size buffer. Make sure there is a NUL at the end
|
||||
** when finished.
|
||||
*/
|
||||
JS_EXPORT_API(JSUint32) JS_snprintf(char *out, JSUint32 outlen, const char *fmt, ...)
|
||||
JS_PUBLIC_API(JSUint32) JS_snprintf(char *out, JSUint32 outlen, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int rv;
|
||||
@ -1177,7 +1177,7 @@ JS_EXPORT_API(JSUint32) JS_snprintf(char *out, JSUint32 outlen, const char *fmt,
|
||||
return rv;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(JSUint32) JS_vsnprintf(char *out, JSUint32 outlen,const char *fmt,
|
||||
JS_PUBLIC_API(JSUint32) JS_vsnprintf(char *out, JSUint32 outlen,const char *fmt,
|
||||
va_list ap)
|
||||
{
|
||||
SprintfState ss;
|
||||
@ -1202,7 +1202,7 @@ JS_EXPORT_API(JSUint32) JS_vsnprintf(char *out, JSUint32 outlen,const char *fmt,
|
||||
return n ? n - 1 : n;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(char *) JS_sprintf_append(char *last, const char *fmt, ...)
|
||||
JS_PUBLIC_API(char *) JS_sprintf_append(char *last, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *rv;
|
||||
@ -1213,7 +1213,7 @@ JS_EXPORT_API(char *) JS_sprintf_append(char *last, const char *fmt, ...)
|
||||
return rv;
|
||||
}
|
||||
|
||||
JS_EXPORT_API(char *) JS_vsprintf_append(char *last, const char *fmt, va_list ap)
|
||||
JS_PUBLIC_API(char *) JS_vsprintf_append(char *last, const char *fmt, va_list ap)
|
||||
{
|
||||
SprintfState ss;
|
||||
int rv;
|
||||
|
@ -62,19 +62,19 @@ JS_BEGIN_EXTERN_C
|
||||
** of the buffer. Returns the length of the written output, NOT including
|
||||
** the NUL, or (JSUint32)-1 if an error occurs.
|
||||
*/
|
||||
JS_EXTERN_API(JSUint32) JS_snprintf(char *out, JSUint32 outlen, const char *fmt, ...);
|
||||
extern JS_PUBLIC_API(JSUint32) JS_snprintf(char *out, JSUint32 outlen, const char *fmt, ...);
|
||||
|
||||
/*
|
||||
** sprintf into a malloc'd buffer. Return a pointer to the malloc'd
|
||||
** buffer on success, NULL on failure. Call "JS_smprintf_free" to release
|
||||
** the memory returned.
|
||||
*/
|
||||
JS_EXTERN_API(char*) JS_smprintf(const char *fmt, ...);
|
||||
extern JS_PUBLIC_API(char*) JS_smprintf(const char *fmt, ...);
|
||||
|
||||
/*
|
||||
** Free the memory allocated, for the caller, by JS_smprintf
|
||||
*/
|
||||
JS_EXTERN_API(void) JS_smprintf_free(char *mem);
|
||||
extern JS_PUBLIC_API(void) JS_smprintf_free(char *mem);
|
||||
|
||||
/*
|
||||
** "append" sprintf into a malloc'd buffer. "last" is the last value of
|
||||
@ -83,7 +83,7 @@ JS_EXTERN_API(void) JS_smprintf_free(char *mem);
|
||||
** will allocate the initial string. The return value is the new value of
|
||||
** last for subsequent calls, or NULL if there is a malloc failure.
|
||||
*/
|
||||
JS_EXTERN_API(char*) JS_sprintf_append(char *last, const char *fmt, ...);
|
||||
extern JS_PUBLIC_API(char*) JS_sprintf_append(char *last, const char *fmt, ...);
|
||||
|
||||
/*
|
||||
** sprintf into a function. The function "f" is called with a string to
|
||||
@ -94,15 +94,15 @@ JS_EXTERN_API(char*) JS_sprintf_append(char *last, const char *fmt, ...);
|
||||
*/
|
||||
typedef JSIntn (*JSStuffFunc)(void *arg, const char *s, JSUint32 slen);
|
||||
|
||||
JS_EXTERN_API(JSUint32) JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...);
|
||||
extern JS_PUBLIC_API(JSUint32) JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...);
|
||||
|
||||
/*
|
||||
** va_list forms of the above.
|
||||
*/
|
||||
JS_EXTERN_API(JSUint32) JS_vsnprintf(char *out, JSUint32 outlen, const char *fmt, va_list ap);
|
||||
JS_EXTERN_API(char*) JS_vsmprintf(const char *fmt, va_list ap);
|
||||
JS_EXTERN_API(char*) JS_vsprintf_append(char *last, const char *fmt, va_list ap);
|
||||
JS_EXTERN_API(JSUint32) JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap);
|
||||
extern JS_PUBLIC_API(JSUint32) JS_vsnprintf(char *out, JSUint32 outlen, const char *fmt, va_list ap);
|
||||
extern JS_PUBLIC_API(char*) JS_vsmprintf(const char *fmt, va_list ap);
|
||||
extern JS_PUBLIC_API(char*) JS_vsprintf_append(char *last, const char *fmt, va_list ap);
|
||||
extern JS_PUBLIC_API(JSUint32) JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap);
|
||||
|
||||
/*
|
||||
***************************************************************************
|
||||
@ -137,7 +137,7 @@ JS_EXTERN_API(JSUint32) JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt,
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
JS_EXTERN_API(JSInt32) JS_sscanf(const char *buf, const char *fmt, ...);
|
||||
extern JS_PUBLIC_API(JSInt32) JS_sscanf(const char *buf, const char *fmt, ...);
|
||||
|
||||
JS_END_EXTERN_C
|
||||
|
||||
|
@ -131,7 +131,7 @@ static void dprintf(const char *format, ...)
|
||||
}
|
||||
#endif /* XP_MAC */
|
||||
|
||||
JS_EXPORT_API(void) JS_Assert(const char *s, const char *file, JSIntn ln)
|
||||
JS_PUBLIC_API(void) JS_Assert(const char *s, const char *file, JSIntn ln)
|
||||
{
|
||||
#if defined(XP_UNIX) || defined(XP_OS2)
|
||||
fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln);
|
||||
|
@ -74,7 +74,8 @@ JS_BEGIN_EXTERN_C
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
JS_EXTERN_API(void) JS_Assert(const char *s, const char *file, JSIntn ln);
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_Assert(const char *s, const char *file, JSIntn ln);
|
||||
#define JS_ASSERT(_expr) \
|
||||
((_expr)?((void)0):JS_Assert(# _expr,__FILE__,__LINE__))
|
||||
|
||||
@ -93,7 +94,7 @@ JS_EXTERN_API(void) JS_Assert(const char *s, const char *file, JSIntn ln);
|
||||
** call to the debugger or other moral equivalent as well as causing the
|
||||
** entire process to stop.
|
||||
*/
|
||||
JS_EXTERN_API(void) JS_Abort(void);
|
||||
extern JS_PUBLIC_API(void) JS_Abort(void);
|
||||
|
||||
JS_END_EXTERN_C
|
||||
|
||||
|
@ -109,58 +109,58 @@ struct JSXDRState {
|
||||
void *data;
|
||||
};
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_XDRNewBase(JSContext *cx, JSXDRState *xdr, JSXDRMode mode);
|
||||
|
||||
JS_PUBLIC_API(JSXDRState *)
|
||||
extern JS_PUBLIC_API(JSXDRState *)
|
||||
JS_XDRNewMem(JSContext *cx, JSXDRMode mode);
|
||||
|
||||
JS_PUBLIC_API(void *)
|
||||
extern JS_PUBLIC_API(void *)
|
||||
JS_XDRMemGetData(JSXDRState *xdr, uint32 *lp);
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_XDRMemSetData(JSXDRState *xdr, void *data, uint32 len);
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_XDRDestroy(JSXDRState *xdr);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRUint8(JSXDRState *xdr, uint8 *b);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRUint16(JSXDRState *xdr, uint16 *s);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRUint32(JSXDRState *xdr, uint32 *lp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRBytes(JSXDRState *xdr, char **bytes, uint32 len);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRCString(JSXDRState *xdr, char **sp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRCStringOrNull(JSXDRState *xdr, char **sp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRString(JSXDRState *xdr, JSString **strp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRStringOrNull(JSXDRState *xdr, JSString **strp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRDouble(JSXDRState *xdr, jsdouble **dp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_XDRValue(JSXDRState *xdr, jsval *vp);
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_RegisterClass(JSXDRState *xdr, JSClass *clasp, uint32 *lp);
|
||||
|
||||
JS_PUBLIC_API(uint32)
|
||||
extern JS_PUBLIC_API(uint32)
|
||||
JS_FindClassIdByName(JSXDRState *xdr, const char *name);
|
||||
|
||||
JS_PUBLIC_API(JSClass *)
|
||||
extern JS_PUBLIC_API(JSClass *)
|
||||
JS_FindClassById(JSXDRState *xdr, uint32 id);
|
||||
|
||||
/* Magic values */
|
||||
|
Loading…
x
Reference in New Issue
Block a user