lib: talloc: Mark talloc_autofree_context() as deprecated.
authorJeremy Allison <jra@samba.org>
Tue, 6 Nov 2018 00:56:05 +0000 (16:56 -0800)
committerAmitay Isaacs <amitay@samba.org>
Tue, 6 Nov 2018 06:16:15 +0000 (07:16 +0100)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
lib/talloc/talloc.h

index ba3dee8de97a8e657213d167713f8713afb53c14..498bad3b533494fe87dd3b7d15b9215011e863c8 100644 (file)
@@ -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