Bizarre happening in my plugin

Bob.Cowdery at CGI-Europe.com Bob.Cowdery at CGI-Europe.com
Sun Jan 22 14:26:37 UTC 2006


John M. McIntosh wrote:

> It's the
> 
> self cCode: 'return value'

Getting there, but clearly I don't completely understand yet.

Here's the code in calling order. I get 'Primitive Mode Change failed' from
this. The dll is called ok from the run/stop so it has to be parameters
still.

primModeChng: mode
  	<primitive: 'modeChng' module:'SDRPhasingDSPPlugin'>
	Transcript show: 'Primitive Mode Change failed'.
  	^ false

modeChng: mode
	self export: true.

	self 	primitive: 'Sideband'
		parameters: #(SmallInteger).

	(self
			cCode: 'SetSideband(mode)'
			inSmalltalk: [false])
		ifFalse: [^ interpreterProxy primitiveFail].

# the generated function and the function it calls
EXPORT(int) Sideband(void) {
	int mode;

	mode = interpreterProxy->stackIntegerValue(0);
	if (interpreterProxy->failed()) {
		return null;
	}
	if (!(SetSideband(mode))) {
		interpreterProxy->primitiveFail();
		return null;
	}
	if (interpreterProxy->failed()) {
		return null;
	}
	interpreterProxy->pop(1);
	return null;
}

int SetSideband( int sideband )
{
 	 m_sideband = sideband;
 	 return true;
}

Bob--

*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060122/dde09044/attachment.htm


More information about the Squeak-dev mailing list