| 55 | } |
| 56 | |
| 57 | static inline |
| 58 | npy_int32 extract_unit_32(npy_int32 *d, npy_int32 unit) { |
| 59 | assert(unit > 0); |
| 60 | npy_int32 div = *d / unit; |
| 61 | npy_int32 mod = *d % unit; |
| 62 | if (mod < 0) { |
| 63 | mod += unit; |
| 64 | div -= 1; |
| 65 | } |
| 66 | assert(mod >= 0); |
| 67 | *d = mod; |
| 68 | return div; |
| 69 | } |
| 70 | |
| 71 | /* |
| 72 | * Imports the PyDateTime functions so we can create these objects. |
no outgoing calls
no test coverage detected