[Patches] warning in timemodule.c

Peter Schneider-Kamp peter@schneider-kamp.de
Sun, 28 May 2000 11:31:29 +0200


This is a multi-part message in MIME format.
--------------9DCB11D1387E7912F52A84B4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Problem:
compilation of timemodule.c gives "assignment from
incompatible pointer type" error.

Solution:
explicit type cast

patch attached as plaintext context diff
--
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims").  To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.

I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation.  I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter@schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de
--------------9DCB11D1387E7912F52A84B4
Content-Type: text/plain; charset=us-ascii;
 name="striptime.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="striptime.patch"

diff -c --recursive python/dist/src/Modules/timemodule.c python-mod/dist/src/Modules/timemodule.c
*** python/dist/src/Modules/timemodule.c	Tue May  9 21:52:40 2000
--- python-mod/dist/src/Modules/timemodule.c	Sun May 28 10:47:43 2000
***************
*** 439,445 ****
  	if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt))
  	        return NULL;
  	memset((ANY *) &tm, '\0', sizeof(tm));
! 	s = strptime(buf, fmt, &tm);
  	if (s == NULL) {
  		PyErr_SetString(PyExc_ValueError, "format mismatch");
  		return NULL;
--- 439,445 ----
  	if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt))
  	        return NULL;
  	memset((ANY *) &tm, '\0', sizeof(tm));
! 	s = (char*)strptime(buf, fmt, &tm);
  	if (s == NULL) {
  		PyErr_SetString(PyExc_ValueError, "format mismatch");
  		return NULL;

--------------9DCB11D1387E7912F52A84B4--