[Freeswitch-users] #define SWITCH_ADD_AP

Michael Jerris mike at jerris.com
Tue Sep 10 23:40:16 MSD 2013


it allows you to make a block in the middle of code without causing warnings on some compilers.  This keeps warnings due to trailing ; from happening on some compilers.


On Sep 10, 2013, at 3:31 PM, Valter Nogueira <valter at fastway.com.br> wrote:

> Why does the definiton of SWITCH_ADD_AP has a for(;;;) looping in it?
> 
> #define SWITCH_ADD_API(api_int, int_name, descript, funcptr, syntax_string) \
> 	for (;;) { \
> 	api_int = (switch_api_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_API_INTERFACE); \
> 	api_int->interface_name = int_name; \
> 	api_int->desc = descript; \
> 	api_int->function = funcptr; \
> 	api_int->syntax = syntax_string; \
> 	break; \
> 	}
> 




Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list