fix error exception name which casued segment fault

This commit is contained in:
virusdefender 2016-01-20 15:27:12 +08:00
parent 90856dc24f
commit c2ff40af99

View File

@ -90,7 +90,7 @@ static PyMethodDef judger_methods[] = {
PyMODINIT_FUNC initjudger(void) { PyMODINIT_FUNC initjudger(void) {
PyObject *module = Py_InitModule3("judger", judger_methods, NULL); PyObject *module = Py_InitModule3("judger", judger_methods, NULL);
error = PyErr_NewException("JudgerError", NULL, NULL); error = PyErr_NewException("judger.error", NULL, NULL);
Py_INCREF(error); Py_INCREF(error);
PyModule_AddObject(module, "error", error); PyModule_AddObject(module, "error", error);
} }