File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,7 @@ public void incRef() {
228
228
if (refCount != IMMORTAL_REFCNT ) {
229
229
CApiTransitions .writeNativeRefCount (pointer , refCount + 1 );
230
230
}
231
- // "-1" because the refcount can briefly go below (e.g., PyTuple_SetItem)
232
- assert refCount >= (PythonAbstractObjectNativeWrapper .MANAGED_REFCNT - 1 ) : "invalid refcnt " + refCount + " during incRef in " + Long .toHexString (getNativePointer ());
231
+ assert refCount >= PythonAbstractObjectNativeWrapper .MANAGED_REFCNT : "invalid refcnt " + refCount + " during incRef in " + Long .toHexString (getNativePointer ());
233
232
}
234
233
235
234
@ TruffleBoundary (allowInlining = true )
@@ -239,8 +238,7 @@ public long decRef() {
239
238
if (refCount != IMMORTAL_REFCNT ) {
240
239
long updatedRefCount = refCount - 1 ;
241
240
CApiTransitions .writeNativeRefCount (pointer , updatedRefCount );
242
- // "-1" because the refcount can briefly go below (e.g., PyTuple_SetItem)
243
- assert updatedRefCount >= (PythonAbstractObjectNativeWrapper .MANAGED_REFCNT - 1 ) : "invalid refcnt " + updatedRefCount + " during decRef in " + Long .toHexString (getNativePointer ());
241
+ assert updatedRefCount >= PythonAbstractObjectNativeWrapper .MANAGED_REFCNT : "invalid refcnt " + updatedRefCount + " during decRef in " + Long .toHexString (getNativePointer ());
244
242
if (updatedRefCount == PythonAbstractObjectNativeWrapper .MANAGED_REFCNT && ref != null ) {
245
243
// make weak
246
244
assert ref .isStrongReference ();
You can’t perform that action at this time.
0 commit comments