Skip to content
Merged
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: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
cmake_minimum_required(VERSION 3.27)

# This is the current version of this C++ project
project(c2pa-c VERSION 0.19.2)
project(c2pa-c VERSION 0.20.0)

# Set the version of the c2pa_rs library used
set(C2PA_VERSION "0.78.6")
Expand Down
7 changes: 5 additions & 2 deletions include/c2pa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,12 @@ namespace c2pa
/// @note This consumes the builder. After calling this, is_valid() returns false.
[[nodiscard]] Context create_context();

/// @brief Get the underlying C2paContextBuilder pointer.
/// @brief Release ownership of the underlying C2paContextBuilder pointer.
/// After this call, the ContextBuilder no longer owns the pointer
/// and is_valid() returns false. The caller is responsible for managing
/// the lifetime of the returned pointer.
/// @return Pointer to the C2paContextBuilder object, or nullptr if moved from.
C2paContextBuilder* c2pa_context_builder() const noexcept;
C2paContextBuilder* release() noexcept;

private:
C2paContextBuilder* context_builder;
Expand Down
4 changes: 2 additions & 2 deletions src/c2pa_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ namespace c2pa
return *this;
}

C2paContextBuilder* Context::ContextBuilder::c2pa_context_builder() const noexcept {
return context_builder;
C2paContextBuilder* Context::ContextBuilder::release() noexcept {
return std::exchange(context_builder, nullptr);
}

Context Context::ContextBuilder::create_context() {
Expand Down
Loading