Author: ArcRiley Date: 2009-01-18 04:04:11 -0500 (Sun, 18 Jan 2009) New Revision: 1494
Added: trunk/concordance/src/sockets/Client.c trunk/concordance/src/sockets/Client.h Modified: trunk/concordance/src/sockets/Socket.c trunk/concordance/src/sockets/__init__.c Log: So it compiles again Copied: trunk/concordance/src/sockets/Client.c (from rev 1492, trunk/concordance/src/sockets/Socket.c) =================================================================== --- trunk/concordance/src/sockets/Client.c (rev 0) +++ trunk/concordance/src/sockets/Client.c 2009-01-18 09:04:11 UTC (rev 1494) @@ -0,0 +1,61 @@ +/* +# Concordance XMPP Service Framework +# +# Copyright (C) 2009 Copyleft Games Group +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# +# $Id$ +*/ + +#include "Socket.h" + + /*\ +cdef class Socket : \*/ + static char socketsSocket_Doc[] = "Test"; + + static PyObject* + socketsSocket_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { /*\ + cdef : \*/ + socketsSocket_Object* self; + + /* allocate self */ + self = (socketsSocket_Object*) type->tp_alloc(type, 0); + + /* start with closed socket */ + self->sock = -1; + + /* grab context from _core */ + self->cntx = NULL; + + return (PyObject*) self; + } + + static int + socketsSocket_init(PyObject* s, PyObject* args, PyObject* kwds) { /*\ + cdef : \*/ + socketsSocket_Object* self = (socketsSocket_Object*) s; + + return 0; + } + + + static void + socketsSocket_dealloc(socketsSocket_Object* self) { + if (self->sock > -1) + close(self->sock); + PyObject_Del(self); + } + + Property changes on: trunk/concordance/src/sockets/Client.c ___________________________________________________________________ Added: svn:keywords + Id Added: svn:mergeinfo + Copied: trunk/concordance/src/sockets/Client.h (from rev 1492, trunk/concordance/src/sockets/Socket.h) =================================================================== --- trunk/concordance/src/sockets/Client.h (rev 0) +++ trunk/concordance/src/sockets/Client.h 2009-01-18 09:04:11 UTC (rev 1494) @@ -0,0 +1,27 @@ +/* +# Concordance XMPP Service Framework +# +# Copyright (C) 2009 Copyleft Games Group +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# +# $Id$ +*/ + +#ifndef SOCKETS_SOCKET_H +#define SOCKETS_SOCKET_H + +#include "__init__.h" + +#endif Property changes on: trunk/concordance/src/sockets/Client.h ___________________________________________________________________ Added: svn:keywords + Id Added: svn:mergeinfo + Modified: trunk/concordance/src/sockets/Socket.c =================================================================== --- trunk/concordance/src/sockets/Socket.c 2009-01-18 08:51:23 UTC (rev 1493) +++ trunk/concordance/src/sockets/Socket.c 2009-01-18 09:04:11 UTC (rev 1494) @@ -58,3 +58,4 @@ PyObject_Del(self); } + Modified: trunk/concordance/src/sockets/__init__.c =================================================================== --- trunk/concordance/src/sockets/__init__.c 2009-01-18 08:51:23 UTC (rev 1493) +++ trunk/concordance/src/sockets/__init__.c 2009-01-18 09:04:11 UTC (rev 1494) @@ -30,7 +30,7 @@ PyModuleDef_HEAD_INIT, "sockets", /*m_name*/ "Test Help", /*m_doc*/ - -1, /*m_size*/ + sizeof(gpointer), /*m_size*/ sockets_Methods, /*m_methods*/ NULL, /*m_reload*/ NULL, /*m_traverse*/ _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn