summaryrefslogtreecommitdiffstats
path: root/ffi/include/sequoia
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-01-15 17:57:35 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-01-15 18:02:37 +0100
commit977fae00f57ca87fa08568a3ce0f55a5382af13a (patch)
tree64afb0bfe2768efee998964a640fd3e24ec75505 /ffi/include/sequoia
parent1f504ddf2d09f62ea3a68aab6deeac24aa813b54 (diff)
ffi: Allocate returned strings using libc.
- Allocate all returned strings using libc's allocator. This has the advantage that the user can easily use strings and free them using free(3). - Fixes #157.
Diffstat (limited to 'ffi/include/sequoia')
-rw-r--r--ffi/include/sequoia/core.h5
-rw-r--r--ffi/include/sequoia/error.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/ffi/include/sequoia/core.h b/ffi/include/sequoia/core.h
index 0e5dd6aa..829d7104 100644
--- a/ffi/include/sequoia/core.h
+++ b/ffi/include/sequoia/core.h
@@ -28,11 +28,6 @@ typedef struct sq_context *sq_context_t;
sq_error_t sq_context_last_error (sq_context_t ctx);
/*/
-/// Frees a string returned from Sequoia.
-/*/
-void sq_string_free (char *s);
-
-/*/
/// Represents a `Context` configuration.
/*/
typedef struct sq_config *sq_config_t;
diff --git a/ffi/include/sequoia/error.h b/ffi/include/sequoia/error.h
index 647fd674..dd42753c 100644
--- a/ffi/include/sequoia/error.h
+++ b/ffi/include/sequoia/error.h
@@ -135,7 +135,7 @@ void sq_error_free (sq_error_t error);
/*/
/// Returns the error message.
///
-/// The returned value must be freed with `sq_string_free`.
+/// The returned value must be freed with `free(3)`.
/*/
char *sq_error_string (const sq_error_t err);