[svn:parrot] r48935 - in trunk: . lib/Parrot/Pmc2c src/pmc
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Sep 11 17:39:50 UTC 2010
Author: jkeenan
Date: Sat Sep 11 17:39:50 2010
New Revision: 48935
URL: https://trac.parrot.org/parrot/changeset/48935
Log:
TT #1785: partially revert r48932 to conform to deprecation policy.
Modified:
trunk/DEPRECATED.pod
trunk/lib/Parrot/Pmc2c/PMC.pm
trunk/src/pmc/oplib.pmc
trunk/src/pmc/resizablestringarray.pmc
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod Sat Sep 11 15:44:54 2010 (r48934)
+++ trunk/DEPRECATED.pod Sat Sep 11 17:39:50 2010 (r48935)
@@ -146,6 +146,14 @@
L<https://trac.parrot.org/parrot/ticket/1564>
+=item Duplicated VTABLE functions [eligible in 2.10]
+
+In F<src/pmc/oplib.pmc>, C<INTVAL get_integer()> is declared twice.
+
+In F<src/pmc/resizablestringarray.pmc>, C<PMC *shift_pmc()> is declared twice.
+
+L<http://trac.parrot.org/parrot/ticket/1785>
+
=back
=head1 Opcodes
Modified: trunk/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC.pm Sat Sep 11 15:44:54 2010 (r48934)
+++ trunk/lib/Parrot/Pmc2c/PMC.pm Sat Sep 11 17:39:50 2010 (r48935)
@@ -71,7 +71,7 @@
# methods
sub add_method {
my ( $self, $method ) = @_;
- die "FATAL ERROR: Duplicated VTABLE function: " . $method->name
+ warn "FATAL ERROR: Duplicated VTABLE function: " . $method->name
if exists $self->{has_method}{$method->name};
$self->{has_method}{ $method->name } = @{ $self->{methods} };
push @{ $self->{methods} }, $method;
Modified: trunk/src/pmc/oplib.pmc
==============================================================================
--- trunk/src/pmc/oplib.pmc Sat Sep 11 15:44:54 2010 (r48934)
+++ trunk/src/pmc/oplib.pmc Sat Sep 11 17:39:50 2010 (r48935)
@@ -116,6 +116,10 @@
return STATICSELF.elements();
}
+ VTABLE INTVAL get_integer() {
+ return STATICSELF.elements();
+ }
+
METHOD op_family(STRING *shortname)
{
char * const sname = Parrot_str_to_cstring(INTERP, shortname);
Modified: trunk/src/pmc/resizablestringarray.pmc
==============================================================================
--- trunk/src/pmc/resizablestringarray.pmc Sat Sep 11 15:44:54 2010 (r48934)
+++ trunk/src/pmc/resizablestringarray.pmc Sat Sep 11 17:39:50 2010 (r48935)
@@ -302,6 +302,25 @@
/*
+=item C<PMC *shift_pmc()>
+
+Removes and returns the first element in the array.
+
+=cut
+
+*/
+
+ VTABLE PMC *shift_pmc() {
+ STRING * const strval = SELF.shift_string();
+ PMC * const value = Parrot_pmc_new(INTERP, enum_class_String);
+
+ VTABLE_set_string_native(INTERP, value, strval);
+
+ return value;
+ }
+
+/*
+
=item C<INTVAL shift_integer()>
Removes and returns the first element in the array.
More information about the parrot-commits
mailing list