File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -714,18 +714,27 @@ PyStackRef_TYPE(_PyStackRef stackref) {
714714static inline bool
715715PyStackRef_GenCheck (_PyStackRef stackref )
716716{
717+ if (PyStackRef_IsTaggedInt (stackref )) {
718+ return false;
719+ }
717720 return PyGen_Check (PyStackRef_AsPyObjectBorrow (stackref ));
718721}
719722
720723static inline bool
721724PyStackRef_BoolCheck (_PyStackRef stackref )
722725{
726+ if (PyStackRef_IsTaggedInt (stackref )) {
727+ return false;
728+ }
723729 return PyBool_Check (PyStackRef_AsPyObjectBorrow (stackref ));
724730}
725731
726732static inline bool
727733PyStackRef_LongCheck (_PyStackRef stackref )
728734{
735+ if (PyStackRef_IsTaggedInt (stackref )) {
736+ return false;
737+ }
729738 return PyLong_Check (PyStackRef_AsPyObjectBorrow (stackref ));
730739}
731740
@@ -738,12 +747,18 @@ PyStackRef_ExceptionInstanceCheck(_PyStackRef stackref)
738747static inline bool
739748PyStackRef_CodeCheck (_PyStackRef stackref )
740749{
750+ if (PyStackRef_IsTaggedInt (stackref )) {
751+ return false;
752+ }
741753 return PyCode_Check (PyStackRef_AsPyObjectBorrow (stackref ));
742754}
743755
744756static inline bool
745757PyStackRef_FunctionCheck (_PyStackRef stackref )
746758{
759+ if (PyStackRef_IsTaggedInt (stackref )) {
760+ return false;
761+ }
747762 return PyFunction_Check (PyStackRef_AsPyObjectBorrow (stackref ));
748763}
749764
You can’t perform that action at this time.
0 commit comments