MCPcopy Create free account
hub / github.com/argotorg/solidity / takeOverAllocation

Function takeOverAllocation

libsolc/libsolc.cpp:53–64  ·  view source on GitHub ↗

Find the equivalent to @p _data in the list of allocations of solidity_alloc(), removes it from the list and returns its value. If any invalid argument is being passed, it is considered a programming error on the caller-side and hence, will call abort() then.

Source from the content-addressed store, hash-verified

51/// If any invalid argument is being passed, it is considered a programming error
52/// on the caller-side and hence, will call abort() then.
53std::string takeOverAllocation(char const* _data)
54{
55 for (auto iter = begin(solidityAllocations); iter != end(solidityAllocations); ++iter)
56 if (iter->data() == _data)
57 {
58 std::string chunk = std::move(*iter);
59 solidityAllocations.erase(iter);
60 return chunk;
61 }
62
63 abort();
64}
65
66/// Resizes a std::string to the proper length based on the occurrence of a zero terminator.
67void truncateCString(std::string& _data)

Callers 2

wrapReadCallbackFunction · 0.85
solidity_freeFunction · 0.85

Calls 2

eraseMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected