1 |
root |
1.1 |
static PyObject* Crossfire_Region_GetName( Crossfire_Region* whoptr, void* closure); |
2 |
|
|
static PyObject* Crossfire_Region_GetLongname( Crossfire_Region* whoptr, void* closure); |
3 |
|
|
static PyObject* Crossfire_Region_GetMessage( Crossfire_Region* whoptr, void* closure); |
4 |
|
|
static PyObject* Crossfire_Region_GetNext( Crossfire_Region* who, PyObject* args ); |
5 |
|
|
static PyObject* Crossfire_Region_GetParent( Crossfire_Region* who, PyObject* args ); |
6 |
|
|
|
7 |
|
|
static int Crossfire_Region_InternalCompare(Crossfire_Region* left, Crossfire_Region* right); |
8 |
|
|
|
9 |
|
|
static PyGetSetDef Region_getseters[] = { |
10 |
|
|
{ "Name", (getter)Crossfire_Region_GetName, NULL, NULL, NULL }, |
11 |
|
|
{ "Longname", (getter)Crossfire_Region_GetLongname, NULL, NULL, NULL }, |
12 |
|
|
{ "Message", (getter)Crossfire_Region_GetMessage, NULL, NULL, NULL }, |
13 |
|
|
{ NULL, NULL, NULL, NULL, NULL } |
14 |
|
|
}; |
15 |
|
|
|
16 |
|
|
static PyMethodDef RegionMethods[] = { |
17 |
|
|
{ "Next", (PyCFunction)Crossfire_Region_GetNext, METH_VARARGS}, |
18 |
|
|
{ "GetParent", (PyCFunction)Crossfire_Region_GetParent, METH_VARARGS}, |
19 |
|
|
{NULL, NULL, 0} |
20 |
|
|
}; |
21 |
|
|
|
22 |
|
|
/* Our actual Python ArchetypeType */ |
23 |
|
|
PyTypeObject Crossfire_RegionType = { |
24 |
|
|
PyObject_HEAD_INIT(NULL) |
25 |
|
|
0, /* ob_size*/ |
26 |
|
|
"Crossfire.Party", /* tp_name*/ |
27 |
|
|
sizeof(Crossfire_Region), /* tp_basicsize*/ |
28 |
|
|
0, /* tp_itemsize*/ |
29 |
|
|
0, /* tp_dealloc*/ |
30 |
|
|
0, /* tp_print*/ |
31 |
|
|
0, /* tp_getattr*/ |
32 |
|
|
0, /* tp_setattr*/ |
33 |
|
|
(cmpfunc)Crossfire_Region_InternalCompare, /* tp_compare*/ |
34 |
|
|
0, /* tp_repr*/ |
35 |
|
|
0, /* tp_as_number*/ |
36 |
|
|
0, /* tp_as_sequence*/ |
37 |
|
|
0, /* tp_as_mapping*/ |
38 |
|
|
0, /* tp_hash */ |
39 |
|
|
0, /* tp_call*/ |
40 |
|
|
0, /* tp_str*/ |
41 |
|
|
PyObject_GenericGetAttr, /* tp_getattro*/ |
42 |
|
|
PyObject_GenericSetAttr, /* tp_setattro*/ |
43 |
|
|
0, /* tp_as_buffer*/ |
44 |
|
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags*/ |
45 |
|
|
"Crossfire regions", /* tp_doc */ |
46 |
|
|
0, /* tp_traverse */ |
47 |
|
|
0, /* tp_clear */ |
48 |
|
|
0, /* tp_richcompare */ |
49 |
|
|
0, /* tp_weaklistoffset */ |
50 |
|
|
0, /* tp_iter */ |
51 |
|
|
0, /* tp_iternext */ |
52 |
|
|
RegionMethods, /* tp_methods */ |
53 |
|
|
0, /* tp_members */ |
54 |
|
|
Region_getseters, /* tp_getset */ |
55 |
|
|
}; |