Skip to content
Commit 4e207452 authored by Joshua Elsasser's avatar Joshua Elsasser Committed by Luís Oliveira
Browse files

Teach groveler cstruct :count :auto to work on arrays anywhere in the struct.

The :count :auto logic assumed the struct member was an array which
filled the remainder of the struct, and would generate incorrect cffi
cstruct forms when any other struct members followed one declared
:count :auto.

The following C struct definition and groveler cstruct form
demonstrate this:

struct charbuf {
	char three_chars[3];
	int clobbered_int
};

(cstruct charbuf "struct charbuf"
  (three-chars "three_chars" :type :char :count :auto)
  (clobbered-int "clobbered_int" :type :int))
parent 5204ef62
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment