[asterisk-dev] ast_module_info(_standard)\? discrepancy

Caio Begotti caio at ueberalles.net
Wed Aug 15 22:14:39 CDT 2007


I was thinking about the reason to have two way to declare a given  
module info and register its load/unload/reload functions and thought  
it wouldn't hurt to ask. Please keep in mind that I honestly didn't  
understand this yet: I am not ranting but that seems ugly or at least  
confusing to me :-)

What's the default define that should be used in new modules, for  
instance: AST_MODULE_INFO or AST_MODULE_INFO_STANDARD? Isn't there a  
default anyway or both has a reason to exist? I checked the module.h  
and noticed that AST_MODULE_INFO_STANDARD is the older form (dated  
back from Aug 2006) and that AST_MODULE_INFO was added/changed by  
Kevin when closing a issue related to module embedding (on Feb 2007,  
that Russell already mentioned in the list).

I suspect that since AST_MODULE_INFO can handle module embedding it  
is the one to use, right? If that's the case, almost 50% of the .c  
module files from trunk still uses AST_MODULE_INFO_STANDARD. Would it  
worth to change as a janitor job or that's useless to do right now?

PS: svn diff -r40722:56092 trunk/include/asterisk/module.h

Cheers!

--
Caio Begotti (caio1982)
http://caio.ueberalles.net





More information about the asterisk-dev mailing list