diff options
author | Ján Tomko <jtomko@redhat.com> | 2019-10-25 00:25:03 +0200 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2019-12-12 14:24:35 +0100 |
commit | 610963cd0411a0cc2aa513e12b23d420a66c9cab (patch) | |
tree | c50d1e137e0a5c9684802592389b62a091fe9847 /src/util/virstring.h | |
parent | ca4c90b435dd7d9b51822441cd3257d7f1c35376 (diff) | |
download | libvirt-610963cd0411a0cc2aa513e12b23d420a66c9cab.tar.gz |
util: remove VIR_STRDUP and VIR_STRNDUP
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'src/util/virstring.h')
-rw-r--r-- | src/util/virstring.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/util/virstring.h b/src/util/virstring.h index 081a5ff1aa..a2cd92cf83 100644 --- a/src/util/virstring.h +++ b/src/util/virstring.h @@ -134,75 +134,6 @@ int virStrdup(char **dest, const char *src) int virStrndup(char **dest, const char *src, ssize_t n) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1); -/** - * VIR_STRDUP: - * @dst: variable to hold result (char*, not char**) - * @src: string to duplicate - * - * DEPRECATED: use g_strdup instead - * - * Duplicate @src string and store it into @dst. - * - * This macro is safe to use on arguments with side effects. - * - * Returns 0 if @src was NULL, 1 if @src was copied, aborts on OOM - */ -#define VIR_STRDUP(dst, src) virStrdup(&(dst), src) - -/** - * VIR_STRDUP_QUIET: - * @dst: variable to hold result (char*, not char**) - * @src: string to duplicate - * - * DEPRECATED: use g_strdup instead - * - * Duplicate @src string and store it into @dst. - * - * This macro is safe to use on arguments with side effects. - * - * Returns 0 if @src was NULL, 1 if @src was copied, aborts on OOM - */ -#define VIR_STRDUP_QUIET(dst, src) VIR_STRDUP(dst, src) - -/** - * VIR_STRNDUP: - * @dst: variable to hold result (char*, not char**) - * @src: string to duplicate - * @n: the maximum number of bytes to copy - * - * DEPRECATED: use g_strndup instead - * - * Duplicate @src string and store it into @dst. If @src is longer than @n, - * only @n bytes are copied and terminating null byte '\0' is added. If @n - * is a negative number, then the whole @src string is copied. That is, - * VIR_STRDUP(dst, src) and VIR_STRNDUP(dst, src, -1) are equal. - * - * This macro is safe to use on arguments with side effects. - * - * Returns 0 if @src was NULL, 1 if @src was copied, aborts on OOM - */ -#define VIR_STRNDUP(dst, src, n) virStrndup(&(dst), src, n) - -/** - * VIR_STRNDUP_QUIET: - * @dst: variable to hold result (char*, not char**) - * @src: string to duplicate - * @n: the maximum number of bytes to copy - * - * DEPRECATED: use g_strndup instead - * - * Duplicate @src string and store it into @dst. If @src is longer than @n, - * only @n bytes are copied and terminating null byte '\0' is added. If @n - * is a negative number, then the whole @src string is copied. That is, - * VIR_STRDUP_QUIET(dst, src) and VIR_STRNDUP_QUIET(dst, src, -1) are - * equal. - * - * This macro is safe to use on arguments with side effects. - * - * Returns 0 if @src was NULL, 1 if @src was copied, aborts on OOM - */ -#define VIR_STRNDUP_QUIET(dst, src, n) virStrndup(&(dst), src, n) - size_t virStringListLength(const char * const *strings); int virStringSortCompare(const void *a, const void *b); |