mirror of
https://github.com/QingdaoU/Judger.git
synced 2024-12-28 16:01:41 +00:00
fix format string
This commit is contained in:
parent
495a58b129
commit
8bd85224df
4
judger.c
4
judger.c
@ -75,7 +75,7 @@ static PyObject *judger_run(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
|
||||
// printf("%s %s %s %d %d", config.path, config.in_file, config.out_file, config.max_cpu_time, config.max_memory);
|
||||
run(&config, &result);
|
||||
return Py_BuildValue("{s: i, s:l, s:i, s:i, s:i, s:i}",
|
||||
return Py_BuildValue("{s:i, s:l, s:i, s:i, s:i, s:i}",
|
||||
"cpu_time", result.cpu_time, "memory", result.memory, "real_time", result.real_time, "signal",
|
||||
result.signal, "flag", result.flag, "error", result.error);
|
||||
|
||||
@ -88,7 +88,7 @@ static PyMethodDef judger_methods[] = {
|
||||
};
|
||||
|
||||
|
||||
PyMODINIT_FUNC initjudger() {
|
||||
PyMODINIT_FUNC initjudger(void) {
|
||||
PyObject *module = Py_InitModule3("judger", judger_methods, NULL);
|
||||
error = PyErr_NewException("judger.error", NULL, NULL);
|
||||
Py_INCREF(error);
|
||||
|
Loading…
Reference in New Issue
Block a user