+
    ‡)Ùj  ã                   óL  € R t ^ RItRtR t]P                  R8X  d½   ^ RIt^ RIHtHtH	t	H
t
HtHtHtHtHt ^ RIHtHtHt ^ t^t^t]! ]4      ]! ]4      8w  d   ]tM]t]t ! R R]4      t ! R R	]	4      t ! R
 R]4      t]! ]4      t]
! R4      t]P<                  t]]n        ]]]]]].]n         ]PB                  t!]]!n        ]]]]].]!n         R t"R t#R#  ^ RI$t$]$P(                  t]$P*                  t]$P,                  tR t"R t#R#   ]%]&3 d    ^ ;t;ttR t"R t# R# i ; i)am  
Portable file locking utilities.

Based partially on an example by Jonathan Feignberg in the Python
Cookbook [1] (licensed under the Python Software License) and a ctypes port by
Anatoly Techtonik for Roundup [2] (license [3]).

[1] https://code.activestate.com/recipes/65203/
[2] https://sourceforge.net/p/roundup/code/ci/default/tree/roundup/backends/portalocker.py  # NOQA
[3] https://sourceforge.net/p/roundup/code/ci/default/tree/COPYING.txt

Example Usage::

    >>> from django.core.files import locks
    >>> with open('./file', 'wb') as f:
    ...     locks.lock(f, locks.LOCK_EX)
    ...     f.write('Django')
Nc                óJ   € \        V R4      '       d   V P                  4       # T # )zCGet a filedescriptor from something which could be a file or an fd.Úfileno)Úhasattrr   ©Úfs   &ÚP/var/www/eggtrainer/venv/lib/python3.14/site-packages/django/core/files/locks.pyÚ_fdr      s   € ä   H×-Ò-ˆ1�8‰8‹:Ð4°1Ð4ó    Únt)	ÚPOINTERÚ	StructureÚUnionÚWinDLLÚbyrefÚc_int64Úc_ulongÚc_void_pÚsizeof)ÚBOOLÚDWORDÚHANDLEc                   ó&   € ] tR t^:tR]3R]3.tRtR# )Ú_OFFSETÚOffsetÚ
OffsetHigh© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú_fields_Ú__static_attributes__r   r	   r   r   r   :   s   † Ø˜uÐ%¨°eÐ'<Ð=Œr	   r   c                   ó,   € ] tR t^=tR.tR]3R]3.tRtR# )Ú_OFFSET_UNIONÚ_offsetÚPointerr   N)	r   r   r   r   Ú_anonymous_r   ÚPVOIDr    r!   r   r	   r   r#   r#   =   s   † Ø �kˆØ Ð(¨9°eÐ*<Ð=Œr	   r#   c                   ó8   € ] tR t^AtR.tR]3R]3R]3R]3.tRt	R# )Ú
OVERLAPPEDÚ_offset_unionÚInternalÚInternalHighÚhEventr   N)
r   r   r   r   r&   Ú	ULONG_PTRr#   r   r    r!   r   r	   r   r)   r)   A   s1   † Ø&Ð'ˆà˜Ð#Ø˜YÐ'Ø˜mÐ,Ø�vÐð	
Œr	   r)   Úkernel32c           
      óš   € \         P                  ! \        V 4      4      p\        4       p\	        W!^ ^ R\        V4      4      p\        V4      # ©é    l     þ )ÚmsvcrtÚget_osfhandler   r)   Ú
LockFileExr   Úbool)r   ÚflagsÚhfileÚ
overlappedÚrets   &&   r   Úlockr;   U   s>   € Ü×$Ò$¤S¨£VÓ,ˆÜ“\ˆ
Ü˜ q¨!¨Z¼¸zÓ9JÓKˆÜ�C‹yÐr	   c           	      óš   € \         P                  ! \        V 4      4      p\        4       p\	        V^ ^ R\        V4      4      p\        V4      # r1   )r3   r4   r   r)   ÚUnlockFileExr   r6   )r   r8   r9   r:   s   &   r   Úunlockr>   [   s>   € Ü×$Ò$¤S¨£VÓ,ˆÜ“\ˆ
Ü˜5 ! Q¨
´E¸*Ó4EÓFˆÜ�C‹yÐr	   c                 ól   €  \         P                  ! \        V 4      V4       R #   \         d     R# i ; i)TF)ÚfcntlÚflockr   ÚBlockingIOError©r   r7   s   &&r   r;   r;   w   s.   € ðÜ—’œC ›F EÔ*ÙøÜ"ô Úðús   ‚ $ ¤3²3c                 ób   € \         P                  ! \        V 4      \         P                  4       R # ©T)r@   rA   r   ÚLOCK_UNr   s   &r   r>   r>   ~   s   € Ü�KŠKœ˜A›¤§¡Ô.Ùr	   c                 ó   € R # )Fr   rC   s   &&r   r;   r;   m   s   € ár	   c                 ó   € R # rE   r   r   s   &r   r>   r>   q   s   € ár	   )ÚLOCK_EXÚLOCK_SHÚLOCK_NBr;   r>   )'Ú__doc__ÚosÚ__all__r   Únamer3   Úctypesr   r   r   r   r   r   r   r   r   Úctypes.wintypesr   r   r   rJ   rK   rI   r.   r'   r   r#   r)   ÚLPOVERLAPPEDr/   r5   ÚrestypeÚargtypesr=   r;   r>   r@   ÚImportErrorÚAttributeErrorr   r	   r   Ú<module>rW      sa  ðñó& 
à
=€ò5ð
 ‡7�7ˆd„?Û÷
÷ 
õ 
÷ 4Ñ3à€GØ€GØ€Gñ ˆgƒ™& Ó*Ô*Ø‰	àˆ	Ø€Eô>�)ô >ô>˜ô >ô
�Yô 
ñ ˜:Ó&€Lñ �jÓ!€HØ×$Ñ$€JØ€JÔØ! 5¨%°¸¸|ÐL€JÔØ×(Ñ(€LØ€LÔØ# U¨E°5¸,ÐG€LÔòôðÛà—-‘-ˆØ—-‘-ˆØ—-‘-ˆò 	ô	øð- ˜Ð(ô à&'Ð'ˆÐ'�'˜Gò	õ	ðús   Ã(D
 Ä
D#Ä"D#