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.
| 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 | |
| 207 | void ckpt_device_seal(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs) |
no test coverage detected