~ubuntu-branches/ubuntu/lucid/erlang/lucid-proposed

« back to all changes in this revision

Viewing changes to lib/dialyzer/src/dialyzer_utils.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-06-11 12:18:07 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090611121807-ks7eb4xrt7dsysgx
Tags: 1:13.b.1-dfsg-1
* New upstream release.
* Removed unnecessary dependency of erlang-os-mon on erlang-observer and
  erlang-tools and added missing dependency of erlang-nox on erlang-os-mon
  (closes: #529512).
* Removed a patch to eunit application because the bug was fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
get_abstract_code_from_beam(File) ->
94
94
  case beam_lib:chunks(File, [abstract_code]) of
95
95
    {ok, {_, List}} ->
96
 
      case lists:keysearch(abstract_code, 1, List) of
97
 
        {value, {abstract_code, {raw_abstract_v1, Abstr}}} -> {ok, Abstr};
 
96
      case lists:keyfind(abstract_code, 1, List) of
 
97
        {abstract_code, {raw_abstract_v1, Abstr}} -> {ok, Abstr};
98
98
        _ -> error
99
99
      end;
100
100
    _ ->
235
235
-spec get_spec_info(abstract_code(), dict()) -> {'ok', dict()} | {'error', string()}.
236
236
 
237
237
get_spec_info(AbstractCode, RecordsDict) ->
238
 
  {value, {attribute, _, module, ModName}} =
239
 
    lists:keysearch(module, 3, AbstractCode),
 
238
  {attribute, _, module, ModName} = lists:keyfind(module, 3, AbstractCode),
240
239
  get_spec_info(AbstractCode, dict:new(), RecordsDict, ModName, "nofile").
241
240
 
242
241
%% TypeSpec is a list of conditional contracts for a function.