Browse Source

prototype: remove alloc/free routines from namespace pEp, they have been moved into the respective classes, (might generalize and extract them later again)

heck-rework
heck 3 years ago
parent
commit
0a641597d4
  1. 28
      test/test_nr1.cc

28
test/test_nr1.cc

@ -13,34 +13,6 @@
namespace pEp { namespace pEp {
char* alloc_str(const std::string& str)
{
char* ret = strdup(str.c_str());
pEpLog(CXX::Inspect::all(ret));
return ret;
}
template<class T>
void free(T ptr_type)
{
pEpLog(CXX::Inspect::all(ptr_type));
::pEp_free(ptr_type);
}
template<>
void free(char* ptr_type)
{
pEpLog(CXX::Inspect::all(ptr_type));
::pEp_free(ptr_type);
}
template<>
void free(::pEp_identity* ptr_type)
{
pEpLog(CXX::Inspect::all(ptr_type));
::pEp_free(ptr_type);
}
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
#define EXSTR(msg) std::string(__FUNCTION__) + "() - " + msg #define EXSTR(msg) std::string(__FUNCTION__) + "() - " + msg

Loading…
Cancel
Save