summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2017-02-09 12:02:47 -0500
committerPeter LaFosse <peter@vector35.com>2017-02-09 12:16:58 -0500
commit5ee2b21b91035ba37b345d6045ec93c33225e93c (patch)
tree766af764e0c1e876dc52249e01daa338f63143c9 /python/basicblock.py
parentecb848f7cedeecf033f283df0b7d1fa8aca80d50 (diff)
Fix highlight API's to work with HighlightStandardColor properly
Diffstat (limited to 'python/basicblock.py')
-rw-r--r--python/basicblock.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index ae9889fc..02e6a2c5 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -215,6 +215,8 @@ class BasicBlock(object):
"""
if not isinstance(color, HighlightStandardColor) and not isinstance(color, highlight.HighlightColor):
raise ValueError("Specified color is not one of HighlightStandardColor, highlight.HighlightColor")
+ if isinstance(color, HighlightStandardColor):
+ color = highlight.HighlightColor(color)
core.BNSetAutoBasicBlockHighlight(self.handle, color._get_core_struct())
def set_user_highlight(self, color):
@@ -229,4 +231,6 @@ class BasicBlock(object):
"""
if not isinstance(color, HighlightStandardColor) and not isinstance(color, highlight.HighlightColor):
raise ValueError("Specified color is not one of HighlightStandardColor, highlight.HighlightColor")
+ if isinstance(color, HighlightStandardColor):
+ color = highlight.HighlightColor(color)
core.BNSetUserBasicBlockHighlight(self.handle, color._get_core_struct())