im_slice_delete

3 views
Skip to first unread message

nidujay

unread,
May 12, 2008, 6:35:16 PM5/12/08
to imbu...@googlegroups.com
Hi,

im_memory.h : im_slice_delete

I'm not exactly sure what is achieved by the if(1) condition in the macro.

Dushara

Zhe Su

unread,
May 12, 2008, 10:16:58 PM5/12/08
to imbu...@googlegroups.com
The following else statement can make sure that the pointer mem has correct type.

dushara

unread,
May 13, 2008, 2:03:44 AM5/13/08
to imbus-dev
Doesn't it generate a 'condition always true' type of warning?

On May 13, 12:16 pm, "Zhe Su" <james...@gmail.com> wrote:
> The following else statement can make sure that the pointer mem has correct
> type.
>

yetist

unread,
May 13, 2008, 2:43:37 AM5/13/08
to imbu...@googlegroups.com
can the following else statement be reached and run? I don't understand this.

2008/5/13 dushara <nid...@gmail.com>:

--
Best regards!

yetist

dushara

unread,
May 13, 2008, 3:09:14 AM5/13/08
to imbus-dev
No it's there to generate a warning if the pointer passed is of a
different type.

im_slice_free accepts (essentially) a void. The else is there to
verify that Mem is of type struct_type.

The else clause will be optimised out.


On May 13, 4:43 pm, yetist <yet...@gmail.com> wrote:
> can the following else statement be reached and run? I don't understand this.
>
> 2008/5/13 dushara <nidu...@gmail.com>:

yetist

unread,
May 13, 2008, 3:19:46 AM5/13/08
to imbu...@googlegroups.com
thank you.

2008/5/13 dushara <nid...@gmail.com>:


>
>
> The else clause will be optimised out.
>
>
>
> On May 13, 4:43 pm, yetist <yet...@gmail.com> wrote:
> > can the following else statement be reached and run? I don't understand this.
> >
>

--
Best regards!

yetist

Reply all
Reply to author
Forward
0 new messages