|
42 | 42 |
|
43 | 43 | @__graalpython__.builtin
|
44 | 44 | def _clearcache(*args):
|
45 |
| - import _cpython__struct |
46 |
| - return _cpython__struct.clearcache(*args) |
| 45 | + import _cpython_struct |
| 46 | + return _cpython_struct.clearcache(*args) |
47 | 47 |
|
48 | 48 |
|
49 | 49 | @__graalpython__.builtin
|
50 | 50 | def calcsize(fmt):
|
51 |
| - import _cpython__struct |
52 |
| - return _cpython__struct.calcsize(fmt) |
| 51 | + import _cpython_struct |
| 52 | + return _cpython_struct.calcsize(fmt) |
53 | 53 |
|
54 | 54 |
|
55 | 55 | @__graalpython__.builtin
|
56 | 56 | def iter_unpack(fmt, buffer):
|
57 |
| - import _cpython__struct |
58 |
| - return _cpython__struct.calcsize(fmt, buffer) |
| 57 | + import _cpython_struct |
| 58 | + return _cpython_struct.calcsize(fmt, buffer) |
59 | 59 |
|
60 | 60 |
|
61 | 61 | @__graalpython__.builtin
|
62 | 62 | def pack(fmt, *vals):
|
63 |
| - import _cpython__struct |
64 |
| - return _cpython__struct.pack(fmt, *vals) |
| 63 | + import _cpython_struct |
| 64 | + return _cpython_struct.pack(fmt, *vals) |
65 | 65 |
|
66 | 66 |
|
67 | 67 | @__graalpython__.builtin
|
68 | 68 | def pack_into(fmt, buffer, offset, *vals):
|
69 |
| - import _cpython__struct |
70 |
| - return _cpython__struct.pack_into(fmt, buffer, offset, *vals) |
| 69 | + import _cpython_struct |
| 70 | + return _cpython_struct.pack_into(fmt, buffer, offset, *vals) |
71 | 71 |
|
72 | 72 |
|
73 | 73 | @__graalpython__.builtin
|
74 | 74 | def unpack(fmt, *vals):
|
75 |
| - import _cpython__struct |
76 |
| - return _cpython__struct.unpack(fmt, *vals) |
| 75 | + import _cpython_struct |
| 76 | + return _cpython_struct.unpack(fmt, *vals) |
77 | 77 |
|
78 | 78 |
|
79 | 79 | @__graalpython__.builtin
|
80 | 80 | def unpack_from(fmt, buffer, offset=0):
|
81 |
| - import _cpython__struct |
82 |
| - return _cpython__struct.unpack_from(fmt, buffer, offset=offset) |
| 81 | + import _cpython_struct |
| 82 | + return _cpython_struct.unpack_from(fmt, buffer, offset=offset) |
83 | 83 |
|
84 | 84 |
|
85 | 85 | # error and Struct
|
86 | 86 | def __getattr__(name):
|
87 | 87 | if name in ['error', 'Struct']:
|
88 |
| - import _cpython__struct |
89 |
| - return __getattr__(_cpython__struct, name) |
| 88 | + import _cpython_struct |
| 89 | + return __getattr__(_cpython_struct, name) |
90 | 90 | raise AttributeError("module {} has no attribute {}".format(__name__, name))
|
91 | 91 |
|
92 | 92 |
|
93 |
| -__graalpython__.import_this_as_module("_struct") |
| 93 | +__graalpython__.import_current_as_named_module("_struct") |
0 commit comments