Commit ec5fa2fb authored by Sven Neumann's avatar Sven Neumann

plug-ins: unify handling of return values

For consistency Use a static GParam array for the return values
in all plug-ins.
parent cad6ba9b
......@@ -185,7 +185,7 @@ run (const gchar *name,
{
GimpRunMode run_mode;
GimpPDBStatusType status;
GimpParam *values;
static GimpParam values[1];
INIT_I18N ();
......@@ -196,8 +196,6 @@ run (const gchar *name,
status = GIMP_PDB_SUCCESS;
run_mode = param[0].data.d_int32;
values = g_new (GimpParam, 1);
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
......
......@@ -336,7 +336,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
GimpParam values[1];
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunMode run_mode;
......
......@@ -130,9 +130,9 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1]; /* Return values */
GimpRunMode run_mode; /* Current run mode */
GimpPDBStatusType status; /* Return status */
GimpParam *values; /* Return values */
GimpDrawable *drawable; /* Current image */
/*
......@@ -144,8 +144,6 @@ run (const gchar *name,
INIT_I18N ();
values = g_new (GimpParam, 1);
*nreturn_vals = 1;
*return_vals = values;
......
......@@ -211,8 +211,6 @@ query (void)
info_return_vals);
}
GimpParam values[5];
static void
run (const gchar *name,
gint nparams,
......@@ -220,6 +218,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[5];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunMode run_mode;
gint32 pc;
......
......@@ -147,11 +147,12 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
GimpParam *values = g_new (GimpParam, 1);
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint pwidth, pheight;
INIT_I18N ();
gfig_context = g_new0 (GFigContext, 1);
......
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