tuple->SetItem(0,newPyInt(MOD_ACTIVATED));//??? what is this really?tuple->SetItem(1,newPyInt(m_item->typeID())); dict->SetItem(newPyString("modulename"), tuple); PyTuple *error =newPyTuple(2); error->SetItem(0,newPyString("MiningDronesDeactivatedAsteroidEmpty")); error->SetItem(...
ret = PyString_FromString((char*) obj->stringval);break;caseXPATH_POINT: { PyObject *node; PyObject *indexIntoNode; PyObject *tuple; node = libxml_xmlNodePtrWrap(obj->user); indexIntoNode = PyInt_FromLong((long) obj->index); tuple =PyTuple_New(2); PyTuple_SetItem(tuple,0, nod...
if (i < 0 || i >= Py_SIZE(op)) { PyErr_SetString(PyExc_IndexError, "tuple index out of range"); return NULL; } return ((PyTupleObject *)op) -> ob_item[i]; } int PyTuple_SetItem(PyObject *op, Py_ssize_t i, PyObject *newitem) { PyObject *olditem; PyObject **p; if...
strcmp(host_addr,ip_port)) && (port == ntohs(addr->sin_port))) { PyObject * py_nodes = (PyObject *) udata_ptr->udata_p; PyDict_SetItemString(py_nodes, node->name, py_res); } } } } else if ( !PyList_Check( py_hosts )){ as_error_update(&udata_ptr->error, AEROSPIKE_...
PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node)); } } break; case XPATH_BOOLEAN: ret = PyInt_FromLong((long) obj->boolval); break; case XPATH_NUMBER: ret = PyFloat_FromDouble(obj->floatval); break; case XPATH_STRING: ret = PyString_FromString((char *) obj->stringval); ...
PyDict_SetItemString(dict,"assoc_id", PyInt_FromLong(n->sac_assoc_id)); }break;caseSCTP_PEER_ADDR_CHANGE: {conststructsctp_paddr_change*n= &(notif->sn_paddr_change);charcaddr[256];intfamily;intlen;intport; PyObject* oaddr;if(from_sockaddr((struct sockaddr*) &(n->spc_aaddr), ...
PyErr_SetString(PyExc_TypeError,"dialect name must be a string");returnNULL; }if(PyUnicode_READY(name_obj) ==-1)returnNULL; dialect = _call_dialect(dialect_obj, kwargs);if(dialect ==NULL)returnNULL;if(PyDict_SetItem(_csvstate_global->dialects, name_obj, dialect) <0) { ...
PyDict_SetItemString(py_nodes, node->name, py_res); } } } }elseif( !PyList_Check( py_hosts )){ as_error_update(&udata_ptr->error, AEROSPIKE_ERR_PARAM,"Hosts should be specified in a list.");gotoCLEANUP;//...这里部分代码省略... 开发者ID:Fabma,项目...
PyTuple* PasswordString::_CreateArgs( PyWString* password ) {PyTuple* head =newPyTuple(2); head->SetItem(0,newPyToken("util.PasswordString") ); head->SetItem(1, password );returnhead; } 开发者ID:Camwarp,项目名称:evemu_server,代码行数:8,代码来源:PyUtils.cpp ...
mSession->SetItemString( name, v ); } PyRep* current = v->GetItem(1);if( value->hash() != current->hash() ) { v->SetItem(1, value ); mDirty =true; }else{ PyDecRef( value ); } } 开发者ID:AlTahir,项目名称:Apocrypha_combo,代码行数:23,代码来源:ClientSession.cpp ...