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