
    ^h
                     x    S r SSKr\R                  S:X  a  SSKrSSKJrJrJrJrJ	r	  SSK
JrJrJr  OSSKrS rg)z
Derived from

> https://github.com/rudolfwalter/pygdbmi/blob/0.7.4.2/pygdbmi/gdbcontroller.py
> MIT License  https://github.com/rudolfwalter/pygdbmi/blob/master/LICENSE
> Copyright (c) 2016 Chad Smith <grassfedcode <at> gmail.com>
    Nnt)POINTERWinErrorbyrefwindllwintypes)BOOLDWORDHANDLEc                    [         R                  S:X  a  [        [        5      n[        R                  " S5      n[
        R                  R                  n[        XU/Ul	        [        Ul        [        R                  " U R                  5       5      n[
        R                  R                  U[        U5      SS5      nUS:X  a  [!        [#        5       5      eg[$        R$                  " U [$        R&                  [         R(                  5        g)z
make file object non-blocking

Windows doesn't have the fcntl module, but someone on
stack overflow supplied this code as an answer, and it works
http://stackoverflow.com/a/34504971/2893090
r      Nr   )osnamer   r
   r   r   kernel32SetNamedPipeHandleStater   argtypesr	   restypemsvcrtget_osfhandlefilenor   
ValueErrorr   fcntlF_SETFL
O_NONBLOCK)file_objLPDWORDPIPE_NOWAITr   hress         R/home/james-whalen/.local/lib/python3.13/site-packages/jupyter_lsp/non_blocking.pymake_non_blockingr!      s     
ww$%.nnZ0"(//"I"I,2Gg+N(*.'  !23oo55a{9KTSWX!8XZ((  	HemmR]];    )__doc__r   r   r   ctypesr   r   r   r   r   ctypes.wintypesr	   r
   r   r   r!    r"   r    <module>r'      s1    
77d?AA33<r"   