aboutsummaryrefslogtreecommitdiff
path: root/python/nissy_module.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--python/nissy_module.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/python/nissy_module.c b/python/nissy_module.c
index 6511382..29facc4 100644
--- a/python/nissy_module.c
+++ b/python/nissy_module.c
@@ -315,7 +315,6 @@ PyDoc_STRVAR(solve_doc,
315"Parameters:\n" 315"Parameters:\n"
316" - cube: a cube in B32 format\n" 316" - cube: a cube in B32 format\n"
317" - solver: the solver to use\n" 317" - solver: the solver to use\n"
318" - options: extra options for the chosen solver\n"
319" - minmoves: the minimum number of moves to use\n" 318" - minmoves: the minimum number of moves to use\n"
320" - maxmoves: the maximum number of moves to use\n" 319" - maxmoves: the maximum number of moves to use\n"
321" - maxsolution: the maximum number of solutions to return\n" 320" - maxsolution: the maximum number of solutions to return\n"
@@ -332,21 +331,20 @@ solve(PyObject *self, PyObject *args)
332 long long result; 331 long long result;
333 unsigned nissflag, minmoves, maxmoves, maxsolutions; 332 unsigned nissflag, minmoves, maxmoves, maxsolutions;
334 int optimal, i, j, k, threads; 333 int optimal, i, j, k, threads;
335 const char *cube, *solver, *options; 334 const char *cube, *solver;
336 char solutions[MAX_SOLUTIONS_SIZE]; 335 char solutions[MAX_SOLUTIONS_SIZE];
337 long long stats[NISSY_SIZE_SOLVE_STATS]; 336 long long stats[NISSY_SIZE_SOLVE_STATS];
338 PyByteArrayObject *data; 337 PyByteArrayObject *data;
339 PyObject *list, *item; 338 PyObject *list, *item;
340 339
341 if (!PyArg_ParseTuple(args, "sssIIIIiiY", &cube, &solver, &options, 340 if (!PyArg_ParseTuple(args, "ssIIIIiiY", &cube, &solver, &nissflag,
342 &nissflag, &minmoves, &maxmoves, &maxsolutions, &optimal, 341 &minmoves, &maxmoves, &maxsolutions, &optimal, &threads, &data))
343 &threads, &data))
344 return NULL; 342 return NULL;
345 343
346 Py_BEGIN_ALLOW_THREADS 344 Py_BEGIN_ALLOW_THREADS
347 result = nissy_solve(cube, solver, options, nissflag, minmoves, 345 result = nissy_solve(cube, solver, nissflag, minmoves, maxmoves,
348 maxmoves, maxsolutions, optimal, threads, data->ob_alloc, 346 maxsolutions, optimal, threads, data->ob_alloc, data->ob_bytes,
349 data->ob_bytes, MAX_SOLUTIONS_SIZE, solutions, stats); 347 MAX_SOLUTIONS_SIZE, solutions, stats);
350 Py_END_ALLOW_THREADS 348 Py_END_ALLOW_THREADS
351 349
352 if(!check_error(result)) { 350 if(!check_error(result)) {

Generated with cgit - Back to sebastiano.tronto.net