Hello,

I divided the last patch into one typo-fix patch and one
improvement patch. This is the former one.

At Fri, 06 Nov 2015 11:47:17 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI 
<horiguchi.kyot...@lab.ntt.co.jp> wrote in 
<20151106.114717.170526268.horiguchi.kyot...@lab.ntt.co.jp>
> > Just a minor nitpick -
> > 
> > ... character beginning *at* s ...?
> > 
> > If so, there would be one more instance to fix.
> 
> I think so.  I overlooked both of them. And as you mention,
> PQdsplen has the same kind of typo. It returns display length of
> the *character* beginning *at* s, too.

This patch fixes wrong comments of PQmblen() and PQdsplen().  The
comments say that "returns the length of the word beginning s"
but what it actually does is "returns the length of the
*character* beginning at s".

regards,

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
>From fed3b85cdca897d4439bb0589fd39642826b84b8 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horiguchi.kyot...@lab.ntt.co.jp>
Date: Fri, 26 Feb 2016 14:05:24 +0900
Subject: [PATCH] Fix wrong comments for PQmblen() and PQdsplen().

These functions count a length actually of a character but wrongly
documented that length of a word in their comments. This patch fixes
them.
---
 src/interfaces/libpq/fe-misc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 9be05a0..30cee7f 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -1180,7 +1180,7 @@ pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time)
  */
 
 /*
- * returns the byte length of the word beginning s, using the
+ * returns the byte length of the character beginning at s, using the
  * specified encoding.
  */
 int
@@ -1190,7 +1190,7 @@ PQmblen(const char *s, int encoding)
 }
 
 /*
- * returns the display length of the word beginning s, using the
+ * returns the display length of the character beginning at s, using the
  * specified encoding.
  */
 int
-- 
1.8.3.1

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to