Skip to content

Commit

Permalink
fix: replace POSTJECT_SENTINEL_STRING macro with a const char*
Browse files Browse the repository at this point in the history
Maybe that will fix this error:
```
Error: Could not find the sentinel POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2: in the binary
    at inject (dist/api.js:5147:11)
    at async Context.<anonymous> (file:///home/circleci/project/test/cli.mjs:138:7)
```

Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/197/workflows/741145b6-e19e-4d09-b995-49eebc237962/jobs/1580
Signed-off-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
RaisinTen committed Oct 28, 2022
1 parent ea9adbe commit a61f9a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions postject-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ inline void postject_options_init(struct postject_options* options) {
}

static inline bool postject_has_resource() {
#define POSTJECT_SENTINEL_STRING \
"POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2:0"
return POSTJECT_SENTINEL_STRING[sizeof(POSTJECT_SENTINEL_STRING) - 2] == '1';
#undef POSTJECT_SENTINEL_STRING
const char* sentinel = "POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2:0";
return sentinel[strlen(sentinel) - 1] == '1';
}

static const void* postject_find_resource(
Expand Down

0 comments on commit a61f9a9

Please sign in to comment.