mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 03:09:23 +00:00
fix(c-tools): clone objects in getResolvedCListFromCppList
This commit is contained in:
parent
d2a68f4580
commit
56a25645a8
1 changed files with 5 additions and 2 deletions
|
|
@ -559,8 +559,11 @@ public:
|
|||
>
|
||||
static inline bctbx_list_t *getResolvedCListFromCppList (const std::list<CppType> &cppList) {
|
||||
bctbx_list_t *result = nullptr;
|
||||
for (const auto &value : cppList)
|
||||
result = bctbx_list_append(result, getCBackPtr(&value));
|
||||
for (const auto &value : cppList) {
|
||||
auto cValue = getCBackPtr(new CppType(value));
|
||||
reinterpret_cast<WrappedClonableObject<CppType> *>(cValue)->owner = WrappedObjectOwner::External;
|
||||
result = bctbx_list_append(result, cValue);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue