summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-05-05 23:06:28 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-05-05 23:06:28 +0200
commitdccf5885e22af80bd7b7e6b7c05abab7e556bc05 (patch)
treeaf8ff99da29c1a68397a65b833ce0fb1ed6957cc
parent81a8955cc944d05a3a2ae422676f9da7fb0fa244 (diff)
downloadcython-dccf5885e22af80bd7b7e6b7c05abab7e556bc05.tar.gz
Allow utility code for declared C properties.
-rw-r--r--Cython/Compiler/Symtab.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
index aeb7a38c1..a82f4551a 100644
--- a/Cython/Compiler/Symtab.py
+++ b/Cython/Compiler/Symtab.py
@@ -2413,7 +2413,8 @@ class CClassScope(ClassScope):
return entry
def declare_cproperty(self, name, type, cfunc_name, doc=None, pos=None, visibility='extern',
- nogil=False, with_gil=False, exception_value=None, exception_check=False):
+ nogil=False, with_gil=False, exception_value=None, exception_check=False,
+ utility_code=None):
"""Internal convenience method to declare a C property function in one go.
"""
property_entry = self.declare_property(name, doc=doc, ctype=type, pos=pos)
@@ -2428,6 +2429,7 @@ class CClassScope(ClassScope):
exception_check=exception_check,
),
cname=cfunc_name,
+ utility_code=utility_code,
visibility=visibility,
pos=pos,
)