Skip to content

Commit 23498a9

Browse files
committed
Refs #23483. Fix stable api
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
1 parent 7406caa commit 23498a9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fastdds_python/src/swig/fastdds/rtps/common/InstanceHandle.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)