Skip to content

Commit

Permalink
handle string subclass in right place
Browse files Browse the repository at this point in the history
  • Loading branch information
Boxiang Sun committed Apr 11, 2016
1 parent 59a7a2f commit 74cbda0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ template <ExceptionStyle S> static BoxedFloat* _floatNew(Box* a) noexcept(S == C
// Make sure that we're not in an error state when we return a non-NULL value.
assert(!PyErr_Occurred());
return new BoxedFloat(a_f);
} else if (a->cls == str_cls || a->cls == unicode_cls) {
} else if (PyString_Check(a)|| a->cls == unicode_cls) {
BoxedFloat* res = (BoxedFloat*)PyFloat_FromString(a, NULL);

if (!res) {
Expand Down

0 comments on commit 74cbda0

Please sign in to comment.