Skip to content

Commit

Permalink
Use the already available Py_STRINGIFY macro
Browse files Browse the repository at this point in the history
  • Loading branch information
lelit committed Aug 18, 2017
1 parent 27fb7b3 commit ef54589
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rapidjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2740,10 +2740,7 @@ PyInit_rapidjson()
PyModule_AddIntConstant(m, "PM_COMMENTS", PM_COMMENTS);
PyModule_AddIntConstant(m, "PM_TRAILING_COMMAS", PM_TRAILING_COMMAS);

#define STRINGIFY(x) XSTRINGIFY(x)
#define XSTRINGIFY(x) #x

PyModule_AddStringConstant(m, "__version__", STRINGIFY(PYTHON_RAPIDJSON_VERSION));
PyModule_AddStringConstant(m, "__version__", Py_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 ef54589

Please sign in to comment.