< prev index next >

test/jdk/java/foreign/TestUpcallStructScope.java

Print this page
*** 22,12 ***
   *
   */
  
  /*
   * @test
-  * @enablePreview
-  * @requires jdk.foreign.linker != "UNSUPPORTED"
   *
   * @run testng/othervm/native
   *   --enable-native-access=ALL-UNNAMED
   *   -Djdk.internal.foreign.DowncallLinker.USE_SPEC=false
   *   TestUpcallStructScope
--- 22,10 ---

*** 49,21 ***
  
  import static org.testng.Assert.assertFalse;
  
  public class TestUpcallStructScope extends NativeTestHelper {
      static final MethodHandle MH_do_upcall;
-     static final Linker LINKER = Linker.nativeLinker();
      static final MethodHandle MH_Consumer_accept;
  
-     // struct S_PDI { void* p0; double p1; int p2; };
-     static final MemoryLayout S_PDI_LAYOUT = MemoryLayout.structLayout(
-         C_POINTER.withName("p0"),
-         C_DOUBLE.withName("p1"),
-         C_INT.withName("p2"),
-         MemoryLayout.paddingLayout(4)
-     );
- 
      static {
          System.loadLibrary("TestUpcallStructScope");
          MH_do_upcall = LINKER.downcallHandle(
                  findNativeOrThrow("do_upcall"),
                  FunctionDescriptor.ofVoid(C_POINTER, S_PDI_LAYOUT)
--- 47,12 ---
< prev index next >