Skip to content

Commit

Permalink
Merge pull request #5 from ondrap/master
Browse files Browse the repository at this point in the history
Long running FFI commands should be marked 'safe'.
  • Loading branch information
ezyang committed Mar 7, 2016
2 parents 371a200 + 50f5be1 commit da4f7ec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions LDAP/Init.hsc
Expand Up @@ -110,13 +110,13 @@ foreign import ccall unsafe "ldap.h ldap_init"
cldap_init :: CString -> CInt -> IO LDAPPtr


foreign import ccall unsafe "ldap.h ldap_open"
foreign import ccall safe "ldap.h ldap_open"
cldap_open :: CString -> CInt -> IO LDAPPtr

foreign import ccall unsafe "ldap.h ldap_initialize"
ldap_initialize :: Ptr LDAPPtr -> CString -> IO LDAPInt

foreign import ccall unsafe "ldap.h ldap_simple_bind_s"
foreign import ccall safe "ldap.h ldap_simple_bind_s"
ldap_simple_bind_s :: LDAPPtr -> CString -> CString -> IO LDAPInt

foreign import ccall unsafe "ldap.h ldap_set_option"
Expand Down
6 changes: 3 additions & 3 deletions LDAP/Modify.hsc
Expand Up @@ -122,11 +122,11 @@ freeCLDAPMod ptr =
withCLDAPModArr0 :: [LDAPMod] -> (Ptr (Ptr CLDAPMod) -> IO a) -> IO a
withCLDAPModArr0 = withAnyArr0 newCLDAPMod freeCLDAPMod

foreign import ccall unsafe "ldap.h ldap_modify_s"
foreign import ccall safe "ldap.h ldap_modify_s"
ldap_modify_s :: LDAPPtr -> CString -> Ptr (Ptr CLDAPMod) -> IO LDAPInt

foreign import ccall unsafe "ldap.h ldap_delete_s"
foreign import ccall safe "ldap.h ldap_delete_s"
ldap_delete_s :: LDAPPtr -> CString -> IO LDAPInt

foreign import ccall unsafe "ldap.h ldap_add_s"
foreign import ccall safe "ldap.h ldap_add_s"
ldap_add_s :: LDAPPtr -> CString -> Ptr (Ptr CLDAPMod) -> IO LDAPInt
2 changes: 1 addition & 1 deletion LDAP/Result.hsc
Expand Up @@ -54,7 +54,7 @@ fromldmptr caller action =
then fail (caller ++ ": got null LDAPMessage pointer")
else newForeignPtr ldap_msgfree_call ptr

foreign import ccall unsafe "ldap.h ldap_result"
foreign import ccall safe "ldap.h ldap_result"
ldap_result :: LDAPPtr -> LDAPInt -> LDAPInt -> Ptr () -> Ptr (Ptr CLDAPMessage) -> IO LDAPInt

foreign import ccall unsafe "ldap.h &ldap_msgfree"
Expand Down
2 changes: 1 addition & 1 deletion LDAP/Search.hsc
Expand Up @@ -153,7 +153,7 @@ foreign import ccall unsafe "ldap.h ldap_get_values_len"
foreign import ccall unsafe "ldap.h ldap_value_free_len"
ldap_value_free_len :: Ptr (Ptr Berval) -> IO ()

foreign import ccall unsafe "ldap.h ldap_search"
foreign import ccall safe "ldap.h ldap_search"
ldap_search :: LDAPPtr -> CString -> LDAPInt -> CString -> Ptr CString ->
LDAPInt -> IO LDAPInt

Expand Down

0 comments on commit da4f7ec

Please sign in to comment.