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

Function initializeFastBufferMetadata

lib/internal/ffi/fast-api.js:151–168  ·  view source on GitHub ↗
(rawFn, argumentTypes)

Source from the content-addressed store, hash-verified

149}
150
151function initializeFastBufferMetadata(rawFn, argumentTypes) {
152 if (rawFn === undefined || rawFn === null || argumentTypes === undefined) {
153 return;
154 }
155 if (rawFn[kSbSharedBuffer] !== undefined) {
156 return;
157 }
158
159 if (rawFn[kFastArguments] !== undefined) {
160 for (let i = 0; i < argumentTypes.length; i++) {
161 const type = argumentTypes[i];
162 if (type === 'buffer' || type === 'arraybuffer') {
163 rawFn[kFastBuffer] = true;
164 break;
165 }
166 }
167 }
168}
169
170function inheritMetadata(wrapper, rawFn, nargs) {
171 ObjectDefineProperty(wrapper, 'name', {

Callers 1

wrapFFIFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…