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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user