~ubuntu-branches/ubuntu/trusty/znc/trusty

« back to all changes in this revision

Viewing changes to modules/modpython/ret.h

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-05-06 09:18:27 UTC
  • mfrom: (21.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20130506091827-08sixjiyy3hjfx6b
Tags: 1.0-4
* Change section from znc-tcl to interpreters.
* Uploading to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2004-2012  See the AUTHORS file for details.
 
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
 
 
9
#pragma once
 
10
 
 
11
class CPyRetString {
 
12
public:
 
13
        CString& s;
 
14
        CPyRetString(CString& S) : s(S) {}
 
15
        static PyObject* wrap(CString& S) {
 
16
                CPyRetString* x = new CPyRetString(S);
 
17
                return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetString*"), SWIG_POINTER_OWN);
 
18
        }
 
19
};
 
20
 
 
21
class CPyRetBool {
 
22
public:
 
23
        bool& b;
 
24
        CPyRetBool(bool& B) : b(B) {}
 
25
        static PyObject* wrap(bool& B) {
 
26
                CPyRetBool* x = new CPyRetBool(B);
 
27
                return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetBool*"), SWIG_POINTER_OWN);
 
28
        }
 
29
};