aboutsummaryrefslogtreecommitdiffstats
path: root/src/libgamma_native_error.pyx
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-09-02 04:43:20 +0200
committerMattias Andrée <maandree@operamail.com>2014-09-02 04:43:20 +0200
commit9f0f3aa33d904cf284ce757b928db23928750657 (patch)
tree3f043828cdfa09c2bb0c69d903b30cebccb3314c /src/libgamma_native_error.pyx
parentadd alternative to the libgamma_crtc_set_gamma_ramps_f functions (diff)
downloadpylibgamma-9f0f3aa33d904cf284ce757b928db23928750657.tar.gz
pylibgamma-9f0f3aa33d904cf284ce757b928db23928750657.tar.bz2
pylibgamma-9f0f3aa33d904cf284ce757b928db23928750657.tar.xz
some of libgamma-facade
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libgamma_native_error.pyx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libgamma_native_error.pyx b/src/libgamma_native_error.pyx
index 8696d10..b10dc5a 100644
--- a/src/libgamma_native_error.pyx
+++ b/src/libgamma_native_error.pyx
@@ -106,7 +106,7 @@ def libgamma_native_get_group_name() -> str:
cannot be determined.
'''
cdef bytes bs
- if libgamma_group_name == NULL:
+ if libgamma_group_name is NULL:
return None
bs = libgamma_group_name
return bs.decode('utf-8', 'strict')
@@ -157,13 +157,12 @@ def libgamma_native_name_of_error(value : int) -> str:
@param value The error code.
@return The name of the definition associated with the error code,
- `None` if the error code does not exist. The return string
- should not be `free`:d.
+ `None` if the error code does not exist.
'''
cdef const char* name
cdef bytes bs
name = libgamma_name_of_error(<int>value)
- if name == NULL:
+ if name is NULL:
return None
bs = name
return bs.decode('utf-8', 'strict')