mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[mujs] No js_dup
This commit is contained in:
parent
716136efd9
commit
98120c7960
@ -75,6 +75,8 @@ mjs_attributes_set_items(js_State *J, void *node)
|
||||
auto end = al->end();
|
||||
int i = 0;
|
||||
|
||||
js_newarray(J);
|
||||
|
||||
for (;it != end; ++it, ++i) {
|
||||
xmlpp::Attribute *attr = *it;
|
||||
|
||||
@ -83,15 +85,14 @@ mjs_attributes_set_items(js_State *J, void *node)
|
||||
}
|
||||
// TODO Check it
|
||||
mjs_push_attr(J, attr);
|
||||
js_dup(J);
|
||||
js_setindex(J, -2, i);
|
||||
|
||||
xmlpp::ustring name = attr->get_name();
|
||||
|
||||
if (name != "" && name != "item" && name != "namedItem") {
|
||||
mjs_push_attr(J, attr);
|
||||
js_setproperty(J, -2, name.c_str());
|
||||
}
|
||||
js_pop(J, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user