[svn:parrot] r38530 - branches/tt631_part2/lib/Parrot/Pmc2c
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu May 7 11:00:04 UTC 2009
Author: bacek
Date: Thu May 7 11:00:03 2009
New Revision: 38530
URL: https://trac.parrot.org/parrot/changeset/38530
Log:
Declare vtable-related functions in headers
Modified:
branches/tt631_part2/lib/Parrot/Pmc2c/PMCEmitter.pm
Modified: branches/tt631_part2/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/tt631_part2/lib/Parrot/Pmc2c/PMCEmitter.pm Thu May 7 10:59:48 2009 (r38529)
+++ branches/tt631_part2/lib/Parrot/Pmc2c/PMCEmitter.pm Thu May 7 11:00:03 2009 (r38530)
@@ -120,6 +120,19 @@
EOH
$h->emit("#define PARROT_IN_EXTENSION\n") if ( $self->is_dynamic );
+
+ # Emit available functions for work with vtables.
+ my $export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT ';
+
+ if (!$name eq 'default') {
+ $h->emit("${export}VTABLE* Parrot_${name}_update_vtable(VTABLE*);\n");
+ $h->emit("${export}VTABLE* Parrot_${name}_ro_update_vtable(VTABLE*);\n");
+ }
+
+ $h->emit("${export}VTABLE* Parrot_${name}_get_vtable(PARROT_INTERP);\n");
+ $h->emit("${export}VTABLE* Parrot_${name}_ro_get_vtable(PARROT_INTERP);\n");
+
+
$self->gen_attributes;
$h->emit(<<"EOH");
More information about the parrot-commits
mailing list