feat: add jextract & FFM API examples

This commit is contained in:
exaucae 2023-02-08 01:19:46 +00:00
parent 7e1a06e2e6
commit ed738777df
32 changed files with 3694 additions and 6 deletions

View File

@ -1,14 +1,12 @@
package com.baeldung.java.panama;
package com.baeldung.java.panama.core;
import java.lang.foreign.*;
import java.lang.invoke.MethodHandle;
import java.util.Objects;
import static java.lang.foreign.ValueLayout.ADDRESS;
import static java.lang.foreign.ValueLayout.JAVA_INT;
import static java.lang.foreign.ValueLayout.*;
public class HelloWorld {
public class Greetings {
public static void main(String[] args) throws Throwable {
@ -27,7 +25,9 @@ public class HelloWorld {
.orElse(null);
Objects.requireNonNull(methodHandle);
if(methodHandle == null){
throw new NoSuchMethodError("Method Handle was not found");
};
try (MemorySession memorySession = MemorySession.openConfined()) {
MemorySegment greetingSegment = memorySession.allocateUtf8String(greeting);

View File

@ -0,0 +1,26 @@
package com.baeldung.java.panama.core;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySession;
import java.lang.foreign.ValueLayout;
import java.lang.foreign.SegmentAllocator;
public class MemoryAllocation {
public static void main(String[] args) throws Throwable {
try (MemorySession session = MemorySession.openConfined()) {
String[] greetingStrings = {"hello", "world", "panama", "baeldung"};
SegmentAllocator allocator = SegmentAllocator.implicitAllocator();
MemorySegment offHeapSegment = allocator.allocateArray(ValueLayout.ADDRESS, greetingStrings.length);
for (int i = 0; i < greetingStrings.length; i++) {
// Allocate a string off-heap, then store a pointer to it
MemorySegment cString = allocator.allocateUtf8String(greetingStrings[i]);
offHeapSegment.setAtIndex(ValueLayout.ADDRESS, i, cString);
}
}
}
}

View File

@ -0,0 +1,56 @@
package com.baeldung.java.panama.core;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySession;
import java.lang.foreign.SequenceLayout;
import java.lang.invoke.VarHandle;
import static java.lang.foreign.MemoryLayout.sequenceLayout;
import static java.lang.foreign.MemoryLayout.structLayout;
import static java.lang.foreign.ValueLayout.*;
public class MemoryLayout {
public static void main(String[] args) {
GroupLayout pointLayout = structLayout(
JAVA_DOUBLE.withName("x"),
JAVA_DOUBLE.withName("y")
);
SequenceLayout ptsLayout = sequenceLayout(10,
pointLayout);
VarHandle xvarHandle = pointLayout.varHandle(PathElement.groupElement("x"));
VarHandle yvarHandle = pointLayout.varHandle(PathElement.groupElement("y"));
try (MemorySession memorySession = MemorySession.openConfined()) {
MemorySegment pointSegment = memorySession.allocate(pointLayout);
xvarHandle.set(pointSegment, 3d);
yvarHandle.set(pointSegment, 4d);
System.out.println(pointSegment.toString());
}
}
static class ValueLayout {
public static void main(String[] args) {
try (MemorySession memorySession = MemorySession.openConfined()) {
int byteSize = 5;
int index = 3;
float value = 6;
MemorySegment segment = MemorySegment.allocateNative(byteSize, memorySession);
segment.setAtIndex(JAVA_FLOAT, index, value);
float result = segment.getAtIndex(JAVA_FLOAT, index);
System.out.println("Float value is:" + result);
}
}
}
}

View File

@ -0,0 +1,17 @@
package com.baeldung.java.panama.jextract;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySession;
import static foreign.c.stdio_h.printf;
public class Greetings {
public static void main(String[] args) {
String greeting = "Hello World from Project Panama Baeldung Article, using JExtract!";
try (MemorySession memorySession = MemorySession.openConfined()) {
MemorySegment greetingSegment = memorySession.allocateUtf8String(greeting);
printf(greetingSegment);
}
}
}

View File

@ -0,0 +1,23 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
public class Constants$root {
static final OfBoolean C_BOOL$LAYOUT = JAVA_BOOLEAN;
static final OfByte C_CHAR$LAYOUT = JAVA_BYTE;
static final OfShort C_SHORT$LAYOUT = JAVA_SHORT.withBitAlignment(16);
static final OfInt C_INT$LAYOUT = JAVA_INT.withBitAlignment(32);
static final OfInt C_LONG$LAYOUT = JAVA_INT.withBitAlignment(32);
static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG.withBitAlignment(64);
static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT.withBitAlignment(32);
static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE.withBitAlignment(64);
static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64);
}

View File

@ -0,0 +1,14 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
public class FILE extends _iobuf {
}

View File

@ -0,0 +1,233 @@
package foreign.c;
// Generated by jextract
import java.lang.foreign.Addressable;
import java.lang.foreign.Linker;
import java.lang.foreign.FunctionDescriptor;
import java.lang.foreign.GroupLayout;
import java.lang.foreign.SymbolLookup;
import java.lang.foreign.MemoryAddress;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.MemorySession;
import java.lang.foreign.SegmentAllocator;
import java.lang.foreign.ValueLayout;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.io.File;
import java.nio.file.Path;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Stream;
import static java.lang.foreign.Linker.*;
import static java.lang.foreign.ValueLayout.*;
final class RuntimeHelper {
private RuntimeHelper() {}
private final static Linker LINKER = Linker.nativeLinker();
private final static ClassLoader LOADER = RuntimeHelper.class.getClassLoader();
private final static MethodHandles.Lookup MH_LOOKUP = MethodHandles.lookup();
private final static SymbolLookup SYMBOL_LOOKUP;
final static SegmentAllocator CONSTANT_ALLOCATOR =
(size, align) -> MemorySegment.allocateNative(size, align, MemorySession.openImplicit());
static {
SymbolLookup loaderLookup = SymbolLookup.loaderLookup();
SYMBOL_LOOKUP = name -> loaderLookup.lookup(name).or(() -> LINKER.defaultLookup().lookup(name));
}
static <T> T requireNonNull(T obj, String symbolName) {
if (obj == null) {
throw new UnsatisfiedLinkError("unresolved symbol: " + symbolName);
}
return obj;
}
private final static SegmentAllocator THROWING_ALLOCATOR = (x, y) -> { throw new AssertionError("should not reach here"); };
static final MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) {
return SYMBOL_LOOKUP.lookup(name).map(symbol -> MemorySegment.ofAddress(symbol.address(), layout.byteSize(), MemorySession.openShared())).orElse(null);
}
static final MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) {
return SYMBOL_LOOKUP.lookup(name).
map(addr -> LINKER.downcallHandle(addr, fdesc)).
orElse(null);
}
static final MethodHandle downcallHandle(FunctionDescriptor fdesc) {
return LINKER.downcallHandle(fdesc);
}
static final MethodHandle downcallHandleVariadic(String name, FunctionDescriptor fdesc) {
return SYMBOL_LOOKUP.lookup(name).
map(addr -> VarargsInvoker.make(addr, fdesc)).
orElse(null);
}
static final <Z> MemorySegment upcallStub(Class<Z> fi, Z z, FunctionDescriptor fdesc, MemorySession session) {
try {
MethodHandle handle = MH_LOOKUP.findVirtual(fi, "apply", Linker.upcallType(fdesc));
handle = handle.bindTo(z);
return LINKER.upcallStub(handle, fdesc, session);
} catch (Throwable ex) {
throw new AssertionError(ex);
}
}
static MemorySegment asArray(MemoryAddress addr, MemoryLayout layout, int numElements, MemorySession session) {
return MemorySegment.ofAddress(addr, numElements * layout.byteSize(), session);
}
// Internals only below this point
private static class VarargsInvoker {
private static final MethodHandle INVOKE_MH;
private final MemorySegment symbol;
private final FunctionDescriptor function;
private VarargsInvoker(MemorySegment symbol, FunctionDescriptor function) {
this.symbol = symbol;
this.function = function;
}
static {
try {
INVOKE_MH = MethodHandles.lookup().findVirtual(VarargsInvoker.class, "invoke", MethodType.methodType(Object.class, SegmentAllocator.class, Object[].class));
} catch (ReflectiveOperationException e) {
throw new RuntimeException(e);
}
}
static MethodHandle make(MemorySegment symbol, FunctionDescriptor function) {
VarargsInvoker invoker = new VarargsInvoker(symbol, function);
MethodHandle handle = INVOKE_MH.bindTo(invoker).asCollector(Object[].class, function.argumentLayouts().size() + 1);
MethodType mtype = MethodType.methodType(function.returnLayout().isPresent() ? carrier(function.returnLayout().get(), true) : void.class);
for (MemoryLayout layout : function.argumentLayouts()) {
mtype = mtype.appendParameterTypes(carrier(layout, false));
}
mtype = mtype.appendParameterTypes(Object[].class);
if (mtype.returnType().equals(MemorySegment.class)) {
mtype = mtype.insertParameterTypes(0, SegmentAllocator.class);
} else {
handle = MethodHandles.insertArguments(handle, 0, THROWING_ALLOCATOR);
}
return handle.asType(mtype);
}
static Class<?> carrier(MemoryLayout layout, boolean ret) {
if (layout instanceof ValueLayout valueLayout) {
return (ret || valueLayout.carrier() != MemoryAddress.class) ?
valueLayout.carrier() : Addressable.class;
} else if (layout instanceof GroupLayout) {
return MemorySegment.class;
} else {
throw new AssertionError("Cannot get here!");
}
}
private Object invoke(SegmentAllocator allocator, Object[] args) throws Throwable {
// one trailing Object[]
int nNamedArgs = function.argumentLayouts().size();
assert(args.length == nNamedArgs + 1);
// The last argument is the array of vararg collector
Object[] unnamedArgs = (Object[]) args[args.length - 1];
int argsCount = nNamedArgs + unnamedArgs.length;
Class<?>[] argTypes = new Class<?>[argsCount];
MemoryLayout[] argLayouts = new MemoryLayout[nNamedArgs + unnamedArgs.length];
int pos = 0;
for (pos = 0; pos < nNamedArgs; pos++) {
argLayouts[pos] = function.argumentLayouts().get(pos);
}
assert pos == nNamedArgs;
for (Object o: unnamedArgs) {
argLayouts[pos] = variadicLayout(normalize(o.getClass()));
pos++;
}
assert pos == argsCount;
FunctionDescriptor f = (function.returnLayout().isEmpty()) ?
FunctionDescriptor.ofVoid(argLayouts) :
FunctionDescriptor.of(function.returnLayout().get(), argLayouts);
MethodHandle mh = LINKER.downcallHandle(symbol, f);
if (mh.type().returnType() == MemorySegment.class) {
mh = mh.bindTo(allocator);
}
// flatten argument list so that it can be passed to an asSpreader MH
Object[] allArgs = new Object[nNamedArgs + unnamedArgs.length];
System.arraycopy(args, 0, allArgs, 0, nNamedArgs);
System.arraycopy(unnamedArgs, 0, allArgs, nNamedArgs, unnamedArgs.length);
return mh.asSpreader(Object[].class, argsCount).invoke(allArgs);
}
private static Class<?> unboxIfNeeded(Class<?> clazz) {
if (clazz == Boolean.class) {
return boolean.class;
} else if (clazz == Void.class) {
return void.class;
} else if (clazz == Byte.class) {
return byte.class;
} else if (clazz == Character.class) {
return char.class;
} else if (clazz == Short.class) {
return short.class;
} else if (clazz == Integer.class) {
return int.class;
} else if (clazz == Long.class) {
return long.class;
} else if (clazz == Float.class) {
return float.class;
} else if (clazz == Double.class) {
return double.class;
} else {
return clazz;
}
}
private Class<?> promote(Class<?> c) {
if (c == byte.class || c == char.class || c == short.class || c == int.class) {
return long.class;
} else if (c == float.class) {
return double.class;
} else {
return c;
}
}
private Class<?> normalize(Class<?> c) {
c = unboxIfNeeded(c);
if (c.isPrimitive()) {
return promote(c);
}
if (MemoryAddress.class.isAssignableFrom(c)) {
return MemoryAddress.class;
}
if (MemorySegment.class.isAssignableFrom(c)) {
return MemorySegment.class;
}
throw new IllegalArgumentException("Invalid type for ABI: " + c.getTypeName());
}
private MemoryLayout variadicLayout(Class<?> c) {
if (c == long.class) {
return JAVA_LONG;
} else if (c == double.class) {
return JAVA_DOUBLE;
} else if (MemoryAddress.class.isAssignableFrom(c)) {
return ADDRESS;
} else {
throw new IllegalArgumentException("Unhandled variadic argument class: " + c);
}
}
}
}

View File

@ -0,0 +1,162 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
public class _iobuf {
static final GroupLayout $struct$LAYOUT = MemoryLayout.structLayout(
Constants$root.C_POINTER$LAYOUT.withName("_ptr"),
Constants$root.C_LONG$LAYOUT.withName("_cnt"),
MemoryLayout.paddingLayout(32),
Constants$root.C_POINTER$LAYOUT.withName("_base"),
Constants$root.C_LONG$LAYOUT.withName("_flag"),
Constants$root.C_LONG$LAYOUT.withName("_file"),
Constants$root.C_LONG$LAYOUT.withName("_charbuf"),
Constants$root.C_LONG$LAYOUT.withName("_bufsiz"),
Constants$root.C_POINTER$LAYOUT.withName("_tmpfname")
).withName("_iobuf");
public static MemoryLayout $LAYOUT() {
return _iobuf.$struct$LAYOUT;
}
static final VarHandle _ptr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_ptr"));
public static VarHandle _ptr$VH() {
return _iobuf._ptr$VH;
}
public static MemoryAddress _ptr$get(MemorySegment seg) {
return (java.lang.foreign.MemoryAddress)_iobuf._ptr$VH.get(seg);
}
public static void _ptr$set( MemorySegment seg, MemoryAddress x) {
_iobuf._ptr$VH.set(seg, x);
}
public static MemoryAddress _ptr$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemoryAddress)_iobuf._ptr$VH.get(seg.asSlice(index*sizeof()));
}
public static void _ptr$set(MemorySegment seg, long index, MemoryAddress x) {
_iobuf._ptr$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _cnt$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_cnt"));
public static VarHandle _cnt$VH() {
return _iobuf._cnt$VH;
}
public static int _cnt$get(MemorySegment seg) {
return (int)_iobuf._cnt$VH.get(seg);
}
public static void _cnt$set( MemorySegment seg, int x) {
_iobuf._cnt$VH.set(seg, x);
}
public static int _cnt$get(MemorySegment seg, long index) {
return (int)_iobuf._cnt$VH.get(seg.asSlice(index*sizeof()));
}
public static void _cnt$set(MemorySegment seg, long index, int x) {
_iobuf._cnt$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _base$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_base"));
public static VarHandle _base$VH() {
return _iobuf._base$VH;
}
public static MemoryAddress _base$get(MemorySegment seg) {
return (java.lang.foreign.MemoryAddress)_iobuf._base$VH.get(seg);
}
public static void _base$set( MemorySegment seg, MemoryAddress x) {
_iobuf._base$VH.set(seg, x);
}
public static MemoryAddress _base$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemoryAddress)_iobuf._base$VH.get(seg.asSlice(index*sizeof()));
}
public static void _base$set(MemorySegment seg, long index, MemoryAddress x) {
_iobuf._base$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _flag$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_flag"));
public static VarHandle _flag$VH() {
return _iobuf._flag$VH;
}
public static int _flag$get(MemorySegment seg) {
return (int)_iobuf._flag$VH.get(seg);
}
public static void _flag$set( MemorySegment seg, int x) {
_iobuf._flag$VH.set(seg, x);
}
public static int _flag$get(MemorySegment seg, long index) {
return (int)_iobuf._flag$VH.get(seg.asSlice(index*sizeof()));
}
public static void _flag$set(MemorySegment seg, long index, int x) {
_iobuf._flag$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _file$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_file"));
public static VarHandle _file$VH() {
return _iobuf._file$VH;
}
public static int _file$get(MemorySegment seg) {
return (int)_iobuf._file$VH.get(seg);
}
public static void _file$set( MemorySegment seg, int x) {
_iobuf._file$VH.set(seg, x);
}
public static int _file$get(MemorySegment seg, long index) {
return (int)_iobuf._file$VH.get(seg.asSlice(index*sizeof()));
}
public static void _file$set(MemorySegment seg, long index, int x) {
_iobuf._file$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _charbuf$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_charbuf"));
public static VarHandle _charbuf$VH() {
return _iobuf._charbuf$VH;
}
public static int _charbuf$get(MemorySegment seg) {
return (int)_iobuf._charbuf$VH.get(seg);
}
public static void _charbuf$set( MemorySegment seg, int x) {
_iobuf._charbuf$VH.set(seg, x);
}
public static int _charbuf$get(MemorySegment seg, long index) {
return (int)_iobuf._charbuf$VH.get(seg.asSlice(index*sizeof()));
}
public static void _charbuf$set(MemorySegment seg, long index, int x) {
_iobuf._charbuf$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _bufsiz$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_bufsiz"));
public static VarHandle _bufsiz$VH() {
return _iobuf._bufsiz$VH;
}
public static int _bufsiz$get(MemorySegment seg) {
return (int)_iobuf._bufsiz$VH.get(seg);
}
public static void _bufsiz$set( MemorySegment seg, int x) {
_iobuf._bufsiz$VH.set(seg, x);
}
public static int _bufsiz$get(MemorySegment seg, long index) {
return (int)_iobuf._bufsiz$VH.get(seg.asSlice(index*sizeof()));
}
public static void _bufsiz$set(MemorySegment seg, long index, int x) {
_iobuf._bufsiz$VH.set(seg.asSlice(index*sizeof()), x);
}
static final VarHandle _tmpfname$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("_tmpfname"));
public static VarHandle _tmpfname$VH() {
return _iobuf._tmpfname$VH;
}
public static MemoryAddress _tmpfname$get(MemorySegment seg) {
return (java.lang.foreign.MemoryAddress)_iobuf._tmpfname$VH.get(seg);
}
public static void _tmpfname$set( MemorySegment seg, MemoryAddress x) {
_iobuf._tmpfname$VH.set(seg, x);
}
public static MemoryAddress _tmpfname$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemoryAddress)_iobuf._tmpfname$VH.get(seg.asSlice(index*sizeof()));
}
public static void _tmpfname$set(MemorySegment seg, long index, MemoryAddress x) {
_iobuf._tmpfname$VH.set(seg.asSlice(index*sizeof()), x);
}
public static long sizeof() { return $LAYOUT().byteSize(); }
public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); }
public static MemorySegment allocateArray(int len, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT()));
}
public static MemorySegment ofAddress(MemoryAddress addr, MemorySession session) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, session); }
}

