File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,6 @@ class c_bool(_SimpleCData):
266266
267267from _ctypes import POINTER , pointer , _pointer_type_cache
268268
269- _CType_Type = type (_Pointer ).__base__
270-
271269def POINTER (cls ):
272270 if cls is None :
273271 return c_void_p
@@ -278,12 +276,8 @@ def POINTER(cls):
278276 except AttributeError :
279277 pass
280278 if isinstance (cls , str ):
281- return type (f'LP_{ cls } ' , (_Pointer ,), {})
282- if isinstance (cls , _CType_Type ):
283- return type (f'LP_{ cls .__name__ } ' , (_Pointer ,), {'_type_' : cls })
284-
285- raise TypeError (f'must be a ctypes-like type: { cls } ' )
286-
279+ return type (f'LP_{ cls } ' , (_Pointer ,), {}) # deprecated
280+ return type (f'LP_{ cls .__name__ } ' , (_Pointer ,), {'_type_' : cls })
287281def pointer (arg ):
288282 typ = POINTER (type (arg ))
289283 return typ (arg )
You can’t perform that action at this time.
0 commit comments