[libre-riscv-dev] extremely busy crowdsupply update started
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Sun Mar 29 14:46:38 BST 2020
On Sun, Mar 29, 2020 at 2:23 PM Jock Tanner <tanner.of.kha at gmail.com> wrote:
>
> Luke,
>
> I think this code won't always work as intended:
>
> p = Cfg.getParamInt(attr) # all params have a type
> if p.type == 'Enumerate':
> Cfg.getParamEnumerate(attr).setInt(val)
> else:
> Cfg.getParamInt(attr).setInt(val)
>
> If the parameter named 'attr' is already defined, 'p.type' will be set
> according to its type. But for undefined parameters 'p.type' will be
> what we ask for, i. e. always 'Int'.
yes i'm assuming that etesian.something is already pre-defined, and
can be detected as being of type "Enumerate".
l.
More information about the libre-riscv-dev
mailing list