View File

@ -0,0 +1,52 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$0 {
static final FunctionDescriptor fopen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fopen$MH = RuntimeHelper.downcallHandle(
"fopen",
constants$0.fopen$FUNC
);
static final FunctionDescriptor freopen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle freopen$MH = RuntimeHelper.downcallHandle(
"freopen",
constants$0.freopen$FUNC
);
static final FunctionDescriptor fflush$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fflush$MH = RuntimeHelper.downcallHandle(
"fflush",
constants$0.fflush$FUNC
);
static final FunctionDescriptor fclose$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fclose$MH = RuntimeHelper.downcallHandle(
"fclose",
constants$0.fclose$FUNC
);
static final FunctionDescriptor remove$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle remove$MH = RuntimeHelper.downcallHandle(
"remove",
constants$0.remove$FUNC
);
}

View File

@ -0,0 +1,54 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$1 {
static final FunctionDescriptor rename$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle rename$MH = RuntimeHelper.downcallHandle(
"rename",
constants$1.rename$FUNC
);
static final FunctionDescriptor tmpfile$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT);
static final MethodHandle tmpfile$MH = RuntimeHelper.downcallHandle(
"tmpfile",
constants$1.tmpfile$FUNC
);
static final FunctionDescriptor tmpnam$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle tmpnam$MH = RuntimeHelper.downcallHandle(
"tmpnam",
constants$1.tmpnam$FUNC
);
static final FunctionDescriptor _tempnam$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _tempnam$MH = RuntimeHelper.downcallHandle(
"_tempnam",
constants$1._tempnam$FUNC
);
static final FunctionDescriptor _rmtmp$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle _rmtmp$MH = RuntimeHelper.downcallHandle(
"_rmtmp",
constants$1._rmtmp$FUNC
);
static final FunctionDescriptor _unlink$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _unlink$MH = RuntimeHelper.downcallHandle(
"_unlink",
constants$1._unlink$FUNC
);
}

