summaryrefslogtreecommitdiffstats
path: root/3rd_party/libsrp6a-sha512/cstr.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2024-10-08 02:41:52 +0200
committerGravatar Nikias Bassen2024-10-08 02:41:52 +0200
commit881102944edf36abc98539b10d13e2375fda88cf (patch)
treeaaf421f57561c795de3d3f60960ebbe007d2c1f5 /3rd_party/libsrp6a-sha512/cstr.h
parented9703db1ee6d54e3801b618cee9524563d709e1 (diff)
downloadlibimobiledevice-881102944edf36abc98539b10d13e2375fda88cf.tar.gz
libimobiledevice-881102944edf36abc98539b10d13e2375fda88cf.tar.bz2
3rd_party/libsrp6a: Remove unnecessary allocator code and just use malloc/free
Diffstat (limited to '3rd_party/libsrp6a-sha512/cstr.h')
-rw-r--r--3rd_party/libsrp6a-sha512/cstr.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/3rd_party/libsrp6a-sha512/cstr.h b/3rd_party/libsrp6a-sha512/cstr.h
index 7cc019a..ae7d71a 100644
--- a/3rd_party/libsrp6a-sha512/cstr.h
+++ b/3rd_party/libsrp6a-sha512/cstr.h
@@ -51,27 +51,15 @@
extern "C" {
#endif /* __cplusplus */
-/* Arguments to allocator methods ordered this way for compatibility */
-typedef struct cstr_alloc_st {
- void * (_CDECL * alloc)(size_t n, void * heap);
- void (_CDECL * free)(void * p, void * heap);
- void * heap;
-} cstr_allocator;
-
typedef struct cstr_st {
char * data; /* Okay to access data and length fields directly */
int length;
int cap;
int ref; /* Simple reference counter */
- cstr_allocator * allocator;
} cstr;
-_TYPE( void ) cstr_set_allocator P((cstr_allocator * alloc));
-
_TYPE( cstr * ) cstr_new P((void));
-_TYPE( cstr * ) cstr_new_alloc P((cstr_allocator * alloc));
_TYPE( cstr * ) cstr_dup P((const cstr * str));
-_TYPE( cstr * ) cstr_dup_alloc P((const cstr * str, cstr_allocator * alloc));
_TYPE( cstr * ) cstr_create P((const char * s));
_TYPE( cstr * ) cstr_createn P((const char * s, int len));