From ec3fa46799308c412ba2873ce317ecae6e7ce39c Mon Sep 17 00:00:00 2001
From: dkg <dkg@fifthhorseman.net>
Date: Wed, 20 Feb 2019 19:38:05 -0500
Subject: [PATCH] Correctly document that body callback chunks are in bytes
 (#28)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

https://github.com/sdgathman/pymilter/issues/12 says "Obviously, body
and replacebody are bytes" and milter_wrap_body in miltermodule.c
says:

   arglist = Py_BuildValue("(Oy#)", c, bodyp, bodylen);
…

So pymilter should sport the correct documentation.
---
 miltermodule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/miltermodule.c b/miltermodule.c
index 947dc8d..069c316 100644
--- a/miltermodule.c
+++ b/miltermodule.c
@@ -379,7 +379,7 @@ Sets the Python function invoked for each body chunk. There may\n\
 be multiple body chunks passed to the filter. End-of-lines are\n\
 represented as received from SMTP (normally Carriage-Return/Line-Feed).\n\
 Function takes args (ctx, chunk) -> int\n\
-chunk -> String - body data";
+chunk -> bytes - body data";
 
 static PyObject *
 milter_set_body_callback(PyObject *self, PyObject *args) {
-- 
GitLab