View File

@ -0,0 +1,61 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$10 {
static final FunctionDescriptor getc$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle getc$MH = RuntimeHelper.downcallHandle(
"getc",
constants$10.getc$FUNC
);
static final FunctionDescriptor putc$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle putc$MH = RuntimeHelper.downcallHandle(
"putc",
constants$10.putc$FUNC
);
static final FunctionDescriptor getchar$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle getchar$MH = RuntimeHelper.downcallHandle(
"getchar",
constants$10.getchar$FUNC
);
static final FunctionDescriptor putchar$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle putchar$MH = RuntimeHelper.downcallHandle(
"putchar",
constants$10.putchar$FUNC
);
static final FunctionDescriptor fread$FUNC = FunctionDescriptor.of(Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fread$MH = RuntimeHelper.downcallHandle(
"fread",
constants$10.fread$FUNC
);
static final FunctionDescriptor fwrite$FUNC = FunctionDescriptor.of(Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fwrite$MH = RuntimeHelper.downcallHandle(
"fwrite",
constants$10.fwrite$FUNC
);
}

View File

@ -0,0 +1,60 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$11 {
static final FunctionDescriptor fseek$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle fseek$MH = RuntimeHelper.downcallHandle(
"fseek",
constants$11.fseek$FUNC
);
static final FunctionDescriptor ftell$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle ftell$MH = RuntimeHelper.downcallHandle(
"ftell",
constants$11.ftell$FUNC
);
static final FunctionDescriptor rewind$FUNC = FunctionDescriptor.ofVoid(
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle rewind$MH = RuntimeHelper.downcallHandle(
"rewind",
constants$11.rewind$FUNC
);
static final FunctionDescriptor fgetpos$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fgetpos$MH = RuntimeHelper.downcallHandle(
"fgetpos",
constants$11.fgetpos$FUNC
);
static final FunctionDescriptor fsetpos$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fsetpos$MH = RuntimeHelper.downcallHandle(
"fsetpos",
constants$11.fsetpos$FUNC
);
static final FunctionDescriptor feof$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle feof$MH = RuntimeHelper.downcallHandle(
"feof",
constants$11.feof$FUNC
);
}

View File

@ -0,0 +1,58 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$12 {
static final FunctionDescriptor ferror$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle ferror$MH = RuntimeHelper.downcallHandle(
"ferror",
constants$12.ferror$FUNC
);
static final FunctionDescriptor clearerr$FUNC = FunctionDescriptor.ofVoid(
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle clearerr$MH = RuntimeHelper.downcallHandle(
"clearerr",
constants$12.clearerr$FUNC
);
static final FunctionDescriptor perror$FUNC = FunctionDescriptor.ofVoid(
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle perror$MH = RuntimeHelper.downcallHandle(
"perror",
constants$12.perror$FUNC
);
static final FunctionDescriptor _popen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _popen$MH = RuntimeHelper.downcallHandle(
"_popen",
constants$12._popen$FUNC
);
static final FunctionDescriptor _pclose$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _pclose$MH = RuntimeHelper.downcallHandle(
"_pclose",
constants$12._pclose$FUNC
);
static final FunctionDescriptor popen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle popen$MH = RuntimeHelper.downcallHandle(
"popen",
constants$12.popen$FUNC
);
}

View File

@ -0,0 +1,53 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$13 {
static final FunctionDescriptor pclose$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle pclose$MH = RuntimeHelper.downcallHandle(
"pclose",
constants$13.pclose$FUNC
);
static final FunctionDescriptor _flushall$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle _flushall$MH = RuntimeHelper.downcallHandle(
"_flushall",
constants$13._flushall$FUNC
);
static final FunctionDescriptor _fgetchar$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle _fgetchar$MH = RuntimeHelper.downcallHandle(
"_fgetchar",
constants$13._fgetchar$FUNC
);
static final FunctionDescriptor _fputchar$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle _fputchar$MH = RuntimeHelper.downcallHandle(
"_fputchar",
constants$13._fputchar$FUNC
);
static final FunctionDescriptor _fdopen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _fdopen$MH = RuntimeHelper.downcallHandle(
"_fdopen",
constants$13._fdopen$FUNC
);
static final FunctionDescriptor _fileno$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _fileno$MH = RuntimeHelper.downcallHandle(
"_fileno",
constants$13._fileno$FUNC
);
}

View File

@ -0,0 +1,52 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$14 {
static final FunctionDescriptor _fcloseall$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle _fcloseall$MH = RuntimeHelper.downcallHandle(
"_fcloseall",
constants$14._fcloseall$FUNC
);
static final FunctionDescriptor _fsopen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle _fsopen$MH = RuntimeHelper.downcallHandle(
"_fsopen",
constants$14._fsopen$FUNC
);
static final FunctionDescriptor __mingw_get_output_format$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle __mingw_get_output_format$MH = RuntimeHelper.downcallHandle(
"__mingw_get_output_format",
constants$14.__mingw_get_output_format$FUNC
);
static final FunctionDescriptor __mingw_set_output_format$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle __mingw_set_output_format$MH = RuntimeHelper.downcallHandle(
"__mingw_set_output_format",
constants$14.__mingw_set_output_format$FUNC
);
static final FunctionDescriptor __mingw_get_printf_count_output$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle __mingw_get_printf_count_output$MH = RuntimeHelper.downcallHandle(
"__mingw_get_printf_count_output",
constants$14.__mingw_get_printf_count_output$FUNC
);
static final FunctionDescriptor __mingw_set_printf_count_output$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle __mingw_set_printf_count_output$MH = RuntimeHelper.downcallHandle(
"__mingw_set_printf_count_output",
constants$14.__mingw_set_printf_count_output$FUNC
);
}

View File

@ -0,0 +1,50 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$15 {
static final FunctionDescriptor _get_output_format$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle _get_output_format$MH = RuntimeHelper.downcallHandle(
"_get_output_format",
constants$15._get_output_format$FUNC
);
static final FunctionDescriptor _set_output_format$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle _set_output_format$MH = RuntimeHelper.downcallHandle(
"_set_output_format",
constants$15._set_output_format$FUNC
);
static final FunctionDescriptor _get_printf_count_output$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle _get_printf_count_output$MH = RuntimeHelper.downcallHandle(
"_get_printf_count_output",
constants$15._get_printf_count_output$FUNC
);
static final FunctionDescriptor _set_printf_count_output$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle _set_printf_count_output$MH = RuntimeHelper.downcallHandle(
"_set_printf_count_output",
constants$15._set_printf_count_output$FUNC
);
static final FunctionDescriptor fgetchar$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle fgetchar$MH = RuntimeHelper.downcallHandle(
"fgetchar",
constants$15.fgetchar$FUNC
);
static final FunctionDescriptor fputchar$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle fputchar$MH = RuntimeHelper.downcallHandle(
"fputchar",
constants$15.fputchar$FUNC
);
}

View File

@ -0,0 +1,61 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$16 {
static final FunctionDescriptor fdopen$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fdopen$MH = RuntimeHelper.downcallHandle(
"fdopen",
constants$16.fdopen$FUNC
);
static final FunctionDescriptor fileno$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fileno$MH = RuntimeHelper.downcallHandle(
"fileno",
constants$16.fileno$FUNC
);
static final FunctionDescriptor fwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fwprintf$MH = RuntimeHelper.downcallHandleVariadic(
"fwprintf",
constants$16.fwprintf$FUNC
);
static final FunctionDescriptor wprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle wprintf$MH = RuntimeHelper.downcallHandleVariadic(
"wprintf",
constants$16.wprintf$FUNC
);
static final FunctionDescriptor vfwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vfwprintf$MH = RuntimeHelper.downcallHandle(
"vfwprintf",
constants$16.vfwprintf$FUNC
);
static final FunctionDescriptor vwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vwprintf$MH = RuntimeHelper.downcallHandle(
"vwprintf",
constants$16.vwprintf$FUNC
);
}

View File

@ -0,0 +1,64 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$17 {
static final FunctionDescriptor _snwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _snwprintf$MH = RuntimeHelper.downcallHandleVariadic(
"_snwprintf",
constants$17._snwprintf$FUNC
);
static final FunctionDescriptor _vscwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _vscwprintf$MH = RuntimeHelper.downcallHandle(
"_vscwprintf",
constants$17._vscwprintf$FUNC
);
static final FunctionDescriptor _vsnwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _vsnwprintf$MH = RuntimeHelper.downcallHandle(
"_vsnwprintf",
constants$17._vsnwprintf$FUNC
);
static final FunctionDescriptor fwscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fwscanf$MH = RuntimeHelper.downcallHandleVariadic(
"fwscanf",
constants$17.fwscanf$FUNC
);
static final FunctionDescriptor wscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle wscanf$MH = RuntimeHelper.downcallHandleVariadic(
"wscanf",
constants$17.wscanf$FUNC
);
static final FunctionDescriptor swscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle swscanf$MH = RuntimeHelper.downcallHandleVariadic(
"swscanf",
constants$17.swscanf$FUNC
);
}

View File

@ -0,0 +1,63 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$18 {
static final FunctionDescriptor fgetwc$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fgetwc$MH = RuntimeHelper.downcallHandle(
"fgetwc",
constants$18.fgetwc$FUNC
);
static final FunctionDescriptor fputwc$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT,
Constants$root.C_SHORT$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fputwc$MH = RuntimeHelper.downcallHandle(
"fputwc",
constants$18.fputwc$FUNC
);
static final FunctionDescriptor ungetwc$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT,
Constants$root.C_SHORT$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle ungetwc$MH = RuntimeHelper.downcallHandle(
"ungetwc",
constants$18.ungetwc$FUNC
);
static final FunctionDescriptor swprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle swprintf$MH = RuntimeHelper.downcallHandleVariadic(
"swprintf",
constants$18.swprintf$FUNC
);
static final FunctionDescriptor vswprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vswprintf$MH = RuntimeHelper.downcallHandle(
"vswprintf",
constants$18.vswprintf$FUNC
);
static final FunctionDescriptor snwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle snwprintf$MH = RuntimeHelper.downcallHandleVariadic(
"snwprintf",
constants$18.snwprintf$FUNC
);
}

View File

@ -0,0 +1,62 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$19 {
static final FunctionDescriptor vsnwprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vsnwprintf$MH = RuntimeHelper.downcallHandle(
"vsnwprintf",
constants$19.vsnwprintf$FUNC
);
static final FunctionDescriptor vwscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vwscanf$MH = RuntimeHelper.downcallHandle(
"vwscanf",
constants$19.vwscanf$FUNC
);
static final FunctionDescriptor vfwscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vfwscanf$MH = RuntimeHelper.downcallHandle(
"vfwscanf",
constants$19.vfwscanf$FUNC
);
static final FunctionDescriptor vswscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vswscanf$MH = RuntimeHelper.downcallHandle(
"vswscanf",
constants$19.vswscanf$FUNC
);
static final FunctionDescriptor _fgetwchar$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT);
static final MethodHandle _fgetwchar$MH = RuntimeHelper.downcallHandle(
"_fgetwchar",
constants$19._fgetwchar$FUNC
);
static final FunctionDescriptor _fputwchar$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT,
Constants$root.C_SHORT$LAYOUT
);
static final MethodHandle _fputwchar$MH = RuntimeHelper.downcallHandle(
"_fputwchar",
constants$19._fputwchar$FUNC
);
}

View File

@ -0,0 +1,60 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$2 {
static final FunctionDescriptor tempnam$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle tempnam$MH = RuntimeHelper.downcallHandle(
"tempnam",
constants$2.tempnam$FUNC
);
static final FunctionDescriptor rmtmp$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT);
static final MethodHandle rmtmp$MH = RuntimeHelper.downcallHandle(
"rmtmp",
constants$2.rmtmp$FUNC
);
static final FunctionDescriptor unlink$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle unlink$MH = RuntimeHelper.downcallHandle(
"unlink",
constants$2.unlink$FUNC
);
static final FunctionDescriptor setvbuf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT
);
static final MethodHandle setvbuf$MH = RuntimeHelper.downcallHandle(
"setvbuf",
constants$2.setvbuf$FUNC
);
static final FunctionDescriptor setbuf$FUNC = FunctionDescriptor.ofVoid(
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle setbuf$MH = RuntimeHelper.downcallHandle(
"setbuf",
constants$2.setbuf$FUNC
);
static final FunctionDescriptor __mingw_fprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_fprintf$MH = RuntimeHelper.downcallHandleVariadic(
"__mingw_fprintf",
constants$2.__mingw_fprintf$FUNC
);
}

View File

@ -0,0 +1,56 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$20 {
static final FunctionDescriptor _getw$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _getw$MH = RuntimeHelper.downcallHandle(
"_getw",
constants$20._getw$FUNC
);
static final FunctionDescriptor _putw$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _putw$MH = RuntimeHelper.downcallHandle(
"_putw",
constants$20._putw$FUNC
);
static final FunctionDescriptor fgetwchar$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT);
static final MethodHandle fgetwchar$MH = RuntimeHelper.downcallHandle(
"fgetwchar",
constants$20.fgetwchar$FUNC
);
static final FunctionDescriptor fputwchar$FUNC = FunctionDescriptor.of(Constants$root.C_SHORT$LAYOUT,
Constants$root.C_SHORT$LAYOUT
);
static final MethodHandle fputwchar$MH = RuntimeHelper.downcallHandle(
"fputwchar",
constants$20.fputwchar$FUNC
);
static final FunctionDescriptor getw$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle getw$MH = RuntimeHelper.downcallHandle(
"getw",
constants$20.getw$FUNC
);
static final FunctionDescriptor putw$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle putw$MH = RuntimeHelper.downcallHandle(
"putw",
constants$20.putw$FUNC
);
}

View File

@ -0,0 +1,18 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$21 {
static final MemoryAddress NULL$ADDR = MemoryAddress.ofLong(0L);
static final MemorySegment _P_tmpdir$SEGMENT = RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String("\\");
static final MemorySegment P_tmpdir$SEGMENT = RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String("\\");
static final MemorySegment _wP_tmpdir$SEGMENT = RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String("\\");
}

View File

@ -0,0 +1,64 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$3 {
static final FunctionDescriptor __mingw_printf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_printf$MH = RuntimeHelper.downcallHandleVariadic(
"__mingw_printf",
constants$3.__mingw_printf$FUNC
);
static final FunctionDescriptor __mingw_sprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_sprintf$MH = RuntimeHelper.downcallHandleVariadic(
"__mingw_sprintf",
constants$3.__mingw_sprintf$FUNC
);
static final FunctionDescriptor __mingw_snprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_snprintf$MH = RuntimeHelper.downcallHandleVariadic(
"__mingw_snprintf",
constants$3.__mingw_snprintf$FUNC
);
static final FunctionDescriptor __mingw_vfprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_vfprintf$MH = RuntimeHelper.downcallHandle(
"__mingw_vfprintf",
constants$3.__mingw_vfprintf$FUNC
);
static final FunctionDescriptor __mingw_vprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_vprintf$MH = RuntimeHelper.downcallHandle(
"__mingw_vprintf",
constants$3.__mingw_vprintf$FUNC
);
static final FunctionDescriptor __mingw_vsprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_vsprintf$MH = RuntimeHelper.downcallHandle(
"__mingw_vsprintf",
constants$3.__mingw_vsprintf$FUNC
);
}

View File

@ -0,0 +1,64 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$4 {
static final FunctionDescriptor __mingw_vsnprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __mingw_vsnprintf$MH = RuntimeHelper.downcallHandle(
"__mingw_vsnprintf",
constants$4.__mingw_vsnprintf$FUNC
);
static final FunctionDescriptor _mingw_output_format_control$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT
);
static final MethodHandle _mingw_output_format_control$MH = RuntimeHelper.downcallHandle(
"_mingw_output_format_control",
constants$4._mingw_output_format_control$FUNC
);
static final FunctionDescriptor fprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fprintf$MH = RuntimeHelper.downcallHandleVariadic(
"fprintf",
constants$4.fprintf$FUNC
);
static final FunctionDescriptor printf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle printf$MH = RuntimeHelper.downcallHandleVariadic(
"printf",
constants$4.printf$FUNC
);
static final FunctionDescriptor sprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle sprintf$MH = RuntimeHelper.downcallHandleVariadic(
"sprintf",
constants$4.sprintf$FUNC
);
static final FunctionDescriptor vfprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vfprintf$MH = RuntimeHelper.downcallHandle(
"vfprintf",
constants$4.vfprintf$FUNC
);
}

