Documentation and uses of ets:info/1
Bjorn Gustavsson
bjorn@REDACTED
Tue Apr 25 19:16:55 CEST 2006
That is an incompatible change we have decided to make in R11B,
since the old behaviour of returning a tuple is very strange.
(That is, you are probably looking at the documentation for R10B,
but running an R11B snapshot.)
The code in the snmp application is written the way it is in order
to work in both R10B and R11B.
/Björn
Kostis Sagonas <kostis@REDACTED> writes:
> The documentation of 'ets:info/1' reads:
>
> info(Tab) -> tuple() | undefined
>
> while it should probably read:
>
> info(Tab) -> [tuple()] | undefined
>
> This causes confusion in other parts of Erlang/OTP.
> For example, in 'snmpa_general_db', there is code which reads:
>
> info({ets, Name, _}) ->
> case ets:info(Name) of
> T when tuple(T) ->
> tuple_to_list(T);
> L ->
> L
> end.
>
>
> Another discrepancy discovered by Dialyzer...
>
>
> Kostis
>
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list