(rawFn, argumentTypes, returnType, owner)
| 80 | } |
| 81 | |
| 82 | function wrapFFIFunction(rawFn, argumentTypes, returnType, owner) { |
| 83 | if (argumentTypes === undefined && rawFn !== undefined && rawFn !== null) { |
| 84 | const sbArguments = rawFn[kSbArguments]; |
| 85 | argumentTypes = sbArguments ?? rawFn[kFastArguments]; |
| 86 | if (sbArguments !== undefined) { |
| 87 | returnType = rawFn[kSbReturn]; |
| 88 | } |
| 89 | } |
| 90 | initializeFastBufferMetadata(rawFn, argumentTypes); |
| 91 | const wrapped = wrapWithSharedBuffer( |
| 92 | rawFn, |
| 93 | argumentTypes === undefined ? undefined : makeSignature(argumentTypes, returnType)); |
| 94 | if (wrapped !== rawFn) { |
| 95 | return wrapped; |
| 96 | } |
| 97 | return wrapWithRawPointerConversions(rawFn, argumentTypes, owner); |
| 98 | } |
| 99 | |
| 100 | const rawGetFunction = DynamicLibrary.prototype.getFunction; |
| 101 | const rawGetFunctions = DynamicLibrary.prototype.getFunctions; |
no test coverage detected
searching dependent graphs…