File tree 1 file changed +0
-8
lines changed 1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -2939,28 +2939,20 @@ pointer_to_safe_refcount(void *ptr)
2939
2939
{
2940
2940
uintptr_t full = (uintptr_t )ptr ;
2941
2941
assert ((full & 3 ) == 0 );
2942
- #if defined(Py_GIL_DISABLED )
2943
- return full + 1 ;
2944
- #else
2945
2942
uint32_t refcnt = (uint32_t )full ;
2946
2943
if (refcnt >= (uint32_t )_Py_IMMORTAL_MINIMUM_REFCNT ) {
2947
2944
full = full - ((uintptr_t )_Py_IMMORTAL_MINIMUM_REFCNT ) + 1 ;
2948
2945
}
2949
2946
return full + 2 ;
2950
- #endif
2951
2947
}
2952
2948
2953
2949
static void *
2954
2950
safe_refcount_to_pointer (uintptr_t refcnt )
2955
2951
{
2956
- #if defined(Py_GIL_DISABLED )
2957
- return (void * )(refcnt - 1 );
2958
- #else
2959
2952
if (refcnt & 1 ) {
2960
2953
refcnt += _Py_IMMORTAL_MINIMUM_REFCNT - 1 ;
2961
2954
}
2962
2955
return (void * )(refcnt - 2 );
2963
- #endif
2964
2956
}
2965
2957
2966
2958
/* Add op to the gcstate->trash_delete_later list. Called when the current
You can’t perform that action at this time.
0 commit comments