|From:||Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>|
|Subject:||Re: Refactor textToQualifiedNameList()|
|Views:||Raw Message | Whole Thread | Download mbox|
At Fri, 24 Aug 2018 20:44:12 +0900, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> wrote in <20180824204412(dot)150979ae6b283ddb639f93f6(at)sraoss(dot)co(dot)jp>
> When working on other patch, I found there are almost same
> functions, texttoQualifiedNameList() and stringToQualifiedNameList().
> The only difference is the argument type, text or char*. I don't know
> why these functions are defined seperately, but I think the former
> function can be rewritten using the latter code as the attached patch.
> Is this reasonable fix?
The functions were introduced within a month for different
objectives in March and April, 2002. I supppose that they are
intentionally added as separate functions for simplicitly since
the second one is apparent CnP'ed from the first one.
Returning to the patch, the downside of it is that textToQNL
makes an extra and unused copy of the parameter string. (It's a
kind of bug that it is forgetting to free rawname.)
Maybe we can separate them into three functions (or one function
and two macros) to get rid of the duplication but I'm not sure
it's worth doing..
NTT Open Source Software Center
|Next Message||Andres Freund||2018-08-28 03:41:25||Re: Why hash OIDs?|
|Previous Message||Thomas Munro||2018-08-28 02:45:49||Re: Why hash OIDs?|