Skip to content

Commit c87ff29

Browse files
committed
Move assert to the right place
1 parent 367675c commit c87ff29

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/CApiContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ public CApiContext(PythonContext context, Object llvmLibrary, boolean useNativeB
269269

270270
// this is the first context accessing the static symbol cache
271271
CApiContext.nativeSymbolCacheSingleContext = this.nativeSymbolCache;
272-
CApiContext.nativeSymbolCacheSingleContextUsed = true;
273272
} else if (CApiContext.nativeSymbolCacheSingleContext != null) {
273+
assert CApiContext.nativeSymbolCacheSingleContextUsed;
274274
/*
275275
* In this case, this context instance is at least the second one attempting to use
276276
* the static symbol cache. We now clear the static field to indicate that every
@@ -280,7 +280,7 @@ public CApiContext(PythonContext context, Object llvmLibrary, boolean useNativeB
280280
*/
281281
CApiContext.nativeSymbolCacheSingleContext = null;
282282
}
283-
assert CApiContext.nativeSymbolCacheSingleContextUsed;
283+
CApiContext.nativeSymbolCacheSingleContextUsed = true;
284284
}
285285

286286
// initialize primitive native wrapper cache

0 commit comments

Comments
 (0)