This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C to Scheme questions regarding bit vectors



    Craig> raw, to some scheme code, but the gh_* interface doesn't
    Craig> seem to have a way to setup bit vectors.  I would prefer
    Craig> not having to create a vector with gh_vector and then step
    Craig> thru it and use gh_vset for each bit with an SCM_BOOL.

    Craig> Is there an easy way to convert a big buffer into a SCM bit
    Craig> vector?  Would you suggest using a different scheme data
    Craig> structure to represent a raw packet (ethernet headers and
    Craig> all) in guile?

    Craig> Do I need to go past the gh_* interface to do this?

Craig, until now I have focused mostly on implementing gh_ data
conversion for standard Scheme data types, like lists and vectors and
scalar types.

I will look in to bit vectors now, but you could also look in to what
the SCM interface offers.  It is not fully documented or commented
yet, but the routines are certainly there, since that's how bit
vectors are implemented.