File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ template <int argCount>
42
42
struct CallbackStructure {
43
43
const StructureType placeholderFlag;
44
44
const int arity;
45
- const TYPEID argType[argCount + 1 ];
45
+ const TYPEID returnType;
46
+ const TYPEID argType[argCount];
46
47
};
47
48
48
49
template <typename ReturnType, typename ... Args>
@@ -59,7 +60,7 @@ const CallbackStructure<sizeof...(Args)> Typer<std::function<ReturnType (Args...
59
60
StructureType :: callback,
60
61
sizeof ...(Args),
61
62
Typer<ReturnType>::makeID (),
62
- Typer<Args>::makeID ()...
63
+ { Typer<Args>::makeID ()... }
63
64
};
64
65
65
66
} // namespace
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ External NBind :: queryType(
139
139
140
140
case StructureType :: callback:
141
141
callbackSpec = static_cast <const CallbackStructure<1 > *>(id.getStructure ());
142
- rawTypePtr = callbackSpec->argType + 1 ;
142
+ rawTypePtr = callbackSpec->argType ;
143
143
arity = callbackSpec->arity ;
144
144
145
145
while (arity--) {
@@ -149,7 +149,7 @@ External NBind :: queryType(
149
149
150
150
result = outTypeDetail.call <External>(
151
151
static_cast <unsigned char >(placeholderFlag),
152
- NBindID (callbackSpec->argType [ 0 ] ),
152
+ NBindID (callbackSpec->returnType ),
153
153
typeIdList
154
154
);
155
155
You can’t perform that action at this time.
0 commit comments