Pyrex - Previous News
A glitch-fix nanorelease to correct a small problem with the setup.py file.
A minor update to fix a few bugs introduced in 0.9.5.
Selley's No More WarningsTM!
Most of the C compiler warnings you used to get when compiling with distutils should be gone now.
Also a big
pile of enhancements and bug fixes. See the CHANGES
file for details.
Tiny bugfix to correct a tab/space problem in the distutils extension.
- LValue Casting Is Dead
- I have redesigned the code
generator to eliminate the need for lvalue casting. This means that
Pyrex-generated code should now be gcc4-compatible, although I haven't tested this. Let me know if you find any remaining lvalue casts; they should be fairly easy to fix now.
The generated code should now be
compilable as either C or C++ without errors (although there may still
be warnings). However, note that you can still only call C++ functions
if they have been declared "extern C", even if you compile the Pyrex
output as C++. I hope to introduce some C++ interface features soon.
A slew of other improvements and bug fixes have been made, see the CHANGES
This version kindly supplied by Giovanni
Bajo incorporates patches to work around the following problems:
- Compatibility with Python 2.4 Distutils
- Compatibility with GCC 4 (lvalue cast problem)
WARNING: I have not
reviewed these patches and have not fully tested this version. Use it
at your own risk.
- Types defined with a ctypedef in a 'cdef extern from' block
are now referred to by the typedef name in generated C code, so it is
longer necessary to match the type in the C header file exactly.
- Some bugs introduced by the recent changes to the handling
of string literals have been fixed.
See the CHANGES file
for a full list of bug fixes and enhancements.
- Fixed the distutils extension, which I managed to break in 0.8.1.
- A bug in 0.8 causing names in external header files to be mangled
has been fixed.
- The distutils extension has been modified to stop it from
trying to compile the generated C file if the Pyrex compiler reports
- Fixed a problem caused by Python 2.3's new "True" and "False" boolean
values (but I haven't tested the fix yet, since I don't have a 2.3
- Function return values weren't always being automatically converted
to/from Python objects when they should have.
- Demos/callback was missing the cheesefinder.c file.
- Passing a Python function to a C function for use as a callback.
- Some things which could crash the compiler.
- Type errors in generated C code for special methods.
- Incorrect optimization of parallel assignments.
- Syntax error on extra comma after a non-parenthesized tuple constructor.
- Syntax error on form feed on a line by itself.
- C attributes of extension types can be exposed
directly to Python code.
- C functions, types, etc. can have different internal
and external names, making it easier to wrap them in Python objects having
the expected names.
- None is now a compile-time
- -I command-line options
for specifing search paths for include files.
- C arguments and variables declared as an extension type can
take the value None.
- The source can contain form-feed characters.
- Improved identification of functions in tracebacks
Fixes broken distutils extension.
- Command line options for reporting version number, requesting a
listing file and specifying the name of the generated C file. See USAGE.txt
An include statement for including
other Pyrex files.
Improved facilities for exporting declarations from one Pyrex file
to another. (Public
Python syntax compatibility enhancements: try-except-else, multiple
statements on one line.
A __delete__ special method for extension types.
Pyrex 0.4.5 has a public declaration for making C variables and
functions available to external C code.
Pyrex 0.4.4 now produces tracebacks that show where an error occurred
in Pyrex code.
Pyrex 0.4.3 introduces a new kind of for-loop for iterating over ranges
of integers at C speed. See the Integer For-Loops section of the Language Overview.
Pyrex 0.4.2 allows any C function to propagate exceptions to its caller,
using a new form of declaration. See Error Return Values in the Language Overview.
Pyrex 0.4 includes substantial new features for dealing with declarations
in C header files and pre-existing Python types. See the new sections
in the Language Overview on External Declarations and External Extension Types .
Graham Fawcett of the University
of Windsor has contributed a distutils extension for compiling Pyrex
modules, which is included with Pyrex.