Progress on modpython global hooks.

OnModuleLoading, OnModuleUnloading, OnGetModInfo work fine.
Need to add: OnClientCapLs, OnGetAvailableMods, OnLoginAttempt

See #98
This commit is contained in:
Alexey Sokolov
2012-07-22 18:21:58 +07:00
parent 5b50003f33
commit 5656e14aa2
6 changed files with 62 additions and 6 deletions

View File

@@ -268,6 +268,13 @@ while (<$in>) {
say $out "Py_BuildValue(\"s\", $a->{var}.c_str());";
}
}
when (/^bool/) {
if ($a->{mod} eq '&') {
say $out "CPyRetBool::wrap($a->{var});";
} else {
say $out "Py_BuildValue(\"l\", (long int)$a->{var});";
}
}
when (/\*$/) {
(my $t = $a->{type}) =~ s/^const//;
say $out "SWIG_NewInstanceObj(const_cast<$t>($a->{var}), SWIG_TypeQuery(\"$t\"), 0);";
@@ -276,9 +283,6 @@ while (<$in>) {
(my $b = $a->{base}) =~ s/^const//;
say $out "SWIG_NewInstanceObj(const_cast<$b*>(&$a->{var}), SWIG_TypeQuery(\"$b*\"), 0);";
}
when ('bool') {
say $out "Py_BuildValue(\"l\", (long int)$a->{var});";
}
when (/(?:^|::)E/) {
say $out "Py_BuildValue(\"i\", (int)$a->{var});";
}