1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-01-22 22:51:39 +00:00

Renamed _trash_* modules to _send2trash_* and added python wrapper around them.

--HG--
rename : modules/trash_osx.c => modules/send2trash_osx.c
rename : modules/trash_win.c => modules/send2trash_win.c
This commit is contained in:
Virgil Dupras
2010-04-06 18:04:32 +02:00
parent be87b55146
commit 8a1dff2947
7 changed files with 37 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
#include "Python.h"
#include <CoreServices/CoreServices.h>
static PyObject* trash_osx_send(PyObject *self, PyObject *args)
static PyObject* send2trash_osx_send(PyObject *self, PyObject *args)
{
UInt8 *utf8_chars;
FSRef fp;
@@ -22,13 +22,13 @@ static PyObject* trash_osx_send(PyObject *self, PyObject *args)
}
static PyMethodDef TrashMethods[] = {
{"send", trash_osx_send, METH_VARARGS, ""},
{"send", send2trash_osx_send, METH_VARARGS, ""},
};
PyMODINIT_FUNC
init_trash_osx(void)
init_send2trash_osx(void)
{
PyObject *m = Py_InitModule("_trash_osx", TrashMethods);
PyObject *m = Py_InitModule("_send2trash_osx", TrashMethods);
if (m == NULL) {
return;
}

View File

@@ -9,7 +9,7 @@
rather than sending it to trash.
*/
static PyObject* trash_win_send(PyObject *self, PyObject *args)
static PyObject* send2trash_win_send(PyObject *self, PyObject *args)
{
SHFILEOPSTRUCTW op;
PyObject *filepath;
@@ -47,14 +47,14 @@ static PyObject* trash_win_send(PyObject *self, PyObject *args)
}
static PyMethodDef TrashMethods[] = {
{"send", trash_win_send, METH_VARARGS, ""},
{"send", send2trash_win_send, METH_VARARGS, ""},
{NULL, NULL, 0, NULL}
};
PyMODINIT_FUNC
init_trash_win(void)
init_send2trash_win(void)
{
PyObject *m = Py_InitModule("_trash_win", TrashMethods);
PyObject *m = Py_InitModule("_send2trash_win", TrashMethods);
if (m == NULL) {
return;
}