Skip to content

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

Closed

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

Activity

  1. added 2 commits that reference this issue on Jan 3, 2024
    6d03ef9
    ad2ee66
  2. added a commit that references this issue on Jan 3, 2024
    2f102be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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