Move nif functions to geef_nif

This commit is contained in:
Carlos Martín Nieto
2013-04-25 11:05:57 +02:00
parent 54d9e8b63a
commit 65227fe85b
10 changed files with 31 additions and 31 deletions

View File

@@ -10,13 +10,13 @@
-spec exists(odb(), oid() | iolist()) -> boolean().
exists(#odb{handle=Handle}, #oid{oid=Oid}) ->
geef:odb_object_exists(Handle, Oid);
geef_nif:odb_object_exists(Handle, Oid);
exists(Odb = #odb{}, Sha) ->
exists(Odb, geef_oid:parse(Sha)).
-spec write(odb(), iolist(), atom()) -> {ok, oid()} | {error, term}.
write(#odb{handle=Handle}, Contents, Type) ->
case geef:odb_write(Handle, Contents, Type) of
case geef_nif:odb_write(Handle, Contents, Type) of
{ok, Oid} ->
{ok, #oid{oid=Oid}};
Other ->