--- a/Cface__SmalltalkXGenerator.st Fri Dec 26 23:53:37 2014 +0100
+++ b/Cface__SmalltalkXGenerator.st Sun Dec 28 22:29:51 2014 +0100
@@ -93,6 +93,22 @@
"Modified: / 05-09-2012 / 11:48:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+sourceForSizeof: size
+
+ ^String streamContents:
+ [:s|
+ s
+ nextPutAll: 'sizeof'; cr;
+ tab4; nextPutAll:'"Returns size of undelaying structure in bytes"'; cr;
+ cr;
+ tab4;
+ nextPutAll: '^';
+ nextPutAll: size printString
+ ]
+
+ "Created: / 28-12-2014 / 21:33:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
sourceForStructFieldGetter:field
^ (String
streamContents:[:s |
@@ -140,23 +156,6 @@
"Created: / 09-09-2008 / 21:26:07 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 05-09-2012 / 11:48:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-sourceForStructSize: size
-
- ^String streamContents:
- [:s|
- s
- nextPutAll: 'structSize'; cr;
- tab4; nextPutAll:'"Returns size of undelaying structure in bytes"'; cr;
- cr;
- tab4;
- nextPutAll: '^';
- nextPutAll: size printString
- ]
-
- "Created: / 09-09-2008 / 17:12:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 10-09-2012 / 10:09:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkXGenerator methodsFor:'visiting'!
@@ -176,14 +175,14 @@
classVariableNames:
(String streamContents:
[:s|
- cEnumNode values do:
- [:cEnumValueNode|
- s nextPutAll: cEnumValueNode smalltalkName; space]]);
+ cEnumNode values
+ do: [:cEnumValueNode| s nextPutAll: cEnumValueNode smalltalkName]
+ separatedBy: [ s space ]
+ ]);
category:
cEnumNode smalltalkCategory;
package:
cEnumNode smalltalkPackage.
- cdc source: cdc definitionStringWithoutNamespace.
(changeset add: MethodDefinitionChange new)
@@ -223,7 +222,7 @@
"Created: / 03-07-2008 / 20:10:34 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 22-02-2009 / 15:03:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 17-09-2012 / 19:22:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-12-2014 / 21:09:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
visitCFunctionNode:functionNode
@@ -285,8 +284,7 @@
category:
cStructNode smalltalkCategory;
package:
- cStructNode smalltalkPackage.
- cdc source: cdc definitionStringWithoutNamespace]
+ cStructNode smalltalkPackage.]
ifNotNil:
[((smalltalkClass inheritsFrom: ExternalStructure) or:[(smalltalkClass inheritsFrom: ExternalAddress)])
ifFalse:
@@ -303,15 +301,15 @@
className:(cStructNode smalltalkClassNameWithNamespace , ' class')
asSymbol;
category:'accessing';
- selector:#structSize;
- source:(self sourceForStructSize: cStructNode cByteSize).
+ selector:#sizeof;
+ source:(self sourceForSizeof: cStructNode cByteSize).
cStructNode fields do:
[:fieldNode|self visit: fieldNode]
"Created: / 10-07-2008 / 08:46:12 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 22-02-2009 / 15:05:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 17-09-2012 / 19:20:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-12-2014 / 21:33:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
visitCTypedefNode: typedefNode
@@ -336,3 +334,4 @@
version_SVN
^ '$Id$'
! !
+