MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / handOver

Function handOver

common/script/seal_api.cpp:195–204  ·  view source on GitHub ↗

Hands a run-scoped copy of `size` bytes to the script through an out parameter pair, then wipes the working buffer. False = out of memory.

Source from the content-addressed store, hash-verified

193 // Hands a run-scoped copy of `size` bytes to the script through an out
194 // parameter pair, then wipes the working buffer. False = out of memory.
195 bool handOver(const uint8_t* data, size_t size, char** out, int* outSize)
196 {
197 void* copy = ScriptHeap::get().dupString(std::string((const char*)data, size));
198 if (copy == nullptr) {
199 return false;
200 }
201 *out = (char*)copy;
202 *outSize = (int)size;
203 return true;
204 }
205}
206
207void ckpt_device_seal(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs)

Callers 2

ckpt_device_sealFunction · 0.85
ckpt_device_unsealFunction · 0.85

Calls 3

getFunction · 0.85
stringFunction · 0.85
dupStringMethod · 0.80

Tested by

no test coverage detected