From 62d87e063318cc4c842b1b2d8c184f48aeaf6659 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 19 May 2025 17:45:14 +0200 Subject: Refactored checkdata Relevant changes include: - Changed the signature of nissy_checkdata(). - Removed expected_distribution.h from tools; this data is now included in each solver's src/ code. - Removed distribution check for cocsep; may add back later. --- python/nissy_module.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'python/nissy_module.c') 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, "Checks if the data (pruning table) given is valid or not\n" "\n" "Parameters:\n" -" - data: a bytearray containing the data for a solver" +" - solver: the name of the solver\n" +" - data: a bytearray containing the data for a solver\n" "\n" "Returns: true if the data is valid, false otherwise\n" ); PyObject * checkdata(PyObject *self, PyObject *args) { + const char *solver; long long result; PyByteArrayObject *data; - if (!PyArg_ParseTuple(args, "Y", &data)) + if (!PyArg_ParseTuple(args, "sY", &solver, &data)) return NULL; result = nissy_checkdata( - data->ob_alloc, (unsigned char *)data->ob_bytes); + solver, data->ob_alloc, (unsigned char *)data->ob_bytes); if (check_error(result)) return Py_True; -- cgit v1.3