PyAPI: add BPY_execute_string_as_string

Utility to execute a string and get the resulting string,
matching BPY_execute_string_as_number.

Not used just yet but generally useful function.
This commit is contained in:
2017-03-18 12:19:03 +11:00
parent d863b5182e
commit e392bb4937
4 changed files with 75 additions and 0 deletions

View File

@@ -81,6 +81,7 @@ int PyC_FlagSet_ToBitfield(PyC_FlagSet *items, PyObject *value, int *r_val
PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag);
bool PyC_RunString_AsNumber(const char *expr, const char *filename, double *r_value);
bool PyC_RunString_AsString(const char *expr, const char *filename, char **r_value);
int PyC_ParseBool(PyObject *o, void *p);