Re: Custom foreign types

2024-06-20 Thread Matt Wette
On 6/19/24 5:11 PM, Matt Wette wrote: On 6/16/24 7:13 PM, Ryan Raymond wrote: Hello, all. I know we can create pointers to structs with make-c-struct, but I would like to pass structs directly as arguments to foreign functions. I can do that by using bytevector-uint-ref, and setting the siz

Re: Custom foreign types

2024-06-19 Thread Matt Wette
On 6/16/24 7:13 PM, Ryan Raymond wrote: Hello, all. I know we can create pointers to structs with make-c-struct, but I would like to pass structs directly as arguments to foreign functions. I can do that by using bytevector-uint-ref, and setting the size to that of the struct, but when it is time

RE: Custom foreign types

2024-06-19 Thread Maxime Devos via General Guile related discussions
>Hello, all. >I know we can create pointers to structs with make-c-struct, but I would like to pass structs directly as arguments to foreign functions. I can do that by using bytevector-uint-ref, and setting the size to that of the struct, but when it is time to specify the type in pointer->proced

Custom foreign types

2024-06-16 Thread Ryan Raymond
Hello, all. I know we can create pointers to structs with make-c-struct, but I would like to pass structs directly as arguments to foreign functions. I can do that by using bytevector-uint-ref, and setting the size to that of the struct, but when it is time to specify the type in pointer->procedure