mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
modpython: move CPyRetString to own header.
It was defined twice: in modpython.cpp, and in modpython.i And there is a fake CPyRetString in modpython.i Now both places which use real CPyRetString include the file instead. Fake CPyRetString is still in modpython.i
This commit is contained in:
21
modules/modpython/retstring.h
Normal file
21
modules/modpython/retstring.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2011 See the AUTHORS file for details.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
class CPyRetString {
|
||||
public:
|
||||
CString& s;
|
||||
CPyRetString(CString& S) : s(S) {}
|
||||
static PyObject* wrap(CString& S) {
|
||||
CPyRetString* x = new CPyRetString(S);
|
||||
return SWIG_NewInstanceObj(x, SWIG_TypeQuery("CPyRetString*"), SWIG_POINTER_OWN);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user