Commit 64692904 authored by Mukund Sivaraman's avatar Mukund Sivaraman

pdb: Add functionality to drop codegen for dead args

parent c8eac767
......@@ -237,7 +237,6 @@ text_get_extents_invoker (GimpProcedure *procedure,
gint32 size_type;
const gchar *foundry;
const gchar *family;
const gchar *weight;
const gchar *slant;
const gchar *set_width;
const gchar *spacing;
......@@ -253,7 +252,6 @@ text_get_extents_invoker (GimpProcedure *procedure,
size_type = g_value_get_enum (&args->values[2]);
foundry = g_value_get_string (&args->values[3]);
family = g_value_get_string (&args->values[4]);
weight = g_value_get_string (&args->values[5]);
slant = g_value_get_string (&args->values[6]);
set_width = g_value_get_string (&args->values[7]);
spacing = g_value_get_string (&args->values[8]);
......
......@@ -76,7 +76,7 @@ sub declare_args {
warn "Array without number of elements param in $proc->{name}";
}
unless (exists $_->{no_declare}) {
unless (exists $_->{no_declare} || exists $_->{dead}) {
if ($outargs) {
$result .= " $arg->{type}$_->{name} = $arg->{init_value}";
}
......@@ -112,7 +112,9 @@ sub marshal_inargs {
my $value;
$value = "&args->values[$argc]";
$result .= eval qq/" $arg->{get_value_func};\n"/;
if (!exists $_->{dead}) {
$result .= eval qq/" $arg->{get_value_func};\n"/;
}
$argc++;
......
......@@ -228,7 +228,7 @@ sub text_get_extents {
desc => 'The font foundry' },
{ name => 'family', type => 'string', allow_non_utf8 => 1,
desc => 'The font family' },
{ name => 'weight', type => 'string', allow_non_utf8 => 1,
{ name => 'weight', type => 'string', allow_non_utf8 => 1, dead => 1,
desc => 'The font weight' },
{ name => 'slant', type => 'string', allow_non_utf8 => 1,
desc => 'The font slant' },
......
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