@@ -28,6 +28,7 @@ RCSIDH(talloc_h, "$Id$")
2828extern "C" {
2929#endif
3030
31+ #ifndef TALLOC_TYPE_SAFE
3132#include <ctype.h>
3233
3334#ifdef HAVE_WDOCUMENTATION
@@ -139,6 +140,7 @@ static inline size_t talloc_strlen(char const *s)
139140 char const * our_s = s ;
140141 return talloc_array_length (our_s ) - 1 ;
141142}
143+
142144#define talloc_strdup (_ctx , _str ) talloc_typed_strdup((TALLOC_CTX *) (_ctx), _str)
143145#define talloc_strndup (_ctx , _str , _len ) talloc_typed_strndup((TALLOC_CTX *) (_ctx), _str, _len)
144146#define talloc_asprintf talloc_typed_asprintf
@@ -212,6 +214,7 @@ void *_talloc_realloc_zero(const void *ctx, void *ptr, size_t elem_size, unsign
212214 (_type *)_talloc_realloc_zero((_ctx), (_ptr), sizeof(_type), _count, #_type)
213215
214216/** @hidecallergraph */
217+ #ifndef TALLOC_TYPE_SAFE
215218char * talloc_typed_strdup (TALLOC_CTX * ctx , char const * p );
216219
217220char * talloc_typed_strdup_buffer (TALLOC_CTX * ctx , char const * p );
@@ -223,6 +226,7 @@ char *talloc_typed_asprintf(TALLOC_CTX *ctx, char const *fmt, ...) CC_HINT(form
223226char * talloc_typed_vasprintf (TALLOC_CTX * ctx , char const * fmt , va_list ap ) CC_HINT (format (printf , 2 , 0 )) CC_HINT (nonnull (2 ));
224227
225228uint8_t * talloc_typed_memdup (TALLOC_CTX * ctx , uint8_t const * in , size_t inlen );
229+ #endif
226230
227231char * talloc_bstrdup (TALLOC_CTX * ctx , char const * in );
228232
@@ -232,8 +236,6 @@ char *talloc_bstr_append(TALLOC_CTX *ctx, char *to, char const *from, size_t fr
232236
233237char * talloc_bstr_realloc (TALLOC_CTX * ctx , char * in , size_t inlen );
234238
235- char * talloc_buffer_append_buffer (TALLOC_CTX * ctx , char * to , char const * from );
236-
237239char * talloc_buffer_append_variadic_buffer (TALLOC_CTX * ctx , char * to , int argc , ...);
238240
239241int talloc_memcmp_array (uint8_t const * a , uint8_t const * b );
@@ -265,6 +267,8 @@ typedef struct talloc_child_ctx_s TALLOC_CHILD_CTX;
265267TALLOC_CHILD_CTX * talloc_child_ctx_init (TALLOC_CTX * ctx );
266268TALLOC_CHILD_CTX * talloc_child_ctx_alloc (TALLOC_CHILD_CTX * parent ) CC_HINT (nonnull );
267269
270+ #endif
271+
268272#ifdef __cplusplus
269273}
270274#endif
0 commit comments