forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure binding packages and move common components to platform-s…
…pecific BindingUtils classes. Remove VH usages - replaced with jextract generated code modification.
- Loading branch information
1 parent
d80a6de
commit 842aef9
Showing
32 changed files
with
716 additions
and
1,426 deletions.
There are no files selected for viewing
116 changes: 0 additions & 116 deletions
116
src/java.base/linux/classes/jdk/internal/bindings/net/socket/generated/socket_address_h.java
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
src/java.base/linux/classes/jdk/internal/ffi/generated/BindingUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 only, as | ||
* published by the Free Software Foundation. Oracle designates this | ||
* particular file as subject to the "Classpath" exception as provided | ||
* by Oracle in the LICENSE file that accompanied this code. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
* or visit www.oracle.com if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
package jdk.internal.ffi.generated; | ||
|
||
import java.lang.invoke.*; | ||
import java.lang.foreign.*; | ||
import java.util.*; | ||
import java.util.stream.*; | ||
|
||
import static java.lang.foreign.ValueLayout.*; | ||
|
||
@SuppressWarnings("restricted") | ||
public final class BindingUtils { | ||
private BindingUtils() { | ||
} | ||
public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN; | ||
public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE; | ||
public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT; | ||
public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT; | ||
public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG; | ||
public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT; | ||
public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE; | ||
public static final AddressLayout C_POINTER = ValueLayout.ADDRESS | ||
.withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE)); | ||
public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.