mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
fix the missmatch between Int and CInt in the Haskell binding to the word alignment API. This was causing problems on 64-bit machines
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-}
|
||||
{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable, ScopedTypeVariables #-}
|
||||
-------------------------------------------------
|
||||
-- |
|
||||
-- Maintainer : Krasimir Angelov
|
||||
@@ -459,8 +459,8 @@ alignWords lang e = unsafePerformIO $
|
||||
c_phrase <- (#peek PgfAlignmentPhrase, phrase) ptr
|
||||
phrase <- peekCString c_phrase
|
||||
n_fids <- (#peek PgfAlignmentPhrase, n_fids) ptr
|
||||
fids <- peekArray (fromIntegral (n_fids :: CInt)) (ptr `plusPtr` (#offset PgfAlignmentPhrase, fids))
|
||||
return (phrase, fids)
|
||||
(fids :: [CInt]) <- peekArray (fromIntegral (n_fids :: CInt)) (ptr `plusPtr` (#offset PgfAlignmentPhrase, fids))
|
||||
return (phrase, map fromIntegral fids)
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Helper functions
|
||||
|
||||
Reference in New Issue
Block a user