Skip to content

Commit 122dbf1

Browse files
committed
rename function
1 parent 4ae9d0e commit 122dbf1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Include/internal/pycore_c_array.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ typedef struct {
1919
int initial_num_entries; /* initial allocation size */
2020
} _Py_c_array_t;
2121

22-
/* If idx is out of bouds:
22+
/* If idx is out of bounds:
2323
* If arr->array is NULL, allocate arr->initial_num_entries slots.
2424
* Otherwise, double its size.
2525
*
2626
* Return 0 if successful and -1 (with exception set) otherwise.
2727
*/
28-
int _Py_c_array_EnsureCapacity(_Py_c_array_t *c_array, int idx);
28+
int _Py_CArray_EnsureCapacity(_Py_c_array_t *c_array, int idx);
2929

3030

3131
#ifdef __cplusplus

Python/codegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static const int compare_masks[] = {
112112

113113

114114
int
115-
_Py_c_array_EnsureCapacity(_Py_c_array_t *c_array, int idx)
115+
_Py_CArray_EnsureCapacity(_Py_c_array_t *c_array, int idx)
116116
{
117117
void *arr = *c_array->array;
118118
int alloc = *c_array->allocated_entries;

Python/flowgraph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "Python.h"
22
#include "opcode.h"
3-
#include "pycore_c_array.h" // _Py_c_array_EnsureCapacity
3+
#include "pycore_c_array.h" // _Py_CArray_EnsureCapacity
44
#include "pycore_flowgraph.h"
55
#include "pycore_compile.h"
66
#include "pycore_intrinsics.h"
@@ -149,7 +149,7 @@ basicblock_next_instr(basicblock *b)
149149
.initial_num_entries = DEFAULT_BLOCK_SIZE,
150150
};
151151

152-
RETURN_IF_ERROR(_Py_c_array_EnsureCapacity(&array, b->b_iused + 1));
152+
RETURN_IF_ERROR(_Py_CArray_EnsureCapacity(&array, b->b_iused + 1));
153153
return b->b_iused++;
154154
}
155155

Python/instruction_sequence.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "Python.h"
99

10-
#include "pycore_c_array.h" // _Py_c_array_EnsureCapacity
10+
#include "pycore_c_array.h" // _Py_CArray_EnsureCapacity
1111
#include "pycore_compile.h" // _PyInstruction
1212
#include "pycore_opcode_utils.h"
1313
#include "pycore_opcode_metadata.h" // OPCODE_HAS_ARG, etc
@@ -45,7 +45,7 @@ instr_sequence_next_inst(instr_sequence *seq) {
4545
.initial_num_entries = INITIAL_INSTR_SEQUENCE_SIZE,
4646
};
4747

48-
RETURN_IF_ERROR(_Py_c_array_EnsureCapacity(&array, seq->s_used + 1));
48+
RETURN_IF_ERROR(_Py_CArray_EnsureCapacity(&array, seq->s_used + 1));
4949

5050
assert(seq->s_allocated >= 0);
5151
assert(seq->s_used < seq->s_allocated);
@@ -70,7 +70,7 @@ _PyInstructionSequence_UseLabel(instr_sequence *seq, int lbl)
7070
.initial_num_entries = INITIAL_INSTR_SEQUENCE_LABELS_MAP_SIZE,
7171
};
7272

73-
RETURN_IF_ERROR(_Py_c_array_EnsureCapacity(&array, lbl));
73+
RETURN_IF_ERROR(_Py_CArray_EnsureCapacity(&array, lbl));
7474

7575
for(int i = old_size; i < seq->s_labelmap_size; i++) {
7676
seq->s_labelmap[i] = -111; /* something weird, for debugging */

0 commit comments

Comments
 (0)