Permalink
Browse files

Support OnClientCapLs in modpython #98

  • Loading branch information...
1 parent 592b5d1 commit 219e6a97cebeaf9c20af27998504910933797334 @DarthGandalf DarthGandalf committed Jul 27, 2012
View
2 modules/modpython/codegen.pl
@@ -261,7 +261,7 @@
when (/vector\s*<\s*.*\*\s*>/) {
say $out "PyList_New(0);";
}
- when (/CString/) {
+ when (/(?:^|\s)CString/) { # not SCString
if ($a->{base} eq 'CString' && $a->{mod} eq '&') {
say $out "CPyRetString::wrap($a->{var});";
} else {
View
1 modules/modpython/functions.in
@@ -72,3 +72,4 @@ EModRet OnModuleLoading(const CString& sModName, const CString& sArgs, CModInfo:
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)
View
2 modules/modpython/modpython.i
@@ -65,6 +65,8 @@ using std::allocator;
%template(VChannels) std::vector<CChan*>;
%template(MNicks) std::map<CString, CNick>;
%template(SModInfo) std::set<CModInfo>;
+%template(SCString) std::set<CString>;
+typedef std::set<CString> SCString;
%typemap(in) CString& {
String* p;
View
1 modules/modpython/module.h
@@ -123,6 +123,7 @@ class CPyModule : public CModule {
virtual EModRet OnGetModInfo(CModInfo& ModInfo, const CString& sModule,
bool& bSuccess, CString& sRetMsg);
virtual void OnGetAvailableMods(std::set<CModInfo>& ssMods, CModInfo::EModuleType eType);
+ virtual void OnClientCapLs(CClient* pClient, SCString& ssCaps);
};
static inline CPyModule* AsPyModule(CModule* p) {

0 comments on commit 219e6a9

Please sign in to comment.