From 2ecf5845303ecc6049ee37d72ff863d7bd8fe1e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sat, 20 Nov 2010 13:52:51 +0100
Subject: [PATCH] Minor optimization in F_LOOKUP_LFUN.

---
 src/interpret_functions.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/interpret_functions.h b/src/interpret_functions.h
index 30d072b0de..ab5ac1fc0a 100644
--- a/src/interpret_functions.h
+++ b/src/interpret_functions.h
@@ -309,7 +309,7 @@ OPCODE1(F_LOOKUP_LFUN, "->lfun", 0, {
 
   if ((Pike_sp[-1].type == T_OBJECT) &&
       (p = (o = Pike_sp[-1].u.object)->prog) &&
-      (FIND_LFUN(p = o->prog->inherits[Pike_sp[-1].subtype].prog,
+      (FIND_LFUN(p = p->inherits[Pike_sp[-1].subtype].prog,
 		 LFUN_ARROW) == -1)) {
     int id = FIND_LFUN(p, arg1);
     if ((id != -1) &&
-- 
GitLab