From 68a0d855c92cb6cd7030abc7e191d1c513ad2a62 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 31 Oct 2007 10:48:01 +0000 Subject: Reorganizatiosn to support the visibility attribute. This can be improved by using fucntion aliases instead of wrapper functions. --- src/sexp.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/sexp.c') diff --git a/src/sexp.c b/src/sexp.c index e88d12c1..721069ea 100644 --- a/src/sexp.c +++ b/src/sexp.c @@ -654,7 +654,7 @@ gcry_sexp_nth_data (const gcry_sexp_t list, int number, size_t *datalen ) /* Get a string from the car. The returned value is a malloced string and needs to be freed by the caller. */ char * -_gcry_sexp_nth_string (const gcry_sexp_t list, int number) +gcry_sexp_nth_string (const gcry_sexp_t list, int number) { const char *s; size_t n; @@ -671,13 +671,6 @@ _gcry_sexp_nth_string (const gcry_sexp_t list, int number) return buf; } -/* Public version of _gcry_sexp_nth_string. */ -char * -gcry_sexp_nth_string (const gcry_sexp_t list, int number) -{ - return _gcry_sexp_nth_string (list, number); -} - /* * Get a MPI from the car */ @@ -1471,6 +1464,15 @@ gcry_sexp_build (gcry_sexp_t *retsexp, size_t *erroff, const char *format, ...) return rc; } + +gcry_error_t +_gcry_sexp_vbuild (gcry_sexp_t *retsexp, size_t *erroff, + const char *format, va_list arg_ptr) +{ + return sexp_sscan (retsexp, erroff, format, strlen(format), 1, + arg_ptr, NULL); +} + /* Like gcry_sexp_build, but uses an array instead of variable function arguments. */ gcry_error_t -- cgit v1.2.1