MCPcopy Create free account
hub / github.com/Snapchat/Valdi / setAsError

Function setAsError

libs/image_toolbox/src/image_toolbox_c/image_toolbox.cpp:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6extern "C" {
7
8static void setAsError(char** error, const Valdi::StringBox& errorMessage) {
9 char* allocatedError = reinterpret_cast<char*>(malloc(sizeof(char) * (errorMessage.length() + 1)));
10 std::memcpy(allocatedError, errorMessage.getCStr(), errorMessage.length());
11 allocatedError[errorMessage.length()] = 0;
12
13 *error = allocatedError;
14}
15
16image_toolbox_size imagetoolbox_get_size(const char* input_path, char** error) {
17 image_toolbox_size size;

Callers 2

imagetoolbox_get_sizeFunction · 0.85
imagetoolbox_convertFunction · 0.85

Calls 2

lengthMethod · 0.45
getCStrMethod · 0.45

Tested by

no test coverage detected