From 975acaf5498223318ed2c61bf896dc982c1801f4 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 15 Dec 2022 13:12:32 +0100 Subject: coding style: line breaks Only two line breaks separate copyright notice from source. For the rest of the source file any function declaration or similar block is separated with a line break from any other block. Except when a python function definition is previously followed by a docstring #define block. --- parttype.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'parttype.c') diff --git a/parttype.c b/parttype.c index e3c6238..cbdae82 100644 --- a/parttype.c +++ b/parttype.c @@ -9,6 +9,7 @@ * Author: Jose M. Guisado */ + #include "fdisk.h" static PyMemberDef PartType_members[] = { @@ -28,10 +29,12 @@ static PyObject *PartType_get_name(PartTypeObject *self) { return PyObjectResultStr(fdisk_parttype_get_name(self->type)); } + static PyObject *PartType_get_code(PartTypeObject *self) { return PyLong_FromUnsignedLong(fdisk_parttype_get_code(self->type)); } + static PyGetSetDef PartType_getseters[] = { {"name", (getter)PartType_get_name, NULL, "parttype human readable name", NULL}, {"code", (getter)PartType_get_code, NULL, "parttype DOS code", NULL}, -- cgit v1.2.3-18-g5258