[gambit-list] Null pointer in scheme
Marc Feeley
feeley at iro.umontreal.ca
Sat May 12 11:13:43 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12-May-07, at 10:19 AM, David St-Hilaire wrote:
> (set! dev (createDevice EDT_OPENGL (vector 800 600) 16 #f
> use-shadows? #f 0))
>
> which when executed gives me the following problem:
>
> [dave at localhost demo]$ ./demo
> *** ERROR IN demo-main -- (Argument 7) Can't convert to C pointer
> (createDevice 5 '#(800 600) 16 #f #f #f 0)
>
> Can anyone tell me would I should do...? I know that the same line in
> c++ works fine:
>
> createDevice( video::EDT_OPENGL, dimension2d<s32>(640, 480), 16,
> false, false, false, 0);
>
#f is the Scheme value corresponding to the C NULL. So you need to do:
(createDevice 5 '#(800 600) 16 #f #f #f #f)
or
(define NULL #f)
(createDevice 5 '#(800 600) 16 #f #f #f NULL)
Marc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFGRdmo//V9Zc2T/v4RAnHuAJ4n+otYpsuIBBLfONveN4Rr8MJjwgCfSycF
VNeSWHvV6PULV+CmoR47pgQ=
=+EAq
-----END PGP SIGNATURE-----
More information about the Gambit-list
mailing list