fix •ns.Keys on namespaces with unexported fields
This commit is contained in:
parent
7013a9edf9
commit
70fec7eb1e
@ -1114,8 +1114,14 @@ B nKeys_c1(B t, B x) {
|
|||||||
if (!isNsp(x)) thrM("•ns.Keys: 𝕩 must be a namespace");
|
if (!isNsp(x)) thrM("•ns.Keys: 𝕩 must be a namespace");
|
||||||
NSDesc* desc = c(NS,x)->desc;
|
NSDesc* desc = c(NS,x)->desc;
|
||||||
ux am = desc->varAm;
|
ux am = desc->varAm;
|
||||||
HArr_p r = m_harr0v(am);
|
ux eam = 0;
|
||||||
for (ux i = 0; i < am; i++) r.a[i] = incG(gid2str(desc->expGIDs[i]));
|
PLAINLOOP for (ux i = 0; i < am; i++) if (desc->expGIDs[i]!=-1) eam++;
|
||||||
|
HArr_p r = m_harr0v(eam);
|
||||||
|
ux ri = 0;
|
||||||
|
for (ux i = 0; i < am; i++) {
|
||||||
|
i32 c = desc->expGIDs[i];
|
||||||
|
if (c!=-1) r.a[ri++] = incG(gid2str(c));
|
||||||
|
}
|
||||||
decG(x);
|
decG(x);
|
||||||
return r.b;
|
return r.b;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user