mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
@@ -275,6 +275,9 @@ while (<$in>) {
|
||||
say $out "Py_BuildValue(\"l\", (long int)$a->{var});";
|
||||
}
|
||||
}
|
||||
when (/^CSmartPtr/) {
|
||||
say $out "SWIG_NewInstanceObj(new $a->{type}($a->{var}), SWIG_TypeQuery(\"$a->{type}*\"), SWIG_POINTER_OWN);";
|
||||
}
|
||||
when (/\*$/) {
|
||||
(my $t = $a->{type}) =~ s/^const//;
|
||||
say $out "SWIG_NewInstanceObj(const_cast<$t>($a->{var}), SWIG_TypeQuery(\"$t\"), 0);";
|
||||
@@ -283,7 +286,7 @@ while (<$in>) {
|
||||
(my $b = $a->{base}) =~ s/^const//;
|
||||
say $out "SWIG_NewInstanceObj(const_cast<$b*>(&$a->{var}), SWIG_TypeQuery(\"$b*\"), 0);";
|
||||
}
|
||||
when (/(?:^|::)E/) {
|
||||
when (/(?:^|::)E/) { # Enumerations
|
||||
say $out "Py_BuildValue(\"i\", (int)$a->{var});";
|
||||
}
|
||||
default {
|
||||
|
||||
@@ -73,3 +73,4 @@ EModRet OnModuleUnloading(CModule* pModule, bool& bSuccess, CString& sRetMsg)
|
||||
EModRet OnGetModInfo(CModInfo& ModInfo, const CString& sModule, bool& bSuccess, CString& sRetMsg)
|
||||
void OnGetAvailableMods(std::set<CModInfo>& ssMods, CModInfo::EModuleType eType)
|
||||
void OnClientCapLs(CClient* pClient, SCString& ssCaps)
|
||||
EModRet OnLoginAttempt(CSmartPtr<CAuthBase> Auth)
|
||||
|
||||
@@ -106,6 +106,7 @@ class MCString : public std::map<CString, CString> {};
|
||||
#include "../include/znc/ZNCString.h"
|
||||
%include "../include/znc/defines.h"
|
||||
%include "../include/znc/Utils.h"
|
||||
%template(PAuthBase) CSmartPtr<CAuthBase>;
|
||||
%include "../include/znc/Config.h"
|
||||
%include "../include/znc/Csocket.h"
|
||||
%template(ZNCSocketManager) TSocketManager<CZNCSock>;
|
||||
|
||||
@@ -124,6 +124,7 @@ public:
|
||||
bool& bSuccess, CString& sRetMsg);
|
||||
virtual void OnGetAvailableMods(std::set<CModInfo>& ssMods, CModInfo::EModuleType eType);
|
||||
virtual void OnClientCapLs(CClient* pClient, SCString& ssCaps);
|
||||
virtual EModRet OnLoginAttempt(CSmartPtr<CAuthBase> Auth);
|
||||
};
|
||||
|
||||
static inline CPyModule* AsPyModule(CModule* p) {
|
||||
|
||||
Reference in New Issue
Block a user