RE: ftdi.write_data doesn’t work with some python3 unicode strings

2015-10-20 Thread Michel Zou
From: xantare...@hotmail.com To: thomas.jaro...@intra2net.com; libftdi@developer.intra2net.com CC: cbrack...@n.io Subject: RE: ftdi.write_data doesn’t work with some python3 unicode strings Date: Sat, 17 Oct 2015 10:16:23 + > From: thomas.jaro...@intra2net.com > To: libftdi@developer.in

RE: ftdi.write_data doesn’t work with some python3 unicode strings

2015-10-27 Thread Michel Zou
Hi, Glad it worked, could you test with python 2 ? The method was not prepared for Python at all, and that length argument was not deduced from the object passed. M. Date: Mon, 26 Oct 2015 16:45:52 -0700 From: cbrack...@n.io To: libftdi@developer.intra2net.com CC: xantare...@hotmail.com Subject:

RE: ftdi.write_data doesn’t work with some python3 unicode strings

2015-10-30 Thread Michel Zou
Hi, Thomas, I think you can apply this patch even if Chris doesn't answer. M. From: xantare...@hotmail.com To: libftdi@developer.intra2net.com Subject: RE: ftdi.write_data doesn’t work with some python3 unicode strings Date: Tue, 27 Oct 2015 10:33:34 + Hi, Glad it worked, could you test wi

RE: ftdi.write_data doesn’t work with some python3 unicode strings

2015-11-05 Thread Michel Zou
Ok, We'll have to cast to (Py_ssize_t*) then: inline char * str2charp_size(PyObject* pyObj, int * size) { char * v_ = 0; #if PY_MAJOR_VERSION >= 3 PyBytes_AsStringAndSize(pyObj, &v_, (Py_ssize_t*)size); #else PyString_AsStringAndSize(pyObj, &v_, (Py_ssize_t*)size); #endif return v_; } >

Re: Outstanding patches for v1.5?

2019-10-01 Thread Michel Zou
Hi, I just have a cleanup patch here: diff --git a/python/ftdi1.i b/python/ftdi1.i index 8b179f9..db54867 100644 --- a/python/ftdi1.i +++ b/python/ftdi1.i @@ -43,6 +43,10 @@ char * str2charp_size(PyObject* pyObj, int * size) %rename("%(strip:[ftdi_])s") ""; +%ignore ftdi_usb_purge_rx_buffer; +

Re: Outstanding patches for v1.5?

2019-10-02 Thread Michel Zou
Yes, these are marked as deprecated, Maybe its reasonable to remove them from the Python bindings. xan From: Thomas Jarosch Sent: Wednesday, October 2, 2019 7:32 AM To: libftdi@developer.intra2net.com Subject: Re: Outstanding patches for v1.5? Hi Xan, You wrote