Skip to content
Browse files

oops, ref cases were reversed

  • Loading branch information...
1 parent 374c692 commit 8e3a6aae186781a0f39c4e3c129e6147d754b12a Jake Donham committed Jul 20, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/generator/gen_aux.ml
View
5 src/generator/gen_aux.ml
@@ -223,7 +223,7 @@ let rec gen_to qual_id t x =
| Option (_loc, t) ->
<:expr< Orpc_onc.to_option (fun x -> $gen_to t <:expr< x >>$) $x$ >>
- | Ref (_loc, t) -> gen_to t <:expr< ! $x$ >>
+ | Ref (_loc, t) -> <:expr< ref $gen_to t x$ >>
| Apply (_loc, mdl, id, args) ->
<:expr<
@@ -323,8 +323,7 @@ let rec gen_of qual_id t v =
| Option (_loc, t) ->
<:expr< Orpc_onc.of_option (fun v -> $gen_of t <:expr< v >>$) $v$ >>
- | Ref (_loc, t) ->
- <:expr< ref ($gen_of t v$) >>
+ | Ref (_loc, t) -> gen_of t <:expr< ! $v$ >>
| Apply (_loc, mdl, id, args) ->
<:expr<

0 comments on commit 8e3a6aa

Please sign in to comment.
Something went wrong with that request. Please try again.