Sat, 27 Jun 2026 18:13:47 +0200
add dav_session_reg_destructor
| .hgignore | file | annotate | diff | comparison | revisions | |
| libidav/session.c | file | annotate | diff | comparison | revisions | |
| libidav/webdav.h | file | annotate | diff | comparison | revisions |
--- a/.hgignore Sat Jun 27 18:01:16 2026 +0200 +++ b/.hgignore Sat Jun 27 18:13:47 2026 +0200 @@ -12,3 +12,4 @@ ^make/vs/.vs$ ^make/.*vcxproj.user$ gmon.out +.DS_Store
--- a/libidav/session.c Sat Jun 27 18:01:16 2026 +0200 +++ b/libidav/session.c Sat Jun 27 18:13:47 2026 +0200 @@ -406,6 +406,10 @@ return cx_strdup_a(sn->mp->allocator, cx_str((char*)str)).ptr; } +void dav_session_reg_destructor(DavSession *sn, void *data, cx_destructor_func destr) { + cxMempoolRegister(sn->mp, data, destr); +} + char* dav_session_create_plain_href(DavSession *sn, const char *path) { if(!DAV_ENCRYPT_NAME(sn) && !DAV_DECRYPT_NAME(sn)) {
--- a/libidav/webdav.h Sat Jun 27 18:01:16 2026 +0200 +++ b/libidav/webdav.h Sat Jun 27 18:13:47 2026 +0200 @@ -317,6 +317,7 @@ void* dav_session_realloc(DavSession *sn, void *ptr, size_t size); void dav_session_free(DavSession *sn, void *ptr); char* dav_session_strdup(DavSession *sn, const char *str); +void dav_session_reg_destructor(DavSession *sn, void *data, cx_destructor_func destr); void dav_set_effective_href(DavSession *sn, DavResource *resource); DavResource* dav_get(DavSession *sn, char *path, const char *properties);