Hi,
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/libc.so")
clib2= cdll.LoadLibrary(“tst.so”)
The library tst.so has been build using the code below:
#include <stdio.h>
#include <time.h>
time_t xtime( time_t * t)
{
return(time(t));
}
Some lines of the test routine:
def test_time():
clib.localtime.restype = POINTER™
using lib tst.so → 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 directly 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 …
Regards
Armin