tuple->SetItem(0,list);// sending 0, as done on retail, doesn't fuck up calculation for some reason// so we can take the same shortcut heretuple->SetItem(1,newPyInt(0));returntuple; } 开发者ID:Logomorph,项目名称:evemu_crucible,代码行数:26,代码来源:Character.cpp 示例2: return ▲...
clientlag_obj = PyTuple_New(5);PyTuple_SetItem( clientlag_obj,0, PyFloat_FromDouble( cl->lag ) );PyTuple_SetItem( clientlag_obj,1, PyInt_FromLong( (long) cl->thread ) );PyTuple_SetItem( clientlag_obj,2, PyInt_FromLong( (long) cl->pktid ) );PyTuple_SetItem( clientlag_obj,...
( first->terms ); for( Py_ssize_t i = 0; i < end; ++i ) // memset 0 for safe error return - PyTuple_SET_ITEM( terms.get(), i, 0 ); + PyTuple_SetItem( terms.get(), i, 0 ); for( Py_ssize_t i = 0; i < end; ++i ) { PyObject* item = PyTuple_GET_ITEM( ...
(Py_None); py_err = Py_None; } if ( py_out == NULL ) { Py_INCREF(Py_None); py_out = Py_None; } PyObject * py_res = PyTuple_New(2); PyTuple_SetItem(py_res, 0, py_err); PyTuple_SetItem(py_res, 1, py_out); if(udata_ptr->host_lookup_p) { PyObject * py_hosts...
_SetItem(newTuple, j, item); } Py_DECREF(pyTuple); pyTuple = newTuple; it->second.obj = newTuple; } if (pyTuple) { if (PyTuple_Size(pyTuple) <= idx) { int oldsize = PyTuple_Size(pyTuple); _PyTuple_Resize(&pyTuple, idx+1); // initialize the tuple elements to None, ...
py_out = Py_None; } PyObject * py_res =PyTuple_New(2); PyTuple_SetItem(py_res,0, py_err); PyTuple_SetItem(py_res,1, py_out);if(udata_ptr->host_lookup_p) { PyObject * py_hosts = (PyObject *)udata_ptr->host_lookup_p;if( py_hosts && PyList_Check(py_hosts) ) { ...
dialect = _call_dialect(dialect_obj, kwargs);if(dialect ==NULL)returnNULL;if(PyDict_SetItem(_csvstate_global->dialects, name_obj, dialect) <0) { Py_DECREF(dialect);returnNULL; } Py_DECREF(dialect); Py_RETURN_NONE; } 开发者ID:1st1,项目名称:cpython,代码行数:25,代码来源:_csv.c ...
oaddr = PyTuple_New(2);PyTuple_SetItem(oaddr,0, PyString_FromString(caddr));PyTuple_SetItem(oaddr,1, PyInt_FromLong(port)); }else{// something went wrongoaddr = Py_None; Py_INCREF(Py_None); } PyDict_SetItemString(dict,"addr", oaddr); ...
v->SetItem(1,newPyNone ); 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,代码来源...
shipEff.randomSeed =newPyNone; shipEff.error =newPyNone;PyTuple* tmp =newPyTuple(3);//tmp->SetItem(1, dmgMsg.Encode());tmp->SetItem(2, shipEff.Encode());std::vector<PyTuple*> events;//events.push_back(dmgMsg.Encode());events.push_back(shipEff.Encode());std::vector<PyTuple*>...