diff --git a/llvm/core.py b/llvm/core.py index 6ef2fad..6b1b0aa 100644 --- a/llvm/core.py +++ b/llvm/core.py @@ -351,7 +351,7 @@ class Module(llvm.Ownable, llvm.Cacheable): a module represented in bitcode. """ - if isinstance(fileobj_or_str, basestring): + if _util.isstring(fileobj_or_str): data = fileobj_or_str else: data = fileobj_or_str.read() @@ -373,7 +373,7 @@ class Module(llvm.Ownable, llvm.Cacheable): a module represented in llvm-ir assembly. """ - if isinstance(fileobj_or_str, basestring): + if _util.isstring(fileobj_or_str): data = fileobj_or_str else: data = fileobj_or_str.read()