Hi, all.

I found a strange behavior in alien:make-alien.  It would appear that
make-alien of an array doesn't evaluate its SIZE argument:

> * (in-package :alien)
> ; 
> #<The ALIEN package, 381/467 internal, 34/44 external>
> 
> * (make-alien (array char 10))
> NIL
> #<Alien (* (ARRAY (SIGNED 8) 10)) at #x0806C650>

No problem there.

> * (let* ((n 3)
>          (a (make-alien (array (* char) n))))
>     a)
> ; 
> 
> ; In: LET* ((N 3) (A #))
> 
> ;   (MAKE-ALIEN (ARRAY # N))
> ; Error: (during macroexpansion)
> ; 
> ; Error in function ALIEN-ARRAY-TYPE-TRANSLATOR:
> ;    First dimension is not a non-negative fixnum or NIL: N

Problem here, though.

How do you define arbitrary size arrays using make-alien?

Thanks!

-- Larry

p.s.  CMU Common Lisp CVS release-18e-branch + minimal debian patches


Reply via email to