diff options
author | David Shah <davey1576@gmail.com> | 2018-08-05 16:21:13 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-08-05 16:21:13 +0200 |
commit | 1ce0b5add2cb06449ae6b759a07aba5078d7b105 (patch) | |
tree | d4b60e0b500ad17e1d82c4404a1b6fc02a97584b /common | |
parent | 2853149c682eca805739a25e46dfb18c006efed9 (diff) | |
download | nextpnr-1ce0b5add2cb06449ae6b759a07aba5078d7b105.tar.gz nextpnr-1ce0b5add2cb06449ae6b759a07aba5078d7b105.tar.bz2 nextpnr-1ce0b5add2cb06449ae6b759a07aba5078d7b105.zip |
API change: Use CellInfo* and NetInfo* as cell/net handles (Python bindings)
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/pywrappers.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 <typename T> struct deref_and_wrap using ret_type = ContextualWrapper<T &>; }; +template <typename T> struct addr_and_unwrap +{ + inline T *operator()(Context *ctx, ContextualWrapper<T &> x) { return &(x.base); } + + using arg_type = ContextualWrapper<T &>; + using ret_type = T *; +}; + // Function wrapper // Zero parameters, one return template <typename Class, typename FuncT, FuncT fn, typename rv_conv> struct fn_wrapper_0a |