Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions system/include/emscripten/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#pragma once

#include <inttypes.h>

#include <emscripten/em_types.h>

#include <inttypes.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
34 changes: 17 additions & 17 deletions system/include/emscripten/bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
#error "embind requires -std=c++17 or newer"
#endif

#include <emscripten/em_asm.h>
#include <emscripten/val.h>
#include <emscripten/wire.h>

#include <cassert>
#include <cstddef>
#include <functional>
#include <map>
#include <optional>
#include <string>
#include <type_traits>
#include <vector>
#include <optional>

#include <emscripten/em_asm.h>
#include <emscripten/val.h>
#include <emscripten/wire.h>

#if __has_feature(leak_sanitizer) || __has_feature(address_sanitizer)
#include <sanitizer/lsan_interface.h>
Expand Down Expand Up @@ -434,7 +434,7 @@ template<typename ReturnType, typename... Args, typename... Policies>
void function(const char* name, ReturnType (*fn)(Args...), Policies...) {
using namespace internal;
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, Args...> args;
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = Invoker<ReturnPolicy, ReturnType, Args...>::invoke;
_embind_register_function(
name,
Expand Down Expand Up @@ -1295,7 +1295,7 @@ struct RegisterClassMethod<ReturnType (ClassType::*)(Args...)> {
template <typename CT, typename... Policies>
static void invoke(const char* methodName,
ReturnType (ClassType::*memberFunction)(Args...)) {
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = MethodInvoker<ReturnPolicy, decltype(memberFunction), ReturnType, ClassType*, Args...>::invoke;

typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, AllowedRawPointer<ClassType>, Args...> args;
Expand Down Expand Up @@ -1325,7 +1325,7 @@ struct RegisterClassMethod<ReturnType (ClassType::*)(Args...) const> {
template <typename CT, typename... Policies>
static void invoke(const char* methodName,
ReturnType (ClassType::*memberFunction)(Args...) const) {
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = MethodInvoker<ReturnPolicy, decltype(memberFunction), ReturnType, const ClassType*, Args...>::invoke;

typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, AllowedRawPointer<const ClassType>, Args...> args;
Expand Down Expand Up @@ -1356,7 +1356,7 @@ struct RegisterClassMethod<ReturnType (*)(ThisType, Args...)> {
static void invoke(const char* methodName,
ReturnType (*function)(ThisType, Args...)) {
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, ThisType, Args...> args;
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = FunctionInvoker<ReturnPolicy, decltype(function), ReturnType, ThisType, Args...>::invoke;
_embind_register_class_function(
TypeID<ClassType>::get(),
Expand Down Expand Up @@ -1385,7 +1385,7 @@ struct RegisterClassMethod<std::function<ReturnType (ThisType, Args...)>> {
static void invoke(const char* methodName,
std::function<ReturnType (ThisType, Args...)> function) {
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, ThisType, Args...> args;
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = FunctorInvoker<ReturnPolicy, decltype(function), ReturnType, ThisType, Args...>::invoke;
_embind_register_class_function(
TypeID<ClassType>::get(),
Expand All @@ -1408,7 +1408,7 @@ struct RegisterClassMethod<FunctionTag<Callable, ReturnType (ThisType, Args...)>
static void invoke(const char* methodName,
Callable& callable) {
typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, ThisType, Args...> args;
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = FunctorInvoker<ReturnPolicy, decltype(callable), ReturnType, ThisType, Args...>::invoke;
_embind_register_class_function(
TypeID<ClassType>::get(),
Expand Down Expand Up @@ -1546,7 +1546,7 @@ class class_ {
smart_ptr<SmartPtr>(smartPtrName);

typename WithPolicies<Policies...>::template ArgTypeList<SmartPtr, Args...> args;
using ReturnPolicy = GetReturnValuePolicy<SmartPtr, return_value_policy::take_ownership>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<SmartPtr, return_value_policy::take_ownership>::tag;
auto invoke = &Invoker<ReturnPolicy, SmartPtr, Args...>::invoke;
_embind_register_class_constructor(
TypeID<ClassType>::get(),
Expand Down Expand Up @@ -1646,7 +1646,7 @@ class class_ {
std::conjunction<internal::isPolicy<Policies>...>::value>::type>
EMSCRIPTEN_ALWAYS_INLINE const class_& property(const char* fieldName, const FieldType ClassType::*field, Policies...) const {
using namespace internal;
using ReturnPolicy = GetReturnValuePolicy<FieldType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<FieldType, Policies...>::tag;
typename WithPolicies<Policies...>::template ArgTypeList<FieldType> returnType;

auto getter = &MemberAccess<ClassType, FieldType>::template getWire<ClassType, ReturnPolicy>;
Expand Down Expand Up @@ -1674,7 +1674,7 @@ class class_ {
std::conjunction<internal::isPolicy<Policies>...>::value>::type>
EMSCRIPTEN_ALWAYS_INLINE const class_& property(const char* fieldName, FieldType ClassType::*field, Policies...) const {
using namespace internal;
using ReturnPolicy = GetReturnValuePolicy<FieldType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<FieldType, Policies...>::tag;
typename WithPolicies<Policies...>::template ArgTypeList<FieldType> returnType;

auto getter = &MemberAccess<ClassType, FieldType>::template getWire<ClassType, ReturnPolicy>;
Expand Down Expand Up @@ -1708,7 +1708,7 @@ class class_ {
typename std::conditional<std::is_same<PropertyType, internal::DeduceArgumentsTag>::value,
Getter,
FunctionTag<Getter, PropertyType>>::type> GP;
using ReturnPolicy = GetReturnValuePolicy<typename GP::ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<typename GP::ReturnType, Policies...>::tag;
auto gter = &GP::template get<ClassType, ReturnPolicy>;
typename WithPolicies<Policies...>::template ArgTypeList<typename GP::ReturnType> returnType;
_embind_register_class_property(
Expand Down Expand Up @@ -1747,7 +1747,7 @@ class class_ {
FunctionTag<Setter, PropertyType>>::type> SP;


using ReturnPolicy = GetReturnValuePolicy<typename GP::ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<typename GP::ReturnType, Policies...>::tag;
auto gter = &GP::template get<ClassType, ReturnPolicy>;
auto ster = &SP::template set<ClassType>;

Expand Down Expand Up @@ -1776,7 +1776,7 @@ class class_ {
using namespace internal;

typename WithPolicies<Policies...>::template ArgTypeList<ReturnType, Args...> args;
using ReturnPolicy = GetReturnValuePolicy<ReturnType, Policies...>::tag;
using ReturnPolicy = typename GetReturnValuePolicy<ReturnType, Policies...>::tag;
auto invoke = internal::Invoker<ReturnPolicy, ReturnType, Args...>::invoke;
_embind_register_class_class_function(
TypeID<ClassType>::get(),
Expand Down
1 change: 1 addition & 0 deletions system/include/emscripten/em_js.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
// additional macro later is added these will be expanded and we want
// to make sure the resulting expansion doesn't break the expectations
// of JS code
#include <stdbool.h>
#if defined(true) && defined(false)
#undef true
#undef false
Expand Down
2 changes: 0 additions & 2 deletions system/include/emscripten/em_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* found in the LICENSE file.
*/

#include <stdbool.h>

#pragma once

#include <stdbool.h>
Expand Down
4 changes: 2 additions & 2 deletions system/include/emscripten/emscripten.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
*/

#include "em_asm.h"
#include "em_js.h"
#include "em_macros.h"
#include "em_types.h"
#include "em_js.h"
#include "promise.h"
#include "wget.h"
#include "version.h"
#include "wget.h"

#ifdef __EMSCRIPTEN__
#ifndef EMSCRIPTEN
Expand Down
3 changes: 2 additions & 1 deletion system/include/emscripten/fetch.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

#pragma once

#include <emscripten/em_types.h>

#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <emscripten/em_types.h>

#ifdef __cplusplus
extern "C" {
Expand Down
6 changes: 3 additions & 3 deletions system/include/emscripten/fiber.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

#pragma once

#include <stdint.h>
#include <stddef.h>

#include <emscripten/emscripten.h>

#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
5 changes: 3 additions & 2 deletions system/include/emscripten/heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

#pragma once

#include <emscripten/emscripten.h>

#include <stdbool.h>
#include <stddef.h>
#include <stddef.h>
#include <stdint.h>
#include <emscripten/emscripten.h>
#include <stdint.h>
#include <stddef.h>

#define WASM_PAGE_SIZE 65536
#define EMSCRIPTEN_PAGE_SIZE WASM_PAGE_SIZE
Expand Down
6 changes: 3 additions & 3 deletions system/include/emscripten/html5.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

#pragma once

#include <pthread.h>
#include <emscripten/em_types.h>

#include <emscripten/emscripten.h>

// Include eventloop.h, console.h and html5_webgl.h for compat with older
// version of this header that used to define these functions.
#include <emscripten/eventloop.h>
#include <emscripten/console.h>
#include <emscripten/eventloop.h>
#include <emscripten/html5_webgl.h>

#include <pthread.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
4 changes: 3 additions & 1 deletion system/include/emscripten/html5_webgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

#pragma once

#include <stdint.h>
#include <emscripten/html5.h>

#include <stdint.h>
#include <pthread.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
3 changes: 2 additions & 1 deletion system/include/emscripten/proxying.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

#include <emscripten/emscripten.h>
#include <emscripten/promise.h>
#include <stdbool.h>

#include <pthread.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
Expand Down
11 changes: 5 additions & 6 deletions system/include/emscripten/threading.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@

#pragma once

#include <inttypes.h>
#include <pthread.h>
#include <stdbool.h>

#include <emscripten/atomic.h>
#include <emscripten/threading_primitives.h>

// Legacy proxying functions. See proxying.h for the new proxying system.
#include <emscripten/threading_legacy.h>
#include <emscripten/threading_primitives.h>

#include <inttypes.h>
#include <pthread.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions system/include/emscripten/threading_legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

#pragma once

#include <stdarg.h>

#include <emscripten/html5.h>

#include <stdarg.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
13 changes: 7 additions & 6 deletions system/include/emscripten/val.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

#pragma once

#include <cassert>
#include <emscripten/wire.h>

#include <array>
#include <cassert>
#include <climits>
#include <emscripten/wire.h>
#include <cstdint> // uintptr_t
#include <vector>
#include <type_traits>
#include <pthread.h>
#include <optional>
#include <pthread.h>
#include <type_traits>
#include <vector>
#if __cplusplus >= 202002L
#include <coroutine>
#include <exception>
Expand Down Expand Up @@ -595,7 +596,7 @@ class EMBIND_VISIBILITY_DEFAULT val {
static Ret internalCallWithPolicy(EM_VAL handle, const char *methodName, Args&&... args) {
using namespace internal;

using RetWire = BindingType<Ret>::WireType;
using RetWire = typename BindingType<Ret>::WireType;

static constexpr typename Policy::template ArgTypeList<Ret, Args...> argTypes;
thread_local EM_INVOKER mc = _emval_create_invoker(argTypes.getCount(), argTypes.getTypes(), Kind);
Expand Down
7 changes: 4 additions & 3 deletions system/include/emscripten/wasm_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

#pragma once

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <emscripten/atomic.h>
#include <emscripten/em_types.h>
#include <emscripten/threading_primitives.h>

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
6 changes: 3 additions & 3 deletions system/include/emscripten/webaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

#pragma once

#include <stdint.h>
#include <memory.h>

#include <emscripten/emscripten.h>
#include <emscripten/html5.h>

#include <memory.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
6 changes: 3 additions & 3 deletions system/include/emscripten/websocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

#pragma once

#include <stdint.h>
#include <memory.h>

#include <emscripten/emscripten.h>
#include <emscripten/html5.h>

#include <memory.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
2 changes: 1 addition & 1 deletion system/include/emscripten/wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ struct GetReturnValuePolicy<ReturnType, return_value_policy::reference, Rest...>

template<typename ReturnType, typename T, typename... Rest>
struct GetReturnValuePolicy<ReturnType, T, Rest...> {
using tag = GetReturnValuePolicy<ReturnType, Rest...>::tag;
using tag = typename GetReturnValuePolicy<ReturnType, Rest...>::tag;
};

template<typename... Policies>
Expand Down
Loading
Loading