Skip to content

Commit

Permalink
Remove unnecessary wrapper around emscripten_fetch_free. NFC (emscrip…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 authored Jan 2, 2025
1 parent 08aecce commit 8cb6dbf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/library_fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var LibraryFetch = {
_emscripten_fetch_get_response_headers_length: fetchGetResponseHeadersLength,
_emscripten_fetch_get_response_headers__deps: ['$lengthBytesUTF8', '$stringToUTF8'],
_emscripten_fetch_get_response_headers: fetchGetResponseHeaders,
_emscripten_fetch_free: fetchFree,
emscripten_fetch_free: fetchFree,

#if FETCH_SUPPORT_INDEXEDDB
$fetchDeleteCachedData: fetchDeleteCachedData,
Expand Down
2 changes: 1 addition & 1 deletion src/library_sigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ sigs = {
_emscripten_dlopen_js__sig: 'vpppp',
_emscripten_dlsync_threads__sig: 'v',
_emscripten_dlsync_threads_async__sig: 'vppp',
_emscripten_fetch_free__sig: 'vi',
_emscripten_fetch_get_response_headers__sig: 'pipp',
_emscripten_fetch_get_response_headers_length__sig: 'pi',
_emscripten_fs_load_embedded_files__sig: 'vp',
Expand Down Expand Up @@ -628,6 +627,7 @@ sigs = {
emscripten_exit_pointerlock__sig: 'i',
emscripten_exit_soft_fullscreen__sig: 'i',
emscripten_exit_with_live_runtime__sig: 'v',
emscripten_fetch_free__sig: 'vi',
emscripten_fiber_swap__sig: 'vpp',
emscripten_force_exit__sig: 'vi',
emscripten_get_battery_status__sig: 'ip',
Expand Down
4 changes: 0 additions & 4 deletions system/lib/fetch/emscripten_fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ void emscripten_fetch_free_unpacked_response_headers(char **unpackedHeaders) {
}
}

void emscripten_fetch_free(unsigned int id) {
return _emscripten_fetch_free(id);
}

static void fetch_free(emscripten_fetch_t* fetch) {
emscripten_fetch_free(fetch->id);
fetch->id = 0;
Expand Down
2 changes: 1 addition & 1 deletion system/lib/libc/emscripten_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct emscripten_fetch_t;
void emscripten_start_fetch(struct emscripten_fetch_t* fetch);
size_t _emscripten_fetch_get_response_headers_length(int32_t fetchID);
size_t _emscripten_fetch_get_response_headers(int32_t fetchID, char *dst, size_t dstSizeBytes);
void _emscripten_fetch_free(unsigned int);
void emscripten_fetch_free(unsigned int);

EMSCRIPTEN_RESULT _emscripten_set_offscreencanvas_size(const char *target, int width, int height);

Expand Down

0 comments on commit 8cb6dbf

Please sign in to comment.