Assuming that astruc is just a memory address, why do we need to call 'get-integer' before we get at the string?
I redefined the struct so that the char* came before the int and noticed that we still need to use 'get-integer' before 'get-string'. But getting the integer is still straightforward: (get-integer (+ astruc 4))
My previous answer to your question was wrong and I have deleted that post.
This is why the 'get-integer' in:
(get-string (get-integer (+ astruc 4)))
is necessary. 'astruc' is the address of the data structure returned. 4 bytes into the structure is a 'char *' which is another address, this time to a string buffer. So:
(+ astruc 4) = > address where address pointer can be found
(get-integer (+ astruc 4)) => address of string buffer
There is a relation between 'pack' and 'get-integer' which also makes it clear: