@@ -815,6 +815,7 @@ io_params_dtype = _numpy.dtype({
815815 " offsets" : [0 , 8 , 40 , 48 , 56 ],
816816}, align = True )
817817
818+
818819# ##############################################################################
819820# Enum
820821# ##############################################################################
@@ -1231,22 +1232,29 @@ cpdef int get_version() except? 0:
12311232 return version
12321233
12331234
1234- cpdef get_parameter_size_t(int param, intptr_t value):
1235+ cpdef size_t get_parameter_size_t(int param) except ? 0 :
1236+ cdef size_t value
12351237 with nogil:
1236- status = cuFileGetParameterSizeT(< _SizeTConfigParameter> param, < size_t * > value)
1238+ status = cuFileGetParameterSizeT(< _SizeTConfigParameter> param, & value)
12371239 check_status(status)
1240+ return value
12381241
12391242
1240- cpdef get_parameter_bool(int param, intptr_t value):
1243+ cpdef bint get_parameter_bool(int param) except ? 0 :
1244+ cdef cpp_bool value
12411245 with nogil:
1242- status = cuFileGetParameterBool(< _BoolConfigParameter> param, < cpp_bool * > value)
1246+ status = cuFileGetParameterBool(< _BoolConfigParameter> param, & value)
12431247 check_status(status)
1248+ return < bint> value
12441249
12451250
1246- cpdef get_parameter_string(int param, intptr_t desc_str, int len ):
1251+ cpdef str get_parameter_string(int param, int len ):
1252+ cdef bytes _desc_str_ = bytes(len )
1253+ cdef char * desc_str = _desc_str_
12471254 with nogil:
1248- status = cuFileGetParameterString(< _StringConfigParameter> param, < char * > desc_str, len )
1255+ status = cuFileGetParameterString(< _StringConfigParameter> param, desc_str, len )
12491256 check_status(status)
1257+ return _desc_str_.decode()
12501258
12511259
12521260cpdef set_parameter_size_t(int param, size_t value):
0 commit comments