| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="whatsnew24.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="whatsnew24.html" title='What's New in Python 2.4' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='last' href='about.html' title='About this document...' /> |
| 10 | <link rel='help' href='about.html' title='About this document...' /> |
| 11 | <link rel="next" href="node15.html" /> |
| 12 | <link rel="prev" href="node13.html" /> |
| 13 | <link rel="parent" href="whatsnew24.html" /> |
| 14 | <link rel="next" href="node15.html" /> |
| 15 | <meta name='aesop' content='information' /> |
| 16 | <title>13 Build and C API Changes</title> |
| 17 | </head> |
| 18 | <body> |
| 19 | <DIV CLASS="navigation"> |
| 20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 22 | <tr> |
| 23 | <td class='online-navigation'><a rel="prev" title="12 New, Improved, and" |
| 24 | href="node13.html"><img src='../icons/previous.png' |
| 25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 26 | <td class='online-navigation'><a rel="parent" title="What's New in Python" |
| 27 | href="whatsnew24.html"><img src='../icons/up.png' |
| 28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 29 | <td class='online-navigation'><a rel="next" title="14 Porting to Python" |
| 30 | href="node15.html"><img src='../icons/next.png' |
| 31 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 32 | <td align="center" width="100%">What's New in Python 2.4</td> |
| 33 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 34 | href="contents.html"><img src='../icons/contents.png' |
| 35 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 36 | <td class='online-navigation'><img src='../icons/blank.png' |
| 37 | border='0' height='32' alt='' width='32' /></td> |
| 38 | <td class='online-navigation'><img src='../icons/blank.png' |
| 39 | border='0' height='32' alt='' width='32' /></td> |
| 40 | </tr></table> |
| 41 | <div class='online-navigation'> |
| 42 | <b class="navlabel">Previous:</b> |
| 43 | <a class="sectref" rel="prev" href="node13.html">12 New, Improved, and</A> |
| 44 | <b class="navlabel">Up:</b> |
| 45 | <a class="sectref" rel="parent" href="whatsnew24.html">What's New in Python</A> |
| 46 | <b class="navlabel">Next:</b> |
| 47 | <a class="sectref" rel="next" href="node15.html">14 Porting to Python</A> |
| 48 | </div> |
| 49 | <hr /></div> |
| 50 | </DIV> |
| 51 | <!--End of Navigation Panel--> |
| 52 | <div class='online-navigation'> |
| 53 | <!--Table of Child-Links--> |
| 54 | <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> |
| 55 | |
| 56 | <UL CLASS="ChildLinks"> |
| 57 | <LI><A href="node14.html#SECTION0001410000000000000000">13.1 Port-Specific Changes</a> |
| 58 | </ul> |
| 59 | <!--End of Table of Child-Links--> |
| 60 | </div> |
| 61 | <HR> |
| 62 | |
| 63 | <H1><A NAME="SECTION0001400000000000000000"> |
| 64 | 13 Build and C API Changes</A> |
| 65 | </H1> |
| 66 | |
| 67 | <P> |
| 68 | Some of the changes to Python's build process and to the C API are: |
| 69 | |
| 70 | <P> |
| 71 | |
| 72 | <UL> |
| 73 | <LI>Three new convenience macros were added for common return |
| 74 | values from extension functions: Py_RETURN_NONE, |
| 75 | Py_RETURN_TRUE, and Py_RETURN_FALSE. |
| 76 | (Contributed by Brett Cannon.) |
| 77 | |
| 78 | <P> |
| 79 | </LI> |
| 80 | <LI>Another new macro, Py_CLEAR(<var>obj</var>), |
| 81 | decreases the reference count of <var>obj</var> and sets <var>obj</var> to the |
| 82 | null pointer. (Contributed by Jim Fulton.) |
| 83 | |
| 84 | <P> |
| 85 | </LI> |
| 86 | <LI>A new function, <tt class="cfunction">PyTuple_Pack(<var>N</var>, <var>obj1</var>, |
| 87 | <var>obj2</var>, ..., <var>objN</var>)</tt>, constructs tuples from a variable |
| 88 | length argument list of Python objects. (Contributed by Raymond Hettinger.) |
| 89 | |
| 90 | <P> |
| 91 | </LI> |
| 92 | <LI>A new function, <tt class="cfunction">PyDict_Contains(<var>d</var>, <var>k</var>)</tt>, |
| 93 | implements fast dictionary lookups without masking exceptions raised |
| 94 | during the look-up process. (Contributed by Raymond Hettinger.) |
| 95 | |
| 96 | <P> |
| 97 | </LI> |
| 98 | <LI>The Py_IS_NAN(<var>X</var>) macro returns 1 if |
| 99 | its float or double argument <var>X</var> is a NaN. |
| 100 | (Contributed by Tim Peters.) |
| 101 | |
| 102 | <P> |
| 103 | </LI> |
| 104 | <LI>C code can avoid unnecessary locking by using the new |
| 105 | <tt class="cfunction">PyEval_ThreadsInitialized()</tt> function to tell |
| 106 | if any thread operations have been performed. If this function |
| 107 | returns false, no lock operations are needed. |
| 108 | (Contributed by Nick Coghlan.) |
| 109 | |
| 110 | <P> |
| 111 | </LI> |
| 112 | <LI>A new function, <tt class="cfunction">PyArg_VaParseTupleAndKeywords()</tt>, |
| 113 | is the same as <tt class="cfunction">PyArg_ParseTupleAndKeywords()</tt> but takes a |
| 114 | <tt class="ctype">va_list</tt> instead of a number of arguments. |
| 115 | (Contributed by Greg Chapman.) |
| 116 | |
| 117 | <P> |
| 118 | </LI> |
| 119 | <LI>A new method flag, <tt class="constant">METH_COEXISTS</tt>, allows a function |
| 120 | defined in slots to co-exist with a <tt class="ctype">PyCFunction</tt> having the |
| 121 | same name. This can halve the access time for a method such as |
| 122 | <tt class="method">set.__contains__()</tt>. (Contributed by Raymond Hettinger.) |
| 123 | |
| 124 | <P> |
| 125 | </LI> |
| 126 | <LI>Python can now be built with additional profiling for the |
| 127 | interpreter itself, intended as an aid to people developing the |
| 128 | Python core. Providing <b class="programopt">---enable-profiling</b> to the |
| 129 | <b class="program">configure</b> script will let you profile the interpreter with |
| 130 | <b class="program">gprof</b>, and providing the <b class="programopt">---with-tsc</b> |
| 131 | switch enables profiling using the Pentium's Time-Stamp-Counter |
| 132 | register. Note that the <b class="programopt">---with-tsc</b> switch is slightly |
| 133 | misnamed, because the profiling feature also works on the PowerPC |
| 134 | platform, though that processor architecture doesn't call that |
| 135 | register ``the TSC register''. (Contributed by Jeremy Hylton.) |
| 136 | |
| 137 | <P> |
| 138 | </LI> |
| 139 | <LI>The <tt class="ctype">tracebackobject</tt> type has been renamed to <tt class="ctype">PyTracebackObject</tt>. |
| 140 | |
| 141 | <P> |
| 142 | </LI> |
| 143 | </UL> |
| 144 | |
| 145 | <P> |
| 146 | |
| 147 | <H2><A NAME="SECTION0001410000000000000000"> |
| 148 | 13.1 Port-Specific Changes</A> |
| 149 | </H2> |
| 150 | |
| 151 | <P> |
| 152 | |
| 153 | <UL> |
| 154 | <LI>The Windows port now builds under MSVC++ 7.1 as well as version 6. |
| 155 | (Contributed by Martin von Loewis.) |
| 156 | |
| 157 | <P> |
| 158 | </LI> |
| 159 | </UL> |
| 160 | |
| 161 | <P> |
| 162 | |
| 163 | <DIV CLASS="navigation"> |
| 164 | <div class='online-navigation'> |
| 165 | <p></p><hr /> |
| 166 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 167 | <tr> |
| 168 | <td class='online-navigation'><a rel="prev" title="12 New, Improved, and" |
| 169 | href="node13.html"><img src='../icons/previous.png' |
| 170 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 171 | <td class='online-navigation'><a rel="parent" title="What's New in Python" |
| 172 | href="whatsnew24.html"><img src='../icons/up.png' |
| 173 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 174 | <td class='online-navigation'><a rel="next" title="14 Porting to Python" |
| 175 | href="node15.html"><img src='../icons/next.png' |
| 176 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 177 | <td align="center" width="100%">What's New in Python 2.4</td> |
| 178 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 179 | href="contents.html"><img src='../icons/contents.png' |
| 180 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 181 | <td class='online-navigation'><img src='../icons/blank.png' |
| 182 | border='0' height='32' alt='' width='32' /></td> |
| 183 | <td class='online-navigation'><img src='../icons/blank.png' |
| 184 | border='0' height='32' alt='' width='32' /></td> |
| 185 | </tr></table> |
| 186 | <div class='online-navigation'> |
| 187 | <b class="navlabel">Previous:</b> |
| 188 | <a class="sectref" rel="prev" href="node13.html">12 New, Improved, and</A> |
| 189 | <b class="navlabel">Up:</b> |
| 190 | <a class="sectref" rel="parent" href="whatsnew24.html">What's New in Python</A> |
| 191 | <b class="navlabel">Next:</b> |
| 192 | <a class="sectref" rel="next" href="node15.html">14 Porting to Python</A> |
| 193 | </div> |
| 194 | </div> |
| 195 | <hr /> |
| 196 | <span class="release-info">Release 1.01.</span> |
| 197 | </DIV> |
| 198 | <!--End of Navigation Panel--> |
| 199 | <ADDRESS> |
| 200 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 201 | </ADDRESS> |
| 202 | </BODY> |
| 203 | </HTML> |