1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-27 20:08:22 +01:00
Diya-API/Diya/DiyaFFIBase.class.st

38 lines
760 B
Smalltalk
Raw Normal View History

2021-12-18 13:07:30 +01:00
Class {
#name : #DiyaFFIBase,
#superclass : #DiyaBaseObject,
#category : #'Diya-Core'
}
{ #category : #accessing }
DiyaFFIBase class >> checkSymbol [
^self subclassResponsibility
]
2021-12-20 01:14:35 +01:00
{ #category : #accessing }
DiyaFFIBase class >> ffiLibraryName [
^ self moduleName
]
2021-12-18 13:07:30 +01:00
{ #category : #accessing }
DiyaFFIBase class >> libNames [
^self subclassResponsibility
]
{ #category : #accessing }
DiyaFFIBase class >> moduleName [
self libNames do:[:aName|
2022-08-09 00:22:18 +02:00
[
(ExternalAddress loadSymbol: self checkSymbol from: aName) ifNotNil: [
^ aName
]
] on: Error do: [ ]
2021-12-18 13:07:30 +01:00
].
DiyaFFILibNotFound signal: 'Unable to find FFI library (', self checkSymbol, ')'.
2021-12-18 13:07:30 +01:00
]
2021-12-20 01:14:35 +01:00
{ #category : #'library path' }
DiyaFFIBase >> ffiLibraryName [
^self class ffiLibraryName
]