PyAPI: add PyC_Err_SetString_Prefix for internal use
This commit is contained in:
@@ -455,6 +455,11 @@ PyObject *PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *for
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PyObject *PyC_Err_SetString_Prefix(PyObject *exception_type_prefix, const char *str)
|
||||||
|
{
|
||||||
|
return PyC_Err_Format_Prefix(exception_type_prefix, "%s", str);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use for Python callbacks run directly from C,
|
* Use for Python callbacks run directly from C,
|
||||||
* when we can't use normal methods of raising exceptions.
|
* when we can't use normal methods of raising exceptions.
|
||||||
|
@@ -38,7 +38,10 @@ PyObject *PyC_ExceptionBuffer(void);
|
|||||||
PyObject *PyC_ExceptionBuffer_Simple(void);
|
PyObject *PyC_ExceptionBuffer_Simple(void);
|
||||||
PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...);
|
PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...);
|
||||||
PyObject *PyC_FrozenSetFromStrings(const char **strings);
|
PyObject *PyC_FrozenSetFromStrings(const char **strings);
|
||||||
|
|
||||||
PyObject *PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...);
|
PyObject *PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...);
|
||||||
|
PyObject *PyC_Err_SetString_Prefix(PyObject *exception_type_prefix, const char *str);
|
||||||
|
|
||||||
void PyC_Err_PrintWithFunc(PyObject *py_func);
|
void PyC_Err_PrintWithFunc(PyObject *py_func);
|
||||||
|
|
||||||
void PyC_FileAndNum(const char **filename, int *lineno);
|
void PyC_FileAndNum(const char **filename, int *lineno);
|
||||||
|
Reference in New Issue
Block a user