]> granicus.if.org Git - python/commitdiff
Issue #9089: Remove references to intobject.c and intobject.h from comments.
authorMark Dickinson <dickinsm@gmail.com>
Sun, 27 Jun 2010 18:19:09 +0000 (18:19 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 27 Jun 2010 18:19:09 +0000 (18:19 +0000)
Include/longobject.h
Modules/xxmodule.c
Objects/floatobject.c
Objects/frameobject.c

index 02bf7ef2c0dba1e3ea68d4a8f230caff1a98630b..a8dace6cc3fb8c9a1f2912fd3eb5ed175a5b88ea 100644 (file)
@@ -58,7 +58,7 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
 #error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)"
 #endif /* SIZEOF_PID_T */
 
-/* For use by intobject.c only */
+/* Used by Python/mystrtoul.c. */
 PyAPI_DATA(unsigned char) _PyLong_DigitValue[256];
 
 /* _PyLong_Frexp returns a double x and an exponent e such that the
index 92c7673df9732fcbc25415d455e80aaf14a0582c..a8a93606d78cb69feb8222a086349b9cae119940 100644 (file)
@@ -10,7 +10,7 @@
    your own types of attributes instead.  Maybe you want to name your
    local variables other than 'self'.  If your object type is needed in
    other files, you'll have to create a file "foobarobject.h"; see
-   intobject.h for an example. */
+   floatobject.h for an example. */
 
 /* Xxo objects */
 
index 9f94003184376f4835b3d036284228f512dcaa49..a2c281eaf8b5336836c954d170726d7aa8a1c27f 100644 (file)
 extern int finite(double);
 #endif
 
-/* Special free list -- see comments for same code in intobject.c. */
+/* Special free list
+
+   Since some Python programs can spend much of their time allocating
+   and deallocating floats, these operations should be very fast.
+   Therefore we use a dedicated allocation scheme with a much lower
+   overhead (in space and time) than straight malloc(): a simple
+   dedicated free list, filled when necessary with memory from malloc().
+
+   block_list is a singly-linked list of all PyFloatBlocks ever allocated,
+   linked via their next members.  PyFloatBlocks are never returned to the
+   system before shutdown (PyFloat_Fini).
+
+   free_list is a singly-linked list of available PyFloatObjects, linked
+   via abuse of their ob_type members.
+*/
+
 #define BLOCK_SIZE      1000    /* 1K less typical malloc overhead */
 #define BHEAD_SIZE      8       /* Enough for a 64-bit pointer */
 #define N_FLOATOBJECTS  ((BLOCK_SIZE - BHEAD_SIZE) / sizeof(PyFloatObject))
index 191c6b622f5c90a5dc5241232923191a0260bb48..10fb8b350eb2af13a04401e00eaaf9a926a46ea2 100644 (file)
@@ -391,7 +391,7 @@ static PyGetSetDef frame_getsetlist[] = {
        the local variables in f_localsplus are NULL.
 
    2. We also maintain a separate free list of stack frames (just like
-   integers are allocated in a special way -- see intobject.c).  When
+   floats are allocated in a special way -- see floatobject.c).  When
    a stack frame is on the free list, only the following members have
    a meaning:
     ob_type             == &Frametype