Skip to content

Commit 84f00c4

Browse files
committed
fix(PythonExternalString): sizeOfBuffer now correctly returns the length of the python string
1 parent 13b13b7 commit 84f00c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsTypeFactory.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void PythonExternalString::finalize(char16_t *chars) const
6969

7070
size_t PythonExternalString::sizeOfBuffer(const char16_t *chars, mozilla::MallocSizeOf mallocSizeOf) const
7171
{
72-
return 0;
72+
return PyUnicode_GetLength(charToPyObjectMap[chars]);
7373
}
7474

7575
PythonExternalString PythonExternalStringCallbacks = {};

0 commit comments

Comments
 (0)