VirtualComputer/libpxc/pxc.c
NorbiPeti 026edffed4
Java-C connection works
Pointers can be passed freely
2018-11-14 23:00:58 +01:00

29 lines
564 B
C

#include <stdio.h>
typedef long long int lli;
void* image=NULL;
void setSource(lli address) {
image=(void*)address;
}
int convert(int px[], int *out[]) {
printf("convert...\n");
printf("px0: %d\n", px[0]);
*out[0]=19;
return 0;
}
void __attribute__ ((constructor)) initLibrary(void) {
//
// Function that is called when the library is loaded
//
printf("Library is initialized\n");
}
void __attribute__ ((destructor)) cleanUpLibrary(void) {
//
// Function that is called when the library is »closed«.
//
printf("Library is exited\n");
}