Use class name as ctor for static construction calls

Longer, but more conventional
release/4.3a0
Duy-Nguyen Ta 2016-09-19 12:39:04 -04:00
parent 814abcb67c
commit f5691804ed
1 changed files with 2 additions and 2 deletions

View File

@ -147,8 +147,8 @@ void Constructor::emit_cython_pyx(FileWriter& pyxFile, const Class& cls) const {
for (size_t i = 0; i < nrOverloads(); i++) {
ArgumentList args = argumentList(i);
pyxFile.oss << "\t@staticmethod\n";
pyxFile.oss << "\tdef ctor"
<< ((i > 0) ? to_string(i) : "") << "(";
pyxFile.oss << "\tdef " << name_
<< ((i > 0) ? "_" + to_string(i) : "") << "(";
args.emit_cython_pyx(pyxFile);
pyxFile.oss << "): \n";