MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / convertToOwnedCString

Function convertToOwnedCString

src/c_api/helpers.cpp:71–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71char* convertToOwnedCString(const std::string& str) {
72 size_t src_len = str.size();
73 auto* c_str = (char*)malloc(sizeof(char) * (src_len + 1));
74 memcpy(c_str, str.c_str(), src_len);
75 c_str[src_len] = '\0';
76 return c_str;
77}
78
79char* lbug_get_last_error() {
80 return takeLastCAPIErrorMessage();

Callers 15

lbug_get_versionFunction · 0.85
lbug_int128_t_to_stringFunction · 0.85
lbug_value_get_stringFunction · 0.85
lbug_value_get_uuidFunction · 0.85
lbug_value_to_stringFunction · 0.85
lbug_node_val_to_stringFunction · 0.85
lbug_rel_val_to_stringFunction · 0.85
lbug_date_to_stringFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected