Allow any number type in a vector to be passed in PDB call as an

2007-05-15  Kevin Cozens  <kcozens@cvs.gnome.org>

	* plug-ins/script-fu/scheme-wrapper.c (marshall_proc_db_call): Allow
	any number type in a vector to be passed in PDB call as an INT*ARRAY.
	Updated error messages accordingly. Fixes bug #435640.

svn path=/trunk/; revision=22495
This commit is contained in:
Kevin Cozens 2007-05-15 16:45:51 +00:00 committed by Kevin Cozens
parent 60b349d16e
commit 4b2000bd1d
2 changed files with 14 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2007-05-15 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/scheme-wrapper.c (marshall_proc_db_call): Allow
any number type in a vector to be passed in PDB call as an INT*ARRAY.
Updated error messages accordingly. Fixes bug #435640.
2007-05-15 Sven Neumann <sven@gimp.org>
* plug-ins/helpbrowser/dialog.c (browser_dialog_open): don't show

View file

@ -852,10 +852,10 @@ g_printerr (" string arg is '%s'\n", args[i].data.d_string);
pointer v_element = sc->vptr->vector_elem (vector, j);
/* FIXME: Check values in vector stay within range for each type. */
if (!sc->vptr->is_integer (v_element))
if (!sc->vptr->is_number (v_element))
{
g_snprintf (error_str, sizeof (error_str),
"Item %d in vector is not INT32 (argument %d for function %s)\n",
"Item %d in vector is not a number (argument %d for function %s)\n",
j+1, i+1, proc_name);
return my_err (error_str, vector);
}
@ -903,10 +903,10 @@ if (count > 0)
{
pointer v_element = sc->vptr->vector_elem (vector, j);
if (!sc->vptr->is_integer (v_element))
if (!sc->vptr->is_number (v_element))
{
g_snprintf (error_str, sizeof (error_str),
"Item %d in vector is not INT16 (argument %d for function %s)\n",
"Item %d in vector is not a number (argument %d for function %s)\n",
j+1, i+1, proc_name);
return my_err (error_str, vector);
}
@ -954,10 +954,10 @@ if (count > 0)
{
pointer v_element = sc->vptr->vector_elem (vector, j);
if (!sc->vptr->is_integer (v_element))
if (!sc->vptr->is_number (v_element))
{
g_snprintf (error_str, sizeof (error_str),
"Item %d in vector is not INT8 (argument %d for function %s)\n",
"Item %d in vector is not a number (argument %d for function %s)\n",
j+1, i+1, proc_name);
return my_err (error_str, vector);
}
@ -1008,7 +1008,7 @@ if (count > 0)
if (!sc->vptr->is_number (v_element))
{
g_snprintf (error_str, sizeof (error_str),
"Item %d in vector is not FLOAT (argument %d for function %s)\n",
"Item %d in vector is not a number (argument %d for function %s)\n",
j+1, i+1, proc_name);
return my_err (error_str, vector);
}
@ -1059,7 +1059,7 @@ if (count > 0)
if (!sc->vptr->is_string (v_element))
{
g_snprintf (error_str, sizeof (error_str),
"Item %d in vector is not STRING (argument %d for function %s)\n",
"Item %d in vector is not a string (argument %d for function %s)\n",
j+1, i+1, proc_name);
return my_err (error_str, vector);
}