From ff2cdaee343e8c61d0b94eddf5dbbe2ad6dc46be Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 23 Nov 2012 17:48:27 -0800 Subject: swig import to avoid PMC symbol duplication --- python/gras/GRAS_Block.i | 1 + python/gras/GRAS_SBuffer.i | 6 ++++++ python/gras/__init__.py | 1 + 3 files changed, 8 insertions(+) (limited to 'python') diff --git a/python/gras/GRAS_Block.i b/python/gras/GRAS_Block.i index 5093f10..cf23b2a 100644 --- a/python/gras/GRAS_Block.i +++ b/python/gras/GRAS_Block.i @@ -186,6 +186,7 @@ struct BlockPython : Block import numpy import traceback from GRAS_Utils import pointer_to_ndarray +from PMC import * def sig_to_dtype_sig(sig): if sig is None: sig = () diff --git a/python/gras/GRAS_SBuffer.i b/python/gras/GRAS_SBuffer.i index a26e3b0..248bcc1 100644 --- a/python/gras/GRAS_SBuffer.i +++ b/python/gras/GRAS_SBuffer.i @@ -2,12 +2,18 @@ %include +%{ +#include +%} + %include DECL_PMC_SWIG_TYPE(gras::SBuffer, swig_sbuffer) %pythoncode %{ +from PMC import * + RegisterPy2PMC( is_py = lambda x: isinstance(x, SBuffer), py2pmc = swig_sbuffer_to_pmc, diff --git a/python/gras/__init__.py b/python/gras/__init__.py index dac4f03..82dcb40 100644 --- a/python/gras/__init__.py +++ b/python/gras/__init__.py @@ -1,5 +1,6 @@ # Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. +from PMC import * from GRAS_Block import Block, Tag, IOSignature from GRAS_HierBlock import HierBlock, TopBlock from GRAS_ThreadPool import ThreadPoolConfig, ThreadPool -- cgit