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

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

end of thread, other threads:[~2024-05-13  0:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-12 21:52 dereferencing C pointer at scheme level Andy Tai
2024-05-13  0:14 ` Nala Ginrut

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).