Mercurial > octave
diff liboctave/util/oct-base64.cc @ 21892:8fcc81df840c
hide gnulib base64 function header
* liboctave/wrappers/base64-wrappers.c,
liboctave/wrappers/base64-wrappers.h: New files.
* liboctave/wrappers/module.mk: Update.
* oct-base64.cc: Use wrapper functions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 14 Jun 2016 10:17:32 -0400 |
parents | aba2e6293dd8 |
children | bac0d6f07a3e |
line wrap: on
line diff
--- a/liboctave/util/oct-base64.cc Mon Jun 13 20:06:51 2016 -0400 +++ b/liboctave/util/oct-base64.cc Tue Jun 14 10:17:32 2016 -0400 @@ -26,9 +26,8 @@ #include <algorithm> -#include <base64.h> - #include "Array.h" +#include "base64-wrappers.h" #include "oct-base64.h" bool @@ -36,7 +35,7 @@ { bool ret = false; - size_t outlen = base64_encode_alloc (inc, inlen, out); + size_t outlen = octave_base64_encode_alloc_wrapper (inc, inlen, out); if (! out) { @@ -58,12 +57,11 @@ { Array<double> retval; - const char *inc = &(str[0]); - char *out; size_t outlen; - bool ok = base64_decode_alloc (inc, str.length (), &out, &outlen); + bool ok = octave_base64_decode_alloc_wrapper (str.data (), str.length (), + &out, &outlen); if (! ok) (*current_liboctave_error_handler)