🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Chris Dodd Mon, 02 Nov 1992 09:05
Objective-C bug and fix
#41
Author: Chris Dodd
Date: Mon, 02 Nov 1992 09:05
24 lines
1191 bytes
I'm not sure if this is the right place to send this; there doesn't
seem to be objc-specific bug mailing list.

Basically, the problem is that the receiver of every message expression
gets evaluated twice; this causes problems if the receiver-expression
has side effects.  Patch:

*** objc-actions.c.orig	Mon Nov  2 16:38:25 1992
--- objc-actions.c	Mon Nov  2 16:50:20 1992
***************
*** 2631,2636 ****
--- 2631,2638 ----
        if (statically_allocated)
  	receiver = build_unary_op (ADDR_EXPR, receiver, 0);
  
+       /* don't evaluate the receiver twice */
+       receiver = save_expr(receiver);
        self_object = receiver;
      }
    else

-------------------------------------------------------
Chris Dodd
dodd@csl.sri.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads