File: parallel.i

package info (click to toggle)
pyepl 1.1.0-3.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,120 kB
  • sloc: cpp: 7,986; python: 6,026; makefile: 360; ansic: 132
file content (27 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
%module parallel

%{
#include "parallel.h"
%}

#ifdef SWIGPYTHON
%typemap(in) unsigned char * {
$1 = (unsigned char *)PyString_AsString($input);
}
#endif

/* %typemap(python, in) unsigned char * { */
/* $1 = (unsigned char *)PyString_AsString($input); */
/* } */

%include exception.i
%exception {
try {
    $function
}
catch(ParallelException) {
SWIG_exception(SWIG_RuntimeError, "Uncaught exception from Parallel port interface!\nSee line beginning \"Parallel port error\" above for details.");
}
}

%include "parallel.h"