Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9465)

Issue 5367046: Replace variable types from g* to standard types. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by hsumita
Modified:
12 years, 5 months ago
Reviewers:
shawn.p.huang, penghuang
CC:
komatsu, mukai, yusukes, nona, horo
Base URL:
git@github.com:hsumita/libpyzy.git@master
Visibility:
Public.

Description

Replace variable types from g* to standard types. replacing - gchar - char - gint - int, unsigned int, or size_t - guint -> unsigned int or size_t - guint8 -> unsigned char - gboolean -> bool - gsize -> size_t - gpointer -> void * - gconstpointer -> const void * - gunichar -> unichar (typedef of int on PyZyUtil.h) BUG=None TEST=Run a test

Patch Set 1 #

Patch Set 2 : Replace some 'unsigned int' to 'size_t' #

Total comments: 12

Patch Set 3 : Fix some bugs and styles. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+407 lines, -403 lines) Patch
M scripts/bopomofo.py View 1 chunk +1 line, -1 line 0 comments Download
M scripts/double.py View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M scripts/genbopomofokeyboard.py View 1 chunk +1 line, -1 line 0 comments Download
M scripts/genpuncttable.py View 2 chunks +2 lines, -2 lines 0 comments Download
M scripts/genpytable.py View 1 chunk +2 lines, -2 lines 0 comments Download
M scripts/gensimptradtable.py View 1 chunk +1 line, -1 line 0 comments Download
M scripts/update-simptrad-table.py View 1 chunk +1 line, -1 line 0 comments Download
M src/PyZyBopomofoContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/PyZyBopomofoContext.cc View 11 chunks +31 lines, -31 lines 0 comments Download
M src/PyZyBopomofoKeyboard.h View 1 chunk +1 line, -1 line 0 comments Download
M src/PyZyConfig.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/PyZyDatabase.h View 3 chunks +17 lines, -17 lines 0 comments Download
M src/PyZyDatabase.cc View 26 chunks +71 lines, -69 lines 0 comments Download
M src/PyZyDoublePinyinContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/PyZyDoublePinyinContext.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M src/PyZyDoublePinyinTable.h View 13 chunks +14 lines, -14 lines 0 comments Download
M src/PyZyDynamicSpecialPhrase.h View 1 chunk +5 lines, -6 lines 0 comments Download
M src/PyZyDynamicSpecialPhrase.cc View 7 chunks +17 lines, -16 lines 0 comments Download
M src/PyZyFullPinyinContext.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/PyZyInputContext.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/PyZyPhoneticContext.h View 1 3 chunks +14 lines, -14 lines 0 comments Download
M src/PyZyPhoneticContext.cc View 1 7 chunks +8 lines, -8 lines 0 comments Download
M src/PyZyPhrase.h View 3 chunks +8 lines, -8 lines 0 comments Download
M src/PyZyPhraseEditor.h View 3 chunks +15 lines, -15 lines 0 comments Download
M src/PyZyPhraseEditor.cc View 8 chunks +17 lines, -17 lines 0 comments Download
M src/PyZyPinyinArray.h View 3 chunks +7 lines, -7 lines 0 comments Download
M src/PyZyPinyinContext.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/PyZyPinyinContext.cc View 1 6 chunks +12 lines, -12 lines 0 comments Download
M src/PyZyPinyinParser.h View 2 chunks +12 lines, -13 lines 0 comments Download
M src/PyZyPinyinParser.cc View 8 chunks +36 lines, -35 lines 0 comments Download
M src/PyZySimpTradConverter.h View 1 chunk +1 line, -3 lines 0 comments Download
M src/PyZySimpTradConverter.cc View 7 chunks +18 lines, -18 lines 0 comments Download
M src/PyZySimpTradConverterTable.h View 1 chunk +1 line, -1 line 0 comments Download
M src/PyZySpecialPhrase.h View 2 chunks +3 lines, -4 lines 0 comments Download
M src/PyZySpecialPhraseTable.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/PyZySpecialPhraseTable.cc View 5 chunks +7 lines, -7 lines 0 comments Download
M src/PyZyString.h View 6 chunks +30 lines, -24 lines 0 comments Download
M src/PyZyTest.cc View 2 chunks +9 lines, -9 lines 0 comments Download
M src/PyZyTypes.h View 2 chunks +7 lines, -9 lines 0 comments Download
M src/PyZyUtil.h View 1 2 5 chunks +11 lines, -10 lines 0 comments Download

Messages

Total messages: 3
hsumita
12 years, 5 months ago (2011-11-14 11:43:39 UTC) #1
Peng
lgtm and with several minor issues. http://codereview.appspot.com/5367046/diff/1039/scripts/double.py File scripts/double.py (right): http://codereview.appspot.com/5367046/diff/1039/scripts/double.py#newcode4 scripts/double.py:4: print "static const ...
12 years, 5 months ago (2011-11-14 16:49:33 UTC) #2
hsumita
12 years, 5 months ago (2011-11-15 02:04:43 UTC) #3
Thank you for your review.
Submitting...

http://codereview.appspot.com/5367046/diff/1039/scripts/double.py
File scripts/double.py (right):

http://codereview.appspot.com/5367046/diff/1039/scripts/double.py#newcode4
scripts/double.py:4: print "static const unsigned char double_pinyin_%s_sheng[]
= {" % name.lower()
On 2011/11/14 16:49:33, Peng wrote:
> char?

Done.

http://codereview.appspot.com/5367046/diff/1039/scripts/double.py#newcode16
scripts/double.py:16: print "static const unsigned char
double_pinyin_%s_yun[][2] = {" % name.lower()
On 2011/11/14 16:49:33, Peng wrote:
> ditto

Done.

http://codereview.appspot.com/5367046/diff/1039/scripts/double.py#newcode36
scripts/double.py:36: const unsigned char  (&yun)[27][2];
On 2011/11/14 16:49:33, Peng wrote:
> ditto

Done.

http://codereview.appspot.com/5367046/diff/1039/src/PyZyPinyinContext.h
File src/PyZyPinyinContext.h (right):

http://codereview.appspot.com/5367046/diff/1039/src/PyZyPinyinContext.h#newco...
src/PyZyPinyinContext.h:31: PinyinContext (Config & config,
PhoneticContext::Observer * observer);
On 2011/11/14 16:49:33, Peng wrote:
> &config and *observer

Done.

http://codereview.appspot.com/5367046/diff/1039/src/PyZyUtil.h
File src/PyZyUtil.h (right):

http://codereview.appspot.com/5367046/diff/1039/src/PyZyUtil.h#newcode56
src/PyZyUtil.h:56: typedef unsigned int unichar;
On 2011/11/14 16:49:33, Peng wrote:
> How about put it in PyZy namespace?

Done.

http://codereview.appspot.com/5367046/diff/1039/src/PyZyUtil.h#newcode66
src/PyZyUtil.h:66: char* uuid;
On 2011/11/14 16:49:33, Peng wrote:
> char *uuid

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b