Commit e96481f9 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Support intern()

parent a3ef7ce8
......@@ -474,7 +474,6 @@ Box* issubclass_func(Box* child, Box* parent) {
}
Box* intern_func(Box* str) {
assert(0 && "check refcounting");
if (!PyString_CheckExact(str)) // have to use exact check!
raiseExcHelper(TypeError, "can't intern subclass of string");
Py_INCREF(str);
......
# expected: reffail
try:
print intern(123)
except TypeError:
......
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