Commits

Dmitry Grebeniuk  committed cf5b945

'[de]ser' -> '[de]ser.marshal'

  • Participants
  • Parent commits d47e191

Comments (0)

Files changed (1)

File src/cd_Ser.ml

 value ti_unit = (ti_unit :> ti unit);
 
 
+(******************************************************)
+
+
+
+
+
+(******************************************************)
 
 value marshal_ser typename x =
   Marshal.to_string (typename, x) []
      let ustrs : array string =
        Array.map
          (fun ub ->
-            let ser = get_meth_untyped "ser" ub.ub_uti in
+            let ser = get_meth_untyped "ser.marshal" ub.ub_uti in
             uget_exn ti_string (u_app ser ub)
          )
          uvals
          fun a ->
            let (variant_name, disp) = destr (ubox ti a) in
            let () = printf "ti_ser: variant_name = %S\n%!" variant_name in
-           let uvals = disp "ser" in
+           let uvals = disp "ser.marshal" in
            let ustrs = ustrs_of_uvals uvals in
            let () = Array.iter (printf "ti_ser: %S\n%!") ustrs in
            let () = print_newline () in
      | Tuple of (R.ubox -> array R.ubox)
 *)
      | Dispatch_method meth ->
-         ti_ser_td ti (meth "ser")
+         ti_ser_td ti (meth "ser.marshal")
      ]
 ;
 
  = fun ustrs utis ->
              Array.map2to1
                (fun str uti ->
-                  let deser = get_meth_untyped "deser" uti in
+                  let deser = get_meth_untyped "deser.marshal" uti in
                   u_app deser (ubox ti_string str)
                )
                ustrs
  = fun ti td ->
      match td with
      [ Dispatch_method meth ->
-         ti_deser_td ti (meth "deser")
+         ti_deser_td ti (meth "deser.marshal")
      | Simple tn ->
          fun a -> marshal_deser tn a
      | Sum_type _destr constr ->
  : #ti 'a -> unit
  = fun ti ->
      (
-         uti_add_meth (ti :> uti) "ser" &
+         uti_add_meth (ti :> uti) "ser.marshal" &
            ubox (ti_abs ti ti_string) &
              (ti_ser_td ti ti#type_desc)
      ;
-         uti_add_meth (ti :> uti) "deser" &
+         uti_add_meth (ti :> uti) "deser.marshal" &
            ubox (ti_abs ti_string ti) &
              (ti_deser_td ti ti#type_desc)
      )
 value ti_ser
  : #ti 'a -> 'a -> string
  = fun ti ->
-     get_meth_typed1 "ser" ti ti ti_string
+     get_meth_typed1 "ser.marshal" ti ti ti_string
 ;
 
 
 value ti_deser
  : #ti 'a -> string -> 'a
  = fun ti ->
-     get_meth_typed1 "deser" ti ti_string ti
+     get_meth_typed1 "deser.marshal" ti ti_string ti
 ;