summaryrefslogtreecommitdiffstats
path: root/label.c
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-01-10 10:15:24 +0100
committerJose M. Guisado <jguisado@soleta.eu>2023-01-10 10:15:24 +0100
commitdce0b0c1e30a728537abfd25cbe8a55dce22db37 (patch)
tree42a5d41ee2c35d736f468748e2bd7d359d5c373e /label.c
parent78cdaef9c6c5acf7328d9d81847295ea74e2ba80 (diff)
context: fix assign_device
Fixes a bug where calling assign_device with readonly keyword parameter raises exception stating it takes no keyword arguments. Context_assign_device has positional and keyword arguments. Adds flags METH_KEYWORDS in method declaration (see Context_methods). Replaces format string in PyArg_ParseTupleAndKeywords from "s|p" to "s|$p". Adds $ after |, meaning all later optional arguments are also keyword only. (See https://docs.python.org/3/c-api/arg.html#other-objects) Empty names in the kwlist array correspond to positional arguments. Replaces fname variable name with device for better readability. Fixes 88c7374db2309e708e9f9713a3d55acb1472f339 ("context: check self->cxt and rc in assign_device")
Diffstat (limited to 'label.c')
0 files changed, 0 insertions, 0 deletions