the Haskell marshaller/unmarshaller are now statically allocated

This commit is contained in:
Krasimir Angelov
2023-03-10 23:34:28 +01:00
parent 4863ab0ec9
commit 62d24b9431
5 changed files with 261 additions and 316 deletions
+1 -2
View File
@@ -103,9 +103,8 @@ pExpr =
unsafePerformIO $
withText str $ \c_str ->
alloca $ \c_pos ->
withForeignPtr unmarshaller $ \u ->
mask_ $ do
c_expr <- pgf_read_expr_ex c_str c_pos u
c_expr <- pgf_read_expr_ex c_str c_pos unmarshaller
if c_expr == castPtrToStablePtr nullPtr
then return []
else do expr <- deRefStablePtr c_expr