From: Jeremy Allison Date: Tue, 6 Nov 2018 00:56:05 +0000 (-0800) Subject: lib: talloc: Mark talloc_autofree_context() as deprecated. X-Git-Tag: tdb-1.3.17~897 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f420e8d56fac5b74712700a88ad59da069ef4c92;p=thirdparty%2Fsamba.git lib: talloc: Mark talloc_autofree_context() as deprecated. Signed-off-by: Jeremy Allison Reviewed-by: Amitay Isaacs --- diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index ba3dee8de97..498bad3b533 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -101,7 +101,15 @@ typedef void TALLOC_CTX; #endif #endif +#ifndef _DEPRECATED_ +#ifdef HAVE___ATTRIBUTE__ +#define _DEPRECATED_ __attribute__ ((deprecated)) +#else +#define _DEPRECATED_ +#endif +#endif #ifdef DOXYGEN + /** * @brief Create a new talloc context. * @@ -1047,7 +1055,7 @@ int talloc_unlink(const void *context, void *ptr); * * @return A talloc context, NULL on error. */ -void *talloc_autofree_context(void); +void *talloc_autofree_context(void) _DEPRECATED_; /** * @brief Get the size of a talloc chunk. @@ -1893,13 +1901,6 @@ void talloc_set_log_fn(void (*log_fn)(const char *message)); */ void talloc_set_log_stderr(void); -#ifndef _DEPRECATED_ -#ifdef HAVE___ATTRIBUTE__ -#define _DEPRECATED_ __attribute__ ((deprecated)) -#else -#define _DEPRECATED_ -#endif -#endif /** * @brief Set a max memory limit for the current context hierarchy * This affects all children of this context and constrain any