diff options
author | Hans Bolinder <[email protected]> | 2011-09-02 08:43:14 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2011-09-02 08:43:14 +0200 |
commit | 1eac5476aa7faad600bb940ca3fe07be78273425 (patch) | |
tree | c5d73b53f588503d3f872e413716b3a9b2e3c91b /lib/stdlib/src/sofs.erl | |
parent | 8fc59a1ff776a472299db26b175da09a03b3d30b (diff) | |
parent | bb94e589c8495caf7c1fa6ebe808f6983ceaf44a (diff) | |
download | otp-1eac5476aa7faad600bb940ca3fe07be78273425.tar.gz otp-1eac5476aa7faad600bb940ca3fe07be78273425.tar.bz2 otp-1eac5476aa7faad600bb940ca3fe07be78273425.zip |
Merge branch 'dev' into major
* dev:
Fix a couple of minor bugs with hook priority
Update to reflect addition of CTH priority addition
Update CTH priority default to be 0
Update to reflect new cth callback api
Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} instead of NewState.
Add priority functionality and tests for ct hooks
Update internal hooks state to use a record instead of tuples
Improve and correct types and specifications in Kernel and STDLIB
Diffstat (limited to 'lib/stdlib/src/sofs.erl')
-rw-r--r-- | lib/stdlib/src/sofs.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/stdlib/src/sofs.erl b/lib/stdlib/src/sofs.erl index d38b8ab37a..34eb224647 100644 --- a/lib/stdlib/src/sofs.erl +++ b/lib/stdlib/src/sofs.erl @@ -81,7 +81,8 @@ -define(ORDTAG, 'OrdSet'). -record(?TAG, {data = [] :: list(), type = type :: term()}). --record(?ORDTAG, {orddata = {} :: tuple(), ordtype = type :: term()}). +-record(?ORDTAG, {orddata = {} :: tuple() | atom(), + ordtype = type :: term()}). -define(LIST(S), (S)#?TAG.data). -define(TYPE(S), (S)#?TAG.type). @@ -375,7 +376,7 @@ to_sets(S) when ?IS_ORDSET(S) -> -spec(no_elements(ASet) -> NoElements when ASet :: a_set() | ordset(), - NoElements :: pos_integer()). + NoElements :: non_neg_integer()). no_elements(S) when ?IS_SET(S) -> length(?LIST(S)); no_elements(S) when ?IS_ORDSET(S), is_tuple(?ORDTYPE(S)) -> |