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


Groups > comp.lang.python > #55339

Re: PyDoc_STRVAR error in msvc compile

From Robin Becker <robin@reportlab.com>
Subject Re: PyDoc_STRVAR error in msvc compile
Date 2013-10-02 14:46 +0100
References (2 earlier) <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>
Newsgroups comp.lang.python
Message-ID <mailman.628.1380721610.18130.python-list@python.org> (permalink)

Show all headers | 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