[Ecls-list] A christmas gift of unboxed functions, etc (experimental)

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sat Jan 6 16:31:23 UTC 2007


2006/12/28, Dave Roberts <dave at vyatta.com>:
> Juan Jose Garcia-Ripoll wrote:
> > 2006/12/28, Dave Roberts <dave at vyatta.com>:
> >> Juan Jose Garcia-Ripoll wrote:
> >> >  - MAKE-ARRAY accepts a foreign pointer as an argument to
> >> :DISPLACED-TO
> >>
> >> Does this require one to also use :ELEMENT-TYPE ? Or does it assume a
> >> particular element type (e.g. (UNSIGNED-BYTE 8) )?
> >
> > You have to supply an element type. But be careful: ELEMENT-TYPE = T
> > sees the foreign region as an array of pointers and that can be
> > dangerous. I am not sure whether I should add a check that prevents
> > this.
>
> That was sort of the root of my question. Seems like you could easily
> forget :ELEMENT-TYPE and then it would default to T, which would give
> you that case, which could be pretty dangerous.

I have fixed the fix :-) :ELEMENT-TYPE = T is not allowed together
with :DISPLACED-TO = foreign pointer. This makes the extension now
completely harmless, except for the fact that the pointer can point
anywhere.

Juanjo

-- 
Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 2804 (Spain)
http://teorica.fis.ucm.es/~jjgarcia/




More information about the ecl-devel mailing list