36a68bc530
* lang/python/helpers.c (pyPassphraseCb): Use gpgme_io_writen. (_gpg_interact_cb): Ditto. * lang/python/helpers.h (write) [W32]: Remove bad write macro. -- GnuPG-bug-id: T6501 Using write(2) without checking for EINTR is a not a good idea. Futher gpgme_io_writen is the correct way to send data from a callback. This also fixed the wrong use of a simple macro for Windows.
39 lines
1.4 KiB
C
39 lines
1.4 KiB
C
/*
|
|
# Copyright (C) 2016 g10 Code GmbH
|
|
# Copyright (C) 2004 Igor Belyi <belyi@users.sourceforge.net>
|
|
# Copyright (C) 2002 John Goerzen <jgoerzen@complete.org>
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
#
|
|
# This library 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
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this library; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <gpgme.h>
|
|
#include "Python.h"
|
|
|
|
/* Flag specifying whether this is an in-tree build. */
|
|
extern int gpg_in_tree_build;
|
|
|
|
PyObject *gpg_raise_callback_exception(PyObject *self);
|
|
|
|
PyObject *gpg_set_passphrase_cb(PyObject *self, PyObject *cb);
|
|
PyObject *gpg_set_progress_cb(PyObject *self, PyObject *cb);
|
|
PyObject *gpg_set_status_cb(PyObject *self, PyObject *cb);
|
|
|
|
PyObject *gpg_data_new_from_cbs(PyObject *self, PyObject *pycbs,
|
|
gpgme_data_t *r_data);
|