RsvgSaxHandlerStyle - don't use an RsvgSaxHandlerDefs struct to store the parent handler

The code was using a single field in RsvgSaxHandlerDefs, anyway.
parent a2acf5b8
...@@ -93,14 +93,9 @@ struct RsvgSaxHandler { ...@@ -93,14 +93,9 @@ struct RsvgSaxHandler {
static xmlSAXHandler rsvgSAXHandlerStruct; static xmlSAXHandler rsvgSAXHandlerStruct;
static gboolean rsvgSAXHandlerStructInited = FALSE; static gboolean rsvgSAXHandlerStructInited = FALSE;
typedef struct _RsvgSaxHandlerDefs {
RsvgSaxHandler super;
RsvgHandle *handle;
} RsvgSaxHandlerDefs;
typedef struct _RsvgSaxHandlerStyle { typedef struct _RsvgSaxHandlerStyle {
RsvgSaxHandler super; RsvgSaxHandler super;
RsvgSaxHandlerDefs *parent; RsvgSaxHandler *parent;
RsvgLoad *load; RsvgLoad *load;
GString *style; GString *style;
gboolean is_text_css; gboolean is_text_css;
...@@ -205,7 +200,7 @@ static void ...@@ -205,7 +200,7 @@ static void
style_handler_end (RsvgSaxHandler * self, const char *name) style_handler_end (RsvgSaxHandler * self, const char *name)
{ {
RsvgSaxHandlerStyle *z = (RsvgSaxHandlerStyle *) self; RsvgSaxHandlerStyle *z = (RsvgSaxHandlerStyle *) self;
RsvgSaxHandler *prev = &z->parent->super; RsvgSaxHandler *prev = z->parent;
if (!strcmp (name, "style")) { if (!strcmp (name, "style")) {
if (z->load->handler != NULL) { if (z->load->handler != NULL) {
...@@ -232,7 +227,7 @@ start_style (RsvgLoad *load, RsvgPropertyBag *atts) ...@@ -232,7 +227,7 @@ start_style (RsvgLoad *load, RsvgPropertyBag *atts)
handler->style = g_string_new (NULL); handler->style = g_string_new (NULL);
handler->parent = (RsvgSaxHandlerDefs *) load->handler; handler->parent = load->handler;
load->handler = &handler->super; load->handler = &handler->super;
/* FIXME: See these: /* FIXME: See these:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment