Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92327

Re: Embedded Python and C Callback functions

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'debug': 0.04; 'subject:Python': 0.05; 'tries': 0.05; '*);': 0.09; 'indicates': 0.09; 'objects.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '*v;': 0.16; 'expects': 0.16; 'pyobject': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'trying': 0.22; 'null)': 0.22; 'object.': 0.22; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'parameters': 0.27; "i'm": 0.29; 'objects': 0.29; 'error.': 0.31; 'wrong': 0.35; 'to:addr:python- list': 0.35; 'expected': 0.35; 'should': 0.37; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'received:org': 0.38; 'goes': 0.39; 'to:addr:python.org': 0.39; 'received:de': 0.40; 'received:217': 0.61; 'email addr:gmail.com': 0.64; 'when:': 0.66
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: Embedded Python and C Callback functions
Date Mon, 08 Jun 2015 07:44:52 +0200
References <daad7377-7a61-4e9e-a442-4ba48f7212b2@googlegroups.com> <mailman.229.1433656976.13271.python-list@python.org> <3726dccc-76cb-45a2-b0a8-e41ef300be96@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Gmane-NNTP-Posting-Host pd9e0a03c.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:PM9elbnrRlQHB4kOPXniFH9byxk=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.290.1433742309.13271.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433742309 news.xs4all.nl 2868 [2001:888:2000:d::a6]:51046
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92327

Show key headers only | View raw


doc.mefisto@gmail.com writes:

> I'm trying to debug and find my error. It goes wrong when:
>  PyObject *v;
>             v = va_arg(*p_va, PyObject *);
>             if (v != NULL) {
>                 if (*(*p_format - 1) != 'N')
>                     Py_INCREF(v);
>             }
>
> it tries to PyINCREF to my passed callback.

This indicates that it expects the "callback" to be a Python object.

Check the C-API specification. It should tell you which parameters
are expected to be Python objects and which C objects.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Embedded Python and C Callback functions doc.mefisto@gmail.com - 2015-06-06 11:09 -0700
  Re: Embedded Python and C Callback functions dieter <dieter@handshake.de> - 2015-06-07 08:02 +0200
    Re: Embedded Python and C Callback functions doc.mefisto@gmail.com - 2015-06-07 01:37 -0700
    Re: Embedded Python and C Callback functions doc.mefisto@gmail.com - 2015-06-07 01:56 -0700
      Re: Embedded Python and C Callback functions Laura Creighton <lac@openend.se> - 2015-06-07 11:49 +0200
        Re: Embedded Python and C Callback functions doc.mefisto@gmail.com - 2015-06-07 02:51 -0700
      Re: Embedded Python and C Callback functions Stefan Behnel <stefan_ml@behnel.de> - 2015-06-07 22:32 +0200
    Re: Embedded Python and C Callback functions doc.mefisto@gmail.com - 2015-06-07 02:15 -0700
      Re: Embedded Python and C Callback functions dieter <dieter@handshake.de> - 2015-06-08 07:44 +0200

csiph-web