Skip to content
Snippets Groups Projects
Commit 924f2f0c authored by rswindell's avatar rswindell
Browse files

New properties for library and directory numbers.

parent 18375b5b
Branches
Tags
No related merge requests found
......@@ -94,6 +94,10 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if((libobj=JS_NewObject(cx, &js_file_area_class, NULL, NULL))==NULL)
return(NULL);
val=INT_TO_JSVAL(l);
if(!JS_SetProperty(cx, libobj, "number", &val))
return(NULL);
val=STRING_TO_JSVAL(JS_NewStringCopyZ(cx, cfg->lib[l]->sname));
if(!JS_SetProperty(cx, libobj, "name", &val))
return(NULL);
......@@ -125,6 +129,10 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if((dirobj=JS_NewObject(cx, &js_file_area_class, NULL, NULL))==NULL)
return(NULL);
val=INT_TO_JSVAL(d);
if(!JS_SetProperty(cx, dirobj, "number", &val))
return(NULL);
val=STRING_TO_JSVAL(JS_NewStringCopyZ(cx, cfg->dir[d]->code));
if(!JS_SetProperty(cx, dirobj, "code", &val))
return(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment