Skip to content

Add PICOJSON_DISABLE_EXCEPTION macro switch to support -fno-exceptions - #118

Open
rhysd wants to merge 1 commit into
kazuho:masterfrom
rhysd:allow-disable-exception
Open

Add PICOJSON_DISABLE_EXCEPTION macro switch to support -fno-exceptions#118
rhysd wants to merge 1 commit into
kazuho:masterfrom
rhysd:allow-disable-exception

Conversation

@rhysd

@rhysd rhysd commented May 28, 2019

Copy link
Copy Markdown

Fixes #117

For supporting -fno-exceptions compiler option, this patch adds PICOJSON_DISABLE_EXCEPTION preprocessor macro switch. When it is defined, picojson utilizes std::abort instead of throw.

I confirmed picojson.h can be compiled with clang++ -fno-exception with this patch and all tests passed by make test.

@rhysd
rhysd force-pushed the allow-disable-exception branch from e3b558b to ae24181 Compare May 28, 2019 11:38
@rhysd rhysd changed the title Add $PICOJSON_DISABLE_EXCEPTION to support -fno-exceptions Add PICOJSON_DISABLE_EXCEPTION macro switch to support -fno-exceptions May 28, 2019
@ajtulloch

Copy link
Copy Markdown

Looks good IMO, this would be useful for some cases I'm interested in.

@kripton

kripton commented Jun 20, 2021

Copy link
Copy Markdown

@kazuho : Anything blocking to get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

picojson does not support -fno-exceptions

3 participants