summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Blake <cblake@csail.mit.edu>2014-10-02 12:33:52 -0400
committerCharles Blake <cblake@csail.mit.edu>2014-10-02 12:33:52 -0400
commit1a4229cc003b2a4a748f9f72248a5b498f2780fd (patch)
tree9c64df2e34ac10ec9bb958f7f1e1c421d42f5efa
parent089c4e5136bf6042bc22db1966472d63fedb644f (diff)
downloadcython-1a4229cc003b2a4a748f9f72248a5b498f2780fd.tar.gz
Remove libc/time.pxd dependency upon sys/types.h (on suggestion of Larsmans).
Also, remove clock_t from posix.types making users find it in libc.time. It's really a standard C type and not used anywhere in system interfaces anyway. --HG-- extra : transplant_source : %AF%F2P%8C%26_%B6%A0%1E6%B3%84jg%A0%20%5D1D%22
-rw-r--r--Cython/Includes/libc/time.pxd4
-rw-r--r--Cython/Includes/posix/types.pxd1
2 files changed, 3 insertions, 2 deletions
diff --git a/Cython/Includes/libc/time.pxd b/Cython/Includes/libc/time.pxd
index ffa8d2430..dfd140484 100644
--- a/Cython/Includes/libc/time.pxd
+++ b/Cython/Includes/libc/time.pxd
@@ -1,9 +1,11 @@
# http://en.wikipedia.org/wiki/C_date_and_time_functions
-from posix.types cimport clock_t, time_t
from libc.stddef cimport wchar_t
cdef extern from "time.h" nogil:
+ ctypedef long clock_t
+ ctypedef long time_t
+
enum: CLOCKS_PER_SEC
clock_t clock() # CPU time
time_t time(time_t *) # wall clock time since Unix epoch
diff --git a/Cython/Includes/posix/types.pxd b/Cython/Includes/posix/types.pxd
index 2c042bae5..fb01bab5f 100644
--- a/Cython/Includes/posix/types.pxd
+++ b/Cython/Includes/posix/types.pxd
@@ -1,7 +1,6 @@
cdef extern from "sys/types.h":
ctypedef long blkcnt_t
ctypedef long blksize_t
- ctypedef long clock_t
ctypedef long clockid_t
ctypedef long dev_t
ctypedef long gid_t