From d6555cadb7015d407a2a17538d8a1ccd073a41e6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 4 Jun 2005 03:35:38 +0000 Subject: r7262: Add a length property to ARGV array. (This used to be commit 4b775c619b7abed52d158ab70505320753a0c9cb) --- source4/scripting/ejs/smbscript.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4') diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c index 43a9377143..4bde40a955 100644 --- a/source4/scripting/ejs/smbscript.c +++ b/source4/scripting/ejs/smbscript.c @@ -78,6 +78,7 @@ void ejs_exception(const char *reason) argv_list = str_list_add(argv_list, argv[i]); } v = mprList("ARGV", argv_list); + mprSetPropertyValue(&v, "length", mprCreateIntegerVar(argc - 2)); mprCreateProperty(ejsGetGlobalObject(eid), "ARGV", &v); /* load the script and advance past interpreter line*/ -- cgit