Commit fc75fdef authored by Ronan's avatar Ronan
Browse files

feat(c-wrapper): L_GET_CPP_PTR_FROM_C_OBJECT supports optional cpp type parameter

parent e75404cb
......@@ -429,8 +429,16 @@ LINPHONE_END_NAMESPACE
#define L_INIT(C_TYPE) _linphone_ ## C_TYPE ## _init ()
// Get/set the cpp-ptr of a wrapped C object.
#define L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT) \
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC(C_OBJECT)
#define L_GET_CPP_PTR_FROM_C_OBJECT_1_ARGS(C_OBJECT) \
L_GET_CPP_PTR_FROM_C_OBJECT_2_ARGS(C_OBJECT, )
#define L_GET_CPP_PTR_FROM_C_OBJECT_2_ARGS(C_OBJECT, CPP_TYPE) \
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC<CPP_TYPE>(C_OBJECT)
#define L_GET_CPP_PTR_FROM_C_OBJECT_MACRO_CHOOSER(...) \
L_GET_ARG_3(__VA_ARGS__, L_GET_CPP_PTR_FROM_C_OBJECT_2_ARGS, L_GET_CPP_PTR_FROM_C_OBJECT_1_ARGS)
#define L_GET_CPP_PTR_FROM_C_OBJECT(...) \
L_GET_CPP_PTR_FROM_C_OBJECT_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
// Set the cpp-ptr of a wrapped C object.
#define L_SET_CPP_PTR_FROM_C_OBJECT(C_OBJECT, CPP_OBJECT) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment