libc trouble


I have ported ctypes 0.9.2 for Python 2.3 … but there is a problem
with libc/time which is hard to understand.

ctypes allows to wrap libc calls by pure python code.

Here some code lines of the problem:

import os, sys

clib = cdll.LoadLibrary("/lib/")
clib2= cdll.LoadLibrary(“”)

The library has been build using the code below:

#include <stdio.h>
#include <time.h>

time_t xtime( time_t * t)

Some lines of the test routine:

def test_time():

clib.localtime.restype = POINTER™

using lib → it’s working with QNX 6.3

ltime = c_int(0)
result = clib2.xtime(byref(ltime))
print ltime.value, result


this is crashing under QNX6.3 (libc used)

ltime = c_int(0)
result = clib.time(byref(ltime))
print ltime.value, result

What’s wrong with the libc or the time() call of libc ??
All other calls of libc are working …