X-Git-Url: https://git.distorted.org.uk/~mdw/mLib-python/blobdiff_plain/6a6bd8fac21d06b426006a5e92f6e2696590a435..5ce5170ce3969dca8366a9d051e4f887ee162df8:/defs.pxi diff --git a/defs.pxi b/defs.pxi index 69f4adb..2de0ab9 100644 --- a/defs.pxi +++ b/defs.pxi @@ -162,6 +162,23 @@ cdef extern from 'mLib/str.h': int str_match(char *p, char *s) void str_sanitize(char *d, char *p, size_t sz) +#----- Form-urlencoding functions ------------------------------------------- + +cdef extern from 'mLib/url.h': + struct url_ectx: + unsigned f + struct url_dctx: + char *p + unsigned f + enum: + URLF_STRICT + URLF_LAX + URLF_SEMI + void url_initenc(url_ectx *ctx) + void url_enc(url_ectx *ctx, dstr *d, char *name, char *value) + void url_initdec(url_dctx *ctx, char *p) + int url_dec(url_dctx *ctx, dstr *n, dstr *v) + #----- Atom stuff ----------------------------------------------------------- # --- Atoms ---