Commit dd4d765b authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Using cache for C content type and subtype return values

parent a5830654
......@@ -90,7 +90,8 @@ void linphone_content_set_user_data (LinphoneContent *content, void *user_data)
// =============================================================================
const char *linphone_content_get_type (const LinphoneContent *content) {
return L_GET_CPP_PTR_FROM_C_OBJECT(content)->getContentType().getType().c_str();
content->cache.type = L_GET_CPP_PTR_FROM_C_OBJECT(content)->getContentType().getType();
return content->cache.type.c_str();
}
void linphone_content_set_type (LinphoneContent *content, const char *type) {
......@@ -100,7 +101,8 @@ void linphone_content_set_type (LinphoneContent *content, const char *type) {
}
const char *linphone_content_get_subtype (const LinphoneContent *content) {
return L_GET_CPP_PTR_FROM_C_OBJECT(content)->getContentType().getSubType().c_str();
content->cache.subtype = L_GET_CPP_PTR_FROM_C_OBJECT(content)->getContentType().getSubType();
return content->cache.subtype.c_str();
}
void linphone_content_set_subtype (LinphoneContent *content, const char *subtype) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment