mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -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
|
-- Maintainer : Krasimir Angelov
|
||||||
@@ -459,8 +459,8 @@ alignWords lang e = unsafePerformIO $
|
|||||||
c_phrase <- (#peek PgfAlignmentPhrase, phrase) ptr
|
c_phrase <- (#peek PgfAlignmentPhrase, phrase) ptr
|
||||||
phrase <- peekCString c_phrase
|
phrase <- peekCString c_phrase
|
||||||
n_fids <- (#peek PgfAlignmentPhrase, n_fids) ptr
|
n_fids <- (#peek PgfAlignmentPhrase, n_fids) ptr
|
||||||
fids <- peekArray (fromIntegral (n_fids :: CInt)) (ptr `plusPtr` (#offset PgfAlignmentPhrase, fids))
|
(fids :: [CInt]) <- peekArray (fromIntegral (n_fids :: CInt)) (ptr `plusPtr` (#offset PgfAlignmentPhrase, fids))
|
||||||
return (phrase, fids)
|
return (phrase, map fromIntegral fids)
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Helper functions
|
-- Helper functions
|
||||||
|
|||||||
Reference in New Issue
Block a user