[Vm-dev] [squeak-dev] VM 4.4 build nastinesses - part 1 of probably many

tim Rowledge tim at rowledge.org
Thu Feb 14 00:42:27 UTC 2013


On 13-02-2013, at 3:46 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>> Surely if one were using &foo the cdecl ought to be foo(SQFile * bar) ?
> 
> 
> In my code base I never use &fileRecords, only fileRecords.  Where's
> the sqFileStdioHandlesInto(& filesRecords) call?  IMO it's wrong.
> 
primitiveFileStdioHandles
	"Answer an Array of file handles for standard in, standard out and standard error,
	 with nil in entries that are unvailable, e.g. because the platform does not provide
	 standard error, etc.  Fail if there are no standard i/o facilities on the platform or
	 if the security plugin denies access or if memory runs out."
	| fileRecords result validMask |
	<export: true>
	<var: 'fileRecords' declareC: 'SQFile fileRecords[3]'>
	sHFAfn ~= 0 ifTrue:
		[(self cCode: ' ((sqInt (*)(void))sHFAfn)()' inSmalltalk: [true]) ifFalse:
			[^interpreterProxy primitiveFail]].
	validMask := self sqFileStdioHandlesInto: (self addressOf: fileRecords).
[snip]


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: ARG: Agree to Run Garbage




More information about the Vm-dev mailing list