From: | "Ideriha, Takeshi" <ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Size and size_t in dsa API |
Date: | 2018-09-20 06:28:13 |
Message-ID: | 4E72940DA2BF16479384A86D54D0988A6F19ABD9@G01JPEXMBKW04 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I'm trying to use DSA API and confused a little bit about $subject.
Some type of return value or arguments are defined as size_t
but others are as Size.
Example:
- dsa_area *dsa_create_in_place(void *place, size_t size,
int tranche_id, dsm_segment *segment)
- Size dsa_minimum_size(void)
I'm confused because Size and size_t is virtually equal but
they are mixed in dsa.c. At first I was thinking that there is
some distinguishing convention to use based on some context.
But according to this thread, which seems gone anywhere,
they are same.
https://www.postgresql.org/message-id/CAEepm%3D1eA0vsgA7-2oigKzqg10YeXoPWiS-fCuQRDLwwmgMXag%40mail.gmail.com
Are there still someone trying to this?
As a non-expert developer's opinion, I think mixing of Size and size_t makes difficult to understand source code.
===================================================
Takeshi Ideriha
Fujitsu Limited
From | Date | Subject | |
---|---|---|---|
Next Message | Adrien Nayrat | 2018-09-20 06:47:38 | Re: Postgres 11 release notes |
Previous Message | Kyotaro HORIGUCHI | 2018-09-20 06:18:13 | Re: Connection slots reserved for replication |