Conversation
|
Let's watch it burn :-) |
|
Maybe it is time to reconsider using my |
IMHO that sounds overkill, just to tame the compiler. We could silence it with a pragma... |
| js_std_cmd(/*SetOpaque*/1, rt, ts); | ||
| } | ||
|
|
||
| #pragma GCC diagnostic push |
There was a problem hiding this comment.
If we are going to work around the compiler, might as well be straight about it.
| return JS_ThrowSyntaxError(ctx, fmt, buf); | ||
| } | ||
|
|
||
| /* %s is replaced by 'atom'. The macro is used so that gcc can check |
There was a problem hiding this comment.
This actually didn't work, it errors in bellart/quickjs if you enable -Wformat=2
|
|
||
| #define ATOM_GET_STR_BUF_SIZE 64 | ||
|
|
||
| /* Should only be used for debug. */ |
There was a problem hiding this comment.
It's also used to print exception messages.
| c |= str->u.str8[i]; | ||
| } | ||
| if (c < 0x80) | ||
| return (const char *)str->u.str8; |
There was a problem hiding this comment.
This return broke the "contract" that the function filled the buffer in. Since this is hardly a hot path, let's be consistent and copy the content to the provided buffer.
|
@bnoordhuis PTAL! You can see the thought process in the shitty conning log. Worry not I'll squash :-) |
No description provided.