Carpet defines globally visible functions without a "Carpet" prefix in their names

Issue #2584 resolved
Roland Haas created an issue

In carpet_public.h (the C header) Carpet defines a couple of helper functions that do not have the thorn name anywhere in them:

/* Call a schedule group */
int CallScheduleGroup(cGH *const cgh, const char *const group);

/* Call a local function */
int CallLocalFunction(cGH *const cgh, void (*const function)(cGH *const cgh));
int CallSinglemapFunction(cGH *const cgh,
                          void (*const function)(cGH *const cgh));
int CallLevelFunction(cGH *const cgh, void (*const function)(cGH *const cgh));
int CallGlobalFunction(cGH *const cgh, void (*const function)(cGH *const cgh));
int CallMetaFunction(cGH *const cgh, void (*const function)(cGH *const cgh));

which causes conflicts with CarpetX, that defines an aliased (much better) function CallScheduleGroup . Cactus thorn providing callable functions should prefix them by their thorn name to avoid name conflicts. Since these functions have been around for a while (and I think the one in conflict with CarpetX is used by CT_Multipole) some sort of backwards compatible solution that avoids the linker name clashes should be provided.

Comments (6)

  1. Log in to comment