C/Python API: Add PyC_RunString_AsIntPtr

Utility to get an int or pointer from a Python expression.
This commit is contained in:
2018-08-31 14:21:32 +10:00
parent 18d135d05c
commit 98800aa4e0
4 changed files with 73 additions and 1 deletions

View File

@@ -102,6 +102,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_AsIntPtr(const char *expr, const char *filename, intptr_t *r_value);
bool PyC_RunString_AsString(const char *expr, const char *filename, char **r_value);
int PyC_ParseBool(PyObject *o, void *p);