Skip to content

Commit

Permalink
Revert "Use the already available Py_STRINGIFY macro"
Browse files Browse the repository at this point in the history
The Py_STRINGIFY() macro is not available in Python 3.4.

This reverts commit ef54589.
  • Loading branch information
lelit committed Aug 18, 2017
1 parent ef54589 commit 4b47be3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rapidjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2740,7 +2740,10 @@ PyInit_rapidjson()
PyModule_AddIntConstant(m, "PM_COMMENTS", PM_COMMENTS);
PyModule_AddIntConstant(m, "PM_TRAILING_COMMAS", PM_TRAILING_COMMAS);

PyModule_AddStringConstant(m, "__version__", Py_STRINGIFY(PYTHON_RAPIDJSON_VERSION));
#define STRINGIFY(x) XSTRINGIFY(x)
#define XSTRINGIFY(x) #x

PyModule_AddStringConstant(m, "__version__", STRINGIFY(PYTHON_RAPIDJSON_VERSION));
PyModule_AddStringConstant(m, "__author__", "Ken Robbins <ken@kenrobbins.com>");
PyModule_AddStringConstant(m, "__rapidjson_version__", RAPIDJSON_VERSION_STRING);

Expand Down

0 comments on commit 4b47be3

Please sign in to comment.