Imported Upstream version 2.4.3
[platform/upstream/audit.git] / bindings / swig / src / auditswig.i
1 /* Author: Dan Walsh
2  *
3  * Copyright (C) 2005,2006,2009 Red Hat
4  * 
5  *  This library is free software; you can redistribute it and/or
6  *  modify it under the terms of the GNU Lesser General Public
7  *  License as published by the Free Software Foundation; either
8  *  version 2.1 of the License, or (at your option) any later version.
9  *
10  *  This library is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  *  Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public
16  *  License along with this library; if not, write to the Free Software
17  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20
21 %module audit
22 %{
23         #include "../lib/libaudit.h"
24 %}
25
26 #if defined(SWIGPYTHON)
27 %except(python) {
28   $action
29   if (result < 0) {
30     PyErr_SetFromErrno(PyExc_OSError);
31     return NULL;
32   }
33 }
34 #endif
35
36 %define __signed__
37 signed
38 %enddef
39 #define __attribute(X) /*nothing*/
40 typedef unsigned __u32;
41 typedef unsigned uid_t;
42 %include "/usr/include/linux/audit.h"
43 #define __extension__ /*nothing*/
44 %include "/usr/include/stdint.h"
45 %include "../lib/libaudit.h"
46