<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Include/intobject.h, branch v2.7rc2</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>- Issue #2862: Make int and float freelist management consistent with other</title>
<updated>2008-07-06T03:35:58+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@mad-scientist.com</email>
</author>
<published>2008-07-06T03:35:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2fe77060eb2b322da925b50ffe3c471258736cee'/>
<id>2fe77060eb2b322da925b50ffe3c471258736cee</id>
<content type='text'>
  freelists.  Changes their CompactFreeList apis into ClearFreeList apis and
  calls them via gc.collect().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  freelists.  Changes their CompactFreeList apis into ClearFreeList apis and
  calls them via gc.collect().
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor and clean up str.format() code (and helpers) in advance of optimizations.</title>
<updated>2008-05-30T18:10:04+00:00</updated>
<author>
<name>Eric Smith</name>
<email>eric@trueblade.com</email>
</author>
<published>2008-05-30T18:10:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=dc13b79a384691ed966f760a58d73a1b835e7d6b'/>
<id>dc13b79a384691ed966f760a58d73a1b835e7d6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added PyNumber_ToBase and supporting routines _PyInt_Format and</title>
<updated>2008-02-10T01:36:53+00:00</updated>
<author>
<name>Eric Smith</name>
<email>eric@trueblade.com</email>
</author>
<published>2008-02-10T01:36:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=5e527ebee1580f052fc53aacabe3906ffcdd4805'/>
<id>5e527ebee1580f052fc53aacabe3906ffcdd4805</id>
<content type='text'>
_PyLong_Format.  In longobject.c, changed long_format to
_PyLong_Format.  In intobject.c, changed uses of PyOS_snprintf to
_PyInt_Format instead.

_PyLong_Format is similar to py3k's routine of the same name, except
it has 2 additional parameters: addL and newstyle.  addL was existing
in long_format, and controls adding the trailing "L".  This is
unneeded in py3k.  newstyle is used to control whether octal prepends
"0" (the pre-2.6 style), or "0o" (the 3.0 sytle).

PyNumber_ToBase is needed for PEP 3127 (Integer Literal Support and
Syntax) and PEP 3101 (Advanced String Formatting).

This changeset does not need merging into py3k.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_PyLong_Format.  In longobject.c, changed long_format to
_PyLong_Format.  In intobject.c, changed uses of PyOS_snprintf to
_PyInt_Format instead.

_PyLong_Format is similar to py3k's routine of the same name, except
it has 2 additional parameters: addL and newstyle.  addL was existing
in long_format, and controls adding the trailing "L".  This is
unneeded in py3k.  newstyle is used to control whether octal prepends
"0" (the pre-2.6 style), or "0o" (the 3.0 sytle).

PyNumber_ToBase is needed for PEP 3127 (Integer Literal Support and
Syntax) and PEP 3101 (Advanced String Formatting).

This changeset does not need merging into py3k.
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch #1953</title>
<updated>2008-02-04T18:00:12+00:00</updated>
<author>
<name>Christian Heimes</name>
<email>christian@cheimes.de</email>
</author>
<published>2008-02-04T18:00:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=422051a3675271e179995ad4a0f056ff94395d55'/>
<id>422051a3675271e179995ad4a0f056ff94395d55</id>
<content type='text'>
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
</pre>
</div>
</content>
</entry>
<entry>
<title>Variation of patch # 1624059 to speed up checking if an object is a subclass</title>
<updated>2007-02-25T19:44:48+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2007-02-25T19:44:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ee3a1b5244e60566c5d5c8f6a1ea4b381de99f1c'/>
<id>ee3a1b5244e60566c5d5c8f6a1ea4b381de99f1c</id>
<content type='text'>
of some of the common builtin types.

Use a bit in tp_flags for each common builtin type.  Check the bit
to determine if any instance is a subclass of these common types.
The check avoids a function call and O(n) search of the base classes.
The check is done in the various Py*_Check macros rather than calling
PyType_IsSubtype().

