File tree Expand file tree Collapse file tree
fastdds_python/src/swig/fastdds/rtps/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ long hash(const eprosima::fastdds::rtps::InstanceHandle_t& handle)
5050
5151 // Fast-path: bytes
5252 if (PyBytes_Check (seq)) {
53- if (PyBytes_GET_SIZE (seq) == 16 )
53+ if (PyBytes_Size (seq) == 16 )
5454 {
55- const char * b = PyBytes_AS_STRING (seq);
55+ const char * b = PyBytes_AsString (seq);
5656 for (int i = 0 ; i < 16 ; ++i) (*self)[i] = (uint8_t )(unsigned char )b[i];
5757 }
5858 else
@@ -65,9 +65,9 @@ long hash(const eprosima::fastdds::rtps::InstanceHandle_t& handle)
6565 // Fast-path: bytearray
6666 else if (PyByteArray_Check (seq))
6767 {
68- if (PyByteArray_GET_SIZE (seq) == 16 )
68+ if (PyByteArray_Size (seq) == 16 )
6969 {
70- const char * b = PyByteArray_AS_STRING (seq);
70+ const char * b = PyByteArray_AsString (seq);
7171 for (int i = 0 ; i < 16 ; ++i) (*self)[i] = (uint8_t )(unsigned char )b[i];
7272 }
7373 else
You can’t perform that action at this time.
0 commit comments