diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2015-09-25 02:06:08 +0200 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2016-01-19 11:31:08 +0100 |
commit | d89eefe156df76194d6343698068350eca92543f (patch) | |
tree | 726894c708c4348c90a94ae19edd40dd3d699950 | |
parent | 06e1dfb6a8eb02624bd35f273a72eb6d0929abef (diff) | |
download | libssh-d89eefe156df76194d6343698068350eca92543f.tar.gz libssh-d89eefe156df76194d6343698068350eca92543f.tar.xz libssh-d89eefe156df76194d6343698068350eca92543f.zip |
buffer: expose ssh_buffer_get()wip/expose_buffer_methods_wo_cwrap
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
-rw-r--r-- | include/libssh/buffer.h | 3 | ||||
-rw-r--r-- | include/libssh/libssh.h | 1 | ||||
-rw-r--r-- | src/buffer.c | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h index abfcc74e..d4cb071b 100644 --- a/include/libssh/buffer.h +++ b/include/libssh/buffer.h @@ -72,9 +72,6 @@ int _ssh_buffer_unpack(struct ssh_buffer_struct *buffer, int ssh_buffer_prepend_data(ssh_buffer buffer, const void *data, uint32_t len); int ssh_buffer_add_buffer(ssh_buffer buffer, ssh_buffer source); -/* ssh_buffer_get_rest returns a pointer to the current position into the buffer */ -void *ssh_buffer_get(ssh_buffer buffer); - /* buffer_read_*() returns the number of bytes read, except for ssh strings */ int ssh_buffer_get_u8(ssh_buffer buffer, uint8_t *data); int ssh_buffer_get_u32(ssh_buffer buffer, uint32_t *data); diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 6ef63225..0cd4bdc3 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -684,6 +684,7 @@ LIBSSH_API void ssh_buffer_free(ssh_buffer buffer); LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer); LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len); LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen); +LIBSSH_API void *ssh_buffer_get(ssh_buffer buffer); LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer); #ifndef LIBSSH_LEGACY_0_4 diff --git a/src/buffer.c b/src/buffer.c index 4e114760..9897f391 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -431,8 +431,6 @@ int ssh_buffer_add_buffer(struct ssh_buffer_struct *buffer, } /** - * @internal - * * @brief Get a pointer to the head of a buffer at the current position. * * @param[in] buffer The buffer to get the head pointer. |