Skip to content
Snippets Groups Projects
Commit 9544742b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Elaborate in JSDOC string for html_decode()

Add comment/question about the use of JS_SetReservedSlot(), for Deuce
parent f1ebce73
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -5118,7 +5118,7 @@ static jsSyncMethodSpec js_global_functions[] = { ...@@ -5118,7 +5118,7 @@ static jsSyncMethodSpec js_global_functions[] = {
,311 ,311
}, },
{"html_decode", js_html_decode, 1, JSTYPE_STRING, JSDOCSTR("html") {"html_decode", js_html_decode, 1, JSTYPE_STRING, JSDOCSTR("html")
,JSDOCSTR("Return a decoded HTML-encoded text string") ,JSDOCSTR("Return a decoded HTML-encoded text string, translating HTML character entities into CP437 character equivalents")
,311 ,311
}, },
{"word_wrap", js_word_wrap, 1, JSTYPE_STRING, JSDOCSTR("text [,line_length=79 [,orig_line_length=79 [,<i>bool</i> handle_quotes=true [,<i>bool</i> is_utf8=false]]]]") {"word_wrap", js_word_wrap, 1, JSTYPE_STRING, JSDOCSTR("text [,line_length=79 [,orig_line_length=79 [,<i>bool</i> handle_quotes=true [,<i>bool</i> is_utf8=false]]]]")
...@@ -5414,13 +5414,13 @@ BOOL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethodSpec* methods ...@@ -5414,13 +5414,13 @@ BOOL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethodSpec* methods
free(p); free(p);
return(FALSE); return(FALSE);
} }
// TODO: Deuce, what purpose does this ReservedSlot serve?
// Removing this had no observable negative impact <shrug>
if (!JS_SetReservedSlot(cx, *glob, 0, INT_TO_JSVAL(0))) { if (!JS_SetReservedSlot(cx, *glob, 0, INT_TO_JSVAL(0))) {
JS_RemoveObjectRoot(cx, glob); JS_RemoveObjectRoot(cx, glob);
free(p); free(p);
return(FALSE); return(FALSE);
} }
#ifdef BUILD_JSDOCS #ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,*glob js_DescribeSyncObject(cx,*glob
,"Top-level functions and properties (common to all servers, services, and <i>JSexec</i>)",310); ,"Top-level functions and properties (common to all servers, services, and <i>JSexec</i>)",310);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment