Skip to content

Commit

Permalink
internal renames module => library
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Sep 24, 2019
1 parent 23b37ca commit bda662b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/UnifiedFFI/FFICalloutAPI.class.st
Expand Up @@ -105,7 +105,7 @@ FFICalloutAPI >> function: functionSignature library: moduleNameOrLibrary [
builder
signature: functionSignature;
sender: sender;
module: moduleNameOrLibrary ].
library: moduleNameOrLibrary ].
ffiMethod
selector: sender selector;
methodClass: sender methodClass. "Replace with generated ffi method, but save old one for future use"
Expand Down
30 changes: 15 additions & 15 deletions src/UnifiedFFI/FFICalloutMethodBuilder.class.st
Expand Up @@ -10,8 +10,8 @@ Class {
'requestor',
'sender',
'signature',
'module',
'functionResolutionStrategies'
'functionResolutionStrategies',
'library'
],
#category : #'UnifiedFFI-Callouts'
}
Expand Down Expand Up @@ -66,7 +66,7 @@ FFICalloutMethodBuilder >> createFFICalloutLiteralFromSpec: functionSpec [

externalFunction := ExternalLibraryFunction
name: functionSpec functionName
module: self moduleName
module: self libraryName
callType: self callType
returnType: functionSpec returnType externalTypeWithArity
argumentTypes: (functionSpec arguments collect: #externalTypeWithArity).
Expand Down Expand Up @@ -131,29 +131,29 @@ FFICalloutMethodBuilder >> initializeCalloutAPI: aCalloutAPI [
]

{ #category : #accessing }
FFICalloutMethodBuilder >> method [
^ self sender method
]

{ #category : #accessing }
FFICalloutMethodBuilder >> module [
^ module
FFICalloutMethodBuilder >> library [
^ library
]

{ #category : #accessing }
FFICalloutMethodBuilder >> module: moduleNameOrLibraryClass [
FFICalloutMethodBuilder >> library: aLibrary [
"A module can be a string with a path to the library or a reference to a class who is child
of FFILibrary.
Example: 'libc' or LibC"
module := moduleNameOrLibraryClass
library := aLibrary
]

{ #category : #accessing }
FFICalloutMethodBuilder >> moduleName [
FFICalloutMethodBuilder >> libraryName [
"Answer the module name, who can come from a string with the path to the module or a
reference to a class who is child of FFILibrary"
self module ifNil: [ ^ nil ].
^ self module asFFILibrary libraryName
self library ifNil: [ ^ nil ].
^ self library asFFILibrary libraryName
]

{ #category : #accessing }
FFICalloutMethodBuilder >> method [
^ self sender method
]

{ #category : #private }
Expand Down

0 comments on commit bda662b

Please sign in to comment.