emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien Guerry <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: [Accepted] [O, 1/3] Replace recursive implementation with an iterative one
Date: Tue, 22 Mar 2011 10:46:10 +0100 (CET)	[thread overview]
Message-ID: <20110322094610.24BFE64AF@myhost.localdomain> (raw)
In-Reply-To: 1300720268-9375-2-git-send-email-christian.egli@alumni.ethz.ch

Patch 707 (http://patchwork.newartisans.com/patch/707/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1300720268-9375-2-git-send-email-christian.egli%40alumni.ethz.ch%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O,1/3] Replace recursive implementation with an iterative one
> Date: Mon, 21 Mar 2011 20:11:06 -0000
> From: Christian Egli <christian.egli@alumni.ethz.ch>
> X-Patchwork-Id: 707
> Message-Id: <1300720268-9375-2-git-send-email-christian.egli@alumni.ethz.ch>
> To: emacs-orgmode@gnu.org
> Cc: Christian Egli <christian.egli@sbszh.ch>
> 
> From: Christian Egli <christian.egli@sbszh.ch>
> 
> * org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace
> recursive implementation with an iterative one.
> 
> That way we can avoid to have ask users to increase
> `max-lisp-eval-depth'.
> 
> ---
> lisp/org-taskjuggler.el |   16 +++++++---------
>  1 files changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
> index 9c88f5d..279f46d 100644
> --- a/lisp/org-taskjuggler.el
> +++ b/lisp/org-taskjuggler.el
> @@ -418,15 +418,13 @@ deeper), then it's not a leaf."
>  (defun org-taskjuggler-assign-resource-ids (resources)
>    "Given a list of resources return the same list, assigning a
>  unique id to each resource."
> -  (cond
> -   ((null resources) nil)
> -   (t
> -    (let* ((resource (car resources))
> -	   (unique-id (org-taskjuggler-get-unique-id resource unique-ids)))
> -      (push (cons "unique-id" unique-id) resource)
> -      (cons resource
> -	    (org-taskjuggler-assign-resource-ids (cdr resources)
> -						 (cons unique-id unique-ids)))))))
> +  (let (unique-ids new-list)
> +    (dolist (resource resources new-list)
> +      (let ((unique-id (org-taskjuggler-get-unique-id resource unique-ids)))
> +	(push (cons "unique-id" unique-id) resource)
> +	(push unique-id unique-ids)
> +	(push resource new-list)))
> +    (nreverse new-list)))
>  
>  (defun org-taskjuggler-resolve-dependencies (tasks)
>    (let ((previous-level 0)
> 

  parent reply	other threads:[~2011-03-22  9:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 15:11 [PATCH 0/3] Small fixes to taskjuggler export Christian Egli
2011-03-21 15:11 ` [PATCH 1/3] Replace recursive implementation with an iterative one Christian Egli
2011-03-22  9:44   ` [Accepted] [O, " Bastien Guerry
2011-03-22  9:46   ` Bastien Guerry [this message]
2011-03-21 15:11 ` [PATCH 2/3] Fix allocations handling for tj3 Christian Egli
2011-03-22  9:47   ` [Accepted] [O,2/3] " Bastien Guerry
2011-03-21 15:11 ` [PATCH 3/3] Fix a typo in the commentary Christian Egli
2011-03-22  9:47   ` [Accepted] [O,3/3] " Bastien Guerry
2011-03-22  9:49 ` [PATCH 0/3] Small fixes to taskjuggler export Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110322094610.24BFE64AF@myhost.localdomain \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).