modpython: Make strings to be stringable.

Now you can use str() on objects of znc.String.
The same is true for arguments which represent CString&.
This commit is contained in:
Alexey Sokolov
2011-03-31 20:41:59 +07:00
parent 63250c2b47
commit 45209eca33

View File

@@ -106,6 +106,18 @@ public:
CString s;
};
%extend CPyRetString {
CString __str__() {
return $self->s;
}
};
%extend String {
CString __str__() {
return $self->s;
}
};
%extend CModule {
MCString_iter BeginNV_() {
return MCString_iter($self->BeginNV());