1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-01-28 01:21:40 +00:00

Converted to py3k (haven't tried it on Windows yet, but it should compile and work...)

--HG--
branch : py3k
This commit is contained in:
Virgil Dupras
2010-07-07 16:12:13 +02:00
parent 88b90d859c
commit 2858b5b153
7 changed files with 52 additions and 26 deletions

View File

@@ -34,12 +34,25 @@ static PyMethodDef TrashMethods[] = {
{NULL, NULL, 0, NULL}
};
PyMODINIT_FUNC
init_send2trash_osx(void)
static struct PyModuleDef TrashDef = {
PyModuleDef_HEAD_INIT,
"send2trash_osx",
NULL,
-1,
TrashMethods,
NULL,
NULL,
NULL,
NULL
};
PyObject *
PyInit_send2trash_osx(void)
{
PyObject *m = Py_InitModule("_send2trash_osx", TrashMethods);
PyObject *m = PyModule_Create(&TrashDef);
if (m == NULL) {
return;
return NULL;
}
return m;
}

View File

@@ -58,11 +58,24 @@ static PyMethodDef TrashMethods[] = {
{NULL, NULL, 0, NULL}
};
PyMODINIT_FUNC
init_send2trash_win(void)
static struct PyModuleDef TrashDef = {
PyModuleDef_HEAD_INIT,
"send2trash_win",
NULL,
-1,
TrashMethods,
NULL,
NULL,
NULL,
NULL
};
PyObject *
PyInit_send2trash_win(void)
{
PyObject *m = Py_InitModule("_send2trash_win", TrashMethods);
PyObject *m = PyModule_Create(&TrashDef);
if (m == NULL) {
return;
return NULL;
}
return m;
}