[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unsecure assoc calls
From: |
Neil Puttock |
Subject: |
Re: Unsecure assoc calls |
Date: |
Sat, 12 Sep 2009 21:38:05 +0100 |
2009/9/12 Michael Käppler <address@hidden>:
> Many thanks for all helpful comments.
> Attached is the revised patch.
+ "Return value if @var{key} in @var{alist}, else @var{default_value}"
@var{default-value}
The automagical docs generation makes the C++ variables more
Scheme-like by replacing underscores with hyphens, so the docstrings
should reflect this.
+ " (or @code{#f} if not specified). If @var{strict_checking} is set"
Two spaces after a full stop.
+ string key_string = ly_scm2string (scm_object_to_string (key,
SCM_UNDEFINED));
I think it's OK to leave out the print function argument, since it's optional.
+ programming_error (to_string ("Cannot find key `%s' in alist,
setting to `%s'.",
+ key_string, default_value_string));
This will crash at runtime.
You'll have to do it something like this:
programming_error ("Cannot find key `" + key_string + "' in alist,
setting to `" + default_value_string + "'.");
> What's the reason that chain-assoc-get is defined separately in
> lily-library.scm:210, though ly_chain_assoc_get exists?
It looks like an honest mistake, since originally ly_assoc_get wasn't
exported to Scheme (chain-assoc-get predates this).
I don't see any harm in removing the code in lily-library.scm and
redefining chain-assoc-get in the same way as assoc-get.
Regards,
Neil
- Unsecure assoc calls (was: Make default margin values depend on paper size), Michael Käppler, 2009/09/11
- Re: Unsecure assoc calls (was: Make default margin values depend on paper size), Carl Sorensen, 2009/09/11
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/11
- Re: Unsecure assoc calls, Neil Puttock, 2009/09/11
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/11
- Re: Unsecure assoc calls, Carl Sorensen, 2009/09/11
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/12
- Re: Unsecure assoc calls,
Neil Puttock <=
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/12
- Re: Unsecure assoc calls, Neil Puttock, 2009/09/12
- Re: Unsecure assoc calls, Neil Puttock, 2009/09/12
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/13
- Re: Unsecure assoc calls, Carl Sorensen, 2009/09/13
- Re: Unsecure assoc calls, John Mandereau, 2009/09/13
- Re: Unsecure assoc calls, Neil Puttock, 2009/09/13
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/13
- Re: Unsecure assoc calls, Neil Puttock, 2009/09/16
- Re: Unsecure assoc calls, Michael Käppler, 2009/09/17