MCPcopy Index your code
hub / github.com/nodejs/node / convertPointerArg

Function convertPointerArg

lib/internal/ffi/fast-api.js:120–135  ·  view source on GitHub ↗
(type, value, owner, index)

Source from the content-addressed store, hash-verified

118}
119
120function convertPointerArg(type, value, owner, index) {
121 if (needsNullPointerConversion(type) &&
122 (value === null || value === undefined)) {
123 return 0n;
124 }
125 if (hasStringPointerArg(type, value)) {
126 return getStringConversionPointer(owner, value, index);
127 }
128 if (hasPointerMemoryArg(type, value)) {
129 return getRawPointer(value);
130 }
131 if (needsRawPointerConversion(type)) {
132 return getRawPointer(value);
133 }
134 return value;
135}
136
137function getPointerConversionIndexes(argumentsTypes, rawFn) {
138 let indexes = null;

Callers 1

Calls 5

hasStringPointerArgFunction · 0.85
hasPointerMemoryArgFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…