mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
handle failed linearization in tabularLinearize
This commit is contained in:
@@ -671,7 +671,10 @@ tabularLinearize c e =
|
|||||||
withForeignPtr (c_revision c) $ \c_revision ->
|
withForeignPtr (c_revision c) $ \c_revision ->
|
||||||
bracket (newStablePtr e) freeStablePtr $ \c_e ->
|
bracket (newStablePtr e) freeStablePtr $ \c_e ->
|
||||||
withForeignPtr marshaller $ \m ->
|
withForeignPtr marshaller $ \m ->
|
||||||
bracket (withPgfExn "tabularLinearize" (pgf_tabular_linearize (c_db c) c_revision c_e nullPtr m)) free peekTable
|
bracket (withPgfExn "tabularLinearize" (pgf_tabular_linearize (c_db c) c_revision c_e nullPtr m)) free $ \c_texts -> do
|
||||||
|
if c_texts == nullPtr
|
||||||
|
then []
|
||||||
|
else peekTable c_texts
|
||||||
where
|
where
|
||||||
peekTable c_texts = do
|
peekTable c_texts = do
|
||||||
c_field <- peekElemOff c_texts 0
|
c_field <- peekElemOff c_texts 0
|
||||||
|
|||||||
Reference in New Issue
Block a user