Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/copentimelineio/errorStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ OTIO_API OTIOErrorStatus* OTIOErrorStatus_create_with_outcome_details_serializab
OTIO_API const char* OTIOErrorStatus_outcome_to_string(OTIO_ErrorStatus_Outcome var1);
OTIO_API OTIO_ErrorStatus_Outcome OTIOErrorStatus_get_outcome(OTIOErrorStatus* self);
OTIO_API void OTIOErrorStatus_destroy(OTIOErrorStatus* self);
OTIO_API const char* OTIOErrorStatus_details(OTIOErrorStatus* self);
OTIO_API const char* OTIOErrorStatus_full_description(OTIOErrorStatus* self);
20 changes: 20 additions & 0 deletions src/copentimelineio/errorStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,23 @@ OTIOErrorStatus_destroy(OTIOErrorStatus* self)
{
delete reinterpret_cast<OTIO_NS::ErrorStatus*>(self);
}

OTIO_API const char*
OTIOErrorStatus_details(OTIOErrorStatus* self)
{;
std::string returnStr =
reinterpret_cast<OTIO_NS::ErrorStatus*>(self)->details;
char *charPtr = (char *) malloc((returnStr.size() + 1) * sizeof(char));
strcpy(charPtr, returnStr.c_str());
return charPtr;
}

OTIO_API const char*
OTIOErrorStatus_full_description(OTIOErrorStatus* self)
{;
std::string returnStr =
reinterpret_cast<OTIO_NS::ErrorStatus*>(self)->full_description;
char *charPtr = (char *) malloc((returnStr.size() + 1) * sizeof(char));
strcpy(charPtr, returnStr.c_str());
return charPtr;
}