Imported Upstream version 3.2.0
[debian/amanda] / perl / amglue / glib.swg
1 /*
2  * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc.  All Rights Reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 as published
6  * by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16  *
17  * Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300
18  * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
19  */
20
21 /* Typedefs for a few glib basic types that SWIG doesn't recognize
22  * automatically.  Integers are handled specially; see bigint.{swg,c}
23  */
24
25 %{
26 #include "amglue.h"
27 %}
28
29 typedef int gboolean;
30 %typemap(in) gboolean {
31     $1 = SvTRUE($input);
32 }
33
34 %typemap(out) gboolean {
35     if ($1)
36         $result = &PL_sv_yes;
37     else
38         $result = &PL_sv_no;
39     argvi++;
40 }
41
42 typedef void *gpointer;
43 typedef void *gconstpointer;
44
45 typedef char gchar;
46 typedef unsigned char guchar;
47
48 typedef float gfloat;
49 typedef double gdouble;