Description: Like CPython, the built-in module should be "_struct", imported
Author: Armin Rigo <arigo@tunes.org>
Last-Update: 2014-05-12
Origin: upstream, https://bitbucket.org/pypy/pypy/commits/23822194f49716ad98b58519a706b5e31a4600fe

--- a/pypy/module/struct/__init__.py
+++ b/pypy/module/struct/__init__.py
@@ -45,6 +45,8 @@
 
 The variable struct.error is an exception raised on errors."""
 
+    applevel_name = "_struct"
+
     interpleveldefs = {
         'error': 'interp_struct.get_error(space)',
 
@@ -55,6 +57,7 @@
         'unpack_from': 'interp_struct.unpack_from',
 
         'Struct': 'interp_struct.W_Struct',
+        '_clearcache': 'interp_struct.clearcache',
     }
 
     appleveldefs = {
--- a/pypy/module/struct/interp_struct.py
+++ b/pypy/module/struct/interp_struct.py
@@ -138,3 +138,6 @@
     pack_into=interp2app(W_Struct.descr_pack_into),
     unpack_from=interp2app(W_Struct.descr_unpack_from),
 )
+
+def clearcache(space):
+    """No-op on PyPy"""
