Merge lp://qastaging/~danilo/pygettextpo/simplify into lp://qastaging/pygettextpo
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~danilo/pygettextpo/simplify |
Merge into: | lp://qastaging/pygettextpo |
Diff against target: |
169 lines (+40/-92) 1 file modified
gettextpo.c (+40/-92) |
To merge this branch: | bzr merge lp://qastaging/~danilo/pygettextpo/simplify |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Launchpad code reviewers | Pending | ||
Review via email: mp+86870@code.qastaging.launchpad.net |
Description of the change
Simplify the C code behind simple set_msg* methods to facilitate code reuse.
Since I'd like to extend it to support all the other current features of libgettextpo, and a bunch of other methods would need the same code for executing a bunch of actions (set_msgctxt, set_extracted_
Alternative approach for this would have been to define a macro, which might be faster (no passing around of function pointers), but it would have resulted in larger binaries and would have been uglier (\ continuation lines and such).
'make check' confirms no tests are broken (all the modified methods are tested in a basic way, but that should be sufficient for the type of changes here).
Unmerged revisions
- 28. By Данило Шеган
-
Merge pep8-fixes.
- 27. By Данило Шеган
-
Remove "helper" from the helper function name: it confused me a bare month after I introduced it because I read it as "helper message" instead of a "helper function on message class".
- 26. By Данило Шеган
-
Reuse the new helper function in other similar methods.
- 25. By Данило Шеган
-
Extract po message setter pattern into a helper method.