unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* dereferencing C pointer at scheme level
@ 2024-05-12 18:51 Andy Tai
  2024-05-12 21:53 ` Andy Tai
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Tai @ 2024-05-12 18:51 UTC (permalink / raw)
  To: help-guix

Hi, a question on access to C pointer in scheme:

if a C function returning a pointer is wrapped and accessed from scheme code,

int64_t * func() {
    int64_t *p = make_new_pointer();
   *p = // something

   return p;
}

in scheme (GNU guile)
(set! p (func))

it is possible to see that p is now a pointer.  How to dereference the
pointer to get the value it points to, in guile, on the scheme side?
Thanks


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: dereferencing C pointer at scheme level
  2024-05-12 18:51 dereferencing C pointer at scheme level Andy Tai
@ 2024-05-12 21:53 ` Andy Tai
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Tai @ 2024-05-12 21:53 UTC (permalink / raw)
  To: help-guix

Please ignore the message.  Sent to the wrong list

On Sun, May 12, 2024 at 11:51 AM Andy Tai <atai@atai.org> wrote:
> Hi, a question on access to C pointer in scheme:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-12 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-12 18:51 dereferencing C pointer at scheme level Andy Tai
2024-05-12 21:53 ` Andy Tai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).