(Not part of Communicator build.)
Add implementation version API call. git-svn-id: svn://10.0.0.236/trunk@4175 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -150,6 +150,7 @@ out:
|
||||
static int
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s\n", JS_GetImplementationVersion());
|
||||
fprintf(stderr, "usage: js [-v version] [-f scriptfile] [scriptfile] [scriptarg...]\n");
|
||||
return 2;
|
||||
}
|
||||
@@ -928,6 +929,7 @@ Help(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
JSString *str;
|
||||
const char *bytes;
|
||||
|
||||
printf("%s\n", JS_GetImplementationVersion());
|
||||
if (argc == 0) {
|
||||
ShowHelpHeader();
|
||||
for (i = 0; shell_functions[i].name; i++)
|
||||
|
||||
@@ -593,6 +593,13 @@ JS_SetVersion(JSContext *cx, JSVersion version)
|
||||
return oldVersion;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(const char *)
|
||||
JS_GetImplementationVersion()
|
||||
{
|
||||
return "JavaScript-C 1.3 1998 06 30";
|
||||
}
|
||||
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetGlobalObject(JSContext *cx)
|
||||
{
|
||||
|
||||
@@ -287,6 +287,9 @@ JS_GetVersion(JSContext *cx);
|
||||
extern JS_PUBLIC_API(JSVersion)
|
||||
JS_SetVersion(JSContext *cx, JSVersion version);
|
||||
|
||||
extern JS_PUBLIC_API(const char *)
|
||||
JS_GetImplementationVersion();
|
||||
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetGlobalObject(JSContext *cx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user