Browse Source

add copy_out() to get a copy of the wrapped value.

master
roker 9 months ago
parent
commit
af5720bed0
2 changed files with 8 additions and 0 deletions
  1. +6
    -0
      src/identity.cc
  2. +2
    -0
      src/wrapper.hh

+ 6
- 0
src/identity.cc View File

@ -22,6 +22,12 @@ namespace pEp
{
::free_identity(id);
}
template<>
::pEp_identity* Wrapper<::pEp_identity*>::copy_out()
{
return identity_dup(value);
}
//////////////


+ 2
- 0
src/wrapper.hh View File

@ -100,6 +100,8 @@ public:
const T* get() const { return value; }
T* move_out() { T* r = value; value=nullptr; return r;}
T* copy_out();
protected:


Loading…
Cancel
Save