Skip to content

Commit

Permalink
Add a FIXME memento
Browse files Browse the repository at this point in the history
  • Loading branch information
lelit committed Dec 15, 2017
1 parent 125f091 commit 6c02061
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions rapidjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,26 @@ do_decode(PyObject* decoder, const char* jsonStr, Py_ssize_t jsonStrLen,
Reader reader;
InsituStringStream ss(jsonStrCopy);

/* FIXME: isn't there a cleverer way to write the following?
Ideally, one would do something like:
unsigned flags = kParseInsituFlag;
if (! (numberMode & NM_NATIVE))
flags |= kParseNumbersAsStringsFlag;
if (numberMode & NM_NAN)
flags |= kParseNanAndInfFlag;
if (parseMode & PM_COMMENTS)
flags |= kParseCommentsFlag;
if (parseMode & PM_TRAILING_COMMAS)
flags |= kParseTrailingCommasFlag;
reader.Parse<flags>(ss, handler);
but C++ does not allow that...
*/

if (numberMode & NM_NAN)
if (numberMode & NM_NATIVE)
if (parseMode & PM_TRAILING_COMMAS)
Expand Down

0 comments on commit 6c02061

Please sign in to comment.