ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] Pyste bug: const data not made read only
by Nicodemus other posts by this author
Oct 23 2003 2:26PM messages near this date
[C++-sig] Pyste bug: const data not made read only | [C++-sig] Can I import a module in C++ and use in python script ?
Hi Niall, sorry about the delay (I was out of town),

Niall Douglas wrote:

> In a class which has:
> 
> static const type variable;
> 
> ... pyste is outputting def_readwrite() where it should be outputting 
> def_readonly(). The def_readwrite() fails to compile (correctly) and 
> so until changed public data members like this are a problem.
> 

Can you post a reproductible case? I tried to reproduce this bug, 
however the generated code seems correct:

struct A
{
    static const int variable;
};

Generates:

    class_< A > ("A", init<  >())
        .def(init< const A& > ())
        .def_readonly("variable", &A::variable)
    ;

Regards,
Nicodemus.


_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Niall Douglas
Nicodemus

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved