{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Each piece of memory that is pushed onto the stack
-- is cast to a GTrashStack*.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GLib.Structs.TrashStack
    ( 

-- * Exported types
    TrashStack(..)                          ,
    newZeroTrashStack                       ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveTrashStackMethod                 ,
#endif


-- ** height #method:height#

    trashStackHeight                        ,


-- ** peek #method:peek#

    trashStackPeek                          ,


-- ** pop #method:pop#

    trashStackPop                           ,


-- ** push #method:push#

    trashStackPush                          ,




 -- * Properties
-- ** next #attr:next#
-- | pointer to the previous element of the stack,
--     gets stored in the first @sizeof (gpointer)@
--     bytes of the element

    clearTrashStackNext                     ,
    getTrashStackNext                       ,
    setTrashStackNext                       ,
#if defined(ENABLE_OVERLOADING)
    trashStack_next                         ,
#endif




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL


-- | Memory-managed wrapper type.
newtype TrashStack = TrashStack (SP.ManagedPtr TrashStack)
    deriving (TrashStack -> TrashStack -> Bool
(TrashStack -> TrashStack -> Bool)
-> (TrashStack -> TrashStack -> Bool) -> Eq TrashStack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrashStack -> TrashStack -> Bool
$c/= :: TrashStack -> TrashStack -> Bool
== :: TrashStack -> TrashStack -> Bool
$c== :: TrashStack -> TrashStack -> Bool
Eq)

instance SP.ManagedPtrNewtype TrashStack where
    toManagedPtr :: TrashStack -> ManagedPtr TrashStack
toManagedPtr (TrashStack ManagedPtr TrashStack
p) = ManagedPtr TrashStack
p

instance BoxedPtr TrashStack where
    boxedPtrCopy :: TrashStack -> IO TrashStack
boxedPtrCopy = \TrashStack
p -> TrashStack -> (Ptr TrashStack -> IO TrashStack) -> IO TrashStack
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TrashStack
p (Int -> Ptr TrashStack -> IO (Ptr TrashStack)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
8 (Ptr TrashStack -> IO (Ptr TrashStack))
-> (Ptr TrashStack -> IO TrashStack)
-> Ptr TrashStack
-> IO TrashStack
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr TrashStack -> TrashStack)
-> Ptr TrashStack -> IO TrashStack
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr TrashStack -> TrashStack
TrashStack)
    boxedPtrFree :: TrashStack -> IO ()
boxedPtrFree = \TrashStack
x -> TrashStack -> (Ptr TrashStack -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr TrashStack
x Ptr TrashStack -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr TrashStack where
    boxedPtrCalloc :: IO (Ptr TrashStack)
boxedPtrCalloc = Int -> IO (Ptr TrashStack)
forall a. Int -> IO (Ptr a)
callocBytes Int
8


-- | Construct a `TrashStack` struct initialized to zero.
newZeroTrashStack :: MonadIO m => m TrashStack
newZeroTrashStack :: m TrashStack
newZeroTrashStack = IO TrashStack -> m TrashStack
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TrashStack -> m TrashStack) -> IO TrashStack -> m TrashStack
forall a b. (a -> b) -> a -> b
$ IO (Ptr TrashStack)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr TrashStack)
-> (Ptr TrashStack -> IO TrashStack) -> IO TrashStack
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr TrashStack -> TrashStack)
-> Ptr TrashStack -> IO TrashStack
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr TrashStack -> TrashStack
TrashStack

instance tag ~ 'AttrSet => Constructible TrashStack tag where
    new :: (ManagedPtr TrashStack -> TrashStack)
-> [AttrOp TrashStack tag] -> m TrashStack
new ManagedPtr TrashStack -> TrashStack
_ [AttrOp TrashStack tag]
attrs = do
        TrashStack
o <- m TrashStack
forall (m :: * -> *). MonadIO m => m TrashStack
newZeroTrashStack
        TrashStack -> [AttrOp TrashStack 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set TrashStack
o [AttrOp TrashStack tag]
[AttrOp TrashStack 'AttrSet]
attrs
        TrashStack -> m TrashStack
forall (m :: * -> *) a. Monad m => a -> m a
return TrashStack
o


-- | Get the value of the “@next@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' trashStack #next
-- @
getTrashStackNext :: MonadIO m => TrashStack -> m (Maybe TrashStack)
getTrashStackNext :: TrashStack -> m (Maybe TrashStack)
getTrashStackNext TrashStack
s = IO (Maybe TrashStack) -> m (Maybe TrashStack)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TrashStack) -> m (Maybe TrashStack))
-> IO (Maybe TrashStack) -> m (Maybe TrashStack)
forall a b. (a -> b) -> a -> b
$ TrashStack
-> (Ptr TrashStack -> IO (Maybe TrashStack))
-> IO (Maybe TrashStack)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TrashStack
s ((Ptr TrashStack -> IO (Maybe TrashStack))
 -> IO (Maybe TrashStack))
