aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtes2006-07-13 12:34:16 +0000
committerLudovic Courtes2006-07-13 12:34:16 +0000
commit9a02dfaefa324ac1e5df3adc11003e1b578cfe64 (patch)
tree748fe4e06355aa1b04f15236c6a58207ff473caf
parent5c602ddef86c6bed6d81687c968340f160d0af21 (diff)
downloadskribilo-9a02dfaefa324ac1e5df3adc11003e1b578cfe64.tar.gz
skribilo-9a02dfaefa324ac1e5df3adc11003e1b578cfe64.tar.lz
skribilo-9a02dfaefa324ac1e5df3adc11003e1b578cfe64.zip
Made `parse-list-of' tail-recursive.
* src/guile/skribilo/skribe/api.scm (parse-list-of): Made tail-recursive, thereby fixing potential stack overflows (e.g., when building the user manual) and perhaps slightly improving performance. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-9
-rw-r--r--ChangeLog15
-rw-r--r--src/guile/skribilo/skribe/api.scm9
2 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 612526e..2119c85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,21 @@
# arch-tag: automatic-ChangeLog--lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2
#
+2006-07-12 16:28:29 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-58
+
+ Summary:
+ Made `parse-list-of' tail-recursive.
+ Revision:
+ skribilo--devel--1.2--patch-58
+
+ * src/guile/skribilo/skribe/api.scm (parse-list-of): Made tail-recursive,
+ thereby fixing potential stack overflows (e.g., when building the user
+ manual) and perhaps slightly improving performance.
+
+ modified files:
+ ChangeLog src/guile/skribilo/skribe/api.scm
+
+
2006-04-23 17:28:14 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-52
Summary:
diff --git a/src/guile/skribilo/skribe/api.scm b/src/guile/skribilo/skribe/api.scm
index 2cd8b2e..2a4d0ae 100644
--- a/src/guile/skribilo/skribe/api.scm
+++ b/src/guile/skribilo/skribe/api.scm
@@ -551,12 +551,13 @@
(null? (cdr lst)))
(parse-list-of for markup (car lst)))
(else
- (let loop ((lst lst))
+ (let loop ((lst lst)
+ (result '()))
(cond
((null? lst)
- '())
+ (reverse! result))
((pair? (car lst))
- (loop (car lst)))
+ (loop (car lst) result))
(else
(let ((r (car lst)))
(if (not (is-markup? r markup))
@@ -567,7 +568,7 @@
(markup-markup r)
(find-runtime-type r))
markup)))
- (cons r (loop (cdr lst))))))))))
+ (loop (cdr lst) (cons r result)))))))))
;*---------------------------------------------------------------------*/
;* itemize ... */