Initial import
This commit is contained in:
commit
405b86068e
324 changed files with 163599 additions and 0 deletions
30
tests/tforwty2.nim
Executable file
30
tests/tforwty2.nim
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
# Test for a hard to fix internal error
|
||||
# occured in the SDL library
|
||||
|
||||
{.push dynlib: "SDL.dll", callconv: cdecl.}
|
||||
|
||||
when defined(windows):
|
||||
type
|
||||
PSDL_semaphore = ptr TSDL_semaphore
|
||||
TSDL_semaphore = record
|
||||
id: uint32
|
||||
count: UInt32
|
||||
|
||||
elif defined(linux):
|
||||
type
|
||||
PSDL_semaphore = ptr TSDL_semaphore
|
||||
TSDL_semaphore = record
|
||||
sem: Pointer #PSem_t;
|
||||
when not defined(USE_NAMED_SEMAPHORES):
|
||||
sem_data: int
|
||||
when defined(BROKEN_SEMGETVALUE):
|
||||
# This is a little hack for MacOS X -
|
||||
# It's not thread-safe, but it's better than nothing
|
||||
sem_value: cint
|
||||
|
||||
type
|
||||
PSDL_Sem = ptr TSDL_Sem
|
||||
TSDL_Sem = TSDL_Semaphore
|
||||
|
||||
proc SDL_CreateSemaphore(initial_value: UInt32): PSDL_Sem
|
||||
{.import: "SDL_CreateSemaphore".}
|
||||
Loading…
Add table
Add a link
Reference in a new issue