Removed debug messages.

This commit is contained in:
retoor 2024-12-08 19:58:50 +01:00
parent d810fc29c9
commit 1c3b867b68
4 changed files with 4 additions and 12 deletions

View File

@ -2,8 +2,9 @@ all: build run
build:
gcc main.c -lsqlite3 -lreadline -o sorm
gcc -shared -o sorm.so -fPIC main.c -lsqlite3 -lreadline
gcc -shared -o sorm.so -fPIC main.c -lsqlite3 -lreadline
run:
./sorm
./sorm

BIN
sorm

Binary file not shown.

9
sorm.h
View File

@ -73,18 +73,14 @@ int sorm_instance_count = 0;
int sormc(char *path) {
// sorm connect
printf("HIERR\n");
sorm_instance_count++;
sorm_instance_count++;
sorm_instances = realloc(sorm_instances, sorm_instance_count * sizeof(sorm_t *) + sorm_instance_count * sizeof(sorm_t));
printf("HIERR\n");
sorm_t *db = &sorm_instances[sorm_instance_count - 1];
printf("HIERR\n");
db->conn = NULL;
printf("HIERR\n");
db->csv = NULL;
db->current_column = 0;
db->current_row = 0;
@ -99,7 +95,6 @@ int sormc(char *path) {
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db->conn));
return 0;
}
printf("DONE!\n");
return sorm_instance_count;
}
sorm_t *sormg(int ptr) { return &sorm_instances[ptr - 1]; }
@ -312,10 +307,6 @@ char *sormm(sorm_t *db) {
sorm_ptr sormq(int sorm, char *sql, ...) {
sorm_t *db = sormg(sorm);
if (db->csv) {
// free(db->csv);
// db->csv = NULL;
}
_sorm_query_start = nsecs();
db->time_query_start = nsecs();
va_list args;

BIN
sorm.so

Binary file not shown.