Author: Armin Rigo <[email protected]>
Branch:
Changeset: r77330:2599e4049ec8
Date: 2015-05-15 11:09 +0200
http://bitbucket.org/pypy/pypy/changeset/2599e4049ec8/
Log: Add an underscore in front of functions that are not meant to be
exposed
diff --git a/rpython/rlib/rawstorage.py b/rpython/rlib/rawstorage.py
--- a/rpython/rlib/rawstorage.py
+++ b/rpython/rlib/rawstorage.py
@@ -19,9 +19,9 @@
def raw_storage_getitem(TP, storage, index):
"NOT_RPYTHON"
_check_alignment(TP, index)
- return raw_storage_getitem_unchecked(TP, storage, index)
+ return _raw_storage_getitem_unchecked(TP, storage, index)
-def raw_storage_getitem_unchecked(TP, storage, index):
+def _raw_storage_getitem_unchecked(TP, storage, index):
"NOT_RPYTHON"
return rffi.cast(rffi.CArrayPtr(TP), rffi.ptradd(storage, index))[0]
@@ -29,9 +29,9 @@
"NOT_RPYTHON"
TP = lltype.typeOf(item)
_check_alignment(TP, index)
- raw_storage_setitem_unchecked(storage, index, item)
+ _raw_storage_setitem_unchecked(storage, index, item)
-def raw_storage_setitem_unchecked(storage, index, item):
+def _raw_storage_setitem_unchecked(storage, index, item):
"NOT_RPYTHON"
TP = lltype.typeOf(item)
rffi.cast(rffi.CArrayPtr(TP), rffi.ptradd(storage, index))[0] = item
@@ -80,13 +80,13 @@
if we_are_translated():
return raw_storage_getitem(TP, storage, index)
else:
- return raw_storage_getitem_unchecked(TP, storage, index)
+ return _raw_storage_getitem_unchecked(TP, storage, index)
mask = _get_alignment_mask(TP)
if (index & mask) == 0:
if we_are_translated():
return raw_storage_getitem(TP, storage, index)
else:
- return raw_storage_getitem_unchecked(TP, storage, index)
+ return _raw_storage_getitem_unchecked(TP, storage, index)
ptr = rffi.ptradd(storage, index)
with lltype.scoped_alloc(rffi.CArray(TP), 1) as s_array:
rffi.c_memcpy(rffi.cast(rffi.VOIDP, s_array),
@@ -100,7 +100,7 @@
if we_are_translated():
raw_storage_setitem(storage, index, item)
else:
- raw_storage_setitem_unchecked(storage, index, item)
+ _raw_storage_setitem_unchecked(storage, index, item)
return
TP = lltype.typeOf(item)
mask = _get_alignment_mask(TP)
@@ -108,7 +108,7 @@
if we_are_translated():
raw_storage_setitem(storage, index, item)
else:
- raw_storage_setitem_unchecked(storage, index, item)
+ _raw_storage_setitem_unchecked(storage, index, item)
return
ptr = rffi.ptradd(storage, index)
with lltype.scoped_alloc(rffi.CArray(TP), 1) as s_array:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit