Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Updating method categorization.
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Jul 20, 2021
1 parent 82a3581 commit 81bd182
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion src/ThreadedFFI-Tests/TFCallbacksTest.class.st
Expand Up @@ -7,7 +7,7 @@ Class {
#category : #'ThreadedFFI-Tests'
}

{ #category : #utils }
{ #category : #utilities }
TFCallbacksTest >> callCallback: aCallback [

| functionDefinition function |
Expand Down
8 changes: 4 additions & 4 deletions src/ThreadedFFI-Tests/TFInnerTestStruct.class.st
Expand Up @@ -23,25 +23,25 @@ TFInnerTestStruct class >> fieldsDesc [
)
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFInnerTestStruct >> a [
"This method was automatically generated"
^handle unsignedCharAt: OFFSET_A
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFInnerTestStruct >> a: anObject [
"This method was automatically generated"
handle unsignedCharAt: OFFSET_A put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFInnerTestStruct >> b [
"This method was automatically generated"
^ExternalData fromHandle: (handle pointerAt: OFFSET_B) type: ExternalType void asPointerType
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFInnerTestStruct >> b: anObject [
"This method was automatically generated"
handle pointerAt: OFFSET_B put: anObject getHandle.
Expand Down
24 changes: 12 additions & 12 deletions src/ThreadedFFI-Tests/TFLongTestStruct.class.st
Expand Up @@ -36,73 +36,73 @@ TFLongTestStruct class >> initialize [
Char100 := FFITypeArray ofType: 'char' size: 100
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> a [
"This method was automatically generated"
^(FFITypeArray ofType: #FFICharacterType size: 100) fromHandle: (handle copyFrom: OFFSET_A to: OFFSET_A + 99)
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> a: anObject [
"This method was automatically generated"
handle replaceFrom: OFFSET_A to: OFFSET_A + 99 with: anObject getHandle startingAt: 1
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> b [
"This method was automatically generated"
^handle floatAt: OFFSET_B
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> b: anObject [
"This method was automatically generated"
handle floatAt: OFFSET_B put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> c [
"This method was automatically generated"
^handle doubleAt: OFFSET_C
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> c: anObject [
"This method was automatically generated"
handle doubleAt: OFFSET_C put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> d [
"This method was automatically generated"
^handle platformLongAt: OFFSET_D
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> d: anObject [
"This method was automatically generated"
^handle platformLongAt: OFFSET_D put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> e [
"This method was automatically generated"
^handle signedLongAt: OFFSET_E
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> e: anObject [
"This method was automatically generated"
handle signedLongAt: OFFSET_E put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> f [
"This method was automatically generated"
^handle signedShortAt: OFFSET_F
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFLongTestStruct >> f: anObject [
"This method was automatically generated"
handle signedShortAt: OFFSET_F put: anObject
Expand Down
12 changes: 6 additions & 6 deletions src/ThreadedFFI-Tests/TFNestedTestStruct.class.st
Expand Up @@ -24,37 +24,37 @@ TFNestedTestStruct class >> fieldsDesc [
)
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFNestedTestStruct >> inner [
"This method was automatically generated"
^ TFInnerTestStruct fromHandle: (handle referenceStructAt: OFFSET_INNER length: TFInnerTestStruct byteSize)
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFNestedTestStruct >> inner: anObject [
"This method was automatically generated"
handle structAt: OFFSET_INNER put: anObject getHandle length: TFInnerTestStruct byteSize
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFNestedTestStruct >> x [
"This method was automatically generated"
^handle floatAt: OFFSET_X
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFNestedTestStruct >> x: anObject [
"This method was automatically generated"
handle floatAt: OFFSET_X put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFNestedTestStruct >> y [
"This method was automatically generated"
^handle doubleAt: OFFSET_Y
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFNestedTestStruct >> y: anObject [
"This method was automatically generated"
handle doubleAt: OFFSET_Y put: anObject
Expand Down
8 changes: 4 additions & 4 deletions src/ThreadedFFI-Tests/TFPointTestStruct.class.st
Expand Up @@ -22,25 +22,25 @@ TFPointTestStruct class >> fieldsDesc [
)
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFPointTestStruct >> x [
"This method was automatically generated"
^handle signedLongAt: OFFSET_X
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFPointTestStruct >> x: anObject [
"This method was automatically generated"
handle signedLongAt: OFFSET_X put: anObject
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFPointTestStruct >> y [
"This method was automatically generated"
^handle signedLongAt: OFFSET_Y
]

{ #category : #'accessing structure variables' }
{ #category : #'accessing - structure variables' }
TFPointTestStruct >> y: anObject [
"This method was automatically generated"
handle signedLongAt: OFFSET_Y put: anObject
Expand Down
Expand Up @@ -7,13 +7,13 @@ Class {
#category : #'ThreadedFFI-UFFI-Tests'
}

{ #category : #'accessing platform' }
{ #category : #'accessing - platform' }
TFTestLibraryUsingSameThreadRunner >> calloutAPIClass [

^ TFCalloutAPI
]

{ #category : #'accessing platform' }
{ #category : #'accessing - platform' }
TFTestLibraryUsingSameThreadRunner >> macLibraryName [

^ 'libTestLibrary.dylib'
Expand All @@ -25,13 +25,13 @@ TFTestLibraryUsingSameThreadRunner >> runner [
^ TFSameThreadRunner uniqueInstance
]

{ #category : #'accessing platform' }
{ #category : #'accessing - platform' }
TFTestLibraryUsingSameThreadRunner >> unixModuleName [

^ 'libTestLibrary.so'
]

{ #category : #'accessing platform' }
{ #category : #'accessing - platform' }
TFTestLibraryUsingSameThreadRunner >> win32LibraryName [

^ 'TestLibrary.dll'
Expand Down
32 changes: 16 additions & 16 deletions src/ThreadedFFI-UFFI-Tests/TFUFFIStructuresTest.class.st
Expand Up @@ -4,55 +4,55 @@ Class {
#category : #'ThreadedFFI-UFFI-Tests'
}

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> passStructByParameter: aPoint x: x y: y [

^ self ffiCall: #(int assertCorrectPoint(TFPointTestStruct aPoint, int x, int y))
]

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> passStructByReference: aPoint [

^ self ffiCall: #(void* id_pointer(TFPointTestStruct* aPoint))
]

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> passingLongStructByCopy: st b: b c: c d: d [

^ self ffiCall: #(int passingLongStruct(TFLongTestStruct st, float b, double c, long d))
]

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> passingLongStructByReference: st b: b c: c d: d [

^ self ffiCall: #(int passingLongStructByRef(TFLongTestStruct* st, float b, double c, long d))
]

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> passingNestedStructByCopy: st a: a y: y [

^ self ffiCall: #(int passingNestedStruct(TFNestedTestStruct st, char a, double y))
]

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> returnNewPointX: x Y: y [

^ self ffiCall: #(TFPointTestStruct newPoint(int x, int y))
]

{ #category : #'as yet unclassified' }
{ #category : #'private - ffi' }
TFUFFIStructuresTest >> sizeOfNestedStruct [

^ self ffiCall: #(int sizeOfNestedStruct())
]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testNestedStructSize [

self assert: TFNestedTestStruct byteSize equals: self sizeOfNestedStruct
]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingByParameterAStructInC [

| aPoint return |
Expand All @@ -68,7 +68,7 @@ TFUFFIStructuresTest >> testPassingByParameterAStructInC [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingByParameterAStructInPharo [

| aPoint return |
Expand All @@ -82,7 +82,7 @@ TFUFFIStructuresTest >> testPassingByParameterAStructInPharo [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingByReferenceAStructInC [

| aPoint return |
Expand All @@ -98,7 +98,7 @@ TFUFFIStructuresTest >> testPassingByReferenceAStructInC [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingLongStructByCopyInC [

| aPoint return |
Expand All @@ -115,7 +115,7 @@ TFUFFIStructuresTest >> testPassingLongStructByCopyInC [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingLongStructByCopyInPharo [

| aPoint return |
Expand All @@ -130,7 +130,7 @@ TFUFFIStructuresTest >> testPassingLongStructByCopyInPharo [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingLongStructByReferenceInC [

| aPoint return |
Expand All @@ -147,7 +147,7 @@ TFUFFIStructuresTest >> testPassingLongStructByReferenceInC [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testPassingNestedStructByCopyInC [

| st return |
Expand All @@ -163,7 +163,7 @@ TFUFFIStructuresTest >> testPassingNestedStructByCopyInC [

]

{ #category : #'as yet unclassified' }
{ #category : #tests }
TFUFFIStructuresTest >> testReturningAnStruct [

| aPoint |
Expand Down
4 changes: 2 additions & 2 deletions src/ThreadedFFI/TFCallback.class.st
Expand Up @@ -40,7 +40,7 @@ TFCallback class >> forCallback: aCallback parameters: parameterTypes returnType
yourself
]

{ #category : #'private primitives' }
{ #category : #'private - primitives' }
TFCallback class >> primUnregister: callbackHandle [
<primitive: 'primitiveUnregisterCallback'>

Expand Down Expand Up @@ -199,7 +199,7 @@ TFCallback >> thunk [
^ self getHandle
]

{ #category : #'private operations' }
{ #category : #'private - operations' }
TFCallback >> validateTypes [

parameterTypes do: [ :each | each validate ].
Expand Down
2 changes: 1 addition & 1 deletion src/ThreadedFFI/TFCallbackQueue.class.st
Expand Up @@ -132,7 +132,7 @@ TFCallbackQueue >> nextPendingCallback [
^ TFCallbackInvocation fromHandle: externalAddress
]

{ #category : #'private primitives' }
{ #category : #'private - primitives' }
TFCallbackQueue >> primNextPendingCallback [
<primitive: 'primitiveReadNextCallback'>

Expand Down
2 changes: 1 addition & 1 deletion src/ThreadedFFI/TFPointerType.class.st
Expand Up @@ -22,7 +22,7 @@ TFPointerType >> readValue: anExternalAddress offset: offset [
^ anExternalAddress pointerAt: offset
]

{ #category : #writting }
{ #category : #writing }
TFPointerType >> write: anExternalAddress into: targetAddress [

targetAddress
Expand Down

0 comments on commit 81bd182

Please sign in to comment.