summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-13 18:02:08 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 10:12:18 +0200
commitca298f7d2a54eb2838d5931d3aac12d5f3209356 (patch)
tree924b414d0ed4dbddc0fd22250bbbac054912cdcb /regen
parent0f90c85382de249d9770a7f8d5d0d22380441cfd (diff)
downloadperl-ca298f7d2a54eb2838d5931d3aac12d5f3209356.tar.gz
Generate the enum for want_vtbl_* with regen/mg_vtable.pl
Diffstat (limited to 'regen')
-rw-r--r--regen/mg_vtable.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl
index bd48545191..2a88263ec2 100644
--- a/regen/mg_vtable.pl
+++ b/regen/mg_vtable.pl
@@ -61,6 +61,17 @@ my $h = open_new('mg_vtable.h', '>',
{ by => 'regen/mg_vtable.pl', file => 'mg_vtable.h',
style => '*' });
+{
+ my @names = map {"want_vtbl_$_"} grep {!ref $_} @sig;
+ local $" = ",\n ";
+ print $h <<"EOH";
+enum { /* pass one of these to get_vtbl */
+ @names
+};
+
+EOH
+}
+
print $h <<'EOH';
/* These all need to be 0, not NULL, as NULL can be (void*)0, which is a
* pointer to data, whereas we're assigning pointers to functions, which are