[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: segmenation fault
From: |
Chris Vine |
Subject: |
Re: segmenation fault |
Date: |
Fri, 9 Jun 2017 12:18:34 +0100 |
On Fri, 9 Jun 2017 10:17:18 +0200
Catonano <address@hidden> wrote:
> 2017-06-09 10:00 GMT+02:00 Amirouche Boubekki
> <address@hidden> :
>
> > It's something like (bytevector->pointer (make-vector)) there is a
> > make-double-pointer procedure in guile git
>
> Thank you !!
>
> I took a look at the guile-gcrypt code and I found
>
> (bytevector->pointer (make-bytevector (sizeof '*))
>
> I was going to write this right now !
>
> It works !
> I just called freexl-open and it returned 0 !!
If you want to manipulate a scheme bytevector at the C level you can
also look at the c-write procedure here for ideas:
https://github.com/ChrisVine/guile-a-sync/blob/master/lib/unix_write.c
(As a point of detail, this procedure is only required with guile-2.0 -
with guile-2.2, suspendable ports are used instead - but it shows you
one approach to working with scheme buffers or other objects.)
Chris
Re: segmenation fault, Catonano, 2017/06/09