comparison python/pydc/pydc.c @ 49:d6670bd553dd

- comment cleanup
author Tassilo Philipp
date Fri, 13 Nov 2020 20:44:00 +0100
parents c21d1c2c84e1
children 03b6934cdd63
comparison
equal deleted inserted replaced
48:a2125195b052 49:d6670bd553dd
208 // w/o PyUnicode_AsUTF8(), which caches the UTF-8 representation, itself, create new ref we'll dec below 208 // w/o PyUnicode_AsUTF8(), which caches the UTF-8 representation, itself, create new ref we'll dec below
209 if((sig_obj = PyUnicode_AsEncodedString(so, "utf-8", "strict"))) // !new ref! 209 if((sig_obj = PyUnicode_AsEncodedString(so, "utf-8", "strict"))) // !new ref!
210 sig_ptr = PyBytes_AS_STRING(sig_obj); // Borrowed pointer 210 sig_ptr = PyBytes_AS_STRING(sig_obj); // Borrowed pointer
211 #endif 211 #endif
212 } else if ( DcPyString_Check(so) ) 212 } else if ( DcPyString_Check(so) )
213 sig_ptr = DcPyString_AsString(so); // @@@ test py 2 213 sig_ptr = DcPyString_AsString(so);
214 214
215 215
216 216
217 if (!sig_ptr) 217 if (!sig_ptr)
218 return PyErr_Format( PyExc_RuntimeError, "signature is NULL" ); 218 return PyErr_Format( PyExc_RuntimeError, "signature is NULL" );