[svn:parrot] r39685 - in branches/io_cleanups/src: io pmc

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Sun Jun 21 10:36:46 UTC 2009


Author: whiteknight
Date: Sun Jun 21 10:36:45 2009
New Revision: 39685
URL: https://trac.parrot.org/parrot/changeset/39685

Log:
[io_cleanups] remove the now-unneeded does VTABLE from socket and add checks for socket type to is_closed

Modified:
   branches/io_cleanups/src/io/api.c
   branches/io_cleanups/src/pmc/socket.pmc

Modified: branches/io_cleanups/src/io/api.c
==============================================================================
--- branches/io_cleanups/src/io/api.c	Sun Jun 21 09:39:33 2009	(r39684)
+++ branches/io_cleanups/src/io/api.c	Sun Jun 21 10:36:45 2009	(r39685)
@@ -280,6 +280,8 @@
         GETATTR_StringHandle_stringhandle(interp, pmc, stringhandle);
         result = STRING_IS_NULL(stringhandle);
     }
+    else if (pmc->vtable->base_type == enum_class_Socket)
+        result = Parrot_io_socket_is_closed(pmc);
     else
         Parrot_PCCINVOKE(interp, pmc, CONST_STRING(interp, "is_closed"), "->I", &result);
 

Modified: branches/io_cleanups/src/pmc/socket.pmc
==============================================================================
--- branches/io_cleanups/src/pmc/socket.pmc	Sun Jun 21 09:39:33 2009	(r39684)
+++ branches/io_cleanups/src/pmc/socket.pmc	Sun Jun 21 10:36:45 2009	(r39685)
@@ -68,21 +68,6 @@
 
 /*
 
-=item C<INTVAL does(STRING * role)>
-
-=cut
-
-*/
-
-    VTABLE INTVAL does(STRING * role) {
-        Parrot_Socket_attributes * const attrs = PARROT_SOCKET(SELF);
-        if (Parrot_str_equal(interp, role, CONST_STRING(interp, "socket")))
-            return 1;
-        return SUPER(role);
-    }
-
-/*
-
 =item C<void mark()>
 
 Mark active socket handle data as live.


More information about the parrot-commits mailing list