Skip to content

Commit 158a50f

Browse files
authored
fix: use std::string::data() instead of c_str() (#131)
1 parent 663d630 commit 158a50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

echion/strings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static std::string pyunicode_to_utf8(PyObject* str_addr)
7373
throw StringError();
7474

7575
auto dest = std::string(size, '\0');
76-
if (copy_generic(data, dest.c_str(), size))
76+
if (copy_generic(data, dest.data(), size))
7777
throw StringError();
7878

7979
return dest;

0 commit comments

Comments
 (0)