f624800b84
I was forced to manually do update the following files, because otherwise they would be ignored according .gitignore settings. Probably they should be deleted from repo. Interop/.idea/compiler.xml Interop/.idea/gradle.xml Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml Interop/.idea/modules.xml Interop/.idea/modules/Indexer/Indexer.iml Interop/.idea/modules/Runtime/Runtime.iml Interop/.idea/modules/StubGenerator/StubGenerator.iml backend.native/backend.native.iml backend.native/bc.frontend/bc.frontend.iml backend.native/cli.bc/cli.bc.iml backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt backend.native/tests/link/lib/foo.kt backend.native/tests/link/lib/foo2.kt backend.native/tests/teamcity-test.property
94 lines
2.1 KiB
Modula-2
94 lines
2.1 KiB
Modula-2
headerFilter = NOTHING
|
|
---
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
typedef int (*atoiPtrType)(const char*);
|
|
|
|
static atoiPtrType getAtoiPtr() {
|
|
return &atoi;
|
|
}
|
|
|
|
static void __printInt(int x) {
|
|
printf("%d\n", x);
|
|
}
|
|
|
|
static void* __getPrintIntPtr() {
|
|
return &__printInt;
|
|
}
|
|
|
|
typedef void* (*getPrintIntPtrPtrType)(void);
|
|
|
|
static getPrintIntPtrPtrType getGetPrintIntPtrPtr() {
|
|
return &__getPrintIntPtr;
|
|
}
|
|
|
|
static double __add(double x, double y) {
|
|
return x + y;
|
|
}
|
|
|
|
typedef double (*addPtrType)(double, double);
|
|
|
|
static addPtrType getAddPtr() {
|
|
return &__add;
|
|
}
|
|
|
|
static int __doubleToInt(double x) {
|
|
return (int) x;
|
|
}
|
|
|
|
typedef int (*doubleToIntPtrType)(double);
|
|
|
|
static doubleToIntPtrType getDoubleToIntPtr() {
|
|
return &__doubleToInt;
|
|
}
|
|
|
|
static _Bool __isIntPositive(int x) {
|
|
return x > 0;
|
|
}
|
|
|
|
typedef _Bool (*isIntPositivePtrType)(int);
|
|
|
|
static isIntPositivePtrType getIsIntPositivePtr() {
|
|
return &__isIntPositive;
|
|
}
|
|
|
|
static unsigned int getMaxUInt(void) {
|
|
return 0xffffffff;
|
|
}
|
|
|
|
static typeof(&getMaxUInt) getMaxUIntGetter() {
|
|
return &getMaxUInt;
|
|
}
|
|
|
|
typedef int (*longSignatureFunctionPtrType)(
|
|
int, int, int, int, int, int, int, int, int, int, int, int,
|
|
int, int, int, int, int, int, int, int, int, int, int
|
|
);
|
|
|
|
typedef int (*notSoLongSignatureFunctionPtrType)(
|
|
int, int, int, int, int, int, int, int, int, int, int,
|
|
int, int, int, int, int, int, int, int, int, int, int
|
|
);
|
|
|
|
static int longSignatureFunction(
|
|
int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10, int p11, int p12,
|
|
int p13, int p14, int p15, int p16, int p17, int p18, int p19, int p20, int p21, int p22, int p23
|
|
) {
|
|
return 42;
|
|
}
|
|
|
|
static int notSoLongSignatureFunction(
|
|
int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10, int p11, int p12,
|
|
int p13, int p14, int p15, int p16, int p17, int p18, int p19, int p20, int p21, int p22
|
|
) {
|
|
return 42;
|
|
}
|
|
|
|
static longSignatureFunctionPtrType getLongSignatureFunctionPtr() {
|
|
return &longSignatureFunction;
|
|
}
|
|
|
|
static notSoLongSignatureFunctionPtrType getNotSoLongSignatureFunctionPtr() {
|
|
return ¬SoLongSignatureFunction;
|
|
} |