From 27169869c074c1d85f0132d96aa3883321a37150 Mon Sep 17 00:00:00 2001 From: sergey-miryanov Date: Wed, 10 Feb 2010 18:13:02 +0500 Subject: [PATCH] Replace binary_to_atom with list_to_atom (binary_to_list ()) To avoid comilation errors on ERTS with version lower than 5.7 (for example, ubuntu 9.04) --- src/sqlite3.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sqlite3.erl b/src/sqlite3.erl index 8831d53..c27348e 100644 --- a/src/sqlite3.erl +++ b/src/sqlite3.erl @@ -424,7 +424,7 @@ handle_call({sql_exec, SQL}, _From, #state{port = Port} = State) -> handle_call(list_tables, _From, #state{port = Port} = State) -> Reply = exec(Port, {sql_exec, "select name from sqlite_master where type='table';"}), TableList = proplists:get_value(rows, Reply), - TableNames = [binary_to_atom(Name, utf8) || {Name} <- TableList], + TableNames = [erlang:list_to_atom (erlang:binary_to_list (Name)) || {Name} <- TableList], {reply, TableNames, State}; handle_call({table_info, Tbl}, _From, #state{port = Port} = State) -> % make sure we only get table info.