On Tue, Mar 05, 2013 at 05:25:45PM +0100, Jakub Hrozek wrote:
On Fri, Mar 01, 2013 at 02:38:08PM +0100, Pavel Březina wrote:
>
> Create a macro for:
> *body = (uint8_t *) mock() => mock_as(uint8_t*)
OK, done.
New tests attached.
Maybe you can consider the attached patch for inclusion as well? It will
silence a "cast to pointer from integer of different size
[-Wint-to-pointer-cast]" compiler warning.
What do you think of asking upstream if they would like to include
#define mock_type(type) ((type) mock())
and maybe
#define mock_ptr_type(type) ((type) (uintptr_t) mock())
or similar? To avoid conflicts I would recommend to add a prefix, e.g.
sss_mock_type and sss_mock_ptr_type.
bye,
Sumit