mirror of
https://github.com/elliotnunn/libhfs.git
synced 2024-10-31 09:15:04 +00:00
python
This commit is contained in:
parent
d965b55f15
commit
f22fae36ed
27
main.c
27
main.c
@ -11,3 +11,30 @@
|
||||
#include "record.c"
|
||||
#include "version.c"
|
||||
#include "volume.c"
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
static char module_docstring[] =
|
||||
"This is the docstring for the module.";
|
||||
static char elmo_docstring[] =
|
||||
"This is the docstring for the elmo function.";
|
||||
|
||||
static PyObject *libhfs_elmo(PyObject *self, PyObject *args);
|
||||
|
||||
static PyMethodDef module_methods[] = {
|
||||
{"elmo", libhfs_elmo, METH_VARARGS, elmo_docstring},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
PyMODINIT_FUNC init_libhfs(void)
|
||||
{
|
||||
PyObject *m = Py_InitModule3("libhfs", module_methods, module_docstring);
|
||||
if (m == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
static PyObject *libhfs_elmo(PyObject *self, PyObject *args)
|
||||
{
|
||||
printf("Hello from the elmo function!\n");
|
||||
return Py_None;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user