View File

@ -0,0 +1,63 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$5 {
static final FunctionDescriptor vprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vprintf$MH = RuntimeHelper.downcallHandle(
"vprintf",
constants$5.vprintf$FUNC
);
static final FunctionDescriptor vsprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vsprintf$MH = RuntimeHelper.downcallHandle(
"vsprintf",
constants$5.vsprintf$FUNC
);
static final FunctionDescriptor __msvcrt_fprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __msvcrt_fprintf$MH = RuntimeHelper.downcallHandleVariadic(
"__msvcrt_fprintf",
constants$5.__msvcrt_fprintf$FUNC
);
static final FunctionDescriptor __msvcrt_printf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __msvcrt_printf$MH = RuntimeHelper.downcallHandleVariadic(
"__msvcrt_printf",
constants$5.__msvcrt_printf$FUNC
);
static final FunctionDescriptor __msvcrt_sprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __msvcrt_sprintf$MH = RuntimeHelper.downcallHandleVariadic(
"__msvcrt_sprintf",
constants$5.__msvcrt_sprintf$FUNC
);
static final FunctionDescriptor __msvcrt_vfprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __msvcrt_vfprintf$MH = RuntimeHelper.downcallHandle(
"__msvcrt_vfprintf",
constants$5.__msvcrt_vfprintf$FUNC
);
}

