incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <>
Subject [jira] Updated: (LUCY-72) use short names wherever CHAZ_USE_SHORT_NAMES is in effect
Date Thu, 26 Nov 2009 19:20:39 GMT


Marvin Humphrey updated LUCY-72:

    Attachment: chaz_prefix-cleanup.patch

Attached two diff files.  The first is charmonize_c_short_names.diff, which
I'm not going to apply right now, but we should keep around pending further
discussions.  The second is another rev of chaz_prefix-cleanup.patch.  Aside
from charmonize.c getting broken out, there are only a few changed lines
relating to ModHandler.h in this version.

When we define macros, we should always use the fully qualified symbol names,
so that the macro will continue to work in the absence of
CHAZ_USE_SHORT_NAMES.  I.e. this change...

-#define CHAZ_MODHAND_END_RUN append_conf("\n")
+#define CHAZ_MODHAND_END_RUN chaz_ModHand_append_conf("\n")

... rather than this one:

-#define CHAZ_MODHAND_END_RUN append_conf("\n")
+#define CHAZ_MODHAND_END_RUN ModHand_append_conf("\n")

In all the changes this iteration, it turned out to be academic, because all
the affected macros only get invoked in the context of CHAZ_USE_SHORT_NAMES
anyway.  However, I think we should always define macros this way for
consistency's sake.  That's how I've tried to do things in the Lucy core,

> use short names wherever CHAZ_USE_SHORT_NAMES is in effect
> ----------------------------------------------------------
>                 Key: LUCY-72
>                 URL:
>             Project: Lucy
>          Issue Type: Task
>          Components: Charmonizer
>            Reporter: Peter Karman
>         Attachments: charmonize_c_short_names.diff, chaz_prefix-cleanup.patch, 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.

View raw message