@@ -587,7 +587,7 @@ PYXXH32_get_digest_size(PYXXH32Object *self, void *closure)
587587static PyObject *
588588PYXXH32_get_name (PYXXH32Object * self , void * closure )
589589{
590- return PyUnicode_FromStringAndSize ("XXH32" , 5 );
590+ return PyUnicode_FromStringAndSize ("XXH32" , sizeof ( "XXH32" ) );
591591}
592592
593593static PyObject *
@@ -895,7 +895,7 @@ PYXXH64_get_digest_size(PYXXH64Object *self, void *closure)
895895static PyObject *
896896PYXXH64_get_name (PYXXH64Object * self , void * closure )
897897{
898- return PyUnicode_FromStringAndSize ("XXH64" , 5 );
898+ return PyUnicode_FromStringAndSize ("XXH64" , sizeof ( "XXH64" ) );
899899}
900900
901901static PyObject *
@@ -1204,7 +1204,7 @@ PYXXH3_64_get_digest_size(PYXXH3_64Object *self, void *closure)
12041204static PyObject *
12051205PYXXH3_64_get_name (PYXXH3_64Object * self , void * closure )
12061206{
1207- return PyUnicode_FromStringAndSize ("XXH3_64" , 7 );
1207+ return PyUnicode_FromStringAndSize ("XXH3_64" , sizeof ( "XXH3_64" ) );
12081208}
12091209
12101210static PyObject *
@@ -1349,7 +1349,8 @@ static PyObject *PYXXH3_128_new(PyTypeObject *type, PyObject *args, PyObject *kw
13491349 return NULL ;
13501350 }
13511351
1352- XXH3_64bits_reset_withSeed (self -> xxhash_state , 0 );
1352+ self -> seed = 0 ;
1353+ XXH3_128bits_reset_withSeed (self -> xxhash_state , 0 );
13531354
13541355 return (PyObject * )self ;
13551356}
@@ -1472,8 +1473,8 @@ static PyObject *PYXXH3_128_intdigest(PYXXH3_128Object *self)
14721473
14731474PyDoc_STRVAR (
14741475 PYXXH3_128_copy_doc ,
1475- "copy() -> xxh64 object\n\n"
1476- "Return a copy (``clone'') of the xxh64 object." );
1476+ "copy() -> xxh3_128 object\n\n"
1477+ "Return a copy (``clone'') of the xxh3_128 object." );
14771478
14781479static PyObject * PYXXH3_128_copy (PYXXH3_128Object * self )
14791480{
@@ -1528,7 +1529,7 @@ PYXXH3_128_get_digest_size(PYXXH3_128Object *self, void *closure)
15281529static PyObject *
15291530PYXXH3_128_get_name (PYXXH3_128Object * self , void * closure )
15301531{
1531- return PyUnicode_FromStringAndSize ("XXH3_64 " , 7 );
1532+ return PyUnicode_FromStringAndSize ("XXH3_128 " , sizeof ( "XXH3_128" ) );
15321533}
15331534
15341535static PyObject *
@@ -1553,7 +1554,7 @@ static PyGetSetDef PYXXH3_128_getseters[] = {
15531554 {
15541555 "name" ,
15551556 (getter )PYXXH3_128_get_name , NULL ,
1556- "Name. Always XXH3_64 ." ,
1557+ "Name. Always XXH3_128 ." ,
15571558 NULL
15581559 },
15591560 {
@@ -1582,7 +1583,7 @@ PyDoc_STRVAR(
15821583 "digest() -- return the current digest value\n"
15831584 "hexdigest() -- return the current digest as a string of hexadecimal digits\n"
15841585 "intdigest() -- return the current digest as an integer\n"
1585- "copy() -- return a copy of the current xxh64 object" );
1586+ "copy() -- return a copy of the current xxh3_128 object" );
15861587
15871588static PyTypeObject PYXXH3_128Type = {
15881589#if PY_MAJOR_VERSION >= 3
0 commit comments