File: fix-argument-imm-being-ignored-in-m_letstar1.patch

package info (click to toggle)
scm 5f4-3.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,320 kB
  • sloc: ansic: 58,822; lisp: 17,257; makefile: 1,241; sh: 555; asm: 288
file content (36 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: astian <astian@elude.in>
Date: Sun, 26 May 2024 12:16:48 +0200
Subject: Fix argument "imm" being ignored in "m_letstar1"

Forwarded: no
Last-Update: 2018-03-03

Like "m_letrec1", "m_letstar1" is used in the implementation of various
syntactic elements.  Like in "m_letrec1", argument "imm" in "m_letstar1"
is supposed to indicate (methinks) what syntactic element is being
implemented.
---
 eval.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eval.c b/eval.c
index 52372de..b861ded 100644
--- a/eval.c
+++ b/eval.c
@@ -1274,6 +1274,7 @@ int scm_nullenv_p(env)
 static SCM m_letstar1(imm, vars, inits, body, env, ctxt)
      SCM imm, vars, inits, body, env, ctxt;
 {
+  SCM op = MAKSPCSYM2(IM_LETSTAR, imm);
   SCM init, bdgs = cons(env, EOL); /* initial env is for debug printing. */
   SCM *loc = &CDR(bdgs);
   while (NIMP(vars)) {
@@ -1284,7 +1285,7 @@ static SCM m_letstar1(imm, vars, inits, body, env, ctxt)
     vars = CDR(vars);
     inits = CDR(inits);
   }
-  return cons2(IM_LETSTAR, bdgs, m_body(body, env, ctxt));
+  return cons2(op, bdgs, m_body(body, env, ctxt));
 }
 
 SCM m_letstar(xorig, env, ctxt)