Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static PyObject *sendPacket(PyObject *self, PyObject *args)
- {
- packetbuf p(MAXTRANS,0);
- for(Py_ssize_t i=0;i<PyTuple_Size(args);i++)
- {
- int data=PyInt_AsLong(PyTuple_GetItem(args,i));
- std::cout<<data<<" ";
- putint(p, data);
- }
- std::cout<<"\n";
- sendpacket(-1, 1, p.finalize(), -1);
- }
- Output:
- 40 432 1224 504 1 1 1 8 5 0 2 0 2 1 -1 1 0 <<<<This is fine
- Segmentation fault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement