libftdi Archives

Subject: [PATCH] Add missing argument to Python read_data docstring

From: Kevin Zheng <kevinz5000@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 24 Jan 2018 18:31:27 -0800
Hi there,

I think the docstring for the Python read_data wrapper is missing an
argument. Is this patch correct?

---
 python/ftdi1.i | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/ftdi1.i b/python/ftdi1.i
index 93793f8..4f4c522 100644
--- a/python/ftdi1.i
+++ b/python/ftdi1.i
@@ -86,7 +86,7 @@ inline char * str2charp_size(PyObject* pyObj, int * size)
 %clear int mnf_len, int desc_len, int product_len, int serial_len;
  %define ftdi_read_data_docstring
-"read_data(context) -> (return_code, buf)"
+"read_data(context, len) -> (return_code, buf)"
 %enddef
 %feature("autodoc", ftdi_read_data_docstring) ftdi_read_data;
 %typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 =
PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
-- 
2.16.0

-- 
Kevin Zheng
kevinz5000@xxxxxxxxx | kevinz@xxxxxxxxxxxx | PGP: 0xC22E1090

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread