Obviously I disagree with Tim about the symbol_name parameter in

2002-06-17  Sven Neumann  <sven@gimp.org>

	Obviously I disagree with Tim about the symbol_name parameter in
	g_scanner_unexp_token(). As it seems it's not supposed to be used
	to tell the user about the expected symbol (see bug #81850):

	* gimpconfig.[ch] (gimp_config_deserialize_return): removed the
	symbol_name parameter.

	* app/config/gimpconfig-deserialize.c
	* app/core/gimpcontainer.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpparasitelist.c: changed the callers accordingly.

	* app/core/gimpunits.c (gimp_unitrc_load): pass NULL as symbol_name
	to g_scanner_unexp_token().
This commit is contained in:
Sven Neumann
2002-06-17 19:36:33 +00:00
committed by Sven Neumann
parent 29c36954f5
commit c585964707
12 changed files with 32 additions and 30 deletions

View File

@ -1,3 +1,20 @@
2002-06-17 Sven Neumann <sven@gimp.org>
Obviously I disagree with Tim about the symbol_name parameter in
g_scanner_unexp_token(). As it seems it's not supposed to be used
to tell the user about the expected symbol (see bug #81850):
* gimpconfig.[ch] (gimp_config_deserialize_return): removed the
symbol_name parameter.
* app/config/gimpconfig-deserialize.c
* app/core/gimpcontainer.c
* app/core/gimpdocumentlist.c
* app/core/gimpparasitelist.c: changed the callers accordingly.
* app/core/gimpunits.c (gimp_unitrc_load): pass NULL as symbol_name
to g_scanner_unexp_token().
2002-06-17 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-server.c (read_from_client): merged

View File

@ -183,8 +183,7 @@ gimp_config_deserialize_properties (GObject *object,
g_scanner_set_scope (scanner, old_scope_id);
return gimp_config_deserialize_return (scanner, token,
nest_level, NULL);
return gimp_config_deserialize_return (scanner, token, nest_level);
}
static GTokenType

View File

@ -322,8 +322,7 @@ gimp_config_deserialize (GObject *object,
gboolean
gimp_config_deserialize_return (GScanner *scanner,
GTokenType expected_token,
gint nest_level,
const gchar *symbol_name)
gint nest_level)
{
GTokenType next_token;
@ -334,8 +333,7 @@ gimp_config_deserialize_return (GScanner *scanner,
if (expected_token != G_TOKEN_LEFT_PAREN)
{
g_scanner_get_next_token (scanner);
g_scanner_unexp_token (scanner, expected_token, NULL, NULL,
symbol_name,
g_scanner_unexp_token (scanner, expected_token, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
return FALSE;
}
@ -348,8 +346,7 @@ gimp_config_deserialize_return (GScanner *scanner,
else if (next_token != G_TOKEN_EOF)
{
g_scanner_get_next_token (scanner);
g_scanner_unexp_token (scanner, expected_token, NULL, NULL,
symbol_name,
g_scanner_unexp_token (scanner, expected_token, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
return FALSE;
}

View File

@ -84,8 +84,7 @@ gboolean gimp_config_deserialize (GObject *object,
gboolean gimp_config_deserialize_return (GScanner *scanner,
GTokenType expected_token,
gint nest_level,
const gchar *symbol_name);
gint nest_level);
GObject * gimp_config_duplicate (GObject *object);
gboolean gimp_config_equal (GObject *a,

View File

@ -154,8 +154,7 @@ gimp_unitrc_load (Gimp *gimp)
if (token != G_TOKEN_LEFT_PAREN)
{
g_scanner_get_next_token (scanner);
g_scanner_unexp_token (scanner, token, NULL, NULL,
scanner->scope_id == 0 ? "unit-info" : NULL,
g_scanner_unexp_token (scanner, token, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
g_message (error->message);

View File

@ -581,8 +581,7 @@ gimp_container_deserialize (GObject *object,
}
}
return gimp_config_deserialize_return (scanner, token,
nest_level, NULL);
return gimp_config_deserialize_return (scanner, token, nest_level);
}
static void

View File

@ -189,8 +189,7 @@ gimp_document_list_deserialize (GObject *document_list,
gimp_list_reverse (GIMP_LIST (document_list));
return gimp_config_deserialize_return (scanner, token,
nest_level, document_symbol);
return gimp_config_deserialize_return (scanner, token, nest_level);
}
GimpContainer *

View File

@ -317,8 +317,7 @@ gimp_parasite_list_deserialize (GObject *list,
}
}
return gimp_config_deserialize_return (scanner, token,
nest_level, parasite_symbol);
return gimp_config_deserialize_return (scanner, token, nest_level);
}
GimpParasiteList *

View File

@ -154,8 +154,7 @@ gimp_unitrc_load (Gimp *gimp)
if (token != G_TOKEN_LEFT_PAREN)
{
g_scanner_get_next_token (scanner);
g_scanner_unexp_token (scanner, token, NULL, NULL,
scanner->scope_id == 0 ? "unit-info" : NULL,
g_scanner_unexp_token (scanner, token, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
g_message (error->message);

View File

@ -183,8 +183,7 @@ gimp_config_deserialize_properties (GObject *object,
g_scanner_set_scope (scanner, old_scope_id);
return gimp_config_deserialize_return (scanner, token,
nest_level, NULL);
return gimp_config_deserialize_return (scanner, token, nest_level);
}
static GTokenType

View File

@ -322,8 +322,7 @@ gimp_config_deserialize (GObject *object,
gboolean
gimp_config_deserialize_return (GScanner *scanner,
GTokenType expected_token,
gint nest_level,
const gchar *symbol_name)
gint nest_level)
{
GTokenType next_token;
@ -334,8 +333,7 @@ gimp_config_deserialize_return (GScanner *scanner,
if (expected_token != G_TOKEN_LEFT_PAREN)
{
g_scanner_get_next_token (scanner);
g_scanner_unexp_token (scanner, expected_token, NULL, NULL,
symbol_name,
g_scanner_unexp_token (scanner, expected_token, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
return FALSE;
}
@ -348,8 +346,7 @@ gimp_config_deserialize_return (GScanner *scanner,
else if (next_token != G_TOKEN_EOF)
{
g_scanner_get_next_token (scanner);
g_scanner_unexp_token (scanner, expected_token, NULL, NULL,
symbol_name,
g_scanner_unexp_token (scanner, expected_token, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
return FALSE;
}

View File

@ -84,8 +84,7 @@ gboolean gimp_config_deserialize (GObject *object,
gboolean gimp_config_deserialize_return (GScanner *scanner,
GTokenType expected_token,
gint nest_level,
const gchar *symbol_name);
gint nest_level);
GObject * gimp_config_duplicate (GObject *object);
gboolean gimp_config_equal (GObject *a,