-> (Ptr TrashStack -> IO (Maybe TrashStack))
-> IO (Maybe TrashStack)
forall a b. (a -> b) -> a -> b
$ \Ptr TrashStack
ptr -> do
    Ptr TrashStack
val <- Ptr (Ptr TrashStack) -> IO (Ptr TrashStack)
forall a. Storable a => Ptr a -> IO a
peek (Ptr TrashStack
ptr Ptr TrashStack -> Int -> Ptr (Ptr TrashStack)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (Ptr TrashStack)
    Maybe TrashStack
result <- Ptr TrashStack
-> (Ptr TrashStack -> IO TrashStack) -> IO (Maybe TrashStack)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr TrashStack
val ((Ptr TrashStack -> IO TrashStack) -> IO (Maybe TrashStack))
-> (Ptr TrashStack -> IO TrashStack) -> IO (Maybe TrashStack)
forall a b. (a -> b) -> a -> b
$ \Ptr TrashStack
val' -> do
        TrashStack
val'' <- ((ManagedPtr TrashStack -> TrashStack)
-> Ptr TrashStack -> IO TrashStack
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr TrashStack -> TrashStack
TrashStack) Ptr TrashStack
val'
        TrashStack -> IO TrashStack
forall (m :: * -> *) a. Monad m => a -> m a
return TrashStack
val''
    Maybe TrashStack -> IO (Maybe TrashStack)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TrashStack
result

-- | Set the value of the “@next@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' trashStack [ #next 'Data.GI.Base.Attributes.:=' value ]
-- @
setTrashStackNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m ()
setTrashStackNext :: TrashStack -> Ptr TrashStack -> m ()
setTrashStackNext TrashStack
s Ptr TrashStack
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TrashStack -> (Ptr TrashStack -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TrashStack
s ((Ptr TrashStack -> IO ()) -> IO ())
-> (Ptr TrashStack -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TrashStack
ptr -> do
    Ptr (Ptr TrashStack) -> Ptr TrashStack -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TrashStack
ptr Ptr TrashStack -> Int -> Ptr (Ptr TrashStack)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr TrashStack
val :: Ptr TrashStack)

-- | Set the value of the “@next@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #next
-- @
clearTrashStackNext :: MonadIO m => TrashStack -> m ()
clearTrashStackNext :: TrashStack -> m ()
clearTrashStackNext TrashStack
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TrashStack -> (Ptr TrashStack -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TrashStack
s ((Ptr TrashStack -> IO ()) -> IO ())
-> (Ptr TrashStack -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr TrashStack
ptr -> do
    Ptr (Ptr TrashStack) -> Ptr TrashStack -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TrashStack
ptr Ptr TrashStack -> Int -> Ptr (Ptr TrashStack)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr TrashStack
forall a. Ptr a
FP.nullPtr :: Ptr TrashStack)

#if defined(ENABLE_OVERLOADING)
data TrashStackNextFieldInfo
instance AttrInfo TrashStackNextFieldInfo where
    type AttrBaseTypeConstraint TrashStackNextFieldInfo = (~) TrashStack
    type AttrAllowedOps TrashStackNextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint TrashStackNextFieldInfo = (~) (Ptr TrashStack)
    type AttrTransferTypeConstraint TrashStackNextFieldInfo = (~)(Ptr TrashStack)
    type AttrTransferType TrashStackNextFieldInfo = (Ptr TrashStack)
    type AttrGetType TrashStackNextFieldInfo = Maybe TrashStack
    type AttrLabel TrashStackNextFieldInfo = "next"
    type AttrOrigin TrashStackNextFieldInfo = TrashStack
    attrGet = getTrashStackNext
    attrSet = setTrashStackNext
    attrConstruct = undefined
    attrClear = clearTrashStackNext
    attrTransfer _ v = do
        return v

trashStack_next :: AttrLabelProxy "next"
trashStack_next = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TrashStack
type instance O.AttributeList TrashStack = TrashStackAttributeList
type TrashStackAttributeList = ('[ '("next", TrashStackNextFieldInfo)] :: [(Symbol, *)])
#endif

-- method TrashStack::height
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "stack_p"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "TrashStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GTrashStack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "g_trash_stack_height" g_trash_stack_height :: 
    Ptr TrashStack ->                       -- stack_p : TInterface (Name {namespace = "GLib", name = "TrashStack"})
    IO Word32

{-# DEPRECATED trashStackHeight ["(Since version 2.48)","t'GI.GLib.Structs.TrashStack.TrashStack' is deprecated without replacement"] #-}
-- | Returns the height of a t'GI.GLib.Structs.TrashStack.TrashStack'.
-- 
-- Note that execution of this function is of O(N) complexity
-- where N denotes the number of items on the stack.
trashStackHeight ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TrashStack
    -- ^ /@stackP@/: a t'GI.GLib.Structs.TrashStack.TrashStack'
    -> m Word32
    -- ^ __Returns:__ the height of the stack
trashStackHeight :: TrashStack -> m Word32
trashStackHeight TrashStack
stackP = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr TrashStack
stackP' <- TrashStack -> IO (Ptr TrashStack)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TrashStack
stackP
    Word32
result <- Ptr TrashStack -> IO Word32
g_trash_stack_height Ptr TrashStack
stackP'
    TrashStack -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TrashStack
stackP
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
#endif

-- method TrashStack::peek
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "stack_p"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "TrashStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GTrashStack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "g_trash_stack_peek" g_trash_stack_peek :: 
    Ptr TrashStack ->                       -- stack_p : TInterface (Name {namespace = "GLib", name = "TrashStack"})
    IO (Ptr ())

{-# DEPRECATED trashStackPeek ["(Since version 2.48)","t'GI.GLib.Structs.TrashStack.TrashStack' is deprecated without replacement"] #-}
-- | Returns the element at the top of a t'GI.GLib.Structs.TrashStack.TrashStack'
-- which may be 'P.Nothing'.
trashStackPeek ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TrashStack
    -- ^ /@stackP@/: a t'GI.GLib.Structs.TrashStack.TrashStack'
    -> m (Ptr ())
    -- ^ __Returns:__ the element at the top of the stack
trashStackPeek :: TrashStack -> m (Ptr ())
trashStackPeek TrashStack
stackP = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr TrashStack
stackP' <- TrashStack -> IO (Ptr TrashStack)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TrashStack
stackP
    Ptr ()
result <- Ptr TrashStack -> IO (Ptr ())
g_trash_stack_peek Ptr TrashStack
stackP'
    TrashStack -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TrashStack
stackP
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

#if defined(ENABLE_OVERLOADING)
#endif

-- method TrashStack::pop
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "stack_p"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "TrashStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GTrashStack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "g_trash_stack_pop" g_trash_stack_pop :: 
    Ptr TrashStack ->                       -- stack_p : TInterface (Name {namespace = "GLib", name = "TrashStack"})
    IO (Ptr ())

{-# DEPRECATED trashStackPop ["(Since version 2.48)","t'GI.GLib.Structs.TrashStack.TrashStack' is deprecated without replacement"] #-}
-- | Pops a piece of memory off a t'GI.GLib.Structs.TrashStack.TrashStack'.
trashStackPop ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TrashStack
    -- ^ /@stackP@/: a t'GI.GLib.Structs.TrashStack.TrashStack'
    -> m (Ptr ())
    -- ^ __Returns:__ the element at the top of the stack
trashStackPop :: TrashStack -> m (Ptr ())
trashStackPop TrashStack
stackP = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
    Ptr TrashStack
stackP' <- TrashStack -> IO (Ptr TrashStack)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TrashStack
stackP
    Ptr ()
result <- Ptr TrashStack -> IO (Ptr ())
g_trash_stack_pop Ptr TrashStack
stackP'
    TrashStack -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TrashStack
stackP
    Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result

#if defined(ENABLE_OVERLOADING)
#endif

-- method TrashStack::push
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "stack_p"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "TrashStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GTrashStack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data_p"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the piece of memory to push on the stack"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_trash_stack_push" g_trash_stack_push :: 
    Ptr TrashStack ->                       -- stack_p : TInterface (Name {namespace = "GLib", name = "TrashStack"})
    Ptr () ->                               -- data_p : TBasicType TPtr
    IO ()

{-# DEPRECATED trashStackPush ["(Since version 2.48)","t'GI.GLib.Structs.TrashStack.TrashStack' is deprecated without replacement"] #-}
-- | Pushes a piece of memory onto a t'GI.GLib.Structs.TrashStack.TrashStack'.
trashStackPush ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TrashStack
    -- ^ /@stackP@/: a t'GI.GLib.Structs.TrashStack.TrashStack'
    -> Ptr ()
    -- ^ /@dataP@/: the piece of memory to push on the stack
    -> m ()
trashStackPush :: TrashStack -> Ptr () -> m ()
trashStackPush TrashStack
stackP Ptr ()
dataP = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TrashStack
stackP' <- TrashStack -> IO (Ptr TrashStack)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TrashStack
stackP
    Ptr TrashStack -> Ptr () -> IO ()
g_trash_stack_push Ptr TrashStack
stackP' Ptr ()
dataP
    TrashStack -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TrashStack
stackP
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveTrashStackMethod (t :: Symbol) (o :: *) :: * where
    ResolveTrashStackMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveTrashStackMethod t TrashStack, O.MethodInfo info TrashStack p) => OL.IsLabel t (TrashStack -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif