mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
make fun shims inline
This commit is contained in:
parent
ab0673a688
commit
4e0f35c078
1 changed files with 4 additions and 4 deletions
|
|
@ -40,10 +40,10 @@ let cc_update_funs funs f1 f2 =
|
|||
|
||||
let shims_fun_pre_408 = "
|
||||
external id : 'a -> 'a = \"%identity\"
|
||||
let flip f x y = f y x
|
||||
let const x _ = x
|
||||
let negate f x = not (f x)
|
||||
let protect ~finally f =
|
||||
let[@inline] flip f x y = f y x
|
||||
let[@inline] const x _ = x
|
||||
let[@inline] negate f x = not (f x)
|
||||
let[@inline] protect ~finally f =
|
||||
try
|
||||
let x= f() in
|
||||
finally();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue