Eigenstate: myrddin-dev mailing list

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

Pointer arithmetic and iterations


Hi,

Myrddin doesn't seem to support pointer arithmetic.
What is the idiomatic way to express the following C code? Any examples?

typedef void (*initfn_t)(void);
> extern initfn_t  *__init_start__;
> initfn_t fp;
> for (fp = __init_start__; fp < __init_end__; fp++) {
>     fp();
> }


and

>
> initfn_t fp = (initfn_t *)__init_start__;
> while (*fp++) {
>     fp();
> }


--
mura

Follow-Ups:
Re: Pointer arithmetic and iterationsOri Bernstein <ori@xxxxxxxxxxxxxx>