2019-07-19 15:12:49 +03:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include "sqliteInt.h"
|
|
|
|
|
2020-09-17 21:20:05 +03:00
|
|
|
const char *RESULT_PTR;
|
2020-09-14 21:00:27 +03:00
|
|
|
int RESULT_SIZE;
|
2019-07-19 15:12:49 +03:00
|
|
|
|
2020-04-17 20:44:55 +03:00
|
|
|
void* allocate(size_t size) {
|
2019-07-19 15:12:49 +03:00
|
|
|
return malloc(size + 1);
|
|
|
|
}
|
|
|
|
|
2020-04-17 20:44:55 +03:00
|
|
|
void deallocate(void *ptr, int size) {
|
2019-07-19 15:12:49 +03:00
|
|
|
free(ptr);
|
|
|
|
}
|
|
|
|
|
2020-09-17 21:20:05 +03:00
|
|
|
void set_result_ptr(const char *ptr) {
|
2020-09-14 21:00:27 +03:00
|
|
|
RESULT_PTR = ptr;
|
|
|
|
}
|
2019-07-19 15:12:49 +03:00
|
|
|
|
2020-09-14 21:00:27 +03:00
|
|
|
void set_result_size(int size) {
|
|
|
|
RESULT_SIZE = size;
|
|
|
|
}
|
|
|
|
|
|
|
|
int get_result_size(void) {
|
|
|
|
return RESULT_SIZE;
|
|
|
|
}
|
2019-07-19 15:12:49 +03:00
|
|
|
|
2020-09-17 21:20:05 +03:00
|
|
|
const char *get_result_ptr() {
|
2020-09-14 21:00:27 +03:00
|
|
|
return RESULT_PTR;
|
2019-07-19 15:12:49 +03:00
|
|
|
}
|
2021-03-04 14:04:48 +03:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
// the main purpose of this empty main is to initialize WASi subsystem
|
|
|
|
return 0;
|
|
|
|
}
|