Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adisbladis/36f158061a6c64f63a92a6ad731ece86 to your computer and use it in GitHub Desktop.
Save adisbladis/36f158061a6c64f63a92a6ad731ece86 to your computer and use it in GitHub Desktop.
Python-netfilterqueue patch
From b12c0807b45ab77273323eabe5ca1ee37c9672a9 Mon Sep 17 00:00:00 2001
From: adisbladis <adis@blad.is>
Date: Sun, 14 May 2017 12:31:41 +0800
Subject: [PATCH] #define PyString_FromStringAndSize ->
PyUnicode_FromStringAndSize on Python 3.
---
netfilterqueue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/netfilterqueue.c b/netfilterqueue.c
index 230d6dc..88a823f 100644
--- a/netfilterqueue.c
+++ b/netfilterqueue.c
@@ -266,6 +266,7 @@
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
+ #define PyString_FromStringAndSize PyUnicode_FromStringAndSize
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
--
2.13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment