Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r313:9f5bcc07fb33
Date: 2013-04-22 14:07 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/9f5bcc07fb33/

Log:    signal and wait primitives return the receiver, not the context...

diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -1170,21 +1170,21 @@
     s_frame._sendSelector(w_selector, argcount, interp,
                       w_rcvr, w_rcvr.shadow_of_my_class(interp.space))
 
-@expose_primitive(SIGNAL, unwrap_spec=[object], clean_stack=False)
+@expose_primitive(SIGNAL, unwrap_spec=[object], clean_stack=False, 
no_result=True)
 def func(interp, s_frame, w_rcvr):
     # XXX we might want to disable this check
     if not w_rcvr.getclass(interp.space).is_same_object(
         interp.space.w_Semaphore):
         raise PrimitiveFailedError()
-    return wrapper.SemaphoreWrapper(interp.space, 
w_rcvr).signal(s_frame.w_self())
+    wrapper.SemaphoreWrapper(interp.space, w_rcvr).signal(s_frame.w_self())
 
-@expose_primitive(WAIT, unwrap_spec=[object], clean_stack=False)
+@expose_primitive(WAIT, unwrap_spec=[object], clean_stack=False, 
no_result=True)
 def func(interp, s_frame, w_rcvr):
     # XXX we might want to disable this check
     if not w_rcvr.getclass(interp.space).is_same_object(
         interp.space.w_Semaphore):
         raise PrimitiveFailedError()
-    return wrapper.SemaphoreWrapper(interp.space, 
w_rcvr).wait(s_frame.w_self())
+    wrapper.SemaphoreWrapper(interp.space, w_rcvr).wait(s_frame.w_self())
 
 @expose_primitive(RESUME, unwrap_spec=[object], result_is_new_frame=True, 
clean_stack=False)
 def func(interp, s_frame, w_rcvr):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to