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 @@
51extern "C" { 51extern "C" {
52#endif /* __cplusplus */ 52#endif /* __cplusplus */
53 53
54/* Arguments to allocator methods ordered this way for compatibility */
55typedef struct cstr_alloc_st {
56 void * (_CDECL * alloc)(size_t n, void * heap);
57 void (_CDECL * free)(void * p, void * heap);
58 void * heap;
59} cstr_allocator;
60
61typedef struct cstr_st { 54typedef struct cstr_st {
62 char * data; /* Okay to access data and length fields directly */ 55 char * data; /* Okay to access data and length fields directly */
63 int length; 56 int length;
64 int cap; 57 int cap;
65 int ref; /* Simple reference counter */ 58 int ref; /* Simple reference counter */
66 cstr_allocator * allocator;
67} cstr; 59} cstr;
68 60
69_TYPE( void ) cstr_set_allocator P((cstr_allocator * alloc));
70
71_TYPE( cstr * ) cstr_new P((void)); 61_TYPE( cstr * ) cstr_new P((void));
72_TYPE( cstr * ) cstr_new_alloc P((cstr_allocator * alloc));
73_TYPE( cstr * ) cstr_dup P((const cstr * str)); 62_TYPE( cstr * ) cstr_dup P((const cstr * str));
74_TYPE( cstr * ) cstr_dup_alloc P((const cstr * str, cstr_allocator * alloc));
75_TYPE( cstr * ) cstr_create P((const char * s)); 63_TYPE( cstr * ) cstr_create P((const char * s));
76_TYPE( cstr * ) cstr_createn P((const char * s, int len)); 64_TYPE( cstr * ) cstr_createn P((const char * s, int len));
77 65