Erlang Mailing Lists

Author Message

<  Erlang patches mailing list  ~  ERT: supervisor module doesn't support parameterized modules

Guest
Posted: Mon Nov 05, 2007 1:59 pm Reply with quote
Guest
Fix to allow a supervisor to support parameterized modules for children.
There is a similiar issue with the rpc module.

*** ./otp_src_R11B-5/lib/stdlib/src/supervisor.erl.orig 2007-06-11
21:52:46.000000000 +0900
--- ./otp_src_R11B-5/lib/stdlib/src/supervisor.erl 2007-09-19
17:57:17.000000000 +0900
@@ -781,7 +781,7 @@

validName(_Name) -> true.

-validFunc({M, F, A}) when is_atom(M),
+validFunc({M, F, A}) when is_atom(M); is_tuple(M),
is_atom(F),
is_list(A) -> true;
validFunc(Func) -> throw({invalid_mfa, Func}).
@@ -801,7 +801,7 @@
validMods(Mods) when is_list(Mods) ->
lists:foreach(fun(Mod) ->
if
- is_atom(Mod) -> ok;
+ is_atom(Mod); is_tuple(Mod) -> ok;
true -> throw({invalid_module, Mod})
end
end,


--
norton@alum.mit.edu
_______________________________________________
erlang-patches mailing list
erlang-patches@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-patches
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum