|
28 | 28 | non-cryptographic hash algorithm */ |
29 | 29 |
|
30 | 30 | #include <Python.h> |
31 | | -#include <string.h> |
32 | 31 |
|
33 | 32 | #include "xxhash.h" |
34 | 33 |
|
@@ -1005,7 +1004,7 @@ PYXXH32_get_digest_size(PYXXH32Object *self, void *closure) |
1005 | 1004 | static PyObject * |
1006 | 1005 | PYXXH32_get_name(PYXXH32Object *self, void *closure) |
1007 | 1006 | { |
1008 | | - return PyUnicode_FromStringAndSize("XXH32", strlen("XXH32")); |
| 1007 | + return PyUnicode_FromString("XXH32"); |
1009 | 1008 | } |
1010 | 1009 |
|
1011 | 1010 | static PyObject * |
@@ -1356,7 +1355,7 @@ PYXXH64_get_digest_size(PYXXH64Object *self, void *closure) |
1356 | 1355 | static PyObject * |
1357 | 1356 | PYXXH64_get_name(PYXXH64Object *self, void *closure) |
1358 | 1357 | { |
1359 | | - return PyUnicode_FromStringAndSize("XXH64", strlen("XXH64")); |
| 1358 | + return PyUnicode_FromString("XXH64"); |
1360 | 1359 | } |
1361 | 1360 |
|
1362 | 1361 | static PyObject * |
@@ -1714,7 +1713,7 @@ PYXXH3_64_get_digest_size(PYXXH3_64Object *self, void *closure) |
1714 | 1713 | static PyObject * |
1715 | 1714 | PYXXH3_64_get_name(PYXXH3_64Object *self, void *closure) |
1716 | 1715 | { |
1717 | | - return PyUnicode_FromStringAndSize("XXH3_64", strlen("XXH3_64")); |
| 1716 | + return PyUnicode_FromString("XXH3_64"); |
1718 | 1717 | } |
1719 | 1718 |
|
1720 | 1719 | static PyObject * |
@@ -2091,7 +2090,7 @@ PYXXH3_128_get_digest_size(PYXXH3_128Object *self, void *closure) |
2091 | 2090 | static PyObject * |
2092 | 2091 | PYXXH3_128_get_name(PYXXH3_128Object *self, void *closure) |
2093 | 2092 | { |
2094 | | - return PyUnicode_FromStringAndSize("XXH3_128", strlen("XXH3_128")); |
| 2093 | + return PyUnicode_FromString("XXH3_128"); |
2095 | 2094 | } |
2096 | 2095 |
|
2097 | 2096 | static PyObject * |
|
0 commit comments