diff options
Diffstat (limited to 'python/nissy_module.c')
| -rw-r--r-- | python/nissy_module.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/python/nissy_module.c b/python/nissy_module.c index 5f5c0c4..3e5ea08 100644 --- a/python/nissy_module.c +++ b/python/nissy_module.c | |||
| @@ -239,21 +239,23 @@ PyDoc_STRVAR(checkdata_doc, | |||
| 239 | "Checks if the data (pruning table) given is valid or not\n" | 239 | "Checks if the data (pruning table) given is valid or not\n" |
| 240 | "\n" | 240 | "\n" |
| 241 | "Parameters:\n" | 241 | "Parameters:\n" |
| 242 | " - data: a bytearray containing the data for a solver" | 242 | " - solver: the name of the solver\n" |
| 243 | " - data: a bytearray containing the data for a solver\n" | ||
| 243 | "\n" | 244 | "\n" |
| 244 | "Returns: true if the data is valid, false otherwise\n" | 245 | "Returns: true if the data is valid, false otherwise\n" |
| 245 | ); | 246 | ); |
| 246 | PyObject * | 247 | PyObject * |
| 247 | checkdata(PyObject *self, PyObject *args) | 248 | checkdata(PyObject *self, PyObject *args) |
| 248 | { | 249 | { |
| 250 | const char *solver; | ||
| 249 | long long result; | 251 | long long result; |
| 250 | PyByteArrayObject *data; | 252 | PyByteArrayObject *data; |
| 251 | 253 | ||
| 252 | if (!PyArg_ParseTuple(args, "Y", &data)) | 254 | if (!PyArg_ParseTuple(args, "sY", &solver, &data)) |
| 253 | return NULL; | 255 | return NULL; |
| 254 | 256 | ||
| 255 | result = nissy_checkdata( | 257 | result = nissy_checkdata( |
| 256 | data->ob_alloc, (unsigned char *)data->ob_bytes); | 258 | solver, data->ob_alloc, (unsigned char *)data->ob_bytes); |
| 257 | 259 | ||
| 258 | if (check_error(result)) | 260 | if (check_error(result)) |
| 259 | return Py_True; | 261 | return Py_True; |
