Skip to content

Bug in page:html5.h (EMSCRIPTEN_WEBGL_CONTEXT_HANDLE) #20993

@zturtleman

Description

@zturtleman

The html5.h documentation specifies that EMSCRIPTEN_WEBGL_CONTEXT_HANDLE is a typedef to an int but it was changed to intptr_t recently.

I noticed this because I ran into a printf("%d", contextHandle) formatting error in my application that hadn't changed. (Error due to my usage of -Werror=format.)

error: format specifies type 'int' but the argument has type 'EMSCRIPTEN_WEBGL_CONTEXT_HANDLE' (aka 'long') [-Werror,-Wformat]

long and int are both 4 bytes in the build but requires a different printf format specifier. (I fixed my application and it's not really a big deal.)

I don't know if the API change matters (should it continue to use int for wasm32?) or if just the documentation should be updated.

URL: ../../docs/api_reference/html5.h

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions