Skip to content

Commit 6049beb

Browse files
committed
Rename parameters for clarity
1 parent f473c42 commit 6049beb

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/lib/libembind.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ var LibraryEmbind = {
421421
return this.fromWireType({{{ makeGetValue('pointer', '0', '*') }}});
422422
},
423423

424-
$installIndexedIterator: (proto, sizeName, getName) => {
424+
$installIndexedIterator: (proto, sizeMethodName, getMethodName) => {
425425
if (typeof Symbol === 'undefined' || !Symbol.iterator) {
426426
return;
427427
}
@@ -448,8 +448,8 @@ var LibraryEmbind = {
448448

449449
if (!proto[Symbol.iterator]) {
450450
proto[Symbol.iterator] = function() {
451-
const size = this[sizeName]();
452-
return makeIterator(size, (i) => this[getName](i));
451+
const size = this[sizeMethodName]();
452+
return makeIterator(size, (i) => this[getMethodName](i));
453453
};
454454
}
455455
},
@@ -1759,12 +1759,12 @@ var LibraryEmbind = {
17591759
_embind_register_iterable__deps: [
17601760
'$whenDependentTypesAreResolved', '$installIndexedIterator', '$AsciiToString',
17611761
],
1762-
_embind_register_iterable: (rawClassType, rawElementType, sizeName, getName) => {
1763-
sizeName = AsciiToString(sizeName);
1764-
getName = AsciiToString(getName);
1762+
_embind_register_iterable: (rawClassType, rawElementType, sizeMethodName, getMethodName) => {
1763+
sizeMethodName = AsciiToString(sizeMethodName);
1764+
getMethodName = AsciiToString(getMethodName);
17651765
whenDependentTypesAreResolved([], [rawClassType, rawElementType], (types) => {
17661766
const classType = types[0];
1767-
installIndexedIterator(classType.registeredClass.instancePrototype, sizeName, getName);
1767+
installIndexedIterator(classType.registeredClass.instancePrototype, sizeMethodName, getMethodName);
17681768
return [];
17691769
});
17701770
},

src/lib/libembind_gen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ var LibraryEmbind = {
636636

637637
},
638638
_embind_register_iterable__deps: ['$whenDependentTypesAreResolved'],
639-
_embind_register_iterable: (rawClassType, rawElementType, sizeName, getName) => {
639+
_embind_register_iterable: (rawClassType, rawElementType, sizeMethodName, getMethodName) => {
640640
whenDependentTypesAreResolved([], [rawClassType, rawElementType], (types) => {
641641
const classType = types[0];
642642
const elementType = types[1];

system/include/emscripten/bind.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ void _embind_register_class_class_property(
220220
void _embind_register_iterable(
221221
TYPEID classType,
222222
TYPEID elementType,
223-
const char* sizeName,
224-
const char* getName);
223+
const char* sizeMethodName,
224+
const char* getMethodName);
225225

226226
EM_VAL _embind_create_inheriting_constructor(
227227
const char* constructorName,
@@ -1594,14 +1594,14 @@ class class_ {
15941594

15951595
template<typename ElementType>
15961596
EMSCRIPTEN_ALWAYS_INLINE const class_& iterable(
1597-
const char* sizeName,
1598-
const char* getName) const {
1597+
const char* sizeMethodName,
1598+
const char* getMethodName) const {
15991599
using namespace internal;
16001600
_embind_register_iterable(
16011601
TypeID<ClassType>::get(),
16021602
TypeID<ElementType>::get(),
1603-
sizeName,
1604-
getName);
1603+
sizeMethodName,
1604+
getMethodName);
16051605
return *this;
16061606
}
16071607

0 commit comments

Comments
 (0)