HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/site-packages/usb/__pycache__/_objfinalizer.cpython-39.opt-1.pyc
a

j��Y��@s^ddlZdgZGdd�de�ZejdkrJddlZdd�ZGdd�de�ZnGd	d�de�ZdS)
�N�AutoFinalizedObjectcs@eZdZdZdd�Z�fdd�Zdd�Zdd	�Zd
d�Z�Z	S)�_AutoFinalizedObjectBasez[
    Base class for objects that get automatically
    finalized on delete or at exit.
    cCsdS)z�Actually finalizes the object (frees allocated resources etc.).

        Returns: None

        Derived classes should implement this.
        N���selfrr�5/usr/lib/python3.9/site-packages/usb/_objfinalizer.py�_finalize_object*sz)_AutoFinalizedObjectBase._finalize_objectcstt|��|�}d|_|S)z�Creates a new object instance and adds the private finalizer
        attributes to it.

        Returns: new object instance

        Arguments:
        * *args, **kwargs -- ignored
        F)�superr�__new__�_finalize_called��cls�args�kwargs�instance��	__class__rrr
3s	z _AutoFinalizedObjectBase.__new__cCs|jsd|_|��dS)z\Helper method that finalizes the object if not already done.

        Returns: None
        TN)rrrrrr�_do_finalize_object@sz,_AutoFinalizedObjectBase._do_finalize_objectcCstd��dS)zIFinalizes the object if not already done.

        Returns: None
        z6finalize() must be implemented by AutoFinalizedObject.N)�NotImplementedErrorrrrr�finalizeIs�z!_AutoFinalizedObjectBase.finalizecCs|��dS)N)rrrrr�__del__Ssz _AutoFinalizedObjectBase.__del__)
�__name__�
__module__�__qualname__�__doc__rr
rrr�
__classcell__rrrrr$s	
	
ricCs|�}|dur|��dS)a)Helper function for weakref.finalize() that dereferences a weakref
        to an object and calls its _do_finalize_object() method if the object
        is still alive. Does nothing otherwise.

        Returns: None (implicit)

        Arguments:
        * obj_ref -- weakref to an object
        N�r)Zobj_ref�objrrr�_do_finalize_object_ref[s
rcs$eZdZ�fdd�Zdd�Z�ZS)rcs8tt|�j|g|�Ri|��}t�|tt�|��|_|S)a&Creates a new object instance and adds the private finalizer
            attributes to it.

            Returns: new object instance

            Arguments:
            * *args, **kwargs -- passed to the parent instance creator
                                 (which ignores them)
            )r	rr
�weakrefrr�ref�
_finalizerrrrrr
ms
����zAutoFinalizedObject.__new__cCs|��dS�z)Finalizes the object if not already done.N)r!rrrrr�s�AutoFinalizedObject.finalize)rrrr
rrrrrrrks!c@seZdZdd�ZdS)rcCs|��dSr"rrrrrr�sr#N)rrrrrrrrr�s)�sys�__all__�objectr�
hexversionrrrrrrr�<module>s3
,