- withUnsafeCString str $ \cstr -> do
- nsub <- withForeignPtr regex_fptr $ \p -> (#peek regex_t, re_nsub) p
- let nsub_int = fromIntegral (nsub :: CSize)
- allocaBytes ((1 + nsub_int) * (#const sizeof(regmatch_t))) $ \p_match -> do
+ withCString str $ \cstr -> do
+ withForeignPtr regex_fptr $ \regex_ptr -> do
+ nsub <- (#peek regex_t, re_nsub) regex_ptr
+ let nsub_int = fromIntegral (nsub :: CSize)
+ allocaBytes ((1 + nsub_int) * (#const sizeof(regmatch_t))) $ \p_match -> do