help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [PATCH] Remove bogus file-in restriction


From: Paolo Bonzini
Subject: [Help-smalltalk] [PATCH] Remove bogus file-in restriction
Date: Sun, 01 Jul 2007 15:17:11 +0200
User-agent: Thunderbird 2.0.0.4 (Macintosh/20070604)

i.e., checking that the filename exists when filing in from a FileDescriptor. Useless, and does not allow filing in from a pipe. Also broken by my next patch.

Applied to 2.3 and 3.0.

Paolo
--- orig/libgst/ChangeLog
+++ mod/libgst/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-01  Paolo Bonzini  <address@hidden>
+
+       * libgst/prims.def: Remove bogus check on file in of FileDescriptor
+       objects.
+
 2007-06-28  Paolo Bonzini  <address@hidden>
 
        * libgst/lib.c: Ensure null termination of _gst_image_file_path.


--- orig/libgst/prims.def
+++ mod/libgst/prims.def
@@ -5116,19 +5116,6 @@ primitive VMpr_Stream_fileIn [succeed,fa
   if (!RECEIVER_IS_OOP (streamOOP))
     PRIM_FAILED;
 
-  if (is_a_kind_of (OOP_CLASS (streamOOP), _gst_file_descriptor_class))
-    {
-      gst_file_stream fileStream = (gst_file_stream) OOP_TO_OBJ (streamOOP);
-      char *fileName = _gst_to_cstring (fileStream->name);
-      if (!_gst_file_is_readable (fileName))
-       {
-         xfree (fileName);
-         PRIM_FAILED;
-       }
-      else
-       xfree (fileName);
-    }
-
   _gst_push_stream_oop (streamOOP);
   old = _gst_set_undeclared (UNDECLARED_GLOBALS);
   parse_stream_with_protection (false);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]