Permalink
Browse files

Merge remote-tracking branch 'klaar/io-requests' into pu

Conflicts:
	apps/etorrent/src/etorrent_io_file.erl
  • Loading branch information...
2 parents 73f28ba + 2a1576d commit c79eb5e2d1c668c79dc40ff117b1186d10afbb84 @jlouis committed Dec 10, 2011
@@ -12,7 +12,8 @@
delete/2,
delete/3,
insert/3,
- from_list/3]).
+ from_list/3,
+ to_list/1]).
-record(chunkset, {
piece_len :: pos_integer(),
@@ -38,6 +39,15 @@ from_list(PieceLen, ChunkLen, Chunks) ->
chunk_len=ChunkLen,
chunks=Chunks}.
+
+%% @doc Return a list of all chunks.
+%% @end
+-spec to_list(chunkset()) -> [{non_neg_integer(), non_neg_integer()}].
+to_list(Chunkset) ->
+ #chunkset{chunks=Chunks} = Chunkset,
+ Chunks.
+
+
%% @doc
%% Get sum of the size of all chunks in the chunkset.
%% @end
Oops, something went wrong.

0 comments on commit c79eb5e

Please sign in to comment.