Commit 26257b35 authored by Stefan Behnel's avatar Stefan Behnel

fix bytes indexing

parent 62be0f9a
......@@ -1226,7 +1226,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
coerce_node.pos, "__Pyx_PyUnicode_GetItemInt",
self.PyUnicode_GetItemInt_func_type,
args = [
arg.base.as_none_safe_node(env),
arg.base.as_none_safe_node("'NoneType' object is not subscriptable"),
index_node.coerce_to(PyrexTypes.c_py_ssize_t_type, env),
bound_check_node,
],
......@@ -1242,7 +1242,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
coerce_node.pos, "__Pyx_PyBytes_GetItemInt",
self.PyBytes_GetItemInt_func_type,
args = [
arg.base.as_none_safe_node(env),
arg.base.as_none_safe_node("'NoneType' object is not subscriptable"),
index_node.coerce_to(PyrexTypes.c_py_ssize_t_type, env),
bound_check_node,
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment