[
https://issues.apache.org/jira/browse/LUCY-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782946#action_12782946
]
Marvin Humphrey commented on LUCY-72:
-------------------------------------
Technical note about the patch first:
There's something a little strange. "svn diff" or however it was prepared
failed to detect that certain lines were changed:
{code:none}
void
-chaz_ModHand_shorten_macro(const char *sym)
+ModHand_shorten_macro(const char *sym)
{
ModHand_append_conf(" #define %s CHY_%s\n", sym, sym);
}
{code}
Note the "ModHand_append_conf". That line has actually changed -- it's just
"append_conf" in the repository now.
It turns out that everywhere that "append_conf" appeared in the code base --
and it's all over the place, in many files -- it wasn't detected as changed.
But clearly it *was* changed, because we see the changed line right there in
the patch. Weird.
In any case, I got everything to work by first manually applying the hunks
that had been rejected, then issuing the following command:
{code}
$ predit -T 's/\bappend_conf\b/ModHand_append_conf/g' charmonizer/src/
{code}
("predit", for "Perl Recursive EDITor", is a little app in the KS
trunk/devel/bin directory. It performs the specified transform on every file
within a directory tree, but before saving the changes it shows you a diff and
asks you to confirm, making it safer than the canonical "perl -pie".)
> use short names wherever CHAZ_USE_SHORT_NAMES is in effect
> ----------------------------------------------------------
>
> Key: LUCY-72
> URL: https://issues.apache.org/jira/browse/LUCY-72
> Project: Lucy
> Issue Type: Task
> Components: Charmonizer
> Reporter: Peter Karman
> Attachments: chaz_prefix-cleanup.patch
>
>
> Function names in .c files always use "short names"
> whenever the "LUCY_USE_SHORT_NAMES" macro is in effect -- e.g. we use
> "Sort_mergesort" rather than "lucy_Sort_mergesort".
>
> Within Charmonizer, we should be consistent about using short names
> everywhere the "CHAZ_USE_SHORT_NAMES" macro is in effect, but currently
> there are lots of places that we don't -- e.g. we use "chaz_Test_plan"
> rather than "Test_plan" within charmonizer/src/Charmonizer/Test.charm:
> void
> -chaz_Test_plan(TestBatch *batch)
> +Test_plan(TestBatch *batch)
> {
> printf("1..%u\n", batch->num_tests);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.