Crossfire Server, Branch 1.12
R12190
|
00001 static PyObject *Crossfire_Region_GetName(Crossfire_Region *whoptr, void *closure); 00002 static PyObject *Crossfire_Region_GetLongname(Crossfire_Region *whoptr, void *closure); 00003 static PyObject *Crossfire_Region_GetMessage(Crossfire_Region *whoptr, void *closure); 00004 static PyObject *Crossfire_Region_GetNext(Crossfire_Region *who, void *closure); 00005 static PyObject *Crossfire_Region_GetParent(Crossfire_Region *who, PyObject *args); 00006 00007 static int Crossfire_Region_InternalCompare(Crossfire_Region *left, Crossfire_Region *right); 00008 00009 static PyGetSetDef Region_getseters[] = { 00010 { "Name", (getter)Crossfire_Region_GetName, NULL, NULL, NULL }, 00011 { "Longname", (getter)Crossfire_Region_GetLongname, NULL, NULL, NULL }, 00012 { "Message", (getter)Crossfire_Region_GetMessage, NULL, NULL, NULL }, 00013 { "Next", (getter)Crossfire_Region_GetNext, NULL, NULL, NULL }, 00014 { NULL, NULL, NULL, NULL, NULL } 00015 }; 00016 00017 static PyMethodDef RegionMethods[] = { 00018 { "GetParent", (PyCFunction)Crossfire_Region_GetParent, METH_NOARGS, NULL }, 00019 { NULL, NULL, 0, NULL } 00020 }; 00021 00022 /* Our actual Python ArchetypeType */ 00023 PyTypeObject Crossfire_RegionType = { 00024 PyObject_HEAD_INIT(NULL) 00025 #ifndef IS_PY3K 00026 0, /* ob_size*/ 00027 #endif 00028 "Crossfire.Party", /* tp_name*/ 00029 sizeof(Crossfire_Region), /* tp_basicsize*/ 00030 0, /* tp_itemsize*/ 00031 NULL, /* tp_dealloc*/ 00032 NULL, /* tp_print*/ 00033 NULL, /* tp_getattr*/ 00034 NULL, /* tp_setattr*/ 00035 (cmpfunc)Crossfire_Region_InternalCompare, /* tp_compare*/ 00036 NULL, /* tp_repr*/ 00037 NULL, /* tp_as_number*/ 00038 NULL, /* tp_as_sequence*/ 00039 NULL, /* tp_as_mapping*/ 00040 PyObject_HashNotImplemented, /* tp_hash */ 00041 NULL, /* tp_call*/ 00042 NULL, /* tp_str*/ 00043 PyObject_GenericGetAttr, /* tp_getattro*/ 00044 PyObject_GenericSetAttr, /* tp_setattro*/ 00045 NULL, /* tp_as_buffer*/ 00046 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags*/ 00047 "Crossfire regions", /* tp_doc */ 00048 NULL, /* tp_traverse */ 00049 NULL, /* tp_clear */ 00050 NULL, /* tp_richcompare */ 00051 0, /* tp_weaklistoffset */ 00052 NULL, /* tp_iter */ 00053 NULL, /* tp_iternext */ 00054 RegionMethods, /* tp_methods */ 00055 NULL, /* tp_members */ 00056 Region_getseters, /* tp_getset */ 00057 NULL, /* tp_base */ 00058 NULL, /* tp_dict */ 00059 NULL, /* tp_descr_get */ 00060 NULL, /* tp_descr_set */ 00061 0, /* tp_dictoffset */ 00062 NULL, /* tp_init */ 00063 NULL, /* tp_alloc */ 00064 NULL, /* tp_new */ 00065 NULL, /* tp_free */ 00066 NULL, /* tp_is_gc */ 00067 NULL, /* tp_bases */ 00068 NULL, /* tp_mro */ 00069 NULL, /* tp_cache */ 00070 NULL, /* tp_subclasses */ 00071 NULL, /* tp_weaklist */ 00072 NULL, /* tp_del */ 00073 };