cssarrayvalue: Redo parsing arrays

Does 3 things:
1) Introduce a "none" array signleton
2) Get rid of memleaks in error paths
3) Reduce code in parse funcs
This commit is contained in:
Benjamin Otte
2012-04-03 09:49:37 +02:00
parent 580b5e4a83
commit b9ebe8c226
5 changed files with 118 additions and 123 deletions

View File

@ -20,12 +20,17 @@
#ifndef __GTK_CSS_ARRAY_VALUE_PRIVATE_H__
#define __GTK_CSS_ARRAY_VALUE_PRIVATE_H__
#include "gtkcssparserprivate.h"
#include "gtkcssvalueprivate.h"
G_BEGIN_DECLS
GtkCssValue * _gtk_css_array_value_new (GtkCssValue **values,
GtkCssValue * _gtk_css_array_value_new (GtkCssValue *content);
GtkCssValue * _gtk_css_array_value_new_from_array (GtkCssValue **values,
guint n_values);
GtkCssValue * _gtk_css_array_value_parse (GtkCssParser *parser,
GtkCssValue * (* parse_func) (GtkCssParser *parser),
gboolean allow_none);
GtkCssValue * _gtk_css_array_value_get_nth (const GtkCssValue *value,
guint i);