pdb: Add functionality to drop codegen for dead args

This commit is contained in:
Mukund Sivaraman
2011-10-08 19:02:09 +05:30
parent c8eac767e6
commit 6469290439
3 changed files with 5 additions and 5 deletions

View File

@ -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]);

View File

@ -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++;

View File

@ -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' },