On Tuesday 22 October 2013, Felix Salfelder wrote:
> detach_all throws an Exception_CS("plugin not attached", cmd)
> in case it finds !handle. from the other attach/detach
> commands, NULL seems to be (intentionally?) valid within
> attach_list.
> 
> i think this is a copy&paste bug (from CMD_DETACH::do_it) and
> NULL should be silently ignored (or unreachable after making
> other commands not set a handle to NULL in the
> dictionary...).

I think you are correct.

It says "//testing=informal" which means it has not yet been 
properly tested.  Also .. that block is marked "untested();"

NULL is valid within attach_list as a cover for an artifact of 
the way std::map works.

The code uses the subscript [] operator which returns whatever 
the default constructor creates (NULL) when the lookup is not 
found.  It also creates an entry, whether needed or not.

So, as you say, NULL should be silently ignored there.  Thanks 
for the bug report, and the fix.

al.

_______________________________________________
Gnucap-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnucap-devel

Reply via email to