This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
TFLongTestStruct.class.st
109 lines (93 loc) · 2.59 KB
/
TFLongTestStruct.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
"
I am a test structure fill with longs
"
Class {
#name : #TFLongTestStruct,
#superclass : #FFIExternalStructure,
#classVars : [
'Char100',
'OFFSET_A',
'OFFSET_B',
'OFFSET_C',
'OFFSET_D',
'OFFSET_E',
'OFFSET_F'
],
#category : #'ThreadedFFI-Tests-Test-Structs'
}
{ #category : #'field definition' }
TFLongTestStruct class >> fieldsDesc [
"self rebuildFieldAccessors"
^ #(
Char100 a;
float b;
double c;
long d;
int e;
short f;
)
]
{ #category : #'field definition' }
TFLongTestStruct class >> initialize [
Char100 := FFITypeArray ofType: 'char' size: 100
]
{ #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' }
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' }
TFLongTestStruct >> b [
"This method was automatically generated"
^handle floatAt: OFFSET_B
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> b: anObject [
"This method was automatically generated"
handle floatAt: OFFSET_B put: anObject
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> c [
"This method was automatically generated"
^handle doubleAt: OFFSET_C
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> c: anObject [
"This method was automatically generated"
handle doubleAt: OFFSET_C put: anObject
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> d [
"This method was automatically generated"
^handle platformLongAt: OFFSET_D
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> d: anObject [
"This method was automatically generated"
^handle platformLongAt: OFFSET_D put: anObject
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> e [
"This method was automatically generated"
^handle signedLongAt: OFFSET_E
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> e: anObject [
"This method was automatically generated"
handle signedLongAt: OFFSET_E put: anObject
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> f [
"This method was automatically generated"
^handle signedShortAt: OFFSET_F
]
{ #category : #'accessing structure variables' }
TFLongTestStruct >> f: anObject [
"This method was automatically generated"
handle signedShortAt: OFFSET_F put: anObject
]