Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d19052c

Browse files
committed
Issue #9089: Remove references to intobject.c and intobject.h from comments.
1 parent 7ab54e4 commit d19052c

4 files changed

Lines changed: 19 additions & 4 deletions

File tree

Include/longobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
5858
#error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)"
5959
#endif /* SIZEOF_PID_T */
6060

61-
/* For use by intobject.c only */
61+
/* Used by Python/mystrtoul.c. */
6262
PyAPI_DATA(unsigned char) _PyLong_DigitValue[256];
6363

6464
/* _PyLong_Frexp returns a double x and an exponent e such that the

Modules/xxmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
your own types of attributes instead. Maybe you want to name your
1111
local variables other than 'self'. If your object type is needed in
1212
other files, you'll have to create a file "foobarobject.h"; see
13-
intobject.h for an example. */
13+
floatobject.h for an example. */
1414

1515
/* Xxo objects */
1616

Objects/floatobject.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,22 @@
2121
extern int finite(double);
2222
#endif
2323

24-
/* Special free list -- see comments for same code in intobject.c. */
24+
/* Special free list
25+
26+
Since some Python programs can spend much of their time allocating
27+
and deallocating floats, these operations should be very fast.
28+
Therefore we use a dedicated allocation scheme with a much lower
29+
overhead (in space and time) than straight malloc(): a simple
30+
dedicated free list, filled when necessary with memory from malloc().
31+
32+
block_list is a singly-linked list of all PyFloatBlocks ever allocated,
33+
linked via their next members. PyFloatBlocks are never returned to the
34+
system before shutdown (PyFloat_Fini).
35+
36+
free_list is a singly-linked list of available PyFloatObjects, linked
37+
via abuse of their ob_type members.
38+
*/
39+
2540
#define BLOCK_SIZE 1000 /* 1K less typical malloc overhead */
2641
#define BHEAD_SIZE 8 /* Enough for a 64-bit pointer */
2742
#define N_FLOATOBJECTS ((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyFloatObject))

Objects/frameobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static PyGetSetDef frame_getsetlist[] = {
391391
the local variables in f_localsplus are NULL.
392392
393393
2. We also maintain a separate free list of stack frames (just like
394-
integers are allocated in a special way -- see intobject.c). When
394+
floats are allocated in a special way -- see floatobject.c). When
395395
a stack frame is on the free list, only the following members have
396396
a meaning:
397397
ob_type == &Frametype

0 commit comments

Comments
 (0)