From 1ce0b5add2cb06449ae6b759a07aba5078d7b105 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sun, 5 Aug 2018 16:21:13 +0200 Subject: API change: Use CellInfo* and NetInfo* as cell/net handles (Python bindings) Signed-off-by: David Shah --- common/pywrappers.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common/pywrappers.h') diff --git a/common/pywrappers.h b/common/pywrappers.h index 725caca8..4e463afd 100644 --- a/common/pywrappers.h +++ b/common/pywrappers.h @@ -140,6 +140,14 @@ template struct deref_and_wrap using ret_type = ContextualWrapper; }; +template struct addr_and_unwrap +{ + inline T *operator()(Context *ctx, ContextualWrapper x) { return &(x.base); } + + using arg_type = ContextualWrapper; + using ret_type = T *; +}; + // Function wrapper // Zero parameters, one return template struct fn_wrapper_0a -- cgit v1.2.3