summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/bz2module.c1
-rw-r--r--Modules/fcntlmodule.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/Modules/bz2module.c b/Modules/bz2module.c
index 562198b..c681991 100644
--- a/Modules/bz2module.c
+++ b/Modules/bz2module.c
@@ -317,6 +317,7 @@ Util_ReadAhead(BZ2FileObject *f, int bufsize)
return 0;
}
if ((f->f_buf = PyMem_Malloc(bufsize)) == NULL) {
+ PyErr_NoMemory();
return -1;
}
Py_BEGIN_ALLOW_THREADS
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 353889c..46bf4d1 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -530,6 +530,11 @@ all_ins(PyObject* d)
if (ins(d, "F_SHLCK", (long)F_SHLCK)) return -1;
#endif
+/* OS X (and maybe others) let you tell the storage device to flush to physical media */
+#ifdef F_FULLFSYNC
+ if (ins(d, "F_FULLFSYNC", (long)F_FULLFSYNC)) return -1;
+#endif
+
/* For F_{GET|SET}FL */
#ifdef FD_CLOEXEC
if (ins(d, "FD_CLOEXEC", (long)FD_CLOEXEC)) return -1;