зеркало из https://github.com/mozilla/gecko-dev.git
Bug 991027 - JS_snprintf: Don't allocate a temporary buffer when handling %hs format-specifier. r=Waldo.
--HG-- extra : rebase_source : d8c25f0b2e7ca9631d31d98fe457f08520be31a1
This commit is contained in:
Родитель
4231758a40
Коммит
d13bfd7aa3
|
@ -62,6 +62,7 @@ function indirectCallCannotGC(fullCaller, fullVariable)
|
|||
var ignoreClasses = {
|
||||
"JSTracer" : true,
|
||||
"JSStringFinalizer" : true,
|
||||
"SprintfState" : true,
|
||||
"SprintfStateStr" : true,
|
||||
"JSLocaleCallbacks" : true,
|
||||
"JSC::ExecutableAllocator" : true,
|
||||
|
|
626
js/src/jsprf.cpp
626
js/src/jsprf.cpp
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -57,23 +57,11 @@ extern JS_PUBLIC_API(void) JS_smprintf_free(char *mem);
|
|||
*/
|
||||
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
|
||||
** place into the output. "arg" is an opaque pointer used by the stuff
|
||||
** function to hold any state needed to do the storage of the output
|
||||
** data. The return value is a count of the number of characters fed to
|
||||
** the stuff function, or (uint32_t)-1 if an error occurs.
|
||||
*/
|
||||
typedef int (*JSStuffFunc)(void *arg, const char *s, uint32_t slen);
|
||||
|
||||
extern JS_PUBLIC_API(uint32_t) JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...);
|
||||
|
||||
/*
|
||||
** va_list forms of the above.
|
||||
*/
|
||||
extern JS_PUBLIC_API(uint32_t) JS_vsnprintf(char *out, uint32_t 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(uint32_t) JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap);
|
||||
|
||||
#endif /* jsprf_h */
|
||||
|
|
Загрузка…
Ссылка в новой задаче