MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxCheckWeakMapKey

Function fxCheckWeakMapKey

xs/sources/xsMapSet.c:1410–1419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1408}
1409
1410txSlot* fxCheckWeakMapKey(txMachine* the, txBoolean mutable)
1411{
1412 if (mxArgc > 0) {
1413 txSlot* slot = fxCanBeHeldWeakly(the, mxArgv(0));
1414 if (slot && mutable && (slot->flag & XS_MARK_FLAG))
1415 mxTypeError("key: read-only");
1416 return slot;
1417 }
1418 return C_NULL;
1419}
1420
1421txSlot* fxNewWeakMapInstance(txMachine* the)
1422{

Calls 1

fxCanBeHeldWeaklyFunction · 0.85

Tested by

no test coverage detected