Re: diffs for cursesmodule.c 1.0 -> 1.1

Guido.van.Rossum@cwi.nl
Thu, 01 Sep 1994 11:31:14 +0200

Here are additional diffs you need for cursesmodule.c. These build on
version 1.1 (without changing the version number -- unpatched 1.1
doesn't compile anyway). There's also a diff for rename1.h.

===================================================================
RCS file: /ufs/guido/CVSROOT/python/Include/rename1.h,v
retrieving revision 2.1.2.1
diff -c -r2.1.2.1 rename1.h
*** 2.1.2.1 1994/01/02 00:11:33
--- rename1.h 1994/08/30 11:57:57
***************
*** 33,38 ****
--- 33,39 ----
distribution. */

typedef ANY *PyUnivPtr;
+ typedef struct methodlist PyMethodDef;

#define Py_NO_DEBUG NDEBUG
#define Py_TRACE_REFS TRACE_REFS
***************
*** 88,93 ****
--- 89,95 ----
#define PyIntObject intobject
#define PyLongObject longobject
#define PyNothingObject noobject
+ #define PyObject object
#define PyStringObject stringobject
#define PyTypeObject typeobject
#define PyListObject listobject
***************
*** 315,324 ****
--- 317,328 ----
#define Py_BuildValue mkvalue
#define Py_VaBuildValue vmkvalue
#define PyArg_Parse getargs
+ #define PyArg_NoArgs(v) getargs(v, "")
#define PyArg_GetChar getichararg
#define PyArg_GetDoubleArray getidoublearray
#define PyArg_GetFloat getifloatarg
#define PyArg_GetFloatArray getifloatarray
+ #define PyArg_GetInt getintarg
#define PyArg_GetLong getilongarg
#define PyArg_GetLongArray getilongarray
#define PyArg_GetLongArraySize getilongarraysize
===================================================================
RCS file: /ufs/guido/CVSROOT/python/Modules/cursesmodule.c,v
retrieving revision 2.3
diff -c -r2.3 cursesmodule.c
*** 2.3 1994/08/31 22:06:24
--- cursesmodule.c 1994/08/31 22:13:09
***************
*** 1033,1038 ****
--- 1033,1040 ----

/* -------------------------------------------------------*/

+ static PyObject *ModDict;
+
static PyObject *
PyCurses_InitScr(self, args)
PyObject * self;
***************
*** 1052,1058 ****

/* This was moved from initcurses() because core dumped on SGI */
#define SetDictChar(string,ch) \
! PyDict_SetItemString(d,string,PyInt_FromLong(ch));

/* Here are some graphic symbols you can use */
SetDictChar("ACS_ULCORNER",(ACS_ULCORNER));
--- 1054,1060 ----

/* This was moved from initcurses() because core dumped on SGI */
#define SetDictChar(string,ch) \
! PyDict_SetItemString(ModDict,string,PyInt_FromLong(ch));

/* Here are some graphic symbols you can use */
SetDictChar("ACS_ULCORNER",(ACS_ULCORNER));
***************
*** 1387,1392 ****
--- 1389,1395 ----
Py_INCREF(PyCurses_ERR);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
+ ModDict = d; /* For PyCurses_InitScr */

/* Make the version available */
PyDict_SetItemString(d,"version",

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>