guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C Struct Interface


From: Noah Lavine
Subject: C Struct Interface
Date: Sun, 11 Jul 2010 22:20:33 -0400

Hello,

I'm trying to use Scheme structures, as defined in struct.c and
struct.h, and I have a question about the interface.

It seems from the code that scm_c_make_structv(vtable, ntail, ninit,
inits) is the main function for creating structs. I'm assuming that
ntail is the number of elements in the tail array of the struct, ninit
is the total number of elements I want to init, and inits is an array
containing the initial values. Is this correct?

Also, if I make a struct in this way, can I then do
SCM_STRUCT_SLOT_REF(struct, n) to get at it, where n=0 is the first
slot?

Thanks,
Noah



reply via email to

[Prev in Thread] Current Thread [Next in Thread]