Skip to content

Commit e386223

Browse files
committed
chore: clean-up native wrappers to ensure consistency with documented return value
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent e60e084 commit e386223

6 files changed

Lines changed: 18 additions & 12 deletions

File tree

lib/node_modules/@stdlib/napi/argv-complex128array/lib/native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ var addon = require( './../src/addon.node' );
4343
*/
4444
function wrapper( v ) {
4545
if ( isComplex128Array( v ) ) {
46-
v = reinterpret( v, 0 );
46+
addon( reinterpret( v, 0 ) );
47+
} else {
48+
addon( v );
4749
}
48-
addon( v );
4950
return v;
5051
}
5152

lib/node_modules/@stdlib/napi/argv-complex64array/lib/native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ var addon = require( './../src/addon.node' );
4343
*/
4444
function wrapper( v ) {
4545
if ( isComplex64Array( v ) ) {
46-
v = reinterpret( v, 0 );
46+
addon( reinterpret( v, 0 ) );
47+
} else {
48+
addon( v );
4749
}
48-
addon( v );
4950
return v;
5051
}
5152

lib/node_modules/@stdlib/napi/argv-strided-complex128array/lib/native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ var addon = require( './../src/addon.node' );
4343
*/
4444
function wrapper( v ) {
4545
if ( isComplex128Array( v ) ) {
46-
v = reinterpret( v, 0 );
46+
addon( reinterpret( v, 0 ) );
47+
} else {
48+
addon( v );
4749
}
48-
addon( v );
4950
return v;
5051
}
5152

lib/node_modules/@stdlib/napi/argv-strided-complex128array2d/lib/native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ var addon = require( './../src/addon.node' );
4343
*/
4444
function wrapper( v ) {
4545
if ( isComplex128Array( v ) ) {
46-
v = reinterpret( v, 0 );
46+
addon( reinterpret( v, 0 ) );
47+
} else {
48+
addon( v );
4749
}
48-
addon( v );
4950
return v;
5051
}
5152

lib/node_modules/@stdlib/napi/argv-strided-complex64array/lib/native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ var addon = require( './../src/addon.node' );
4343
*/
4444
function wrapper( v ) {
4545
if ( isComplex64Array( v ) ) {
46-
v = reinterpret( v, 0 );
46+
addon( reinterpret( v, 0 ) );
47+
} else {
48+
addon( v );
4749
}
48-
addon( v );
4950
return v;
5051
}
5152

lib/node_modules/@stdlib/napi/argv-strided-complex64array2d/lib/native.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ var addon = require( './../src/addon.node' );
4343
*/
4444
function wrapper( v ) {
4545
if ( isComplex64Array( v ) ) {
46-
v = reinterpret( v, 0 );
46+
addon( reinterpret( v, 0 ) );
47+
} else {
48+
addon( v );
4749
}
48-
addon( v );
4950
return v;
5051
}
5152

0 commit comments

Comments
 (0)