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