summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-11-11 18:22:18 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2010-11-11 18:22:18 +0000
commitc53d1a68dc44a5fed209f5e36c2b2de84a3ea67b (patch)
tree8ac6d2e8f82516b9c77e6b2c252bfe75798e0794
parentce2e8d76bc77fcf7cb3ebb7db89fba16f82ead35 (diff)
downloadrabbitmq-server-c53d1a68dc44a5fed209f5e36c2b2de84a3ea67b.tar.gz
Correction of specs
-rw-r--r--src/rabbit_misc.erl7
-rw-r--r--src/rabbit_upgrade.erl2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index 8e62150c..d8eef7e8 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -76,7 +76,7 @@
-ifdef(use_specs).
--export_type([resource_name/0]).
+-export_type([resource_name/0, module_attributes/0, modules_attributes/0]).
-type(ok_or_error() :: rabbit_types:ok_or_error(any())).
-type(thunk(T) :: fun(() -> T)).
@@ -84,6 +84,9 @@
-type(optdef() :: {flag, string()} | {option, string(), any()}).
-type(channel_or_connection_exit()
:: rabbit_types:channel_exit() | rabbit_types:connection_exit()).
+-type(module_attributes() :: [term()]).
+-type(modules_attributes() :: [{atom(), module_attributes()}]).
+
-spec(method_record_type/1 :: (rabbit_framing:amqp_method_record())
-> rabbit_framing:amqp_method_name()).
@@ -184,7 +187,7 @@
-spec(unlink_and_capture_exit/1 :: (pid()) -> 'ok').
-spec(get_options/2 :: ([optdef()], [string()])
-> {[string()], [{string(), any()}]}).
--spec(all_module_attributes/1 :: (atom()) -> dict:dictionary()).
+-spec(all_module_attributes/1 :: (atom()) -> modules_attributes()).
-spec(now_ms/0 :: () -> non_neg_integer()).
-endif.
diff --git a/src/rabbit_upgrade.erl b/src/rabbit_upgrade.erl
index 9c294660..eeaa4c62 100644
--- a/src/rabbit_upgrade.erl
+++ b/src/rabbit_upgrade.erl
@@ -32,7 +32,7 @@
-ifdef(use_specs).
--spec(maybe_upgrade/0 :: () -> 'ok' | 'version_not_available').
+-spec(maybe_upgrade/0 :: () -> 'ok' | 'version_not_available' | no_return()).
-spec(read_version/0 ::
() -> {'ok', [any()]} | rabbit_types:error(any())).
-spec(write_version/0 :: () -> 'ok').