MCPcopy Create free account
hub / github.com/WheretIB/nullc / IsCoroutineReset

Method IsCoroutineReset

NULLC/StdLib.cpp:924–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924int NULLC::IsCoroutineReset(NULLCRef f)
925{
926 if(linker->exTypes[f.typeID].subCat != ExternTypeInfo::CAT_FUNCTION)
927 {
928 nullcThrowError("Argument is not a function");
929 return 0;
930 }
931 NULLCFuncPtr *fPtr = (NULLCFuncPtr*)f.ptr;
932 if(linker->exFunctions[fPtr->id].funcCat != ExternFuncInfo::COROUTINE)
933 {
934 nullcThrowError("Function is not a coroutine");
935 return 0;
936 }
937 return !**(int**)fPtr->context;
938}
939
940void NULLC::AssertCoroutine(NULLCRef f)
941{

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.70

Tested by

no test coverage detected