From: Nicholas Clark Date: Wed, 2 Nov 2005 21:27:58 +0000 (+0000) Subject: unlink chmod utime kill can be merged into Perl_pp_chown(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=605b9385ca432fdf5dd870e452cfa8fc5038eab7;p=p5sagit%2Fp5-mst-13.2.git unlink chmod utime kill can be merged into Perl_pp_chown(). p4raw-id: //depot/perl@25964 --- diff --git a/mathoms.c b/mathoms.c index e814a80..6596037 100644 --- a/mathoms.c +++ b/mathoms.c @@ -921,6 +921,26 @@ PP(pp_ftsvtx) return pp_ftrowned(); } +PP(pp_unlink) +{ + return pp_chown(); +} + +PP(pp_chmod) +{ + return pp_chown(); +} + +PP(pp_utime) +{ + return pp_chown(); +} + +PP(pp_kill) +{ + return pp_chown(); +} + U8 * Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) { diff --git a/opcode.h b/opcode.h index 090621c..196f0ec 100644 --- a/opcode.h +++ b/opcode.h @@ -1032,9 +1032,9 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ MEMBER_TO_FPTR(Perl_pp_chdir), MEMBER_TO_FPTR(Perl_pp_chown), MEMBER_TO_FPTR(Perl_pp_chroot), - MEMBER_TO_FPTR(Perl_pp_unlink), - MEMBER_TO_FPTR(Perl_pp_chmod), - MEMBER_TO_FPTR(Perl_pp_utime), + MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_unlink */ + MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_chmod */ + MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_utime */ MEMBER_TO_FPTR(Perl_pp_rename), MEMBER_TO_FPTR(Perl_pp_link), MEMBER_TO_FPTR(Perl_pp_symlink), @@ -1052,7 +1052,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ MEMBER_TO_FPTR(Perl_pp_waitpid), MEMBER_TO_FPTR(Perl_pp_system), MEMBER_TO_FPTR(Perl_pp_exec), - MEMBER_TO_FPTR(Perl_pp_kill), + MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_kill */ MEMBER_TO_FPTR(Perl_pp_getppid), MEMBER_TO_FPTR(Perl_pp_getpgrp), MEMBER_TO_FPTR(Perl_pp_setpgrp), diff --git a/opcode.pl b/opcode.pl index 7ac9922..921324c 100755 --- a/opcode.pl +++ b/opcode.pl @@ -67,9 +67,9 @@ my @raw_alias = ( Perl_pp_gservent => [qw(gsbyname gsbyport)], Perl_pp_gpwent => [qw(gpwnam gpwuid)], Perl_pp_ggrent => [qw(ggrnam ggrgid)], - Perl_pp_ftis => [qw(ftsize ftmtime ftatime ftctime)], -); + Perl_pp_chown => [qw(unlink chmod utime kill)], + ); while (my ($func, $names) = splice @raw_alias, 0, 2) { $alias{$_} = $func for @$names; diff --git a/pp_sys.c b/pp_sys.c index 52a2839..8682be3 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3456,7 +3456,7 @@ PP(pp_chdir) PP(pp_chown) { dSP; dMARK; dTARGET; - I32 value = (I32)apply(PL_op->op_type, MARK, SP); + const I32 value = (I32)apply(PL_op->op_type, MARK, SP); SP = MARK; PUSHi(value); @@ -3476,36 +3476,6 @@ PP(pp_chroot) #endif } -PP(pp_unlink) -{ - dSP; dMARK; dTARGET; - I32 value; - value = (I32)apply(PL_op->op_type, MARK, SP); - SP = MARK; - PUSHi(value); - RETURN; -} - -PP(pp_chmod) -{ - dSP; dMARK; dTARGET; - I32 value; - value = (I32)apply(PL_op->op_type, MARK, SP); - SP = MARK; - PUSHi(value); - RETURN; -} - -PP(pp_utime) -{ - dSP; dMARK; dTARGET; - I32 value; - value = (I32)apply(PL_op->op_type, MARK, SP); - SP = MARK; - PUSHi(value); - RETURN; -} - PP(pp_rename) { dSP; dTARGET; @@ -4210,16 +4180,6 @@ PP(pp_exec) RETURN; } -PP(pp_kill) -{ - dSP; dMARK; dTARGET; - I32 value; - value = (I32)apply(PL_op->op_type, MARK, SP); - SP = MARK; - PUSHi(value); - RETURN; -} - PP(pp_getppid) { #ifdef HAS_GETPPID