Skip to content

Commit 033f675

Browse files
cgohlkesdispater
authored andcommitted
Fix Visual Studio build errors (#261)
* Fix iso8601.c(220): error C2090: function returns array * Fix error LNK2001: unresolved external symbol p
1 parent ea921de commit 033f675

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pendulum/_extensions/_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int _is_leap(int year) {
102102
}
103103

104104
int _is_long_year(int year) {
105-
return (p(year) % 7 == 4) || (p(year - 1) % 7 == 3);
105+
return (_p(year) % 7 == 4) || (_p(year - 1) % 7 == 3);
106106
}
107107

108108
int _week_day(int year, int month, int day) {

pendulum/parsing/_iso8601.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static PyObject *FixedOffset_dst(FixedOffset *self, PyObject *args) {
217217
* return "%s%d:%d" % (sign, self.offset / 60, self.offset % 60)
218218
*/
219219
static PyObject *FixedOffset_tzname(FixedOffset *self, PyObject *args) {
220-
char tzname[7] = {0};
220+
char tzname_[7] = {0};
221221
char sign = '+';
222222
int offset = self->offset;
223223

@@ -227,14 +227,14 @@ static PyObject *FixedOffset_tzname(FixedOffset *self, PyObject *args) {
227227
}
228228

229229
sprintf(
230-
tzname,
230+
tzname_,
231231
"%c%02d:%02d",
232232
sign,
233233
offset / SECS_PER_HOUR,
234234
offset / SECS_PER_MIN % SECS_PER_MIN
235235
);
236236

237-
return PyUnicode_FromString(tzname);
237+
return PyUnicode_FromString(tzname_);
238238
}
239239

240240
/*

0 commit comments

Comments
 (0)