Skip to content

cpp namespace pollution in julia.h #10682

@stevengj

Description

@stevengj

The julia.h file #defines a bunch of symbols that could easily conflict with other header files if someone is embedding Julia: NWORDS, NORETURN, DLLEXPORT, MAX_ALIGN, STORE_ARRAY_LEN, ARRAY_INLINE_NBYTES, ENABLE_INFERENCE, COPY_STACKS, STDCALL, NBITS ... (tons of stuff via libsupport.h)

It seems like it would be better to

  • qualify all preprocessor symbols with JL_ in the julia.h file
  • include libsupport.h only in julia_internal.h.

Metadata

Metadata

Assignees

No one assigned

    Labels

    embeddingEmbedding Julia using the C APIhelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions