Skip to content

Commit

Permalink
calling std::function should be safe!
Browse files Browse the repository at this point in the history
  • Loading branch information
wavewave committed Aug 28, 2023
1 parent 83d21f4 commit 81486f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fficxx-runtime/src/FFICXX/Runtime/Function/TH.hs
Expand Up @@ -75,8 +75,8 @@ genFunctionInstanceFor qtyp param =
let suffix = fpinfoSuffix param
typ <- qtyp
f1 <- mkNew "newFunction" t_newFunction typ suffix
-- TODO: handle safety correctly
f2 <- mkMember "call" (t_call FFIUnsafe) typ suffix
-- NOTE: The indirected function call should be safe.
f2 <- mkMember "call" (t_call FFISafe) typ suffix
f3 <- mkDelete "deleteFunction" t_deleteFunction typ suffix
wrap <- mkWrapper (typ, suffix)
addModFinalizer
Expand Down
2 changes: 1 addition & 1 deletion fficxx-test/fficxx-test.cabal
@@ -1,6 +1,6 @@
Cabal-Version: 3.0
Name: fficxx-test
Version: 0.7.0.1
Version: 0.8.0.0
Synopsis: test for fficxx
Description: test for fficxx (with stdcxx)
License: BSD-2-Clause
Expand Down

0 comments on commit 81486f9

Please sign in to comment.