[Python-checkins] python/dist/src/Doc/ext extending.tex, 1.21.2.2, 1.21.2.3 noddy2.c, 1.5.6.1, 1.5.6.2 run-func.c, 1.2.16.1, 1.2.16.2
jhylton@users.sourceforge.net
jhylton at users.sourceforge.net
Sun Oct 16 07:24:30 CEST 2005
- Previous message: [Python-checkins] python/dist/src/Doc/api abstract.tex, 1.17.2.2, 1.17.2.3 concrete.tex, 1.17.2.2, 1.17.2.3 init.tex, 1.3.2.2, 1.3.2.3 newtypes.tex, 1.13.2.2, 1.13.2.3 refcounts.dat, 1.43.2.1, 1.43.2.2 utilities.tex, 1.5.2.2, 1.5.2.3
- Next message: [Python-checkins] python/dist/src/Doc/dist dist.tex, 1.42.2.2, 1.42.2.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Doc/ext
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27718/Doc/ext
Modified Files:
Tag: ast-branch
extending.tex noddy2.c run-func.c
Log Message:
Merge head to branch (for the last time)
Index: extending.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v
retrieving revision 1.21.2.2
retrieving revision 1.21.2.3
diff -u -d -r1.21.2.2 -r1.21.2.3
--- extending.tex 7 Jan 2005 06:57:02 -0000 1.21.2.2
+++ extending.tex 16 Oct 2005 05:23:57 -0000 1.21.2.3
@@ -374,7 +374,7 @@
\cdata{_PyImport_Inittab} table. The easiest way to handle this is to
statically initialize your statically-linked modules by directly
calling \cfunction{initspam()} after the call to
-\cfunction{Py_Initialize()} or \cfunction{PyMac_Initialize()}:
+\cfunction{Py_Initialize()}:
\begin{verbatim}
int
@@ -426,7 +426,6 @@
(chapter \ref{building}) and additional information that pertains only
to building on Windows (chapter \ref{building-on-windows}) for more
information about this.
-% XXX Add information about Mac OS
If you can't use dynamic loading, or if you want to make your module a
permanent part of the Python interpreter, you will have to change the
@@ -1307,7 +1306,7 @@
/* C API functions */
#define PySpam_System_NUM 0
#define PySpam_System_RETURN int
-#define PySpam_System_PROTO (char *command)
+#define PySpam_System_PROTO (const char *command)
/* Total number of C API pointers */
#define PySpam_API_pointers 1
Index: noddy2.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/noddy2.c,v
retrieving revision 1.5.6.1
retrieving revision 1.5.6.2
diff -u -d -r1.5.6.1 -r1.5.6.2
--- noddy2.c 7 Jan 2005 06:57:02 -0000 1.5.6.1
+++ noddy2.c 16 Oct 2005 05:23:57 -0000 1.5.6.2
@@ -3,8 +3,8 @@
typedef struct {
PyObject_HEAD
- PyObject *first;
- PyObject *last;
+ PyObject *first; /* first name */
+ PyObject *last; /* last name */
int number;
} Noddy;
Index: run-func.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/run-func.c,v
retrieving revision 1.2.16.1
retrieving revision 1.2.16.2
diff -u -d -r1.2.16.1 -r1.2.16.2
--- run-func.c 28 Apr 2003 17:38:05 -0000 1.2.16.1
+++ run-func.c 16 Oct 2005 05:23:57 -0000 1.2.16.2
@@ -20,11 +20,8 @@
Py_DECREF(pName);
if (pModule != NULL) {
- pDict = PyModule_GetDict(pModule);
- /* pDict is a borrowed reference */
-
- pFunc = PyDict_GetItemString(pDict, argv[2]);
- /* pFun: Borrowed reference */
+ pFunc = PyDict_GetItemString(pModule, argv[2]);
+ /* pFunc is a new reference */
if (pFunc && PyCallable_Check(pFunc)) {
pArgs = PyTuple_New(argc - 3);
@@ -46,18 +43,19 @@
Py_DECREF(pValue);
}
else {
+ Py_DECREF(pFunc);
Py_DECREF(pModule);
PyErr_Print();
fprintf(stderr,"Call failed\n");
return 1;
}
- /* pDict and pFunc are borrowed and must not be Py_DECREF-ed */
}
else {
if (PyErr_Occurred())
PyErr_Print();
fprintf(stderr, "Cannot find function \"%s\"\n", argv[2]);
}
+ Py_XDECREF(pFunc);
Py_DECREF(pModule);
}
else {
- Previous message: [Python-checkins] python/dist/src/Doc/api abstract.tex, 1.17.2.2, 1.17.2.3 concrete.tex, 1.17.2.2, 1.17.2.3 init.tex, 1.3.2.2, 1.3.2.3 newtypes.tex, 1.13.2.2, 1.13.2.3 refcounts.dat, 1.43.2.1, 1.43.2.2 utilities.tex, 1.5.2.2, 1.5.2.3
- Next message: [Python-checkins] python/dist/src/Doc/dist dist.tex, 1.42.2.2, 1.42.2.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list