473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ctypes 0.6.3 released

It's release day ;-)

ctypes 0.6.3 released
=====================

Overview

'ctypes' is a Python package to create and manipulate C data types
in Python, and to call functions in dynamic link libraries/shared
dlls. It allows wrapping these libraries in pure Python.

It works on Windows, Linux and MacOS X (the latter require that
your machine is supported by libffi).
Changes

A critical bug with pointer instances was fixed, this makes the
'incomplete types' sample code in the tutorial actually work.

All ctypes objects are now correctly garbarge collected. This
*may* lead to crashes in your program (especially with callback
functions, or pointers handed out to longer running C code). You
must keep a reference in Python to any object as long as it is
used in foreign C code.

All other known bugs have been fixed.

Again, a lot of changes to the COM package, but all this is still work in
progress and unstable, and it has to be properly documented.

Homepage

<http://starship.python.net/crew/theller/ctypes/>

Enjoy,

Thomas
Jul 18 '05 #1
2 1511
>>>>> "Thomas" == Thomas Heller <th*****@python.net> writes:
It works on Windows, Linux and MacOS X (the latter require that
your machine is supported by libffi).


Hi,

I maintain the ctypes Debian package. The following patch allows ctypes to
be built on 64-bit archs.

--- ctypes-0.6.3.orig/source/callproc.c
+++ ctypes-0.6.3/source/callproc.c
@@ -549,11 +549,11 @@
#if (SIZEOF_LONG_LONG == 8 && SIZEOF_LONG == 4)
#undef ffi_type_ulong
#define ffi_type_ulong ffi_type_uint32
-#define ffi_type_ulonglong ffi_type_uint64
#undef ffi_type_slong
#define ffi_type_slong ffi_type_sint32
-#define ffi_type_slonglong ffi_type_sint64
#endif
+#define ffi_type_ulonglong ffi_type_uint64
+#define ffi_type_slonglong ffi_type_sint64

Ganesan

--
Ganesan R (rganesan at debian dot org) | http://www.debian.org/~rganesan/
1024D/5D8C12EA, fingerprint F361 84F1 8D82 32E7 1832 6798 15E0 02BA 5D8C 12EA

Jul 18 '05 #2
Ganesan R <rg******@myrealbox.com> writes:
>> "Thomas" == Thomas Heller <th*****@python.net> writes:

It works on Windows, Linux and MacOS X (the latter require that
your machine is supported by libffi).


Hi,

I maintain the ctypes Debian package. The following patch allows ctypes to
be built on 64-bit archs.

--- ctypes-0.6.3.orig/source/callproc.c
+++ ctypes-0.6.3/source/callproc.c
@@ -549,11 +549,11 @@
#if (SIZEOF_LONG_LONG == 8 && SIZEOF_LONG == 4)
#undef ffi_type_ulong
#define ffi_type_ulong ffi_type_uint32
-#define ffi_type_ulonglong ffi_type_uint64
#undef ffi_type_slong
#define ffi_type_slong ffi_type_sint32
-#define ffi_type_slonglong ffi_type_sint64
#endif
+#define ffi_type_ulonglong ffi_type_uint64
+#define ffi_type_slonglong ffi_type_sint64

Ganesan


Cool, thanks. I've applied this in cvs.

Thomas

PS: Can you post (or send by private email, if it is large, the output
of the test suite: 'python setup.py test' ?
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.1 (final). Python 2.3.1 is a pure bug fix release of Python 2.3, released in...
1
by: Wiktor Sadowski | last post by:
Thomas,consider this: specialized_python.exe --path/foo.px (command line) where foo.px is zipped ctypes-venster program -modules,some code,binaries(images etc.) specialized_python.exe could be...
1
by: Thomas Heller | last post by:
ctypes 0.9.1 released - Sept 14, 2004 ===================================== Overview ctypes is a ffi (Foreign Function Interface) package for Python 2.3 and higher. ctypes allows to call...
19
by: Thomas Heller | last post by:
ctypes 0.9.2 released - Oct 28, 2004 ==================================== Overview ctypes is a ffi (Foreign Function Interface) package for Python 2.3 and higher. ctypes allows to call...
4
by: Michael | last post by:
Hi! (OK, slightly silly subject line :) I'm extremely pleased to say - Kamaelia 0.4.0 has been released! What's New & Changed? =====================
1
by: geskerrett | last post by:
I was wondering if a ctypes expert could point me in the right direction. I am using the wrapper for the "freeimage" library to create multipage TIFF files from a group of png images. The...
5
by: Daniel | last post by:
I'm trying to implement a routine that converts a PDF document to image files using ctypes and the Apple CoreGraphics library as per the 'Splitting a PDF File' example on Apple's web site ....
1
by: mmacrobert | last post by:
Hi Everyone, I've created a 'C' dll that is accessed via ctypes library containing a bunch of functions. I've successfully been able to use the functions. However, I would like to throw python...
0
by: Egor Zindy | last post by:
Egor Zindy wrote: #!/usr/bin/env python """ A generic chipid library based on ctypes This module handles most of the functions in FTChipID.dll
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.