File tree 1 file changed +15
-0
lines changed
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) {
714
714
static inline bool
715
715
PyStackRef_GenCheck (_PyStackRef stackref )
716
716
{
717
+ if (PyStackRef_IsTaggedInt (stackref )) {
718
+ return false;
719
+ }
717
720
return PyGen_Check (PyStackRef_AsPyObjectBorrow (stackref ));
718
721
}
719
722
720
723
static inline bool
721
724
PyStackRef_BoolCheck (_PyStackRef stackref )
722
725
{
726
+ if (PyStackRef_IsTaggedInt (stackref )) {
727
+ return false;
728
+ }
723
729
return PyBool_Check (PyStackRef_AsPyObjectBorrow (stackref ));
724
730
}
725
731
726
732
static inline bool
727
733
PyStackRef_LongCheck (_PyStackRef stackref )
728
734
{
735
+ if (PyStackRef_IsTaggedInt (stackref )) {
736
+ return false;
737
+ }
729
738
return PyLong_Check (PyStackRef_AsPyObjectBorrow (stackref ));
730
739
}
731
740
@@ -738,12 +747,18 @@ PyStackRef_ExceptionInstanceCheck(_PyStackRef stackref)
738
747
static inline bool
739
748
PyStackRef_CodeCheck (_PyStackRef stackref )
740
749
{
750
+ if (PyStackRef_IsTaggedInt (stackref )) {
751
+ return false;
752
+ }
741
753
return PyCode_Check (PyStackRef_AsPyObjectBorrow (stackref ));
742
754
}
743
755
744
756
static inline bool
745
757
PyStackRef_FunctionCheck (_PyStackRef stackref )
746
758
{
759
+ if (PyStackRef_IsTaggedInt (stackref )) {
760
+ return false;
761
+ }
747
762
return PyFunction_Check (PyStackRef_AsPyObjectBorrow (stackref ));
748
763
}
749
764
You can’t perform that action at this time.
0 commit comments