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

Method GetBytecode

NULLC/BinaryCache.cpp:62–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62const char* BinaryCache::GetBytecode(const char* path)
63{
64 unsigned int hash = GetStringHash(path);
65 if(hash == lastHash)
66 return lastBytecode;
67
68 unsigned int i = 0;
69 for(; i < cache.size(); i++)
70 {
71 if(hash == cache[i].nameHash)
72 break;
73 }
74 if(i != cache.size())
75 return cache[i].binary;
76
77 return NULL;
78}
79
80void BinaryCache::RemoveBytecode(const char* path)
81{

Callers

nothing calls this directly

Calls 2

GetStringHashFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected