PyAPI: add utility functions get the size from an evaluated string

Allows including null bytes in the resulting string.
This commit is contained in:
2019-12-11 18:04:44 +11:00
parent f52d60a21d
commit 576d385ddb
4 changed files with 41 additions and 7 deletions

View File

@@ -85,6 +85,12 @@ bool BPY_execute_string_as_intptr(struct bContext *C,
const char *expr,
const bool verbose,
intptr_t *r_value);
bool BPY_execute_string_as_string_and_size(struct bContext *C,
const char *imports[],
const char *expr,
const bool verbose,
char **r_value,
size_t *r_value_size);
bool BPY_execute_string_as_string(struct bContext *C,
const char *imports[],
const char *expr,