diff --git a/include/copentimelineio/errorStatus.h b/include/copentimelineio/errorStatus.h index 099824c..871b6d1 100644 --- a/include/copentimelineio/errorStatus.h +++ b/include/copentimelineio/errorStatus.h @@ -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); \ No newline at end of file diff --git a/src/copentimelineio/errorStatus.cpp b/src/copentimelineio/errorStatus.cpp index 5f5ca16..8d81b87 100644 --- a/src/copentimelineio/errorStatus.cpp +++ b/src/copentimelineio/errorStatus.cpp @@ -52,3 +52,23 @@ OTIOErrorStatus_destroy(OTIOErrorStatus* self) { delete reinterpret_cast(self); } + +OTIO_API const char* +OTIOErrorStatus_details(OTIOErrorStatus* self) +{; + std::string returnStr = + reinterpret_cast(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(self)->full_description; + char *charPtr = (char *) malloc((returnStr.size() + 1) * sizeof(char)); + strcpy(charPtr, returnStr.c_str()); + return charPtr; +} \ No newline at end of file