libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.4-22-ge647821

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 1 Oct 2019 15:24:34 +0200 (CEST)
The branch, master has been updated
       via  e6478214f57dc20aeee7fbaa6b44af86f9bfb3fa (commit)
      from  c7db7f11b21d5efe6f63f1a9b5f45c99ed6c1a5c (commit)


- Log -----------------------------------------------------------------
commit e6478214f57dc20aeee7fbaa6b44af86f9bfb3fa
Author: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
Date:   Thu Aug 22 15:47:06 2019 +0200

    swig: improve indentation
    
    Fixes -Wmisleading-indentation warnings.

-----------------------------------------------------------------------

Summary of changes:
 python/ftdi1.i |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/python/ftdi1.i b/python/ftdi1.i
index f397f84..8b179f9 100644
--- a/python/ftdi1.i
+++ b/python/ftdi1.i
@@ -92,7 +92,12 @@ char * str2charp_size(PyObject* pyObj, int * size)
 %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)); %}
-%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result 
= SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2)); free($1); %}
+%typemap(argout) (unsigned char *buf, int size) %{
+        if(result<0)
+                $2=0;
+        $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2));
+        free($1);
+%}
     int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int 
size);
 %clear (unsigned char *buf, int size);
 
@@ -132,7 +137,12 @@ char * str2charp_size(PyObject* pyObj, int * size)
 %clear int* value;
 
 %typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = 
PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
-%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result 
= SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2)); free($1); %}
+%typemap(argout) (unsigned char *buf, int size) %{
+        if(result<0)
+                $2=0;
+        $result = SWIG_Python_AppendOutput($result, charp2str((char*)$1, $2));
+        free($1);
+%}
     int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, 
int size);
 %clear (unsigned char *buf, int size);
 


hooks/post-receive
-- 
A library to talk to FTDI chips

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

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.4-22-ge647821, libftdi-git <=