* tests/gpgscm/scheme-private.h (struct scheme): Use (void *) for
alloc_seg.
* tests/gpgscm/scheme.c (alloc_cellseg): Use (void *) for cp. Use
(void *) for coercion of address calculation.
--
In old C language, (char *) means an address. In modern C, it's
specifically an address with alignment=1. It's good to use (void *) for
an address, because newer compiler emits warnings. Note: in this
particular case, it is just a warning and the code is safe against
invalid alignment, though.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tests/gpgscm/scheme.c (opexe_0): Include names of missing function
parameters in the error message.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/scheme.c (enum scheme_types): Add types for boolean,
nil, eof, and the sink object.
(type_to_string): Handle new types.
(scheme_init_custom_alloc): Give special objects a type.
Signed-off-by: Justus Winter <justus@g10code.com>
This potentially causes a crash if the garbage collector marks an eof
object.
* tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize
'EOF_OBJ'.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/scheme.c (type_to_string): New function.
(Eval_Cycle): Include actual type in error message.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/scheme.c (mk_integer): Rename arg NUM to N.
(fill_vector): Ditto.
(mark): Rename var NUM to N.
(set_slot_in_env): Mark SC as unused.
(is_any): Mark P as unused.
--
Signed-off-by: Werner Koch <wk@gnupg.org>
* tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable.
* tests/gpgscm/scheme.h (struct scheme_interface): New field
'mk_port_from_file'.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/scheme.c (opexe_0): Include the value that we tried to
evaluate as function-like in the error message.
Signed-off-by: Justus Winter <justus@g10code.com>