summaryrefslogtreecommitdiff
path: root/gruel/src/swig/pmt_swig.i
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-03-16 13:09:23 -0700
committerJosh Blum <josh@joshknows.com>2012-03-16 13:09:23 -0700
commitf9a07338b9c7c0af19d64d24c47eaa9f7fe1ba38 (patch)
treeeb2a0911c73c193cb0af6bff2bd2b9c9bdf8e84f /gruel/src/swig/pmt_swig.i
parent7e1ac13d5558eaca2233c4be4c41307b5e61b8f5 (diff)
gruel: created common swig include file
This work taken from gruel_work_squashed Common swig file includes: * Language independent exception handler * Wrapper for python calls that may block Benefits: * More common swig code, less copy pasta * Wrapper for blocking python calls handles the case where the call throws, python is not left in a bad state
Diffstat (limited to 'gruel/src/swig/pmt_swig.i')
-rw-r--r--gruel/src/swig/pmt_swig.i17
1 files changed, 2 insertions, 15 deletions
diff --git a/gruel/src/swig/pmt_swig.i b/gruel/src/swig/pmt_swig.i
index 0c937edfcb..954501863c 100644
--- a/gruel/src/swig/pmt_swig.i
+++ b/gruel/src/swig/pmt_swig.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2011 Free Software Foundation, Inc.
+ * Copyright 2011-2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -34,26 +34,13 @@
#include <gruel/pmt.h>
%}
+%include "gruel_common.i"
//load generated python docstrings
%include "pmt_swig_doc.i"
////////////////////////////////////////////////////////////////////////
// Language independent exception handler
////////////////////////////////////////////////////////////////////////
-%include exception.i
-
-%exception {
- try {
- $action
- }
- catch(std::exception &e) {
- SWIG_exception(SWIG_RuntimeError, e.what());
- }
- catch(...) {
- SWIG_exception(SWIG_RuntimeError, "Unknown exception");
- }
-
-}
// Template intrusive_ptr for Swig to avoid dereferencing issues
namespace pmt{