I think it'd be better to have
with-foreign-object (var type &key (count 1)) &body body
or even
with-foreign-object (var type options) &body body
(where options are used as keyword arguments to foreign-alloc) or some such instead of
with-foreign-object (var type &optional (count 1)) &body body
given that we have
foreign-alloc type &key initial-element initial-contents (count 1)
Unless I'm thoroughly confused and with-foreign-object does not correspond to foreign-alloc (as with-open-file corresponds to open).
Andras