Re: Compiling _namewrapper.c against Python 2.4
"R. Tyler Croy" <[email protected]> Tue, 2 Nov 2010 20:10:38 -0700
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <[email protected]> |
--===============1511496441187294187==
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi"
Content-Disposition: inline
--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, 02 Nov 2010, Fred Ludlow wrote:
> Hi,
>=20
> I think an oldish bug has resurfaced (see
> http://web.archiveorange.com/archive/v/GBNPV1aKn5iohvd2oUFP). I just tried
> to build Cheetah 2.4.3 on a CentOS 5 virtual server running python 2.4 and
> couldn't compile _namewrapper.c as PyUnicode_FromFormat isn't defined for
> python 2.4.
What version of Python 2.4 is this? I'm building the current release just f=
ine
on Python 2.4.6/amd64.
> I've sort of fixed this (in the sense it now builds, can import _namewrap=
per
> and runs without warnings) by
>=20
> 1) adding the macro definition suggested in the above thread to
> cheetah/c/cheetah.h
> ie.
> #ifndef PyUnicode_FromFormat
> #define PyUnicode_FromFormat(a,b) PyString_FromFormat(a,b)
> #endif
>=20
> 2) Changing the call to this macro in _namewrapper.c line 61 to only take=
2
> arguments (However, I did this just by ditching the 2nd argument (excValu=
e)
> and removing the relevant '%U' from the format string, ie. the line now
> reads:
> newExcValue =3D PyUnicode_FromFormat("Exception while searching for
> \'%s\'",fullName);
>=20
> I'm not familiar with the Python C API (or C really), so not really sure
> what the best (and probably very simple) way to fix this properly is, but
> thought this might provide some help for anyone in a similar position.
>=20
> Cheers,
>=20
> Fred
> -------------------------------------------------------------------------=
-----
> Nokia and AT&T present the 2010 Calling All Innovators-North America cont=
est
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in market=
ing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store=
=20
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Cheetahtemplate-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
- R. Tyler Croy
--------------------------------------
GitHub: http://github.com/rtyler
Twitter: http://twitter.com/agentdero
--Qxx1br4bt0+wmkIi
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEARECAAYFAkzQ0q4ACgkQFCbH3D9R4W/3xQCeIE+MIgSX8Dgy7SV3EbrCJGuq
TyEAn0OQESd2/IsgJk0Z1IMoWApUOOHh
=k/LQ
-----END PGP SIGNATURE-----
--Qxx1br4bt0+wmkIi--
--===============1511496441187294187==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment. Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
--===============1511496441187294187==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
--===============1511496441187294187==--