maradydd: (Default)
[personal profile] maradydd
I have written compiler-specific code. Cf. "mood".

(no subject)

Date: 2005-04-05 07:59 am (UTC)
From: [identity profile] elwe.livejournal.com
Ick. What did you do?

(no subject)

Date: 2005-04-05 08:05 am (UTC)
From: [identity profile] maradydd.livejournal.com
I'm working on a SWIG wrapper for a function which (at the moment) has a float** as one of its arguments. In one of my rewrite attempts, I exploited the fact that gcc will let you specify the bounds of an array parameter as variables within the scope of a function declaration, as long as those variables are passed in first. Evidently this is a gcc-specific extension, though I'd be surprised if other compilers didn't do it too.

It compiles, but the generated wrapper doesn't (before, both the C and the wrapper compiled, but there was a runtime complaint in the interpreter about expecting a pointer type). Reading through the docs more closely, I see that I actually need to use a typemap, which should make things considerably less ugly, so now I'm working on wrapping my head around that.

Profile

maradydd: (Default)
maradydd

September 2010

S M T W T F S
   1234
567891011
12131415 161718
19202122232425
26 27282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags