summaryrefslogtreecommitdiff
path: root/dev-python/tlsh/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/tlsh/files')
-rw-r--r--dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch b/dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch
new file mode 100644
index 000000000000..56c4766bd711
--- /dev/null
+++ b/dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch
@@ -0,0 +1,25 @@
+Use PyVarObject_HEAD_INIT instead PyObject_HEAD_INIT
+
+--- a/tlshmodule.cpp
++++ b/tlshmodule.cpp
+@@ -59,7 +59,7 @@
+ #include <Python.h>
+ #include <new>
+ #include <bytesobject.h>
+-#include "tlsh.h"
++#include <tlsh/tlsh.h>
+
+ // to generate the "T1" hashes introduced in TLSH 4.0.0
+ // see 4.0.0 from 26/Mar/2020 at https://github.com/trendmicro/tlsh/blob/master/Change_History.md
+@@ -286,10 +286,7 @@ static PyGetSetDef Tlsh_getsetters[] = {
+ };
+
+ static PyTypeObject tlsh_TlshType = {
+- PyObject_HEAD_INIT(NULL)
+-#if PY_MAJOR_VERSION < 3
+- 0, /* ob_size */
+-#endif
++ PyVarObject_HEAD_INIT(NULL, 0)
+ "tlsh.Tlsh", /* tp_name */
+ sizeof(tlsh_TlshObject), /* tp_basicsize */
+ 0, /* tp_itemsize */