View File

@ -0,0 +1,67 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$6 {
static final FunctionDescriptor __msvcrt_vprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __msvcrt_vprintf$MH = RuntimeHelper.downcallHandle(
"__msvcrt_vprintf",
constants$6.__msvcrt_vprintf$FUNC
);
static final FunctionDescriptor __msvcrt_vsprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle __msvcrt_vsprintf$MH = RuntimeHelper.downcallHandle(
"__msvcrt_vsprintf",
constants$6.__msvcrt_vsprintf$FUNC
);
static final FunctionDescriptor _snprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _snprintf$MH = RuntimeHelper.downcallHandleVariadic(
"_snprintf",
constants$6._snprintf$FUNC
);
static final FunctionDescriptor _vsnprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _vsnprintf$MH = RuntimeHelper.downcallHandle(
"_vsnprintf",
constants$6._vsnprintf$FUNC
);
static final FunctionDescriptor _vscprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _vscprintf$MH = RuntimeHelper.downcallHandle(
"_vscprintf",
constants$6._vscprintf$FUNC
);
static final FunctionDescriptor snprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle snprintf$MH = RuntimeHelper.downcallHandleVariadic(
"snprintf",
constants$6.snprintf$FUNC
);
}

View File

@ -0,0 +1,69 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$7 {
static final FunctionDescriptor vsnprintf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vsnprintf$MH = RuntimeHelper.downcallHandle(
"vsnprintf",
constants$7.vsnprintf$FUNC
);
static final FunctionDescriptor vscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vscanf$MH = RuntimeHelper.downcallHandle(
"vscanf",
constants$7.vscanf$FUNC
);
static final FunctionDescriptor vfscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vfscanf$MH = RuntimeHelper.downcallHandle(
"vfscanf",
constants$7.vfscanf$FUNC
);
static final FunctionDescriptor vsscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle vsscanf$MH = RuntimeHelper.downcallHandle(
"vsscanf",
constants$7.vsscanf$FUNC
);
static final FunctionDescriptor getdelim$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle getdelim$MH = RuntimeHelper.downcallHandle(
"getdelim",
constants$7.getdelim$FUNC
);
static final FunctionDescriptor getline$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle getline$MH = RuntimeHelper.downcallHandle(
"getline",
constants$7.getline$FUNC
);
}

