Improve bytes/unicode distinction for reading modules from bitcode & assembly

This commit is contained in:
Thomas Kluyver 2012-09-30 15:07:51 +01:00 committed by Siu Kwan Lam
commit aba3e208d2
3 changed files with 17 additions and 2 deletions

View file

@ -163,7 +163,11 @@ _wLLVMGetModuleFromAssembly(PyObject *self, PyObject *args)
{
LLVMPY_TRY
const char * str;
#if (PY_MAJOR_VERSION >= 3)
if ( !PyArg_ParseTuple(args, "y", &str) ){
#else
if ( !PyArg_ParseTuple(args, "s", &str) ){
#endif
return NULL;
}