[pypy-svn] r60543 - pypy/extradoc/talk/ecoop2009/benchmarks

fijal at codespeak.net fijal at codespeak.net
Wed Dec 17 15:46:50 CET 2008


Author: fijal
Date: Wed Dec 17 15:46:50 2008
New Revision: 60543

Modified:
   pypy/extradoc/talk/ecoop2009/benchmarks/accumulator.cpp
Log:
now I remember...


Modified: pypy/extradoc/talk/ecoop2009/benchmarks/accumulator.cpp
==============================================================================
--- pypy/extradoc/talk/ecoop2009/benchmarks/accumulator.cpp	(original)
+++ pypy/extradoc/talk/ecoop2009/benchmarks/accumulator.cpp	Wed Dec 17 15:46:50 2008
@@ -5,8 +5,8 @@
 class Accumulator
 {
  public:
-  virtual void accumulate(int x);
-  virtual int getvalue();
+  virtual void accumulate(int x) = 0;
+  virtual int getvalue() = 0;
 };
 
 class Add : public Accumulator
@@ -18,11 +18,11 @@
     value = 0;
   }
 
-  void accumulate(int x)
+  virtual void accumulate(int x)
   {
     value += x;
   }
-  int getvalue()
+  virtual int getvalue()
   {
     return value;
   }
@@ -36,11 +36,11 @@
   {
     value = 0;
   }
-  void accumulate(int x)
+  virtual void accumulate(int x)
   {
     value++;
   }
-  int getvalue()
+  virtual int getvalue()
   {
     return value;
   }



More information about the Pypy-commit mailing list