diff options
author | Nao Pross <np@0hm.ch> | 2022-03-01 10:34:03 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2022-03-01 10:34:03 +0100 |
commit | 3077bbea252c62e8abf825ad11bf5118d79a2ba3 (patch) | |
tree | 585faa0c5e1964b01c60c9ca31d8dfa4fb61888e /setup_c_extension.py | |
parent | Method to find arrayobject.h path on any distro (diff) | |
download | o3000-python-binding-master.tar.gz o3000-python-binding-master.zip |
If for any reason the data stream from the camera is no longer
available, without these checks the entire python interpreter crashes
with a nice segmentation fault.
These checks allow to handle the error from within Python with something
like:
try:
o3000.video_images_get()
except RuntimeError:
... restart o3000 driver
Also, there is a change in the compilation flags to show more (useful)
warnings, i.e. -Wall and hide the "unused variable" warning.
Diffstat (limited to '')
-rw-r--r-- | setup_c_extension.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setup_c_extension.py b/setup_c_extension.py index e01837f..f1f3e08 100644 --- a/setup_c_extension.py +++ b/setup_c_extension.py @@ -12,5 +12,5 @@ setup(name = 'o3000', version = '1.0', sources = ['c_extension.c', 'helpers.c'], libraries = ['o3000', 'o3000_imgpipe', 'tiff'], include_dirs = [str(numpy_headers_path)], - # extra_compile_args = ['-Wextra'] + extra_compile_args = ['-Wextra', '-Wall', '-Wno-unused-parameter'] )]) |