View File

@ -0,0 +1,61 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$8 {
static final FunctionDescriptor fscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fscanf$MH = RuntimeHelper.downcallHandleVariadic(
"fscanf",
constants$8.fscanf$FUNC
);
static final FunctionDescriptor scanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle scanf$MH = RuntimeHelper.downcallHandleVariadic(
"scanf",
constants$8.scanf$FUNC
);
static final FunctionDescriptor sscanf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle sscanf$MH = RuntimeHelper.downcallHandleVariadic(
"sscanf",
constants$8.sscanf$FUNC
);
static final FunctionDescriptor fgetc$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fgetc$MH = RuntimeHelper.downcallHandle(
"fgetc",
constants$8.fgetc$FUNC
);
static final FunctionDescriptor fgets$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fgets$MH = RuntimeHelper.downcallHandle(
"fgets",
constants$8.fgets$FUNC
);
static final FunctionDescriptor fputc$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fputc$MH = RuntimeHelper.downcallHandle(
"fputc",
constants$8.fputc$FUNC
);
}

View File

@ -0,0 +1,59 @@
// Generated by jextract
package foreign.c;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;
import java.lang.foreign.*;
import static java.lang.foreign.ValueLayout.*;
class constants$9 {
static final FunctionDescriptor fputs$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle fputs$MH = RuntimeHelper.downcallHandle(
"fputs",
constants$9.fputs$FUNC
);
static final FunctionDescriptor gets$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle gets$MH = RuntimeHelper.downcallHandle(
"gets",
constants$9.gets$FUNC
);
static final FunctionDescriptor puts$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle puts$MH = RuntimeHelper.downcallHandle(
"puts",
constants$9.puts$FUNC
);
static final FunctionDescriptor ungetc$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle ungetc$MH = RuntimeHelper.downcallHandle(
"ungetc",
constants$9.ungetc$FUNC
);
static final FunctionDescriptor _filbuf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _filbuf$MH = RuntimeHelper.downcallHandle(
"_filbuf",
constants$9._filbuf$FUNC
);
static final FunctionDescriptor _flsbuf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT,
Constants$root.C_LONG$LAYOUT,
Constants$root.C_POINTER$LAYOUT
);
static final MethodHandle _flsbuf$MH = RuntimeHelper.downcallHandle(
"_flsbuf",
constants$9._flsbuf$FUNC
);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf("Hello World from Project Panama Baeldung Article");
return 0;
}