[pypy-svn] r46969 - pypy/dist/pypy/module/md5
arigo at codespeak.net
arigo at codespeak.net
Thu Sep 27 18:51:45 CEST 2007
Author: arigo
Date: Thu Sep 27 18:51:39 2007
New Revision: 46969
Modified:
pypy/dist/pypy/module/md5/interp_md5.py
Log:
Checking this in, but I'm not getting why annotation fails...
Modified: pypy/dist/pypy/module/md5/interp_md5.py
==============================================================================
--- pypy/dist/pypy/module/md5/interp_md5.py (original)
+++ pypy/dist/pypy/module/md5/interp_md5.py Thu Sep 27 18:51:39 2007
@@ -14,6 +14,9 @@
self._init()
self.update(initialdata)
+ def update_w(self, string):
+ self.update(string)
+
def digest_w(self):
return self.space.wrap(self.digest())
@@ -32,16 +35,15 @@
md5 = space.interp_w(W_MD5, w_md5)
W_MD5.__init__(md5, space, initialdata)
return w_md5
-W_MD5___new__.unwrap_spec = [ObjSpace, W_Root, str]
W_MD5.typedef = TypeDef(
'MD5Type',
- __new__ = interp2app(W_MD5___new__),
- update = interp2app(W_MD5.update, unwrap_spec=['self', str]),
- digest = interp2app(W_MD5.digest_w),
- hexdigest = interp2app(W_MD5.hexdigest_w),
- copy = interp2app(W_MD5.copy_w),
+ __new__ = interp2app(W_MD5___new__, unwrap_spec=[ObjSpace, W_Root, str]),
+ update = interp2app(W_MD5.update_w, unwrap_spec=['self', str]),
+ digest = interp2app(W_MD5.digest_w, unwrap_spec=['self']),
+ hexdigest = interp2app(W_MD5.hexdigest_w, unwrap_spec=['self']),
+ copy = interp2app(W_MD5.copy_w, unwrap_spec=['self']),
__doc__ = """md5(arg) -> return new md5 object.
If arg is present, the method call update(arg) is made.""")
More information about the Pypy-commit
mailing list