Skip to content

Passing strings requires passing their lengths as well #1

Open
@MakisH

Description

@MakisH

Only in the module variant of our Fortran bindings, we always need to pass the (exact, or sometimes large enough) size of the strings, e.g. for participant name, data name, names of actions, etc. See, for example, how we create the interface:

CALL precicef_create(participantName, config, rank, commsize, 50, 50)

The last two arguments (50, 50) refer to the maximum sizes of participantName and config.

This is not only ugly, but can also be dangerous in some cases.

Compare with the solverdummy using the preCICE-internal fortran bindings:

CALL precicef_create(participantName, config, rank, commsize)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions