Skip to content

Commit

Permalink
transition away from ironport's libc.pxd to the ones distributed with…
Browse files Browse the repository at this point in the history
… Cython
  • Loading branch information
samrushing committed Feb 1, 2013
1 parent 49a56e6 commit 1d05778
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pyrex/pyrex_helpers.pyx
Expand Up @@ -24,13 +24,15 @@

cdef object oserrors
from coro import oserrors
cimport libc
from xlibc cimport stdarg
from libc cimport errno
from libc cimport stdint

cdef raise_oserror():
oserrors.map_exception(OSError(libc.errno, libc.strerror(libc.errno)))
oserrors.map_exception(OSError(errno.errno, errno.strerror(errno.errno)))

cdef raise_oserror_with_errno(int e):
oserrors.map_exception(OSError(e, libc.strerror(e)))
oserrors.map_exception(OSError(e, errno.strerror(e)))

cdef object __builtin__
import __builtin__
Expand All @@ -40,8 +42,8 @@ bool = __builtin__.bool

cdef extern from "pyrex_helpers.h":

int va_int(libc.va_list)
char * va_charptr(libc.va_list)
int va_int(stdarg.va_list)
char * va_charptr(stdarg.va_list)

object PySequence_Fast_GET_ITEM_SAFE (object, int)

Expand All @@ -57,8 +59,8 @@ cdef extern from "pyrex_helpers.h":

object PyDict_GET_ITEM_SAFE (object, object, object)

void * Pyrex_Malloc_SAFE (libc.size_t) except NULL
void * Pyrex_Realloc_SAFE (void *, libc.size_t) except NULL
void * Pyrex_Malloc_SAFE (size_t) except NULL
void * Pyrex_Realloc_SAFE (void *, size_t) except NULL
void Pyrex_Free_SAFE (void *)

object minimal_ulonglong (unsigned long long)
Expand Down

0 comments on commit 1d05778

Please sign in to comment.