diff options
| author | Pip Cet | 2019-06-27 14:58:56 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-06-27 15:39:34 -0700 |
| commit | 01d6349b17316e184b890d056c575815edf11e26 (patch) | |
| tree | aa84297d8d4227cd1e60c8b955b705021d71e3c5 /src | |
| parent | 4f2b2559ab32ff98e04eb3251d983b6ecf02700a (diff) | |
| download | emacs-01d6349b17316e184b890d056c575815edf11e26.tar.gz emacs-01d6349b17316e184b890d056c575815edf11e26.zip | |
Remove unnecessary tortoise checks.
* src/fns.c (Fplist_get, Fplist_put, Flax_plist_get)
(Flax_plist_put, Fplist_member): Remove unnecessary check.
* src/json.c (lisp_to_json_toplevel_1): Remove unnecessary check.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 10 | ||||
| -rw-r--r-- | src/json.c | 1 |
2 files changed, 0 insertions, 11 deletions
| @@ -2164,8 +2164,6 @@ properties on the list. This function never signals an error. */) | |||
| 2164 | if (EQ (prop, XCAR (tail))) | 2164 | if (EQ (prop, XCAR (tail))) |
| 2165 | return XCAR (XCDR (tail)); | 2165 | return XCAR (XCDR (tail)); |
| 2166 | tail = XCDR (tail); | 2166 | tail = XCDR (tail); |
| 2167 | if (EQ (tail, li.tortoise)) | ||
| 2168 | break; | ||
| 2169 | } | 2167 | } |
| 2170 | 2168 | ||
| 2171 | return Qnil; | 2169 | return Qnil; |
| @@ -2208,8 +2206,6 @@ The PLIST is modified by side effects. */) | |||
| 2208 | 2206 | ||
| 2209 | prev = tail; | 2207 | prev = tail; |
| 2210 | tail = XCDR (tail); | 2208 | tail = XCDR (tail); |
| 2211 | if (EQ (tail, li.tortoise)) | ||
| 2212 | circular_list (plist); | ||
| 2213 | } | 2209 | } |
| 2214 | CHECK_TYPE (NILP (tail), Qplistp, plist); | 2210 | CHECK_TYPE (NILP (tail), Qplistp, plist); |
| 2215 | Lisp_Object newcell | 2211 | Lisp_Object newcell |
| @@ -2247,8 +2243,6 @@ one of the properties on the list. */) | |||
| 2247 | if (! NILP (Fequal (prop, XCAR (tail)))) | 2243 | if (! NILP (Fequal (prop, XCAR (tail)))) |
| 2248 | return XCAR (XCDR (tail)); | 2244 | return XCAR (XCDR (tail)); |
| 2249 | tail = XCDR (tail); | 2245 | tail = XCDR (tail); |
| 2250 | if (EQ (tail, li.tortoise)) | ||
| 2251 | circular_list (plist); | ||
| 2252 | } | 2246 | } |
| 2253 | 2247 | ||
| 2254 | CHECK_TYPE (NILP (tail), Qplistp, plist); | 2248 | CHECK_TYPE (NILP (tail), Qplistp, plist); |
| @@ -2280,8 +2274,6 @@ The PLIST is modified by side effects. */) | |||
| 2280 | 2274 | ||
| 2281 | prev = tail; | 2275 | prev = tail; |
| 2282 | tail = XCDR (tail); | 2276 | tail = XCDR (tail); |
| 2283 | if (EQ (tail, li.tortoise)) | ||
| 2284 | circular_list (plist); | ||
| 2285 | } | 2277 | } |
| 2286 | CHECK_TYPE (NILP (tail), Qplistp, plist); | 2278 | CHECK_TYPE (NILP (tail), Qplistp, plist); |
| 2287 | Lisp_Object newcell = list2 (prop, val); | 2279 | Lisp_Object newcell = list2 (prop, val); |
| @@ -3045,8 +3037,6 @@ The value is actually the tail of PLIST whose car is PROP. */) | |||
| 3045 | tail = XCDR (tail); | 3037 | tail = XCDR (tail); |
| 3046 | if (! CONSP (tail)) | 3038 | if (! CONSP (tail)) |
| 3047 | break; | 3039 | break; |
| 3048 | if (EQ (tail, li.tortoise)) | ||
| 3049 | circular_list (tail); | ||
| 3050 | } | 3040 | } |
| 3051 | CHECK_TYPE (NILP (tail), Qplistp, plist); | 3041 | CHECK_TYPE (NILP (tail), Qplistp, plist); |
| 3052 | return Qnil; | 3042 | return Qnil; |
diff --git a/src/json.c b/src/json.c index 23234c767d8..48820a1cb04 100644 --- a/src/json.c +++ b/src/json.c | |||
| @@ -404,7 +404,6 @@ lisp_to_json_toplevel_1 (Lisp_Object lisp, | |||
| 404 | tail = XCDR (tail); | 404 | tail = XCDR (tail); |
| 405 | CHECK_CONS (tail); | 405 | CHECK_CONS (tail); |
| 406 | value = XCAR (tail); | 406 | value = XCAR (tail); |
| 407 | if (EQ (tail, li.tortoise)) circular_list (lisp); | ||
| 408 | } | 407 | } |
| 409 | else | 408 | else |
| 410 | { | 409 | { |