mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-27 03:48:21 +01:00
38 lines
760 B
Smalltalk
38 lines
760 B
Smalltalk
Class {
|
|
#name : #DiyaFFIBase,
|
|
#superclass : #DiyaBaseObject,
|
|
#category : #'Diya-Core'
|
|
}
|
|
|
|
{ #category : #accessing }
|
|
DiyaFFIBase class >> checkSymbol [
|
|
^self subclassResponsibility
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaFFIBase class >> ffiLibraryName [
|
|
^ self moduleName
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaFFIBase class >> libNames [
|
|
^self subclassResponsibility
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaFFIBase class >> moduleName [
|
|
self libNames do:[:aName|
|
|
[
|
|
(ExternalAddress loadSymbol: self checkSymbol from: aName) ifNotNil: [
|
|
^ aName
|
|
]
|
|
] on: Error do: [ ]
|
|
].
|
|
DiyaFFILibNotFound signal: 'Unable to find FFI library (', self checkSymbol, ')'.
|
|
]
|
|
|
|
{ #category : #'library path' }
|
|
DiyaFFIBase >> ffiLibraryName [
|
|
^self class ffiLibraryName
|
|
]
|