Re: declarations in crunch.h

"felix.winkelmann--- via Chicken-users" <[email protected]>
Newsgroups gmane.lisp.scheme.chicken
Message-ID <[email protected]>
> Hi,
>
> Another beginner question as I try to understand how stuff works in Crunch, so there is this typedef section in crunch.h:
>
> ```
>  138 typedef crunch_string_block *crunch_string;
>  139 typedef crunch_vector_block *crunch_vector;
>  140 typedef crunch_u8vector_block *crunch_u8vector;
>  141 typedef crunch_s8vector_block *crunch_s8vector;
>  142 typedef crunch_u16vector_block *crunch_u16vector;
>  143 typedef crunch_s16vector_block *crunch_s16vector;
>  144 typedef crunch_u32vector_block *crunch_u32vector;
>  145 typedef crunch_s32vector_block *crunch_s32vector;
>  146 typedef crunch_u64vector_block *crunch_u64vector;
>  147 typedef crunch_s64vector_block *crunch_s64vector;
>  148 typedef crunch_f32vector_block *crunch_f32vector;
>  149 typedef crunch_f64vector_block *crunch_f64vector;
>  150 typedef crunch_c64vector_block *crunch_c64vector;
>  151 typedef crunch_c128vector_block *crunch_c128vector;
>  152 typedef crunch_port_block *crunch_port;
>  153 typedef crunch_record_block *crunch_record;
> ```
>
> I would expect that `*crunch_string` is defined somewhere. But it is not, not in crunch.h and also not in the generated out.c file.

"crunch_string" is typedef'd to be a pointer to "crunch_string_block", which in turn
is typedef'd to be a "crunch_sequence(char)" which is a macro that expands into
a struct with elements of type "char".


cheers,
felix
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.