HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/self/root/lib/python3.6/site-packages/usb/__pycache__/_objfinalizer.cpython-36.opt-1.pyc
3

�~�V��@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�#/usr/lib/python3.6/_objfinalizer.py�_finalize_object*sz)_AutoFinalizedObjectBase._finalize_objectcstt|�j|�}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|_|j�dS)z\Helper method that finalizes the object if not already done.

        Returns: None
        TN)r
r)rrrr�_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)�NotImplementedError)rrrr�finalizeIsz!_AutoFinalizedObjectBase.finalizecCs|j�dS)N)r)rrrr�__del__Ssz _AutoFinalizedObjectBase.__del__)
�__name__�
__module__�__qualname__�__doc__rr	rrr�
__classcell__rr)rrr$s	
	
ricCs|�}|dk	r|j�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)rcs2tt|�j|f|�|�}tj|ttj|��|_|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)
            )rrr	�weakrefrr�ref�
_finalizer)rrr
r)rrrr	ms

zAutoFinalizedObject.__new__cCs|j�dS)z)Finalizes the object if not already done.N)r)rrrrr�szAutoFinalizedObject.finalize)rrrr	rrrr)rrrks!c@seZdZdd�ZdS)rcCs|j�dS)z)Finalizes the object if not already done.N)r)rrrrr�szAutoFinalizedObject.finalizeN)rrrrrrrrr�s)�sys�__all__�objectr�
hexversionrrrrrrr�<module>s3
,