diff options
| author | Justus Winter <[email protected]> | 2016-06-14 10:37:26 +0000 | 
|---|---|---|
| committer | Justus Winter <[email protected]> | 2016-06-16 12:19:17 +0000 | 
| commit | 6641c7814b30e3e8f18105b2636545cc1bd07552 (patch) | |
| tree | 5d4eaa422fd3346dfc9c704750a536777c40fb15 /lang/python/helpers.c | |
| parent | python: Rework callbacks. (diff) | |
| download | gpgme-6641c7814b30e3e8f18105b2636545cc1bd07552.tar.gz gpgme-6641c7814b30e3e8f18105b2636545cc1bd07552.zip | |
python: Simplify wrapping glue.
* lang/python/pyme/core.py: Rename '_getctype' to '_ctype' and turn it
  into a string.  Likewise rename '_getnameprepend' to '_cprefix'.
* lang/python/helpers.c: Adapt accordingly.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/helpers.c')
| -rw-r--r-- | lang/python/helpers.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/lang/python/helpers.c b/lang/python/helpers.c index 5380ff26..6de2b8de 100644 --- a/lang/python/helpers.c +++ b/lang/python/helpers.c @@ -171,7 +171,7 @@ PyObject *  object_to_gpgme_t(PyObject *input, const char *objtype, int argnum)  {    PyObject *pyname = NULL, *pypointer = NULL; -  pyname = PyObject_CallMethod(input, "_getctype", NULL); +  pyname = PyObject_GetAttrString(input, "_ctype");    if (pyname && PyUnicode_Check(pyname))      {        if (strcmp(PyUnicode_AsUTF8(pyname), objtype) != 0) @@ -261,7 +261,7 @@ object_to_gpgme_data_t(PyObject *input, int argnum, gpgme_data_t *wrapper,      }    /* As last resort we assume it is a wrapped data object.  */ -  if (PyObject_HasAttrString(data, "_getctype")) +  if (PyObject_HasAttrString(data, "_ctype"))      return object_to_gpgme_t(data, "gpgme_data_t", argnum);    return PyErr_Format(PyExc_TypeError, | 
