Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
kwant
tinyarray
Commits
9d9371f1
Verified
Commit
9d9371f1
authored
Dec 22, 2021
by
Anton Akhmerov
Browse files
use Py_ssize_t everywhere
parent
a4768ec2
Pipeline
#86857
passed with stage
in 55 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/array.cc
View file @
9d9371f1
...
@@ -459,7 +459,7 @@ T (*get_buffer_converter(Py_buffer *view))(const void *)
...
@@ -459,7 +459,7 @@ T (*get_buffer_converter(Py_buffer *view))(const void *)
case
'Q'
:
case
'Q'
:
return
number_from_ptr
<
T
,
unsigned
long
long
>
;
return
number_from_ptr
<
T
,
unsigned
long
long
>
;
case
'n'
:
case
'n'
:
return
number_from_ptr
<
T
,
ssize_t
>
;
return
number_from_ptr
<
T
,
Py_
ssize_t
>
;
case
'N'
:
case
'N'
:
return
number_from_ptr
<
T
,
size_t
>
;
return
number_from_ptr
<
T
,
size_t
>
;
case
'f'
:
case
'f'
:
...
...
src/array.hh
View file @
9d9371f1
...
@@ -105,7 +105,7 @@ public:
...
@@ -105,7 +105,7 @@ public:
}
}
}
}
ssize_t
object_size
()
const
;
Py_
ssize_t
object_size
()
const
;
static
bool
check_exact
(
PyObject
*
candidate
)
{
static
bool
check_exact
(
PyObject
*
candidate
)
{
return
(
Py_TYPE
(
candidate
)
==
&
pytype
);
return
(
Py_TYPE
(
candidate
)
==
&
pytype
);
...
@@ -160,7 +160,7 @@ int coerce_to_arrays(PyObject **a, PyObject **b, Dtype *coerced_dtype);
...
@@ -160,7 +160,7 @@ int coerce_to_arrays(PyObject **a, PyObject **b, Dtype *coerced_dtype);
template
<
typename
T
>
PyObject
*
transpose
(
PyObject
*
in
,
PyObject
*
dummy
);
template
<
typename
T
>
PyObject
*
transpose
(
PyObject
*
in
,
PyObject
*
dummy
);
template
<
typename
T
>
template
<
typename
T
>
ssize_t
Array
<
T
>::
object_size
()
const
Py_
ssize_t
Array
<
T
>::
object_size
()
const
{
{
int
ndim
;
int
ndim
;
size_t
*
shape
;
size_t
*
shape
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment