Re: FFI to C, what is the equivalent to const u8 *

2017-02-15 Thread lucian
1. C lang: passing (void *) as an parameter (typed *) seems legit for the gcc compiler (apparently not so for g++) 2. the Nim to C backend _might_ actually consider the type of the message variable and create the proper/compatible parameter for the C call both work in your favor and this s

Re: FFI to C, what is the equivalent to const u8 *

2017-02-14 Thread enthus1ast
Thanks, works!

Re: FFI to C, what is the equivalent to const u8 *

2017-02-14 Thread cheatfate
Does it helps? proc crypto_ed25519_sign(signature: array[64, uint8]; secret_key: array[32, uint8]; message: ptr uint8; message_size: csize) {.cdecl, importc: "crypto_ed25519_sign".} var me

FFI to C, what is the equivalent to const u8 *

2017-02-14 Thread enthus1ast
Hi, i've got a c declaration that i like to wrap: void crypto_ed25519_sign(u8signature[64], const u8 secret_key[32], const u8 *message, size_tmessage_si