diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-25 19:10:35 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-25 19:10:35 +0200 |
commit | 7937ba477539072253c46cea28b3d16b9d6c755f (patch) | |
tree | 662ad4c79c286a069dd4f572e3c232939fd75218 /src/guile_interface.scm.c | |
parent | Made none-output print statprof info. (diff) | |
download | calp-7937ba477539072253c46cea28b3d16b9d6c755f.tar.gz calp-7937ba477539072253c46cea28b3d16b9d6c755f.tar.xz |
Move single curly brace.
This fixes an error where the property list of an object would be
rebuilt every time it was accessed. This was both slow and wrong.
Diffstat (limited to '')
-rw-r--r-- | src/guile_interface.scm.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/guile_interface.scm.c b/src/guile_interface.scm.c index 0f795d44..63d3f737 100644 --- a/src/guile_interface.scm.c +++ b/src/guile_interface.scm.c @@ -68,22 +68,23 @@ SCM_DEFINE (vcomponent_get_attribute, "%vcomponent-get-attribute", 2, 0, 0, val = scm_cons(val, SCM_MAKE_HASH_TABLE()); v->key.scm = val; scm_gc_protect_object(v->key.scm); - } - triekeys = KEYS(TRIE(param_set))(&v->val); - /* For every property key bound to the current attribute */ - FOR (LLIST, strbuf, k, triekeys) { - proplist = SCM_EOL; + triekeys = KEYS(TRIE(param_set))(&v->val); + /* For every property key bound to the current attribute */ + FOR (LLIST, strbuf, k, triekeys) { + proplist = SCM_EOL; - trievals = GET(TRIE(param_set))(&v->val, k->mem); - /* For every value bound to the current property */ - FOR (LLIST, strbuf, s, trievals) { - proplist = scm_cons(scm_from_strbuf(s), proplist); - } + trievals = GET(TRIE(param_set))(&v->val, k->mem); + /* For every value bound to the current property */ + FOR (LLIST, strbuf, s, trievals) { + proplist = scm_cons(scm_from_strbuf(s), proplist); + } - scm_hashq_set_x(scm_cdr(val), scm_from_strbuf_symbol(k), - scm_reverse(proplist)); + scm_hashq_set_x(scm_cdr(val), scm_from_strbuf_symbol(k), + scm_reverse(proplist)); + } } + attrlist = scm_cons(val, attrlist); } |