8000 Change ctypes.c_int to ctypes.c_long since they're the same · GenericMappingTools/pygmt@9202941 · GitHub < 8000 link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
[go: up one dir, main page]

Skip to content

Commit 9202941

Browse files
committed
Change ctypes.c_int to ctypes.c_long since they're the same
According to https://docs.python.org/3/library/ctypes.html#ctypes-tutorial, `c_int` is just an alias for `c_long`.
1 parent efe35ec commit 9202941

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygmt/clib/conversion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ def kwargs_to_ctypes_array(argument, kwargs, dtype):
226226
--------
227227
228228
>>> import ctypes as ct
229-
>>> value = kwargs_to_ctypes_array('bla', {'bla': [10, 10]}, ct.c_int*2)
229+
>>> value = kwargs_to_ctypes_array('bla', {'bla': [10, 10]}, ct.c_long*2)
230230
>>> type(value)
231-
<class 'pygmt.clib.conversion.c_int_Array_2'>
231+
<class 'pygmt.clib.conversion.c_long_Array_2'>
232232
>>> should_be_none = kwargs_to_ctypes_array(
233233
... 'swallow', {'bla': 1, 'foo': [20, 30]}, ct.c_int*2)
234234
>>> print(should_be_none)

0 commit comments

Comments
 (0)
0