diff --git a/src/ThreadedFFI-Tests/TFCallbacksTest.class.st b/src/ThreadedFFI-Tests/TFCallbacksTest.class.st index 1167d15..f3392d9 100644 --- a/src/ThreadedFFI-Tests/TFCallbacksTest.class.st +++ b/src/ThreadedFFI-Tests/TFCallbacksTest.class.st @@ -7,7 +7,7 @@ Class { #category : #'ThreadedFFI-Tests' } -{ #category : #utils } +{ #category : #utilities } TFCallbacksTest >> callCallback: aCallback [ | functionDefinition function | diff --git a/src/ThreadedFFI-Tests/TFInnerTestStruct.class.st b/src/ThreadedFFI-Tests/TFInnerTestStruct.class.st index c65db44..88178f5 100644 --- a/src/ThreadedFFI-Tests/TFInnerTestStruct.class.st +++ b/src/ThreadedFFI-Tests/TFInnerTestStruct.class.st @@ -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. diff --git a/src/ThreadedFFI-Tests/TFLongTestStruct.class.st b/src/ThreadedFFI-Tests/TFLongTestStruct.class.st index 4922e31..491cb5a 100644 --- a/src/ThreadedFFI-Tests/TFLongTestStruct.class.st +++ b/src/ThreadedFFI-Tests/TFLongTestStruct.class.st @@ -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 diff --git a/src/ThreadedFFI-Tests/TFNestedTestStruct.class.st b/src/ThreadedFFI-Tests/TFNestedTestStruct.class.st index 288acbc..48b0e30 100644 --- a/src/ThreadedFFI-Tests/TFNestedTestStruct.class.st +++ b/src/ThreadedFFI-Tests/TFNestedTestStruct.class.st @@ -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 diff --git a/src/ThreadedFFI-Tests/TFPointTestStruct.class.st b/src/ThreadedFFI-Tests/TFPointTestStruct.class.st index 4067b89..dcf8584 100644 --- a/src/ThreadedFFI-Tests/TFPointTestStruct.class.st +++ b/src/ThreadedFFI-Tests/TFPointTestStruct.class.st @@ -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 diff --git a/src/ThreadedFFI-UFFI-Tests/TFTestLibraryUsingSameThreadRunner.class.st b/src/ThreadedFFI-UFFI-Tests/TFTestLibraryUsingSameThreadRunner.class.st index f7bb139..5b83955 100644 --- a/src/ThreadedFFI-UFFI-Tests/TFTestLibraryUsingSameThreadRunner.class.st +++ b/src/ThreadedFFI-UFFI-Tests/TFTestLibraryUsingSameThreadRunner.class.st @@ -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' @@ -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' diff --git a/src/ThreadedFFI-UFFI-Tests/TFUFFIStructuresTest.class.st b/src/ThreadedFFI-UFFI-Tests/TFUFFIStructuresTest.class.st index 2c4b81b..ee7395a 100644 --- a/src/ThreadedFFI-UFFI-Tests/TFUFFIStructuresTest.class.st +++ b/src/ThreadedFFI-UFFI-Tests/TFUFFIStructuresTest.class.st @@ -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 | @@ -68,7 +68,7 @@ TFUFFIStructuresTest >> testPassingByParameterAStructInC [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testPassingByParameterAStructInPharo [ | aPoint return | @@ -82,7 +82,7 @@ TFUFFIStructuresTest >> testPassingByParameterAStructInPharo [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testPassingByReferenceAStructInC [ | aPoint return | @@ -98,7 +98,7 @@ TFUFFIStructuresTest >> testPassingByReferenceAStructInC [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testPassingLongStructByCopyInC [ | aPoint return | @@ -115,7 +115,7 @@ TFUFFIStructuresTest >> testPassingLongStructByCopyInC [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testPassingLongStructByCopyInPharo [ | aPoint return | @@ -130,7 +130,7 @@ TFUFFIStructuresTest >> testPassingLongStructByCopyInPharo [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testPassingLongStructByReferenceInC [ | aPoint return | @@ -147,7 +147,7 @@ TFUFFIStructuresTest >> testPassingLongStructByReferenceInC [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testPassingNestedStructByCopyInC [ | st return | @@ -163,7 +163,7 @@ TFUFFIStructuresTest >> testPassingNestedStructByCopyInC [ ] -{ #category : #'as yet unclassified' } +{ #category : #tests } TFUFFIStructuresTest >> testReturningAnStruct [ | aPoint | diff --git a/src/ThreadedFFI/TFCallback.class.st b/src/ThreadedFFI/TFCallback.class.st index e08296c..f5e2e27 100644 --- a/src/ThreadedFFI/TFCallback.class.st +++ b/src/ThreadedFFI/TFCallback.class.st @@ -40,7 +40,7 @@ TFCallback class >> forCallback: aCallback parameters: parameterTypes returnType yourself ] -{ #category : #'private primitives' } +{ #category : #'private - primitives' } TFCallback class >> primUnregister: callbackHandle [ @@ -199,7 +199,7 @@ TFCallback >> thunk [ ^ self getHandle ] -{ #category : #'private operations' } +{ #category : #'private - operations' } TFCallback >> validateTypes [ parameterTypes do: [ :each | each validate ]. diff --git a/src/ThreadedFFI/TFCallbackQueue.class.st b/src/ThreadedFFI/TFCallbackQueue.class.st index fe61330..48e7a2b 100644 --- a/src/ThreadedFFI/TFCallbackQueue.class.st +++ b/src/ThreadedFFI/TFCallbackQueue.class.st @@ -132,7 +132,7 @@ TFCallbackQueue >> nextPendingCallback [ ^ TFCallbackInvocation fromHandle: externalAddress ] -{ #category : #'private primitives' } +{ #category : #'private - primitives' } TFCallbackQueue >> primNextPendingCallback [ diff --git a/src/ThreadedFFI/TFPointerType.class.st b/src/ThreadedFFI/TFPointerType.class.st index d591bea..16a3de3 100644 --- a/src/ThreadedFFI/TFPointerType.class.st +++ b/src/ThreadedFFI/TFPointerType.class.st @@ -22,7 +22,7 @@ TFPointerType >> readValue: anExternalAddress offset: offset [ ^ anExternalAddress pointerAt: offset ] -{ #category : #writting } +{ #category : #writing } TFPointerType >> write: anExternalAddress into: targetAddress [ targetAddress diff --git a/src/ThreadedFFI/TFSameThreadCall.class.st b/src/ThreadedFFI/TFSameThreadCall.class.st index d3296c9..ae2e261 100644 --- a/src/ThreadedFFI/TFSameThreadCall.class.st +++ b/src/ThreadedFFI/TFSameThreadCall.class.st @@ -44,7 +44,7 @@ TFSameThreadCall >> invokeFunction: aTFExternalFunction withArguments: aCollecti self primitiveFailed ] -{ #category : #'as yet unclassified' } +{ #category : #accessing } TFSameThreadCall >> parameters: aCollection [ self shouldBeImplemented. ] diff --git a/src/ThreadedFFI/TFStringType.class.st b/src/ThreadedFFI/TFStringType.class.st index 9e87cdf..689277f 100644 --- a/src/ThreadedFFI/TFStringType.class.st +++ b/src/ThreadedFFI/TFStringType.class.st @@ -13,7 +13,7 @@ Class { #category : #'ThreadedFFI-Types' } -{ #category : #writting } +{ #category : #writing } TFStringType >> allocateString: aString [ | anExternalAddress | @@ -22,7 +22,7 @@ TFStringType >> allocateString: aString [ ^ anExternalAddress ] -{ #category : #'as yet unclassified' } +{ #category : #accessing } TFStringType >> allocatedStrings [ ^ AllocatedStrings ifNil: [ AllocatedStrings := Set new ] @@ -34,7 +34,7 @@ TFStringType >> basicType [ ^ TFBasicType pointer ] -{ #category : #writting } +{ #category : #writing } TFStringType >> callbackReadValue: anExternalAddress [ ^ (self readValue: anExternalAddress) readStringUTF8 @@ -72,7 +72,7 @@ TFStringType >> emitMarshallToPrimitive: anIRBuilder [ ] -{ #category : #writting } +{ #category : #writing } TFStringType >> freeValueIfNeeded: aCHeapValueHolder [ | pointer | @@ -91,7 +91,7 @@ TFStringType >> marshallToPrimitive: aValue [ ] -{ #category : #writting } +{ #category : #writing } TFStringType >> prepareStringForMarshalling: aStringOrExternalAddress [ "The TFString type supports four possible parameters. @@ -124,13 +124,13 @@ TFStringType >> prepareStringForMarshalling: aStringOrExternalAddress [ ^ self error: 'Could not handle this object' ] -{ #category : #writting } +{ #category : #writing } TFStringType >> readValue: anExternalAddress [ ^ self basicType readValue: anExternalAddress ] -{ #category : #writting } +{ #category : #writing } TFStringType >> write: aStringOrExternalAddress into: targetAddress [ "If the argument is a aString I have to allocate it and later free it" diff --git a/src/ThreadedFFI/TFStructType.class.st b/src/ThreadedFFI/TFStructType.class.st index 0f73868..df04977 100644 --- a/src/ThreadedFFI/TFStructType.class.st +++ b/src/ThreadedFFI/TFStructType.class.st @@ -59,7 +59,7 @@ TFStructType >> callbackWrite: aNumber into: anExternalAddress [ self write: aNumber getHandle into: anExternalAddress ] -{ #category : #utils } +{ #category : #utilities } TFStructType >> copyFrom: from to: to size: size [ "Copy from the from an externalAdress or a ByteArray or to a ByteArray or an External Address" @@ -97,7 +97,7 @@ TFStructType >> free [ ^ self primitiveFailed ] -{ #category : #'as yet unclassified' } +{ #category : #utilities } TFStructType >> freeValueIfNeeded: anExternalAddress [ "Nothing to free"