src/convert.c
/**
 * This is only called if 'o' is not bytes
 */
This is only called if 'o' is not bytes
This is only called if ' o ' is not bytes
static PyObject*
convert_to_bytesobj(PyObject *o)
{
    PyObject *bytesobj = NULL;
    pycbc_assert(!PyBytes_Check(o));
    if (PyUnicode_Check(o)) {
        bytesobj = PyUnicode_AsUTF8String(o);
    }
    if (!bytesobj) {
        PYCBC_EXC_WRAP_OBJ(PYCBC_EXC_ENCODING,
                           0, "Couldn't convert object to bytes",
                           o);
    }
    return bytesobj;
}
static PyObject * convert_to_bytesobj ( PyObject * o ) { PyObject * bytesobj = NULL ; pycbc_assert ( ! PyBytes_Check ( o ) ) ; if ( PyUnicode_Check ( o ) ) { bytesobj = PyUnicode_AsUTF8String ( o ) ; } if ( ! bytesobj ) { PYCBC_EXC_WRAP_OBJ ( PYCBC_EXC_ENCODING , 0 , " " , o ) ; } return bytesobj ; }
This is only called if 'o' is not bytes
This is only called if ' o ' is not bytes