diff options
| author | krasimir <krasimir@chalmers.se> | 2015-09-02 07:12:36 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2015-09-02 07:12:36 +0000 |
| commit | 73b41687c8038ee69562fafd0693204509621c79 (patch) | |
| tree | 92b6253470d1a57a3409ed40015cea1446763062 /src/runtime/haskell-bind/PGF2/FFI.hs | |
| parent | 4a1da62d841cb63dd4671dd3d46a4e150dd26485 (diff) | |
added the minimal Haskell API for storing expressions/triples in the semantic graph
Diffstat (limited to 'src/runtime/haskell-bind/PGF2/FFI.hs')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2/FFI.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hs b/src/runtime/haskell-bind/PGF2/FFI.hs index 295c1fde9..96b3eea35 100644 --- a/src/runtime/haskell-bind/PGF2/FFI.hs +++ b/src/runtime/haskell-bind/PGF2/FFI.hs @@ -76,6 +76,11 @@ foreign import ccall "gu/string.h gu_string_buf_freeze" withGuPool :: (Ptr GuPool -> IO a) -> IO a withGuPool f = bracket gu_new_pool gu_pool_free f +newOut :: Ptr GuPool -> IO (Ptr GuStringBuf, Ptr GuOut) +newOut pool = + do sb <- gu_string_buf pool + out <- gu_string_buf_out sb + return (sb,out) ------------------------------------------------------------------ -- libpgf API |
