NEURON
nrnpy_hoc.h
Go to the documentation of this file.
1 #include "nrnpython.h"
2 
3 static PyType_Slot nrnpy_HocObjectType_slots[] = {
4  {Py_tp_dealloc, (void*) hocobj_dealloc},
5  {Py_tp_repr, (void*) hocobj_repr},
6  {Py_tp_hash, (void*) hocobj_hash},
7  {Py_tp_call, (void*) hocobj_call},
8  {Py_tp_getattro, (void*) hocobj_getattro},
9  {Py_tp_setattro, (void*) hocobj_setattro},
10  {Py_tp_richcompare, (void*) hocobj_richcmp},
11  {Py_tp_iter, (void*) &hocobj_iter},
12  {Py_tp_iternext, (void*) &hocobj_iternext},
13  {Py_tp_methods, (void*) hocobj_methods},
14  {Py_tp_init, (void*) hocobj_init},
15  {Py_tp_new, (void*) hocobj_new},
16  {Py_nb_bool, (void*) hocobj_nonzero},
17  {Py_sq_length, (void*) hocobj_len},
18  {Py_mp_subscript, (void*) hocobj_slice_getitem},
19  {Py_sq_item, (void*) hocobj_getitem},
20  {Py_mp_ass_subscript, (void*) hocobj_slice_setitem},
21  {Py_sq_ass_item, (void*) hocobj_setitem},
22  {Py_nb_add, (PyObject*) py_hocobj_add},
23  {Py_nb_subtract, (PyObject*) py_hocobj_sub},
24  {Py_nb_multiply, (PyObject*) py_hocobj_mul},
25  {Py_nb_negative, (PyObject*) py_hocobj_uneg},
26  {Py_nb_positive, (PyObject*) py_hocobj_upos},
27  {Py_nb_absolute, (PyObject*) py_hocobj_uabs},
28  {Py_nb_true_divide, (PyObject*) py_hocobj_div},
29  {0, 0},
30 };
31 
32 
33 static struct PyModuleDef hocmodule = {PyModuleDef_HEAD_INIT,
34  "hoc",
35  "HOC interaction with Python",
36  -1,
37  HocMethods,
38  NULL,
39  NULL,
40  NULL,
41  NULL};
_object PyObject
Definition: nrnpy.h:12
static void hocobj_dealloc(PyHocObject *self)
Definition: nrnpy_hoc.cpp:235
static PyObject * hocobj_getattro(PyObject *subself, PyObject *name)
Definition: nrnpy_hoc.cpp:1423
static int hocobj_slice_setitem(PyObject *self, PyObject *slice, PyObject *arg)
Definition: nrnpy_hoc.cpp:2223
static PyObject * py_hocobj_add(PyObject *obj1, PyObject *obj2)
Definition: nrnpy_hoc.cpp:3165
static PyObject * hocobj_iter(PyObject *raw_self)
Definition: nrnpy_hoc.cpp:1757
static PyObject * py_hocobj_uabs(PyObject *obj)
Definition: nrnpy_hoc.cpp:3169
static int hocobj_init(PyObject *subself, PyObject *args, PyObject *kwds)
Definition: nrnpy_hoc.cpp:320
static PyObject * hocobj_call(PyHocObject *self, PyObject *args, PyObject *kwrds)
Definition: nrnpy_hoc.cpp:782
static PyObject * hocobj_slice_getitem(PyObject *self, PyObject *slice)
Definition: nrnpy_hoc.cpp:2073
static PyObject * py_hocobj_uneg(PyObject *obj)
Definition: nrnpy_hoc.cpp:3173
static PyObject * py_hocobj_upos(PyObject *obj)
Definition: nrnpy_hoc.cpp:3177
static int hocobj_setattro(PyObject *subself, PyObject *pyname, PyObject *value)
Definition: nrnpy_hoc.cpp:1455
static PyObject * py_hocobj_div(PyObject *obj1, PyObject *obj2)
Definition: nrnpy_hoc.cpp:3189
static int hocobj_setitem(PyObject *self, Py_ssize_t i, PyObject *arg)
Definition: nrnpy_hoc.cpp:2102
static PyMethodDef hocobj_methods[]
Definition: nrnpy_hoc.cpp:3072
static PyObject * hocobj_richcmp(PyHocObject *self, PyObject *other, int op)
Definition: nrnpy_hoc.cpp:2422
static PyObject * hocobj_repr(PyObject *p)
Definition: nrnpy_hoc.cpp:405
static PyObject * py_hocobj_sub(PyObject *obj1, PyObject *obj2)
Definition: nrnpy_hoc.cpp:3181
static PyMethodDef HocMethods[]
Definition: nrnpy_hoc.cpp:227
static PyObject * hocobj_getitem(PyObject *self, Py_ssize_t ix)
Definition: nrnpy_hoc.cpp:1933
static int hocobj_nonzero(PyObject *self)
Definition: nrnpy_hoc.cpp:1718
static Py_ssize_t hocobj_len(PyObject *self)
Definition: nrnpy_hoc.cpp:1692
static PyObject * hocobj_iternext(PyObject *self)
Definition: nrnpy_hoc.cpp:1906
static long hocobj_hash(PyHocObject *self)
Definition: nrnpy_hoc.cpp:2392
static PyObject * hocobj_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds)
Definition: nrnpy_hoc.cpp:262
static PyObject * py_hocobj_mul(PyObject *obj1, PyObject *obj2)
Definition: nrnpy_hoc.cpp:3185
static struct PyModuleDef hocmodule
Definition: nrnpy_hoc.h:33
static PyType_Slot nrnpy_HocObjectType_slots[]
Definition: nrnpy_hoc.h:3
#define NULL
Definition: spdefs.h:105