Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(563)

Side by Side Diff: lily/lily-guile.cc

Issue 561640045: Copy alist instead of deep copy on Grob clone (Closed)
Patch Set: description Created 4 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lily/include/lily-guile.hh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1998--2020 Jan Nieuwenhuizen <janneke@gnu.org> 4 Copyright (C) 1998--2020 Jan Nieuwenhuizen <janneke@gnu.org>
5 Han-Wen Nienhuys <hanwen@xs4all.nl> 5 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 6
7 LilyPond is free software: you can redistribute it and/or modify 7 LilyPond is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or 9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 SCM b; 729 SCM b;
730 SCM c; 730 SCM c;
731 SCM d; 731 SCM d;
732 }; 732 };
733 733
734 /* inserts at front, removing duplicates */ 734 /* inserts at front, removing duplicates */
735 SCM ly_assoc_prepend_x (SCM alist, SCM key, SCM val) 735 SCM ly_assoc_prepend_x (SCM alist, SCM key, SCM val)
736 { 736 {
737 return scm_acons (key, val, scm_assoc_remove_x (alist, key)); 737 return scm_acons (key, val, scm_assoc_remove_x (alist, key));
738 } 738 }
739
740 SCM
741 ly_alist_copy (SCM alist)
742 {
743 SCM l = SCM_EOL;
744 SCM *tail = &l;
745 for (; scm_is_pair (alist); alist = scm_cdr (alist))
746 {
747 *tail = scm_acons (scm_caar (alist), scm_cdar (alist), *tail);
748 tail = SCM_CDRLOC (*tail);
749 }
750 return l;
751 }
OLDNEW
« no previous file with comments | « lily/include/lily-guile.hh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b