guile-user
[Top][All Lists]
Advanced

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

Re: how to access c-array member in c-structure?


From: tomas
Subject: Re: how to access c-array member in c-structure?
Date: Wed, 30 Mar 2016 10:07:41 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Mar 30, 2016 at 10:03:28AM +0200, Taylan Ulrich Bayırlı/Kammer wrote:
> Park SungMin <address@hidden> writes:
> 
> > (let ((c-type (list int int (make-list 20000 int))))
> >     (parse-c-struct
> >      ((pointer->procedure
> >        c-type
> >        (dynamic-func "make_foo" libfoo)
> >        (list int int))
> >       4 11)
> >      c-type))
> >
> > also run well…but seems less effective.(if more bigger size…2000000??) 
> 
> You could create the type object once at program startup and use it
> many times.
> 
>     (define foo-type
>       (list int int (make-list 2000000 int)))

If I understood Park SungMin right, the problem is rather with the
representation of a huge array as a list?

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlb7iU0ACgkQBcgs9XrR2kY8iwCdG3h68BefLs69cBsc0M0gC4l8
0WwAnRpSNt2YVQASj3SwCi9Ct34zUMm5
=fB2/
-----END PGP SIGNATURE-----



reply via email to

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