Boost logo

Boost :

Subject: [boost] Fwd: bug fix in boost/libs/python/pyste/src/Pyste/declarations.py
From: $B (zhou_at_[hidden])
Date: 2009-06-18 20:23:58


Hi,

I was unable to reach Dave, and
https://svn.boost.org/trac/boost/newticket doesn't work for me.
("Secure Connection Failed").

So I'm posting here, can anyone take a look this? thanks.

---------- Forwarded message ----------
From: YuQian Zhou ($B<~1'A0(B) <zhou_at_[hidden]>
Date: 2009/6/15
Subject: Fwd: bug fix in boost/libs/python/pyste/src/Pyste/declarations.py
To: dave_at_[hidden]

Hi Dave,

Can you tell me where I should submit this change?

Thanks.

---------- Forwarded message ----------
From: Bruno Oliveira <nicoddemus_at_[hidden]>
Date: 2009/6/15
Subject: Re: bug fix in boost/libs/python/pyste/src/Pyste/declarations.py
To: "YuQian Zhou ($B<~1'A0(B)" <zhou_at_[hidden]>

Hi YuQian,
Unfortunately I don't maintain Pyste anymore; I advise you to send
this fix to the boost-python list, since I don't have commit
privileges anymore (I think).
Best Regards,

On Mon, Jun 15, 2009 at 5:32 PM, YuQian Zhou ($B<~1'A0(B) <zhou_at_[hidden]> wrote:
>
> Hi Bruno,
>
> I found a bug in boost/libs/python/pyste/src/Pyste/declarations.py (I
> tried the latest version (Version 1.39.0) from boost.org, it has the
> same bug.)
>
> The bug is: when paring an anonymous struct, the name passed to a
> Declaration object is None, then on
> libs/python/pyste/src/Pyste/GCCXMLParser.py: line 57
>
> def AddDecl(self, decl):
> if decl.FullName() in self._names:
>
> The call to FullName() will concatenate name, line 53:
>
> return namespace + self.name
>
> TypeError: cannot concatenate 'str' and 'NoneType' objects
>
> I made a fix below, please let me know if it's correct, and you can
> include in the release.
>
> Thanks.
>
> YuQian
>
> Below is a test file:
>
> $ cat test.h
>
> typedef int __jmp_buf;
>
> typedef struct
> {
> struct
> {
> __jmp_buf __cancel_jmp_buf;
> int __mask_was_saved;
> } __cancel_jmp_buf[1];
> void *__pad[4];
> } __pthread_unwind_buf_t __attribute__ ((__aligned__));
>
>
> here is the diff of libs/python/pyste/src/Pyste/declarations.py
>
> 16d15
> < _anonymous_name_counter = 0
> 33,36d31
> < global _anonymous_name_counter
> < if name is None:
> < name = 'anonymous_name_%s' % _anonymous_name_counter
> < _anonymous_name_counter += 1


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk