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


Groups > comp.lang.python > #55339

Re: PyDoc_STRVAR error in msvc compile

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:error': 0.03; 'url:bitbucket': 0.05; 'string': 0.09; 'highlighting': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'cc:addr :python-list': 0.11; '.........': 0.16; 'bitbucket': 0.16; 'conditional': 0.16; 'parameters,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'properly': 0.19; 'url:default': 0.19; 'later': 0.20; 'seems': 0.21; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'define': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; "doesn't": 0.30; "i'm": 0.30; 'code': 0.31; 'lines': 0.31; 'that.': 0.31; 'apparently': 0.31; 'gcc': 0.31; 'actual': 0.34; 'maybe': 0.34; 'problem.': 0.35; 'editor': 0.35; 'etc': 0.35; 'there': 0.35; "didn't": 0.36; "i'll": 0.36; 'url:org': 0.36; 'too': 0.37; 'to:addr:python-list': 0.38; 'use.': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'skip:u 10': 0.60; 'dave': 0.60; "you're": 0.61; 'url:c': 0.67; 'legal': 0.71; 'internet': 0.71; 'received:109': 0.72; 'done;': 0.84; 'pasting': 0.84; 'sfxlen:4': 0.84; 'angel': 0.91; 'pfxlen:big': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Robin Becker <robin@reportlab.com>
Subject Re: PyDoc_STRVAR error in msvc compile
Date Wed, 02 Oct 2013 14:46:36 +0100
References <524AFB57.9090500@chamonix.reportlab.co.uk> <524B05B7.4060906@mrabarnett.plus.com> <524BE099.8040004@chamonix.reportlab.co.uk> <524BEEFD.50202@chamonix.reportlab.co.uk> <l2gto9$in1$1@ger.gmane.org> <524C035F.6030000@chamonix.reportlab.co.uk> <l2h25c$75m$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Cc python-list@python.org
X-Gmane-NNTP-Posting-Host 109.174.168.73
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
In-Reply-To <l2h25c$75m$1@ger.gmane.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.628.1380721610.18130.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1380721610 news.xs4all.nl 15991 [2001:888:2000:d::a6]:58607
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:55339

Show key headers only | View raw


On 02/10/2013 13:05, Dave Angel wrote:
> On 2/10/2013 07:28, Robin Becker wrote:
>
>
>> The actual is this code from _renderPM.c
>>
>> https://bitbucket.org/rptlab/reportlab/src/fa65fe72b6c2aaecb7747bf14884adb996d8e87f/src/rl_addons/renderPM/_renderPM.c?at=default
>>
........
>> at the end of the lines etc etc.
>
> Unfortunately, bitbucket doesn't properly support highlighting either,
> so I had to copy/paste it into an editor to check for extra spaces.
> That's apparently not your problem.
>
> What I didn't understand before is that PyDoc_STRVAR is a macro, not a
> function.  And inside the macro's parameters, you're trying to define an
> #ifdef.  i don't think Microsoft supports that.
>
> If I'm right, you need to separate out the conditional string
> concatenation from the macro expansion.  it's been too long for me even
> to remember the correct way to do that.  There are some legal tricks you
> can use.  Maybe search the internet for "preprocessor stringizing".
.

that's what I have done; it seems to work OK for MSVC and I'll have to check 
later if it breaks GCC or if I need to do token pasting or something.
-- 
Robin Becker

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


Thread

Re: PyDoc_STRVAR error in msvc compile Robin Becker <robin@reportlab.com> - 2013-10-02 14:46 +0100

csiph-web