Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Represents the hunk of a diff.
Synopsis
- newtype DiffHunk = DiffHunk (ManagedPtr DiffHunk)
- diffHunkGetHeader :: (HasCallStack, MonadIO m) => DiffHunk -> m Text
- diffHunkGetNewLines :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkGetNewStart :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkGetOldLines :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkGetOldStart :: (HasCallStack, MonadIO m) => DiffHunk -> m Int32
- diffHunkRef :: (HasCallStack, MonadIO m) => DiffHunk -> m (Maybe DiffHunk)
- diffHunkUnref :: (HasCallStack, MonadIO m) => DiffHunk -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq DiffHunk Source # | |
GBoxed DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk | |
ManagedPtrNewtype DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk toManagedPtr :: DiffHunk -> ManagedPtr DiffHunk | |
TypedObject DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk | |
HasParentTypes DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk | |
IsGValue (Maybe DiffHunk) Source # | Convert |
Defined in GI.Ggit.Structs.DiffHunk gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe DiffHunk -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe DiffHunk) | |
type ParentTypes DiffHunk Source # | |
Defined in GI.Ggit.Structs.DiffHunk |
Methods
Click to display all available methods, including inherited ones
getHeader
diffHunkGetHeader :: (HasCallStack, MonadIO m) => DiffHunk -> m Text Source #
No description available in the introspection data.
getNewLines
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the number of lines in the new file. |
Gets the number of lines in the new file.
getNewStart
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the starting line number in the new file. |
Gets the starting line number in the new file.
getOldLines
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the number of lines in the old file. |
Gets the number of lines in the old file.
getOldStart
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m Int32 | Returns: the starting line number in the old file. |
Gets the starting line number in the old file.
ref
Atomically increments the reference count of hunk
by one.
This function is MT-safe and may be called from any thread.
unref
:: (HasCallStack, MonadIO m) | |
=> DiffHunk |
|
-> m () |
Atomically decrements the reference count of hunk
by one.
If the reference count drops to 0, hunk
is freed.