[gimp] pdb: Add functionality to drop codegen for dead args
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb: Add functionality to drop codegen for dead args
- Date: Sat, 8 Oct 2011 13:34:15 +0000 (UTC)
commit 64692904393d02d3161fec52f58907502b853296
Author: Mukund Sivaraman <muks banu com>
Date: Sat Oct 8 19:02:09 2011 +0530
pdb: Add functionality to drop codegen for dead args
app/pdb/text-tool-cmds.c | 2 --
tools/pdbgen/app.pl | 6 ++++--
tools/pdbgen/pdb/text_tool.pdb | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/pdb/text-tool-cmds.c b/app/pdb/text-tool-cmds.c
index 0872d52..20e84cb 100644
--- a/app/pdb/text-tool-cmds.c
+++ b/app/pdb/text-tool-cmds.c
@@ -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]);
diff --git a/tools/pdbgen/app.pl b/tools/pdbgen/app.pl
index fa01ae0..bd67731 100644
--- a/tools/pdbgen/app.pl
+++ b/tools/pdbgen/app.pl
@@ -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++;
diff --git a/tools/pdbgen/pdb/text_tool.pdb b/tools/pdbgen/pdb/text_tool.pdb
index d4f6be5..abf682f 100644
--- a/tools/pdbgen/pdb/text_tool.pdb
+++ b/tools/pdbgen/pdb/text_tool.pdb
@@ -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' },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]