C extension problem (Solaris)

Christopher A. Craig com-nospam at ccraig.org
Thu Jun 28 08:15:29 EDT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was working with the Rational.py that comes with Python trying to
improve it's speed and I decided I could save quite a bit if I wrote
it as a C extension (mainly because I was doing a couple hundred
operations on long integers for each add, which could be done much
faster if I didn't have to go through PyNumber_<op> each time).  So I
wrote (and am nearly finished with) a rational type available at 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/pythonic/crat/cratmodule.c?rev=1.12&content-type=text/plain 
(currently cvs only).  

Though I have used the C API before, this was my first attempt at
defining a new type with it, and I had a problem.  It works fine on my
Linux/Intel box, but when I try to compile it on my Solaris 8
UltraSPARC box it has an item in the module dictionary that contains a
non-working reference to the subtraction routine.  

I've looked over it and I didn't define anything as non-static, so I
can't figure out where that reference came from.  Any suggestions?

- -- 
Christopher A. Craig <com-nospam at ccraig.org>
"In the beginning the Universe was created.  This has made a lot of people
very angry and been widely regarded as a bad move." Douglas Adams
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>

iEYEARECAAYFAjs7H9gACgkQjVztv3T8pzvktgCfREn2BkxskWmHKNVwZJudpUFY
JvkAoKMxppjgn5KpkqwWILcNmJ/Gyo+w
=AFF2
-----END PGP SIGNATURE-----



More information about the Python-list mailing list