o ºŽÒ_ ã@sddlmZGdd„dƒZdS)é)Úc_void_pc@sBeZdZdZdZeZdZeZ e dd„ƒZ e j dd„ƒZ dd„Z dS)Ú CPointerBasezz Base class for objects that have a pointer access property that controls access to the underlying C pointer. NcCs|jr|jS| d|jj¡‚)NzNULL %s pointer encountered.)Ú_ptrÚnull_ptr_exception_classÚ __class__Ú__name__©Úself©r ú8/usr/lib/python3/dist-packages/django/contrib/gis/ptr.pyÚptrszCPointerBase.ptrcCs.|dust||jƒstdt|ƒƒ‚||_dS)NzIncompatible pointer type: %s.)Ú isinstanceÚptr_typeÚ TypeErrorÚtyper)r r r r r r s c CsB|jr|jrz | |j¡WdStttfyYdSwdSdS)z9 Free the memory used by the C++ object. N)Ú destructorrr ÚAttributeErrorÚ ImportErrorrrr r r Ú__del__s ÿýzCPointerBase.__del__)rÚ __module__Ú __qualname__Ú__doc__rrrrrrÚpropertyr Úsetterrr r r r rs   rN)Úctypesrrr r r r Ús