From: Michael Orlitzky Date: Tue, 17 Oct 2023 21:04:07 +0000 (-0400) Subject: src/svgtiny_css.c: use our userdata handler in set_libcss_node_data() X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=7dba1bf5be8eb9acd0b064ac3c8f41ae60216f82;p=libsvgtiny.git src/svgtiny_css.c: use our userdata handler in set_libcss_node_data() This was a missing part of the implementation that had to wait until our css_select_handler vtable was defined. --- diff --git a/src/svgtiny_css.c b/src/svgtiny_css.c index a5a7521..075d87d 100644 --- a/src/svgtiny_css.c +++ b/src/svgtiny_css.c @@ -1931,15 +1931,12 @@ css_error set_libcss_node_data(void *pw, void *node, void *old_data; /* A unique "userdata key" (a string) is used to identify this - * data. The fourth parameter (NULL) is a "user handler - * function." We will eventually have one, but for now we set - * it to NULL to avoid a circular reference mess that would - * break the build temporarily. */ + * data. */ state = (struct svgtiny_parse_state *)pw; dom_node_set_user_data((dom_node *)node, state->interned_userdata_key, libcss_node_data, - NULL, + svgtiny_dom_user_data_handler, &old_data); /* dom_node_set_user_data() always returns DOM_NO_ERR */