rxi / aria

A tiny, embeddable lisp-shaped language implemented in C89
MIT License
167 stars 18 forks source link

Add #ifdef __cplusplus macros and extern "C" { to aria.h #4

Open jason-c-daniels opened 7 years ago

jason-c-daniels commented 7 years ago

Use Case A developer wants to embed aria into a C++ applications.

Estimated Impact Cons: None I can think of. Pros: Extends the reach of host languages.

rxi commented 7 years ago

Sounds good -- If you want to make a pull request with this change, assure it works as expected with C++ and doesn't change the existing behaviour with C I can accept it.

jason-c-daniels commented 7 years ago

This is how I'm already using it. aria.h and aria.c are in a static library and consumed by a C++ app. I'll create the pull request after I remake this change in isolation (it's mixed with other stuff right now) and test with GCC and the -std=c89 flag. Are there additional flags you'd like me to use for the compilation?

rxi commented 7 years ago

-Wall -Wextra -std=c89 -pedantic should be all you need.