develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34586 - trunk/languages/pipp/src/common

From:
bernhard
Date:
December 29, 2008 09:15
Subject:
[svn:parrot] r34586 - trunk/languages/pipp/src/common
Message ID:
20081229171511.200B3CB9FA@x12.develooper.com
Author: bernhard
Date: Mon Dec 29 09:15:10 2008
New Revision: 34586

Modified:
   trunk/languages/pipp/src/common/php_file.pir

Log:
[Pipp] The Perl-like file modes have been removed from Parrot.


Modified: trunk/languages/pipp/src/common/php_file.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_file.pir	(original)
+++ trunk/languages/pipp/src/common/php_file.pir	Mon Dec 29 09:15:10 2008
@@ -315,6 +315,7 @@
 
 .sub 'fopen'
     .param pmc args :slurpy
+
     .local string filename
     .local string mode
     .local int use_include_path
@@ -342,33 +343,10 @@
 .sub '_getmode' :anon
     .param string mode
     .local string res
-    unless mode == 'r' goto L1
-    res = '<'
-    goto L9
-  L1:
-    unless mode == 'w' goto L2
-    res = '>'
-    goto L9
-  L2:
-    unless mode == 'a' goto L3
-    res = '>>'
-    goto L9
-  L3:
-    unless mode == 'r+' goto L4
-    res = '+<'
-    goto L9
-  L4:
-    unless mode == 'w+' goto L5
-    res = '+>'
-    goto L9
-  L5:
-    unless mode == 'a+' goto L6
-    res = '+>>'
-    goto L9
-  L6:
-    res = ''
-  L9:
-    .return (res)
+
+    # TODO: check which Parrot modes differ from the PHP modes
+  NO_CHANGE:
+    .return (mode)
 .end
 
 =item C<int fpassthru(resource fp)>



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About