Skip to content

Commit

Permalink
swap jsx with jiffy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Yakamercan committed Dec 17, 2012
1 parent 04698ea commit 9762bea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bench/cberl_bench.config
Expand Up @@ -12,7 +12,7 @@
%% code path to cberl/jiffy/poolboy
{code_paths, ["*/cberl",
"*/cberl/deps/poolboy",
"*/cberl/deps/jsx"]}.
"*/cberl/deps/jiffy"]}.

{key_generator, {int_to_str, {uniform_int, 100000}}}.

Expand Down
4 changes: 2 additions & 2 deletions rebar.config
Expand Up @@ -7,8 +7,8 @@
{port_specs, [{"priv/cberl_drv.so", ["c_src/*.c"]}]}.

{deps, [
{'jsx', "", {git, "git@github.com:talentdeficit/jsx.git", {branch, master}}},
{'poolboy', "", {git, "git@github.com:devinus/poolboy.git", {branch, master}}}
{'jiffy', "", {git, "https://github.com/davisp/jiffy.git", {branch, master}}},
{'poolboy', "", {git, "https://github.com/devinus/poolboy.git", {branch, master}}}
]}.

{erl_opts, [debug_info, warnings_as_errors]}.
Expand Down
4 changes: 2 additions & 2 deletions src/cberl_transcoder.erl
Expand Up @@ -20,7 +20,7 @@ encode_value(Encoders, Value) ->
encode_value1(Flag, Value) when Flag band ?'CBE_STR' =/= 0 ->
encode_value1(Flag bxor ?'CBE_STR', list_to_binary(Value));
encode_value1(Flag, Value) when Flag band ?'CBE_JSON' =/= 0 ->
encode_value1(Flag bxor ?'CBE_JSON', jsx:encode(Value));
encode_value1(Flag bxor ?'CBE_JSON', jiffy:encode(Value));
encode_value1(Flag, Value) when Flag band ?'CBE_RAW' =/= 0 ->
encode_value1(Flag bxor ?'CBE_RAW', term_to_binary(Value));
encode_value1(0, Value) ->
Expand All @@ -30,7 +30,7 @@ encode_value1(0, Value) ->
decode_value(Flag, Value) when ?'CBE_RAW' band Flag =/= 0->
decode_value(Flag bxor ?'CBE_RAW', binary_to_term(Value));
decode_value(Flag, Value) when ?'CBE_JSON' band Flag =/= 0->
decode_value(Flag bxor ?'CBE_JSON', jsx:decode(Value));
decode_value(Flag bxor ?'CBE_JSON', jiffy:decode(Value));
decode_value(Flag, Value) when ?'CBE_STR' band Flag =/= 0->
decode_value(Flag bxor ?'CBE_STR', binary_to_list(Value));
decode_value(0, Value) ->
Expand Down

0 comments on commit 9762bea

Please sign in to comment.