diff options
| -rw-r--r-- | pyisda/date.pxd | 7 | ||||
| -rw-r--r-- | pyisda/date.pyx | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/pyisda/date.pxd b/pyisda/date.pxd index c1f7dd5..364792a 100644 --- a/pyisda/date.pxd +++ b/pyisda/date.pxd @@ -1,5 +1,4 @@ from cpython cimport datetime as c_datetime -from cdsone cimport TStubMethod cdef extern from "isda/yearfrac.h" nogil: int JpmcdsStringToDayCountConv(char* day_count, long* type) @@ -18,6 +17,12 @@ cdef extern from "isda/mdydate.h": long day long year +cdef extern from "isda/stub.h" nogil: + ctypedef struct TStubMethod: + pass + + int JpmcdsStringToStubMethod(char* name, TStubMethod* stub) + cdef extern from "isda/convert.h" nogil: int JpmcdsStringToDateInterval(char* input, char* label, TDateInterval* interval) int JpmcdsMakeDateInterval(int num_periods, char period_type, TDateInterval* interval) diff --git a/pyisda/date.pyx b/pyisda/date.pyx index 7e13ce1..9085992 100644 --- a/pyisda/date.pyx +++ b/pyisda/date.pyx @@ -2,7 +2,6 @@ import datetime from cpython cimport datetime as c_datetime from cpython.version cimport PY_MAJOR_VERSION from libc.stdlib cimport malloc, free -from cdsone cimport JpmcdsStringToStubMethod cimport cython cimport numpy as np @@ -26,7 +25,7 @@ cdef long dcc(str day_count) except -1: cdef long r dc_bytes = day_count.encode('utf-8') cdef char* dc = dc_bytes - cdef err = JpmcdsStringToDayCountConv(<char*> dc, &r) + cdef int err = JpmcdsStringToDayCountConv(dc, &r) if err == 0: return r else: |
