Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4443
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <airween@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.021 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'exception,': 0.07; 'question:': 0.09; 'debugging': 0.14; '"error",': 0.16; '>it': 0.16; 'objects?': 0.16; 'printf': 0.16; 'subject:() ': 0.16; 'thanks,': 0.17; 'stuff': 0.18; 'exists': 0.19; 'obviously': 0.20; 'seems': 0.21; 'header:In-Reply-To:1': 0.22; 'gregory': 0.23; 'here?': 0.23; 'guess': 0.26; 'there.': 0.26; "i'll": 0.26; 'object': 0.27; 'looks': 0.28; 'skip:p 30': 0.29; '(as': 0.29; '>and': 0.31; 'does': 0.31; 'it.': 0.31; 'to:addr:python-list': 0.32; 'done': 0.32; 'thank': 0.32; 'sorry': 0.33; 'module': 0.33; 'reference': 0.34; 'there': 0.35; 'header:User-Agent:1': 0.35; 'point': 0.35; 'hello,': 0.36; 'think': 0.36; 'problem.': 0.36; 'enough': 0.37; 'some': 0.37; 'should': 0.37; 'but': 0.38; 'happens': 0.38; 'docs': 0.39; 'ok,': 0.39; 'to:addr:python.org': 0.39; 'where': 0.39; 'how': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'received:86': 0.60; 'here': 0.65; 'received:hu': 0.84; 'safer': 0.95 |
| X-Spam-Score | -1.347 |
| X-Spam-Level | |
| X-Spam-Status | No, score=-1.347 tagged_above=-20 required=4 tests=[AWL=0.022, BAYES_00=-2.599, DNS_FROM_OPENWHOIS=1.13, RDNS_NONE=0.1] |
| Date | Mon, 2 May 2011 08:41:14 +0200 |
| From | Hegedüs, Ervin <airween@gmail.com> |
| To | python-list@python.org |
| Subject | Re: Py_INCREF() incomprehension |
| References | <mailman.830.1303811297.9059.python-list@python.org> <ip6dc5$m7d$1@r03.glglgl.eu> <mailman.839.1303826380.9059.python-list@python.org> <ip6qmr$50j$1@r03.glglgl.eu> <mailman.851.1303838890.9059.python-list@python.org> <ip70b8$3lv$1@r03.glglgl.eu> <mailman.858.1303843478.9059.python-list@python.org> <ip8pc1$qb8$1@r03.glglgl.eu> <mailman.1044.1304280052.9059.python-list@python.org> <ipkvmd$cu5$1@r03.glglgl.eu> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| In-Reply-To | <ipkvmd$cu5$1@r03.glglgl.eu> |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1059.1304318485.9059.python-list@python.org> (permalink) |
| Lines | 52 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1304318485 news.xs4all.nl 81482 [::ffff:82.94.164.166]:42812 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:4443 |
Show key headers only | View raw
hello, Thomas, Gregory, thank you for your ansrwers, > I guess this is the point where yo should start printf programing. oh', already done :) > * What happens during module initialization? successfully initialized, > * What happens n the functions? > * Where does the stuff fail? > * What are the reference counts of the involved objects? sorry for the dumb question: how can I controll number of reference in C? > > PyModule_AddObject(o, "error", cibcrypt_error_nokey); > > Py_INCREF(cibcrypt_error_nokey); > > > >and now if there is some expected exception, I get it. > > >Any explanation? > > I don't have one - I would think that if the module object exists > for all the time, it would be enough to have one reference there. > > But obviously it is not enough - did you at any time del something > related to here? The module or one of its attributes? > > Anyway, it seems safer to do INCREF here - so do it. (As Gregory > already stated - it looks cleaner if you do INCREF before > AddObject.) ok, > > >ps: this is just for my passion, but I would like to understand > >it very-very much :) > > Understandable. That's that the printf debugging of the refcounts > can be good for - even if you don't really have a problem. thanks, I'll go to read the docs :) bye: a.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Py_INCREF() incomprehension Ervin Hegedüs <airween@gmail.com> - 2011-04-26 11:48 +0200
Re: Py_INCREF() incomprehension Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-26 14:23 +0200
Re: Py_INCREF() incomprehension Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-26 14:21 +0200
Re: Py_INCREF() incomprehension Hegedüs Ervin <airween@gmail.com> - 2011-04-26 16:03 +0200
Re: Py_INCREF() incomprehension Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-26 18:08 +0200
Re: Py_INCREF() incomprehension Hegedüs Ervin <airween@gmail.com> - 2011-04-26 19:28 +0200
Re: Py_INCREF() incomprehension Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-26 19:45 +0200
Re: Py_INCREF() incomprehension Hegedüs Ervin <airween@gmail.com> - 2011-04-26 20:44 +0200
Re: Py_INCREF() incomprehension Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-27 11:58 +0200
Re: Py_INCREF() incomprehension Hegedüs Ervin <airween@gmail.com> - 2011-05-01 22:00 +0200
Re: Py_INCREF() incomprehension Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-02 10:48 +1200
Re: Py_INCREF() incomprehension Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-05-02 02:59 +0200
Re: Py_INCREF() incomprehension Hegedüs, Ervin <airween@gmail.com> - 2011-05-02 08:41 +0200
Re: Py_INCREF() incomprehension Stefan Behnel <stefan_ml@behnel.de> - 2011-05-02 09:07 +0200
csiph-web