From 5304fe4433c610fa4a4a11fe5e90c96fdf99635d Mon Sep 17 00:00:00 2001 From: virusdefender Date: Tue, 22 Mar 2016 14:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=80=E5=A4=A7=E5=86=85?= =?UTF-8?q?=E5=AD=98=E9=99=90=E5=88=B6=E6=95=B0=E5=AD=97=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=BA=A2=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将int改为了long --- judger.c | 2 +- runner.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/judger.c b/judger.c index 5794517..4e142d0 100644 --- a/judger.c +++ b/judger.c @@ -14,7 +14,7 @@ static PyObject *judger_run(PyObject *self, PyObject *args, PyObject *kwargs) { "max_memory", "args", "env", "use_sandbox", "use_nobody", NULL}; config.path = config.in_file = config.out_file = NULL; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sssii|OOOO", kwargs_list, &(config.path), &(config.in_file), + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sssil|OOOO", kwargs_list, &(config.path), &(config.in_file), &(config.out_file), &(config.max_cpu_time), &(config.max_memory), &args_list, &env_list, &use_sandbox, &use_nobody)) { PyErr_SetString(PyExc_ValueError, "Invalid args and kwargs"); diff --git a/runner.h b/runner.h index 0341352..7fd0822 100644 --- a/runner.h +++ b/runner.h @@ -36,7 +36,7 @@ struct result { struct config { int max_cpu_time; - int max_memory; + long max_memory; char *path; char *in_file; char *out_file;