Commit Graph

30 Commits

Author SHA1 Message Date
Thomas Heller 0e10cb0266 add svn:eol-style native svn:keywords Id 2006-05-12 19:31:46 +00:00
Thomas Heller e43a0fcc9d Add missing svn properties. 2006-05-12 18:16:03 +00:00
Thomas Heller 40f55b2f08 Disable a test that is unreliable. 2006-05-09 20:20:15 +00:00
Thomas Heller 97a7b7fef3 oops - the function is exported as 'my_free', not 'free'. 2006-05-05 18:46:27 +00:00
Thomas Heller 748f6fbf2c Fix memory leaks in the ctypes test suite, reported by valgrind, by
free()ing the memory we allocate.
2006-05-05 18:43:24 +00:00
Thomas Heller 14f3da7585 Don't fail the tests when libglut.so or libgle.so cannot be loaded. 2006-05-03 18:35:39 +00:00
Thomas Heller 6a907d8b8e Remove a duplicated test (the same test is in test_incomplete.py). 2006-04-28 17:02:18 +00:00
Thomas Heller 6ff67ef096 Merge in changes from ctypes 0.9.9.6 upstream version. 2006-04-21 16:51:04 +00:00
Tim Peters c5c9ce957d Add missing SVN eol-style property to text files. 2006-04-16 22:11:28 +00:00
Thomas Heller 55d031ef23 Fix for a bug found by Armin Rigo, plus test.
https://sourceforge.net/tracker/?func=detail&atid=532154&aid=1467852&group_id=71702
2006-04-12 19:07:36 +00:00
Tim Peters 319c47fcdb Try to repair what may be the last new test failure on the
"x86 OpenBSD trunk" buildbot due to changing Python so that
Python-exposed addresses are always non-negative.

test_int_pointer_arg():  This line failed now whenever the
box happened to assign an address to `ci` "with the sign
bit set":

    self.failUnlessEqual(addressof(ci), func(byref(ci)))

The problem is that the ctypes addressof() inherited "all
addresses are non-negative now" from changes to
PyLong_FromVoidPtr(), but byref() did not inherit that
change and can still return a negative int.

I don't know whether, or what, the ctypes implementation wants
to do about that (possibly nothing), but in the meantime
the test fails frequently.

So, introduced a Python positive_address() function in
the test module, that takes a purported machine address and,
if negative, converts it to a non-negative value "with the
same bits".  This should leave the test passing under all
versions of Python.

Belated thanks to Armin Rigo for teaching me the sick trick ;-)
for determining the # of bits in a machine pointer via abuse
of the struct module.
2006-04-11 02:59:48 +00:00
Thomas Heller fff61ea025 Expose RTLD_LOCAL and RTLD_GLOBAL always from the _ctypes extension module.
If RTLD_LOCAL is not #defined in any header file (Windows), set it to 0.
If RTLD_GLOBAL is not #defined, set it equal to RTLD_LOCAL.

This should fix ctypes on cygwin.
2006-04-06 15:23:16 +00:00
Thomas Heller fb8f83b33f One test still fails on the ia64 debian box. 2006-04-05 19:01:35 +00:00
Thomas Heller 726dcf34a6 Use 'ldd' to find the libc library to load. Based on an idea from Matthias Klose. 2006-04-05 17:36:45 +00:00
Neal Norwitz b0b20a10bc Get ctypes loader working on OSF1 (Tru64) 2006-04-03 06:52:43 +00:00
Thomas Heller 0d93a23479 Try to fix test_loading on openbsd. 2006-03-30 19:16:15 +00:00
Thomas Heller 300269ae6f Oops - this should not have gone in. 2006-03-30 18:29:25 +00:00
Thomas Heller b320682577 Output more info when the test fails. 2006-03-30 17:49:55 +00:00
Thomas Heller 240ec6b9ef Make the tests succeed with -Qnew: Do not rely on the exact wording of a ZeroDivisionError. 2006-03-28 11:00:08 +00:00
Thomas Heller cce2267cf1 Plug a leak in the ctypes test suite when tests are run repeatedly. 2006-03-20 08:11:56 +00:00
Thomas Heller d59ca8f335 Accessing unaligned structure fields works now on all architectures.
Including unittest.
2006-03-20 07:54:01 +00:00
Thomas Heller b03cb602e8 Merge changes from the upstream version:
- cast is implemented as a foreign function now
- On Windows, it is now possible to access functions exported by ordinal only
2006-03-17 15:52:58 +00:00
Thomas Heller 23e408603c Fix a test that fails when libGL.so and libGLU.so are not installed (on posix systems). 2006-03-16 20:09:22 +00:00
Thomas Heller a022789ab3 Plug some refcount leaks when tests are run repeatedly. 2006-03-13 10:47:02 +00:00
Thomas Heller 6058aa40d2 Remove the slightly broken test_leaks.py.
Change test_functions.py so that it can be run multiple time without
failing: Assign a restype to the function in test_intresult, and move
the definition of class POINT to module level so that no new class is
created each time the test is run.
2006-03-13 07:33:38 +00:00
Thomas Heller 51f77b5152 Remove the magic to run an uninstalled ctypes version from a CVS sandbox. 2006-03-09 19:40:00 +00:00
Thomas Heller 57e881eb22 Disable the testcase that crashes solaris. 2006-03-09 09:43:53 +00:00
Tim Peters e8d09e5818 Whitespace normalization. 2006-03-09 01:15:05 +00:00
Hye-Shik Chang d758d3d747 Remove .cvsignore and set svn:ignore for *.pyc *.pyo. 2006-03-08 23:31:17 +00:00
Thomas Heller babddfca75 Copy ctypes-0.9.9.4 Python modules from external into the trunk. 2006-03-08 19:56:54 +00:00