[Ecls-list] Any documentation for the C library?
Gabriel Dos Reis
gdr at integrable-solutions.net
Mon Feb 23 16:02:08 UTC 2009
On Mon, Feb 23, 2009 at 8:53 AM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> On Mon, Feb 23, 2009 at 3:20 PM, Gabriel Dos Reis
> <gdr at integrable-solutions.net> wrote:
>> At the moment, OpenAxiom for
>> ECL generates c-inline calls by refering to fields of ->vector.self
>> of an object.
> Would something like ecl_array_pointer(cl_object a, cl_fixnum
> displacement) help here?
Yes, I think this would help, along with official 'C type names' for the
corresponding element types. E.g., for a simple arrays of 8-bit integer,
would it be uint8_t or just the 'byte' typedef. similar question for the
other integer types.
BTW, it would be nice if ECL had guranteed specialized version of
16-bit, 32-bit, and 64-bit integers. At the moment on 32-bit machine,
'long' is 32-bit; but on 64-bit machines, it is 64-bit. I suspect support
for C99 'long long' is now common place, and maybe ECL can make
use of it.
>> The problem for OpenAxiom is when there are several ECL versions out
>> there with differing structures and having to support each of them. For example
>> I develop with current trunk, but some OS distros chip either 0.9l or
> I am really sorry for this inconvenience. Hopefully this will not
> repeat in the future, but let's try to find a more stable solution.
> The problem of incompatible changes between releases is best solved by
> conditionalizations. Currently ECL only provides a version number for
> the lisp environment and only in the form of a function, which is not
> useful for #+/#-.
> I can first provide a C macro, kind of ECL_VERSION_NUMBER, which is an
> increasing number of the form yymmvv (81200 in the previous case) and
> which you can use for the automatically generated code.
I think this is definitely an improvement, and if the Lisp version is somehow
possible, that would be wonderful.
> Conditionalization at the lisp level can probably be improved with
> customized reader macros or customized features. I can provide the
> same numeric version in the form of a lisp constant
> EXT:+ECL-VERSION-NUMBER+, so that you can do something like
> #+(or #.(< 81200 ext:+ecl-version-number+ 90102))
> #-(or #.(< 81200 ext:+ecl-version-number+ 90102))
> Would that help?
More information about the ecl-devel