[pypy-svn] r48905 - pypy/branch/new-genc-tests-wrapper/pypy/rlib
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Nov 21 15:56:56 CET 2007
Author: cfbolz
Date: Wed Nov 21 15:56:54 2007
New Revision: 48905
Modified:
pypy/branch/new-genc-tests-wrapper/pypy/rlib/rmarshal.py
Log:
add another way to construct a marshaller directly from an annotation
Modified: pypy/branch/new-genc-tests-wrapper/pypy/rlib/rmarshal.py
==============================================================================
--- pypy/branch/new-genc-tests-wrapper/pypy/rlib/rmarshal.py (original)
+++ pypy/branch/new-genc-tests-wrapper/pypy/rlib/rmarshal.py Wed Nov 21 15:56:54 2007
@@ -23,6 +23,11 @@
with new data when the marshaller is called.
"""
s_obj = annotation(type, None)
+ return _get_marshaller_s_obj(s_obj)
+get_marshaller._annspecialcase_ = 'specialize:memo'
+
+
+def _get_marshaller_s_obj(s_obj):
try:
# look for a marshaller in the 'dumpers' list
return find_dumper(s_obj)
@@ -30,7 +35,6 @@
# ask the annotation to produce an appropriate dumper
pair(_tag, s_obj).install_marshaller()
return find_dumper(s_obj)
-get_marshaller._annspecialcase_ = 'specialize:memo'
def get_loader(type):
s_obj = annotation(type, None)
More information about the Pypy-commit
mailing list