diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2000-06-19 00:42:03 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2000-06-19 00:42:03 +0000 |
commit | a0adfbf0222fe6d7c0d97127610d485cd8047970 (patch) | |
tree | 030ba2721b6f44bdcd14d752ffe85f8404b880c2 /libguile/print.c | |
parent | 9293b3c638567aa05861eaaab14527f4a8f9b9f0 (diff) | |
download | guile-a0adfbf0222fe6d7c0d97127610d485cd8047970.tar.gz |
* print.c (scm_current_pstate, scm_make_print_state): Simplified
tests, using the assumption that Guile has been initialized.
Diffstat (limited to 'libguile/print.c')
-rw-r--r-- | libguile/print.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libguile/print.c b/libguile/print.c index 9a5734446..ebe9c9751 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -193,10 +193,10 @@ SCM_DEFINE (scm_current_pstate, "current-pstate", 0, 0, 0, "`current-pstate' is only included in GUILE_DEBUG builds.") #define FUNC_NAME s_scm_current_pstate { - if (!print_state_pool || SCM_NCONSP(print_state_pool) - || SCM_NULLP(SCM_CDR(print_state_pool))) + if (SCM_NNULLP (SCM_CDR (print_state_pool))) + return SCM_CADR (print_state_pool); + else return SCM_BOOL_F; - return SCM_CADR (print_state_pool); } #undef FUNC_NAME @@ -225,8 +225,7 @@ scm_make_print_state () /* First try to allocate a print state from the pool */ SCM_DEFER_INTS; - if (print_state_pool && SCM_CONSP(print_state_pool) && - SCM_NNULLP (SCM_CDR (print_state_pool))) + if (SCM_NNULLP (SCM_CDR (print_state_pool))) { answer = SCM_CADR (print_state_pool); SCM_SETCDR (print_state_pool, SCM_CDDR (print_state_pool)); |