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() {
228228 if (refCount != IMMORTAL_REFCNT ) {
229229 CApiTransitions .writeNativeRefCount (pointer , refCount + 1 );
230230 }
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 ());
233232 }
234233
235234 @ TruffleBoundary (allowInlining = true )
@@ -239,8 +238,7 @@ public long decRef() {
239238 if (refCount != IMMORTAL_REFCNT ) {
240239 long updatedRefCount = refCount - 1 ;
241240 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 ());
244242 if (updatedRefCount == PythonAbstractObjectNativeWrapper .MANAGED_REFCNT && ref != null ) {
245243 // make weak
246244 assert ref .isStrongReference ();
You can’t perform that action at this time.
0 commit comments