diff options
| author | Jim Blandy | 1991-06-24 23:22:15 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-06-24 23:22:15 +0000 |
| commit | 36e37d632e6f089a89f4fc59ae6c2bf90d37e9d3 (patch) | |
| tree | 832d793ace89b596d3600851d362421414dd08b1 | |
| parent | c23ae0440bc2ad23237142545edfb741dba4dc2f (diff) | |
| download | emacs-36e37d632e6f089a89f4fc59ae6c2bf90d37e9d3.tar.gz emacs-36e37d632e6f089a89f4fc59ae6c2bf90d37e9d3.zip | |
*** empty log message ***
| -rw-r--r-- | src/eval.c | 20 | ||||
| -rw-r--r-- | src/mocklisp.c | 6 |
2 files changed, 16 insertions, 10 deletions
diff --git a/src/eval.c b/src/eval.c index f2cb96e911b..c0aafa88d86 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1551,7 +1551,6 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.") | |||
| 1551 | register int i, numargs; | 1551 | register int i, numargs; |
| 1552 | register Lisp_Object spread_arg; | 1552 | register Lisp_Object spread_arg; |
| 1553 | register Lisp_Object *funcall_args; | 1553 | register Lisp_Object *funcall_args; |
| 1554 | struct gcpro gcpro1; | ||
| 1555 | Lisp_Object fun; | 1554 | Lisp_Object fun; |
| 1556 | 1555 | ||
| 1557 | fun = args [0]; | 1556 | fun = args [0]; |
| @@ -1614,13 +1613,7 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.") | |||
| 1614 | spread_arg = XCONS (spread_arg)->cdr; | 1613 | spread_arg = XCONS (spread_arg)->cdr; |
| 1615 | } | 1614 | } |
| 1616 | 1615 | ||
| 1617 | GCPRO1 (*funcall_args); | 1616 | return Ffuncall (numargs + 1, funcall_args); |
| 1618 | gcpro1.nvars = numargs + 1; | ||
| 1619 | { | ||
| 1620 | Lisp_Object val = Ffuncall (numargs + 1, funcall_args); | ||
| 1621 | UNGCPRO; | ||
| 1622 | return val; | ||
| 1623 | } | ||
| 1624 | } | 1617 | } |
| 1625 | 1618 | ||
| 1626 | /* Apply fn to arg */ | 1619 | /* Apply fn to arg */ |
| @@ -1719,8 +1712,15 @@ Thus, (funcall 'cons 'x 'y) returns (x . y).") | |||
| 1719 | 1712 | ||
| 1720 | QUIT; | 1713 | QUIT; |
| 1721 | if (consing_since_gc > gc_cons_threshold) | 1714 | if (consing_since_gc > gc_cons_threshold) |
| 1722 | Fgarbage_collect (); | 1715 | { |
| 1723 | 1716 | struct gcpro gcpro1; | |
| 1717 | |||
| 1718 | /* The backtrace protects the arguments for the rest of the function. */ | ||
| 1719 | GCPRO1 (*args); | ||
| 1720 | gcpro1.nvars = nargs; | ||
| 1721 | Fgarbage_collect (); | ||
| 1722 | UNGCPRO; | ||
| 1723 | } | ||
| 1724 | 1724 | ||
| 1725 | if (++lisp_eval_depth > max_lisp_eval_depth) | 1725 | if (++lisp_eval_depth > max_lisp_eval_depth) |
| 1726 | { | 1726 | { |
diff --git a/src/mocklisp.c b/src/mocklisp.c index 5fb34ae74cc..86243fc987d 100644 --- a/src/mocklisp.c +++ b/src/mocklisp.c | |||
| @@ -205,6 +205,10 @@ is converted into a string by expressing it in decimal.") | |||
| 205 | { | 205 | { |
| 206 | register int argnum; | 206 | register int argnum; |
| 207 | register Lisp_Object tem; | 207 | register Lisp_Object tem; |
| 208 | struct gcpro gcpro1; | ||
| 209 | |||
| 210 | GCPRO1 (*args); | ||
| 211 | gcpro1.nvars = nargs; | ||
| 208 | 212 | ||
| 209 | for (argnum = 0; argnum < nargs; argnum++) | 213 | for (argnum = 0; argnum < nargs; argnum++) |
| 210 | { | 214 | { |
| @@ -220,6 +224,8 @@ is converted into a string by expressing it in decimal.") | |||
| 220 | goto retry; | 224 | goto retry; |
| 221 | } | 225 | } |
| 222 | } | 226 | } |
| 227 | |||
| 228 | UNGCPRO; | ||
| 223 | return Qnil; | 229 | return Qnil; |
| 224 | } | 230 | } |
| 225 | 231 | ||