summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-06-04 03:32:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:33 -0500
commitb1243510793cd135f1464dcfeec0b7e88999d1a0 (patch)
tree960539c5792f72d5354cb03abc8b10a9f011dc8b /testprogs
parent6ade5fc245a6f56b991b1b66742509270d65479d (diff)
downloadsamba-b1243510793cd135f1464dcfeec0b7e88999d1a0.tar.gz
samba-b1243510793cd135f1464dcfeec0b7e88999d1a0.tar.bz2
samba-b1243510793cd135f1464dcfeec0b7e88999d1a0.zip
r7261: Pass by reference is done in js via MPR_TYPE_OBJECT. Update argument
parsing and example for resolveName(). (This used to be commit 1a4a54931733ebfa743401a184fe460c044427b4)
Diffstat (limited to 'testprogs')
-rw-r--r--testprogs/ejs/resolveName.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/testprogs/ejs/resolveName.js b/testprogs/ejs/resolveName.js
index c2d06b5c74..1619b69d69 100644
--- a/testprogs/ejs/resolveName.js
+++ b/testprogs/ejs/resolveName.js
@@ -2,11 +2,12 @@
Demonstrate use of resolveName() js function
*/
-var result;
-res = resolveName(result, "frogurt");
+var result = new Object();
-if (!res.is_ok) {
- println(res.errstr);
+res = resolveName(result, ARGV[0]);
+
+if (res.is_ok) {
+ println(result.value);
} else {
- println(result);
+ println(res.errstr);
}