All the bits are set in tp_flags when the type is declared
in the Objects/*object.c files because PyType_Ready() is not called
for all the types.  Should PyType_Ready() be called for all types?
If so and the change is made, the changes to the Objects/*object.c files
can be reverted (remove setting the tp_flags).  Objects/typeobject.c
would also have to be modified to add conditions
for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of some of the common builtin types.

Use a bit in tp_flags for each common builtin type.  Check the bit
to determine if any instance is a subclass of these common types.
The check avoids a function call and O(n) search of the base classes.
The check is done in the various Py*_Check macros rather than calling
PyType_IsSubtype().

All the bits are set in tp_flags when the type is declared
in the Objects/*object.c files because PyType_Ready() is not called
for all the types.  Should PyType_Ready() be called for all types?
If so and the change is made, the changes to the Objects/*object.c files
can be reverted (remove setting the tp_flags).  Objects/typeobject.c
would also have to be modified to add conditions
for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge ssize_t branch.</title>
<updated>2006-02-15T17:27:45+00:00</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-02-15T17:27:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=18e165558b24d29e7e0ca501842b9236589b012a'/>
<id>18e165558b24d29e7e0ca501842b9236589b012a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Wrote down the invariants of some common objects whose structure is</title>
<updated>2004-10-28T16:32:00+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2004-10-28T16:32:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=89a39461bff04b80bb4857790350e1ab30ff2df9'/>
<id>89a39461bff04b80bb4857790350e1ab30ff2df9</id>
<content type='text'>
exposed in header files.  Fixed a few comments in these headers.

As we might have expected, writing down invariants systematically exposed a
(minor) bug.  In this case, function objects have a writeable func_code
attribute, which could be set to code objects with the wrong number of
free variables.  Calling the resulting function segfaulted the interpreter.
Added a corresponding test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
exposed in header files.  Fixed a few comments in these headers.

As we might have expected, writing down invariants systematically exposed a
(minor) bug.  In this case, function objects have a writeable func_code
attribute, which could be set to code objects with the wrong number of
free variables.  Calling the resulting function segfaulted the interpreter.
Added a corresponding test.
</pre>
</div>
</content>
</entry>
<entry>
<title>SF # 595026: support for masks in getargs.c.</title>
<updated>2003-04-17T18:55:45+00:00</updated>
<author>
<name>Thomas Heller</name>
<email>theller@ctypes.org</email>
</author>
<published>2003-04-17T18:55:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a4ea603b055533e71920a088acb1c106e4895dbd'/>
<id>a4ea603b055533e71920a088acb1c106e4895dbd</id>
<content type='text'>
New functions:
  unsigned long PyInt_AsUnsignedLongMask(PyObject *);
  unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
  unsigned long PyLong_AsUnsignedLongMask(PyObject *);
  unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);

New and changed format codes:

b unsigned char 0..UCHAR_MAX
B unsigned char none **
h unsigned short 0..USHRT_MAX
H unsigned short none **
i int INT_MIN..INT_MAX
I * unsigned int 0..UINT_MAX
l long LONG_MIN..LONG_MAX
k * unsigned long none
L long long LLONG_MIN..LLONG_MAX
K * unsigned long long none

Notes:

* New format codes.

** Changed from previous "range-and-a-half" to "none"; the
range-and-a-half checking wasn't particularly useful.

New test test_getargs2.py, to verify all this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New functions:
  unsigned long PyInt_AsUnsignedLongMask(PyObject *);
  unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
  unsigned long PyLong_AsUnsignedLongMask(PyObject *);
  unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);

New and changed format codes:

b unsigned char 0..UCHAR_MAX
B unsigned char none **
h unsigned short 0..USHRT_MAX
H unsigned short none **
i int INT_MIN..INT_MAX
I * unsigned int 0..UINT_MAX
l long LONG_MIN..LONG_MAX
k * unsigned long none
L long long LLONG_MIN..LLONG_MAX
K * unsigned long long none

Notes:

* New format codes.

** Changed from previous "range-and-a-half" to "none"; the
range-and-a-half checking wasn't particularly useful.

New test test_getargs2.py, to verify all this.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move _PyInt_Init() into pythonrun.h, since all the other _Init()</title>
<updated>2003-01-01T15:18:32+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2003-01-01T15:18:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=dc392e31439d9992ea0101abaca09bcb78ebc311'/>
<id>dc392e31439d9992ea0101abaca09bcb78ebc311</id>
<content type='text'>
functions are here.  Suggested by Skip.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
functions are here.  Suggested by Skip.
</pre>
</div>
</content>
</entry>
<entry>
<title>Since the *_Init() are private, prefix with _, suggested by Skip</title>
<updated>2002-12-31T03:42:13+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2002-12-31T03:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b2501f4cd18f65cc671482ceb1abe88c289b664c'/>
<id>b2501f4cd18f65cc671482ceb1abe88c289b664c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
