Skip to content

Commit

Permalink
add_define_ownership() should be a safe call
Browse files Browse the repository at this point in the history
Summary: Trying to fix some timeouts during deriving on the incremental base DB.

Reviewed By: pepeiborra

Differential Revision: D51065406

fbshipit-source-id: de74909e16e3ea874d9d89b89716a10e3b6dc92d
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Nov 7, 2023
1 parent 9de2897 commit 1f8d565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion glean/db/Glean/Database/Storage/RocksDB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ foreign import ccall unsafe glean_rocksdb_get_ownership
-> Ptr (Ptr Ownership)
-> IO CString

foreign import ccall unsafe glean_rocksdb_add_define_ownership
foreign import ccall safe glean_rocksdb_add_define_ownership
:: Ptr (Database RocksDB)
-> Ptr DefineOwnership
-> IO CString
Expand Down
6 changes: 3 additions & 3 deletions glean/hs/Glean/RTS/Foreign/Ownership.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,18 @@ foreign import ccall unsafe glean_new_define_ownership
foreign import ccall unsafe "&glean_define_ownership_free"
glean_define_ownership_free :: FunPtr (Ptr DefineOwnership -> IO ())

foreign import ccall unsafe glean_define_ownership_subst
foreign import ccall safe glean_define_ownership_subst
:: Ptr DefineOwnership
-> Ptr Subst
-> IO CString

foreign import ccall unsafe glean_define_ownership_sort_by_owner
foreign import ccall safe glean_define_ownership_sort_by_owner
:: Ptr DefineOwnership
-> Word64
-> Ptr (HsArray Int64)
-> IO CString

foreign import ccall unsafe glean_define_ownership_add_derived
foreign import ccall safe glean_define_ownership_add_derived
:: Ptr Lookup
-> Ptr DefineOwnership
-> Word64
Expand Down

0 comments on commit 1f8d565

Please sign in to comment.