Index: ChangeLog
from BenoƮt Perrot <benoit(a)lrde.epita.fr>
print is a python keyword
* src/inst/inst.hh, src/inst/nodes.gen.py:
(print) Rename as...
(write).
Index: src/inst/nodes.gen.py
--- src/inst/nodes.gen.py (revision 203)
+++ src/inst/nodes.gen.py (working copy)
@@ -191,12 +191,12 @@
sys.stdout = header
print """ public:
/// Print this
- virtual void\tprint(std::ostream &ostr) const;
+ virtual void\twrite(std::ostream &ostr) const;
"""
sys.stdout = impl
print """
void"""
- print " " + class_id + "::print(std::ostream &ostr) const"
+ print " " + class_id + "::write(std::ostream &ostr) const"
print " {"
s = ""
i = 0
Index: src/inst/inst.hh
--- src/inst/inst.hh (revision 203)
+++ src/inst/inst.hh (working copy)
@@ -49,7 +49,7 @@
virtual void accept (Visitor& v) = 0;
public:
- virtual void print(std::ostream&) const = 0;
+ virtual void write(std::ostream&) const = 0;
public:
format_type get_format() const
@@ -64,7 +64,7 @@
inline std::ostream&
operator<<(std::ostream& ostr, const Inst& i)
{
- i.print(ostr);
+ i.write(ostr);
return ostr;
}
Show replies by date