Skip to content

Python3 support #5

Open
Open
@rom1sqr

Description

@rom1sqr

This project looks dead. But for those wondering how to make a wrapper compatible with Python3,
you just need to replace the PyMODINIT_FUNC init_pydmtx(void) function with this :

static struct PyModuleDef _pydmtx =
{
    PyModuleDef_HEAD_INIT,
    "_pydmtx",
    "",
    -1,
    dmtxMethods
};

PyMODINIT_FUNC PyInit__pydmtx(void)
{
    return PyModule_Create(&_pydmtx);
}

and to remove the init_pydmtx() call in the int main function. That's it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions