From: Joshua Colp Date: Fri, 23 Aug 2013 21:45:48 +0000 (+0000) Subject: Fix a bug where the argc value was passed as no_doc when registering custom sorcery... X-Git-Tag: 13.0.0-beta1~1198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd7436a6c02aaccc0909def8eb834d879050738f;p=thirdparty%2Fasterisk.git Fix a bug where the argc value was passed as no_doc when registering custom sorcery types. This also adds a _nodoc equivalent. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397599 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h index 20bf2d20a3..84a537937d 100644 --- a/include/asterisk/sorcery.h +++ b/include/asterisk/sorcery.h @@ -485,7 +485,24 @@ int __ast_sorcery_object_field_register(struct ast_sorcery *sorcery, const char * \retval -1 failure */ #define ast_sorcery_object_field_register_custom(sorcery, type, name, default_val, config_handler, sorcery_handler, flags, ...) \ - __ast_sorcery_object_field_register(sorcery, type, name, default_val, OPT_CUSTOM_T, config_handler, sorcery_handler, flags, VA_NARGS(__VA_ARGS__), __VA_ARGS__); + __ast_sorcery_object_field_register(sorcery, type, name, default_val, OPT_CUSTOM_T, config_handler, sorcery_handler, flags, 0, VA_NARGS(__VA_ARGS__), __VA_ARGS__); + +/*! + * \brief Register a field within an object with custom handlers without documentation + * + * \param sorcery Pointer to a sorcery structure + * \param type Type of object + * \param name Name of the field + * \param default_val Default value of the field + * \param config_handler Custom configuration handler + * \param sorcery_handler Custom sorcery handler + * \param flags Option type specific flags + * + * \retval 0 success + * \retval -1 failure + */ +#define ast_sorcery_object_field_register_custom_nodoc(sorcery, type, name, default_val, config_handler, sorcery_handler, flags, ...) \ + __ast_sorcery_object_field_register(sorcery, type, name, default_val, OPT_CUSTOM_T, config_handler, sorcery_handler, flags, 1, VA_NARGS(__VA_ARGS__), __VA_ARGS__); /*! * \brief Inform any wizards to load persistent objects