Skip to content

Commit

Permalink
generate: fix strict mode define
Browse files Browse the repository at this point in the history
Before introduction of `LLHTTP_STRICT_MODE`, `llhttp` built defaulted to
loose mode output. Fix this incosistency and fix define checks as well.
  • Loading branch information
indutny committed Jul 21, 2020
1 parent 07469fd commit 3b6ea4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function guard(strict: string, loose: string): string {
return strict;
}

out += '#ifdef LLHTTP_STRICT_MODE\n';
out += '#if LLHTTP_STRICT_MODE\n';
out += '\n';
out += strict + '\n';
out += '\n';
Expand Down Expand Up @@ -78,7 +78,7 @@ headers += `#define LLHTTP_VERSION_PATCH ${version.patch}\n`;
headers += '\n';

headers += '#ifndef LLHTTP_STRICT_MODE\n';
headers += '# define LLHTTP_STRICT_MODE 1\n';
headers += '# define LLHTTP_STRICT_MODE 0\n';
headers += '#endif\n';
headers += '\n';

Expand Down

0 comments on commit 3b6ea4a

Please sign in to comment.