diff --git a/wrap/StaticMethod.cpp b/wrap/StaticMethod.cpp index 23dc93d72..e612f4353 100644 --- a/wrap/StaticMethod.cpp +++ b/wrap/StaticMethod.cpp @@ -56,3 +56,18 @@ string StaticMethod::wrapper_call(FileWriter& wrapperFile, Str cppClassName, } /* ************************************************************************* */ +void StaticMethod::emit_cython_pxd(FileWriter& file) const { + // don't support overloads for static method :-( + for(size_t i = 0; i < nrOverloads(); ++i) { + if (i>0) file.oss << "# "; + file.oss << "\t\t@staticmethod\n"; + if (i>0) file.oss << "# "; + file.oss << "\t\t"; + returnVals_[i].emit_cython_pxd(file); + file.oss << name_ << "("; + argumentList(i).emit_cython_pxd(file); + file.oss << ")\n"; + } +} + +/* ************************************************************************* */ diff --git a/wrap/StaticMethod.h b/wrap/StaticMethod.h index a01eeff62..2c69459a0 100644 --- a/wrap/StaticMethod.h +++ b/wrap/StaticMethod.h @@ -34,6 +34,8 @@ struct StaticMethod: public MethodBase { return os; } + void emit_cython_pxd(FileWriter& file) const; + protected: virtual void proxy_header(FileWriter& proxyFile) const;