def new(library, type_, value=None):
is_pointer, is_array, type_ = _type_info(library, type_)
if is_array:
if is_array is True:
type_ = type_ * value
value = None
else:
type_ = type_ * is_array
params = []
if value is not None:
params.append(value)
output = type_(*params)
if is_pointer:
output = pointer(output)
return output
评论列表
文章目录