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

Re: more more



Rob_MacLachlan@LISP-PMAX1.SLISP.CS.CMU.EDU writes:
> And you can't (make-alien (struct foo) 13) either?
> 
> Or can you?  How do you allocate a chunk of 13 foos?  I would guess that
> (make-alien (* (struct foo)) 13) would allocate 13 (* (struct foo))'s and
> not 13 foos.
> 
>   Rob

First of all, we have to decide if make-alien makes an alien of the
specified type and returns a pointer to it, or makes an alien of
whatever type the alien (pointer) type points to.  I kinda like the
first option better.  Then the optional argument would just mean make
n aliens of this type and return a pointer to the first.

So (make-alien int 10) is valid and meaningful.

-William