openbsd-ports/devel/py-silc/patches/patch-src_pysilc_channel_c

60 lines
1.9 KiB
Plaintext
Raw Normal View History

2007-10-02 13:35:48 -04:00
$OpenBSD: patch-src_pysilc_channel_c,v 1.3 2007/10/02 17:35:48 martynas Exp $
--- src/pysilc_channel.c.orig Sun Jul 9 20:18:40 2006
+++ src/pysilc_channel.c Sun Jul 1 22:52:11 2007
@@ -40,7 +40,6 @@ static PyObject *PySilcChannel_GetAttr(PyObject *self,
// - (TODO) founder_key
// - unsigned int user_limit
// - (TODO) user_list
- // - int resolve_cmd_ident
int result;
PyObject *temp = NULL, *value = NULL;
@@ -85,7 +84,7 @@ static PyObject *PySilcChannel_GetAttr(PyObject *self,
goto cleanup;
if (result == 0) {
char buf[160];
- memcpy(&buf, (pychannel->silcobj->id), 160);
+ memcpy(&buf, &(pychannel->silcobj->id), 160);
value = PyString_FromStringAndSize(buf, 160);
goto cleanup;
}
@@ -110,16 +109,6 @@ static PyObject *PySilcChannel_GetAttr(PyObject *self,
goto cleanup;
}
- // check for resolve_cmd_ident
- Py_DECREF(temp);
- temp = PyString_FromString("resolve_cmd_ident");
- if (PyObject_Cmp(temp, name, &result) == -1)
- goto cleanup;
- if (result == 0) {
- value = PyInt_FromLong(pychannel->silcobj->resolve_cmd_ident);
- goto cleanup;
- }
-
cleanup:
Py_XDECREF(temp);
if (value)
@@ -155,13 +144,12 @@ static int PySilcChannel_Compare(PyObject *self, PyObj
}
-static PyObject *PySilcKeys_New(SilcPKCS pkcs, SilcPublicKey public, SilcPrivateKey private)
+static PyObject *PySilcKeys_New(SilcPublicKey public, SilcPrivateKey private)
{
PySilcKeys *pykeys = (PySilcKeys *)PyObject_New(PySilcKeys, &PySilcKeys_Type);
if (!pykeys)
return NULL;
- pykeys->pkcs = pkcs;
pykeys->private = private;
pykeys->public = public;
@@ -171,6 +159,5 @@ static PyObject *PySilcKeys_New(SilcPKCS pkcs, SilcPub
static void PySilcKeys_Del(PyObject *object)
{
// TODO: free them properly
- //silc_pkcs_free((PySilcKeys *)object)->pkcs);
PyObject_Del(object);
}