1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-23 11:33:16 +03:00

r11458: fixed our ejs smbscript interfaces to use arrays where appropriate. In

js arrays are a special type of object where the length property is
automatic, and cannot be modified manually. Our code was manually
setting length, which made it abort when someone passed in a real ejs
array. To fix this we need to create real arrays instead of objects,
and remove the code that manually sets the length
This commit is contained in:
Andrew Tridgell
2005-11-02 01:04:00 +00:00
committed by Gerald (Jerry) Carter
parent 46e91f269c
commit ebdd1393fd
8 changed files with 48 additions and 42 deletions

View File

@@ -88,7 +88,7 @@ static int ejs_blobToArray(MprVarHandle eid, int argc, struct MprVar **argv)
goto failed;
}
array = mprObject("array");
array = mprArray("array");
for (i=0;i<blob->length;i++) {
mprAddArray(&array, i, mprCreateNumberVar(blob->data[i]));