diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-22 14:47:25 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-22 14:47:25 +0200 |
| commit | 93522effba2f200257141189de5925a23fca93b8 (patch) | |
| tree | 96d94b56017f1448832b5dc9e24bfcb31183f13c /python | |
| parent | 1fb55fe25b3dd5ef61dbc38290fbba2e233dc6b6 (diff) | |
| download | nissy-core-93522effba2f200257141189de5925a23fca93b8.tar.gz nissy-core-93522effba2f200257141189de5925a23fca93b8.zip | |
Remove compose from the public API
Diffstat (limited to '')
| -rw-r--r-- | python/nissy_module.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/python/nissy_module.c b/python/nissy_module.c index 58a5b67..5378c72 100644 --- a/python/nissy_module.c +++ b/python/nissy_module.c | |||
| @@ -61,32 +61,6 @@ long_result(long long result) | |||
| 61 | return PyLong_FromLong(result); | 61 | return PyLong_FromLong(result); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | |||
| 65 | PyDoc_STRVAR(compose_doc, | ||
| 66 | "compose(cube, permutation)\n" | ||
| 67 | "--\n\n" | ||
| 68 | "Apply 'permutation' on 'cube'.\n" | ||
| 69 | "\n" | ||
| 70 | "Parameters:\n" | ||
| 71 | " - cube: a cube\n" | ||
| 72 | " - permutation: another cube\n" | ||
| 73 | "\n" | ||
| 74 | "Returns: the resulting cube string\n" | ||
| 75 | ); | ||
| 76 | static PyObject * | ||
| 77 | compose(PyObject *self, PyObject *args) | ||
| 78 | { | ||
| 79 | long long err; | ||
| 80 | const char *cube, *permutation; | ||
| 81 | char result[NISSY_SIZE_CUBE]; | ||
| 82 | |||
| 83 | if (!PyArg_ParseTuple(args, "ss", &cube, &permutation)) | ||
| 84 | return NULL; | ||
| 85 | |||
| 86 | err = nissy_compose(cube, permutation, result); | ||
| 87 | return string_result(err, result); | ||
| 88 | } | ||
| 89 | |||
| 90 | PyDoc_STRVAR(inverse_doc, | 64 | PyDoc_STRVAR(inverse_doc, |
| 91 | "inverse(cube)\n" | 65 | "inverse(cube)\n" |
| 92 | "--\n\n" | 66 | "--\n\n" |
| @@ -368,7 +342,6 @@ countmoves(PyObject *self, PyObject *args) | |||
| 368 | } | 342 | } |
| 369 | 343 | ||
| 370 | static PyMethodDef nissy_methods[] = { | 344 | static PyMethodDef nissy_methods[] = { |
| 371 | { "compose", compose, METH_VARARGS, compose_doc }, | ||
| 372 | { "inverse", inverse, METH_VARARGS, inverse_doc }, | 345 | { "inverse", inverse, METH_VARARGS, inverse_doc }, |
| 373 | { "applymoves", applymoves, METH_VARARGS, applymoves_doc }, | 346 | { "applymoves", applymoves, METH_VARARGS, applymoves_doc }, |
| 374 | { "applytrans", applytrans, METH_VARARGS, applytrans_doc }, | 347 | { "applytrans", applytrans, METH_VARARGS, applytrans_doc }, |
