FFI: FFI-Tools-mt.1.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FFI: FFI-Tools-mt.1.mcz

commits-2
Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:
http://source.squeak.org/FFI/FFI-Tools-mt.1.mcz

==================== Summary ====================

Name: FFI-Tools-mt.1
Author: mt
Time: 19 May 2020, 1:23:14.276702 pm
UUID: 5063ac2e-3c6e-be41-81bd-6dc2f87f025b
Ancestors:

Recue inspector for external structures from being deprecated.

==================== Snapshot ====================

SystemOrganization addCategory: #'FFI-Tools'!

----- Method: ExternalStructure>>inspectorClass (in category '*FFI-Tools') -----
inspectorClass

        ^ ExternalStructureInspector!

Inspector subclass: #ExternalStructureInspector
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: 'FFI-Tools'!

----- Method: ExternalStructureInspector>>recordFieldList (in category 'accessing') -----
recordFieldList
        | fields |
        fields := object class fields.
        (fields first isKindOf: Array) ifFalse: [fields := Array with: fields].
        ^fields collect: [ :field | field first ] thenSelect: [:name | name notNil]!

----- Method: ExternalStructureInspector>>streamFieldsOn: (in category 'fields - streaming') -----
streamFieldsOn: aStream

        self
                streamBaseFieldsOn: aStream;
                streamRecordFieldsOn: aStream.!

----- Method: ExternalStructureInspector>>streamRecordFieldsOn: (in category 'fields - streaming') -----
streamRecordFieldsOn: aStream

        self recordFieldList do: [:field |
                aStream nextPut: ((self newFieldForType: #record key: field)
                        valueGetter: [:object | object perform: field];
                        valueSetter: [:object :value | (field, ':') asSymbol with: value];
                        yourself)].!


Reply | Threaded
Open this post in threaded view
|

Re: FFI: FFI-Tools-mt.1.mcz

Eliot Miranda-2
Thanks you Marcel!!!!

On Tue, May 19, 2020 at 4:23 AM <[hidden email]> wrote:
Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:
http://source.squeak.org/FFI/FFI-Tools-mt.1.mcz

==================== Summary ====================

Name: FFI-Tools-mt.1
Author: mt
Time: 19 May 2020, 1:23:14.276702 pm
UUID: 5063ac2e-3c6e-be41-81bd-6dc2f87f025b
Ancestors:

Recue inspector for external structures from being deprecated.

==================== Snapshot ====================

SystemOrganization addCategory: #'FFI-Tools'!

----- Method: ExternalStructure>>inspectorClass (in category '*FFI-Tools') -----
inspectorClass

        ^ ExternalStructureInspector!

Inspector subclass: #ExternalStructureInspector
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: 'FFI-Tools'!

----- Method: ExternalStructureInspector>>recordFieldList (in category 'accessing') -----
recordFieldList
        | fields |
        fields := object class fields.
        (fields first isKindOf: Array) ifFalse: [fields := Array with: fields].
        ^fields collect: [ :field | field first ] thenSelect: [:name | name notNil]!

----- Method: ExternalStructureInspector>>streamFieldsOn: (in category 'fields - streaming') -----
streamFieldsOn: aStream

        self
                streamBaseFieldsOn: aStream;
                streamRecordFieldsOn: aStream.!

----- Method: ExternalStructureInspector>>streamRecordFieldsOn: (in category 'fields - streaming') -----
streamRecordFieldsOn: aStream

        self recordFieldList do: [:field |
                aStream nextPut: ((self newFieldForType: #record key: field)
                        valueGetter: [:object | object perform: field];
                        valueSetter: [:object :value | (field, ':') asSymbol with: value];
                        yourself)].!




--
_,,,^..^,,,_
best, Eliot