- Trying to fix this broken importC (jeese)

-
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-26 22:22:11 +02:00
parent 9592c615bf
commit ddd6cb1275
3 changed files with 16 additions and 5 deletions

View File

@ -7,5 +7,10 @@
"license": "LGPL v3.0",
"name": "libsnooze",
"targetType": "library",
"sourceFiles": ["source/libsnooze/clib.c"]
"buildTypes": {
"unittest-cov": {
"dflags": ["source/libsnooze/clib.c"]
}
}
}

View File

@ -3,9 +3,12 @@ module libsnooze.event;
// TODO: Would be nice if this built without unit tests failing
// ... so I'd like libsnooze.clib to work as my IDE picks up on
// ... it then
import clib : pipe, write, read;
import clib : select, fd_set, fdSetZero, fdSetSet;
import clib : timeval, time_t, suseconds_t;
import libsnooze.clib : pipe, write, read;
import libsnooze.clib : select, fd_set, fdSetZero, fdSetSet;
import libsnooze.clib : timeval, time_t, suseconds_t;
import core.thread : Thread, Duration, dur;
import core.sync.mutex : Mutex;
import libsnooze.exceptions : SnoozeError;
@ -22,6 +25,9 @@ public class Event
private bool nonFail = false;
/**
* Constructs a new Event
*/
this()
{
internalInit();
@ -33,6 +39,7 @@ public class Event
{
// TODO: Switch to eventfd in the future
initPipe();
pragma(msg, "Buulding on linux uses the `pipe(int*)` system call");
}
else version(Windows)
{

View File

@ -1,5 +1,4 @@
module libsnooze;
public import libsnooze.event : Event;
public import clib;
public import libsnooze.exceptions;