mirror of https://github.com/GNOME/gimp.git
Additional simplifications for return values by using the same code for
2006-06-10 Kevin Cozens <kcozens@cvs.gnome.org> * plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call): Additional simplifications for return values by using the same code for all INT32 PDB types. Wrong member name was being used for INT16 and INT8 return types. Added back if statement that was removed but is needed.
This commit is contained in:
parent
c4ffc27293
commit
e2d373d817
|
@ -1,3 +1,11 @@
|
|||
2006-06-10 Kevin Cozens <kcozens@cvs.gnome.org>
|
||||
|
||||
* plug-ins/script-fu/siod-wrapper.c (marshall_proc_db_call):
|
||||
Additional simplifications for return values by using the same
|
||||
code for all INT32 PDB types. Wrong member name was being used
|
||||
for INT16 and INT8 return types. Added back if statement that
|
||||
was removed but is needed.
|
||||
|
||||
2006-06-09 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* app/tools/gimpcropoptions.c: clean up code.
|
||||
|
|
|
@ -579,8 +579,9 @@ marshall_proc_db_call (LISP a)
|
|||
else
|
||||
args = NULL;
|
||||
|
||||
for (i = 0, a = cdr (a); i < nparams && success; i++, a = cdr (a))
|
||||
for (i = 0; i < nparams && success; i++)
|
||||
{
|
||||
a = cdr (a);
|
||||
args[i].type = params[i].type;
|
||||
|
||||
switch (params[i].type)
|
||||
|
@ -839,6 +840,9 @@ marshall_proc_db_call (LISP a)
|
|||
i + 1, proc_name);
|
||||
return my_err (error_str, NIL);
|
||||
}
|
||||
|
||||
if (! success)
|
||||
break;
|
||||
}
|
||||
|
||||
if (success)
|
||||
|
@ -886,17 +890,24 @@ marshall_proc_db_call (LISP a)
|
|||
switch (return_vals[i].type)
|
||||
{
|
||||
case GIMP_PDB_INT32:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
case GIMP_PDB_IMAGE:
|
||||
case GIMP_PDB_LAYER:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
case GIMP_PDB_SELECTION:
|
||||
case GIMP_PDB_VECTORS:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_INT16:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val = cons (flocons (values[i + 1].data.d_int16),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_INT8:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val = cons (flocons (values[i + 1].data.d_int8),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
|
@ -1015,45 +1026,10 @@ marshall_proc_db_call (LISP a)
|
|||
return my_err ("Regions are currently unsupported as return values", NIL);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_DISPLAY:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_IMAGE:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_LAYER:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_CHANNEL:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_SELECTION:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
return my_err ("Boundaries are currently unsupported as return values", NIL);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_VECTORS:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_PARASITE:
|
||||
{
|
||||
LISP name, flags, data;
|
||||
|
|
|
@ -579,8 +579,9 @@ marshall_proc_db_call (LISP a)
|
|||
else
|
||||
args = NULL;
|
||||
|
||||
for (i = 0, a = cdr (a); i < nparams && success; i++, a = cdr (a))
|
||||
for (i = 0; i < nparams && success; i++)
|
||||
{
|
||||
a = cdr (a);
|
||||
args[i].type = params[i].type;
|
||||
|
||||
switch (params[i].type)
|
||||
|
@ -839,6 +840,9 @@ marshall_proc_db_call (LISP a)
|
|||
i + 1, proc_name);
|
||||
return my_err (error_str, NIL);
|
||||
}
|
||||
|
||||
if (! success)
|
||||
break;
|
||||
}
|
||||
|
||||
if (success)
|
||||
|
@ -886,17 +890,24 @@ marshall_proc_db_call (LISP a)
|
|||
switch (return_vals[i].type)
|
||||
{
|
||||
case GIMP_PDB_INT32:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
case GIMP_PDB_IMAGE:
|
||||
case GIMP_PDB_LAYER:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
case GIMP_PDB_SELECTION:
|
||||
case GIMP_PDB_VECTORS:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_INT16:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val = cons (flocons (values[i + 1].data.d_int16),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_INT8:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val = cons (flocons (values[i + 1].data.d_int8),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
|
@ -1015,45 +1026,10 @@ marshall_proc_db_call (LISP a)
|
|||
return my_err ("Regions are currently unsupported as return values", NIL);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_DISPLAY:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_IMAGE:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_LAYER:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_CHANNEL:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_SELECTION:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
return my_err ("Boundaries are currently unsupported as return values", NIL);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_VECTORS:
|
||||
return_val = cons (flocons (values[i + 1].data.d_int32),
|
||||
return_val);
|
||||
break;
|
||||
|
||||
case GIMP_PDB_PARASITE:
|
||||
{
|
||||
LISP name, flags, data;
|
||||
|
|
Loading…
Reference in New Issue