summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-06-04 03:35:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:33 -0500
commitd6555cadb7015d407a2a17538d8a1ccd073a41e6 (patch)
treec76667cc83522ae6c5ccbc29526475e704d9ea38 /source4
parentb1243510793cd135f1464dcfeec0b7e88999d1a0 (diff)
downloadsamba-d6555cadb7015d407a2a17538d8a1ccd073a41e6.tar.gz
samba-d6555cadb7015d407a2a17538d8a1ccd073a41e6.tar.bz2
samba-d6555cadb7015d407a2a17538d8a1ccd073a41e6.zip
r7262: Add a length property to ARGV array.
(This used to be commit 4b775c619b7abed52d158ab70505320753a0c9cb)
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/ejs/smbscript.c1
1 files changed, 1 insertions, 0 deletions
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*/