mirror of
https://github.com/logos-storage/nim-leopard.git
synced 2026-01-03 22:23:12 +00:00
Replaces no-error passC with importc pointer type definition
This commit is contained in:
parent
dae62a1b9a
commit
d4a9498019
@ -12,12 +12,6 @@ push: {.upraises: [].}
|
||||
|
||||
{.deadCodeElim: on.}
|
||||
|
||||
# in gcc-14, incompatible-pointer-types warning was promoted to error.
|
||||
# function arguments in C of type 'const void* const * const' are seen as
|
||||
# not compatible with nim 'ptr pointer' type.
|
||||
# We use localPassC to disable this check for the compiling of nim-leopard.
|
||||
{.localPassC:"-Wno-error=incompatible-pointer-types"}
|
||||
|
||||
import pkg/stew/results
|
||||
|
||||
import ./wrapper
|
||||
|
||||
@ -67,6 +67,9 @@ import std/compilesettings
|
||||
import std/os
|
||||
import std/strutils
|
||||
|
||||
type
|
||||
LeoDataPtr* {.importc: "const void* const * const", bycopy.} = pointer
|
||||
|
||||
const
|
||||
LeopardCmakeFlags {.strdefine.} =
|
||||
when defined(macosx):
|
||||
@ -225,7 +228,7 @@ proc leoEncode*(
|
||||
originalCount: cuint;
|
||||
recoveryCount: cuint;
|
||||
workCount: cuint;
|
||||
originalData: ptr pointer;
|
||||
originalData: LeoDataPtr;
|
||||
workData: ptr pointer): LeopardResult {.leo, importc: "leo_encode".}
|
||||
## Number of bytes in each data buffer
|
||||
## Number of original_data[] buffer pointers
|
||||
@ -277,8 +280,8 @@ proc leoDecode*(
|
||||
originalCount: cuint;
|
||||
recoveryCount: cuint;
|
||||
workCount: cuint;
|
||||
originalData: ptr pointer;
|
||||
recoveryData: ptr pointer;
|
||||
originalData: LeoDataPtr;
|
||||
recoveryData: LeoDataPtr;
|
||||
workData: ptr pointer): LeopardResult {.leo, importc: "leo_decode".}
|
||||
## Number of bytes in each data buffer
|
||||
## Number of original_data[] buffer pointers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user