Archive::Archive defined twice (original) (raw)

Describe the bug

Building the package reports a warning:

swig -python -o fitz/fitz_wrap.c fitz/fitz.i
fitz/fitz.i:12342: Warning 509: Overloaded method Archive::Archive(PyObject *,char const *) effectively ignored,
fitz/fitz.i:12331: Warning 509: as it is shadowed by Archive::Archive(struct Archive *,char const *).
creating build

To Reproduce

Build the wheel.

Expected behavior

No warnings are raised.

Your configuration

Additional context

Looking into the code, both definitions are mostly identical:

Archive(struct Archive *a0=NULL, const char *path=NULL)
{
fz_archive *arch=NULL;
fz_try(gctx) {
arch = fz_new_multi_archive(gctx);
}
fz_catch(gctx) {
return NULL;
}
return (struct Archive *) arch;
}
Archive(PyObject *a0=NULL, const char *path=NULL)
{
fz_archive *arch=NULL;
fz_try(gctx) {
arch = fz_new_multi_archive(gctx);
}
fz_catch(gctx) {
return NULL;
}
return (struct Archive *) arch;
}