Skip to content

Commit 847fee6

Browse files
committed
Better setlocale error
1 parent 9e34c2a commit 847fee6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/_libs/src/ujson/lib/ultrajsondec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ JSOBJ JSON_DecodeObject(JSONObjectDecoder *dec, const char *buffer,
11751175

11761176
locale = setlocale(LC_NUMERIC, NULL);
11771177
if (!locale) {
1178-
return SetError(&ds, -1, "Could not reserve memory block");
1178+
return SetError(&ds, -1, "setlocale call failed");
11791179
}
11801180

11811181
if (strcmp(locale, "C")) {

pandas/_libs/src/ujson/lib/ultrajsonenc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ char *JSON_EncodeObject(JSOBJ obj, JSONObjectEncoder *enc, char *_buffer,
11771177

11781178
locale = setlocale(LC_NUMERIC, NULL);
11791179
if (!locale) {
1180-
SetError(NULL, enc, "Could not reserve memory block");
1180+
SetError(NULL, enc, "setlocale call failed");
11811181
return NULL;
11821182
}
11831183

0 commit comments

Comments
 (0)