Here's a message from a user who had his email bounce because he's not  
signed up to the list.

> From: Denys Duchier <[email protected]>
> Subject: AttributeError: 'CppClassScope' object has no attribute  
> 'add_include_file'
> To: [email protected]
> Date: Sat, 08 May 2010 20:56:50 +0200
>
> not sure where to submit this bug report/fix, so here goes:
>
> I am using cython-devel, and "extern +" annotations on methods of a
> "cdef cppclass" declaration dont currently compile due to the  
> following
> error:
>
>  File "/home/denys/lib/python/Cython/Compiler/Nodes.py", line 575,  
> in analyse
>    env.add_include_file('stdexcept')
> AttributeError: 'CppClassScope' object has no attribute  
> 'add_include_file'
>
> I managed to make it compile happily with the following patch:
>
> diff -r 85ae5e1b7fb9 Cython/Compiler/Symtab.py
> --- a/Cython/Compiler/Symtab.py       Thu May 06 08:27:37 2010 +0200
> +++ b/Cython/Compiler/Symtab.py       Sat May 08 20:44:51 2010 +0200
> @@ -643,6 +643,9 @@
>         else:
>             return outer.is_cpp()
>
> +    def add_include_file(self, filename):
> +        self.outer_scope.add_include_file(filename)
> +
> class PreImportScope(Scope):
>
>     namespace_cname = Naming.preimport_cname
>
> Cheers,
>
> --Denys
> ----------

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to