[svn:parrot] r37772 - trunk/src/pmc

Infinoid at svn.parrot.org Infinoid at svn.parrot.org
Fri Mar 27 22:07:21 UTC 2009


Author: Infinoid
Date: Fri Mar 27 22:07:20 2009
New Revision: 37772
URL: https://trac.parrot.org/parrot/changeset/37772

Log:
Fix the return value handling in the Socket PMC.
Fix a typo.  (The arguments are ordered differently in the lower level routines.)

Modified:
   trunk/src/pmc/socket.pmc

Modified: trunk/src/pmc/socket.pmc
==============================================================================
--- trunk/src/pmc/socket.pmc	Fri Mar 27 22:07:17 2009	(r37771)
+++ trunk/src/pmc/socket.pmc	Fri Mar 27 22:07:20 2009	(r37772)
@@ -143,9 +143,10 @@
 */
 
 
-    METHOD socket(INTVAL type, INTVAL fam, INTVAL proto) {
-        PMC * res = Parrot_io_socket(interp, SELF, type, fam, proto);
-        RETURN(PMC * res);
+    METHOD socket(INTVAL fam, INTVAL type, INTVAL proto) {
+        if(Parrot_io_socket(interp, SELF, fam, type, proto) < 0)
+            RETURN(PMC * PMCNULL);
+        RETURN(PMC * SELF);
     }
 
 /*


More information about the parrot-commits mailing list