Skip to content

Commit

Permalink
[Polly] Revert changes to isl Python code
Browse files Browse the repository at this point in the history
This partially reverts b605dab,
dropping the changes to isl. This is an external library, so
we shouldn't modify it unless strictly necessary.
  • Loading branch information
nikic committed Jan 13, 2025
1 parent 3efe832 commit 5eb9acf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion polly/lib/External/isl/interface/python.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static void print_persistent_callback_failure_check(int indent,
printf(fmt, 0);
printf(", '%s') and ", callback_name.c_str());
printf(fmt, 0);
printf(".%s['exc_info'] is not None:\n", callback_name.c_str());
printf(".%s['exc_info'] != None:\n", callback_name.c_str());
print_indent(indent, " exc_info = ");
printf(fmt, 0);
printf(".%s['exc_info'][0]\n", callback_name.c_str());
Expand Down
4 changes: 2 additions & 2 deletions polly/lib/External/isl/libisl-gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def invoke(self, arg, from_tty):
arg = gdb.parse_and_eval(arg)
printer = str_lookup_function(arg)

if printer is None:
if printer == None:
print("No isl printer for this type")
return

Expand All @@ -90,7 +90,7 @@ def str_lookup_function(val):
lookup_tag = val.type.target()
regex = re.compile("^isl_(.*)$")

if lookup_tag is None:
if lookup_tag == None:
return None

m = regex.match(str(lookup_tag))
Expand Down
4 changes: 2 additions & 2 deletions polly/lib/External/isl/python/isl.py.top
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from ctypes import *
from ctypes.util import find_library

isl_dyld_library_path = os.environ.get('ISL_DYLD_LIBRARY_PATH')
if isl_dyld_library_path is not None:
if isl_dyld_library_path != None:
os.environ['DYLD_LIBRARY_PATH'] = isl_dyld_library_path
try:
isl = cdll.LoadLibrary(isl_dlname)
Expand All @@ -29,7 +29,7 @@ class Context:

@staticmethod
def getDefaultInstance():
if Context.defaultInstance is None:
if Context.defaultInstance == None:
Context.defaultInstance = Context()
return Context.defaultInstance

Expand Down

0 comments on commit 5eb9acf

Please sign in to comment.