[pypy-svn] r31094 - in pypy/dist/pypy/translator/cli: . src

antocuni at codespeak.net antocuni at codespeak.net
Mon Aug 7 10:41:27 CEST 2006


Author: antocuni
Date: Mon Aug  7 10:41:21 2006
New Revision: 31094

Modified:
   pypy/dist/pypy/translator/cli/cts.py
   pypy/dist/pypy/translator/cli/src/pypylib.cs
Log:
Do not longer use the WeakRef workaround because the mono bug has been
solved.



Modified: pypy/dist/pypy/translator/cli/cts.py
==============================================================================
--- pypy/dist/pypy/translator/cli/cts.py	(original)
+++ pypy/dist/pypy/translator/cli/cts.py	Mon Aug  7 10:41:21 2006
@@ -16,8 +16,7 @@
 log = py.log.Producer("cli") 
 py.log.setconsumer("cli", ansi_log) 
 
-#WEAKREF = '[mscorlib]System.WeakReference'
-WEAKREF = '[pypylib]pypy.runtime.WeakReference'
+WEAKREF = '[mscorlib]System.WeakReference'
 PYPY_LIST = '[pypylib]pypy.runtime.List`1<%s>'
 PYPY_LIST_OF_VOID = '[pypylib]pypy.runtime.ListOfVoid'
 PYPY_DICT = '[pypylib]pypy.runtime.Dict`2<%s, %s>'

Modified: pypy/dist/pypy/translator/cli/src/pypylib.cs
==============================================================================
--- pypy/dist/pypy/translator/cli/src/pypylib.cs	(original)
+++ pypy/dist/pypy/translator/cli/src/pypylib.cs	Mon Aug  7 10:41:21 2006
@@ -117,28 +117,6 @@
         }
     }
 
-    // this is a simple wrapper around System.WeakReference, whose
-    // interface is the same as here. This is a workaround for a Mono
-    // bug that causes a crash when calling set_Target.
-    public class WeakReference
-    {
-        System.WeakReference weakref;
-        public WeakReference(object obj)
-        {
-            set_Target(obj);
-        }
-
-        public virtual void set_Target(object obj)
-        {
-            this.weakref = new System.WeakReference(obj);
-        }
-
-        public virtual object get_Target()
-        {
-            return this.weakref.Target;
-        }
-    }
-
     public class StringBuilder
     {
         System.Text.StringBuilder builder = new System.Text.StringBuilder();



More information about the Pypy-commit mailing list