From: Yegor Yefremov Date: Thu, 22 Aug 2019 13:47:06 +0000 (+0200) Subject: swig: improve indentation X-Git-Tag: v1.5rc1~21 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=e6478214f57dc20aeee7fbaa6b44af86f9bfb3fa swig: improve indentation Fixes -Wmisleading-indentation warnings. --- 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);