Rev 4732: Clean up the fprintf() debugging code. in http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple

John Arbash Meinel john at arbash-meinel.com
Thu Oct 1 22:00:23 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple

------------------------------------------------------------
revno: 4732
revision-id: john at arbash-meinel.com-20091001210016-qpui2k190ngeslyh
parent: john at arbash-meinel.com-20091001205755-6gvs1f6njipjbxo6
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-static-tuple
timestamp: Thu 2009-10-01 16:00:16 -0500
message:
  Clean up the fprintf() debugging code.
-------------- next part --------------
=== modified file 'bzrlib/_static_tuple_c.c'
--- a/bzrlib/_static_tuple_c.c	2009-10-01 20:57:55 +0000
+++ b/bzrlib/_static_tuple_c.c	2009-10-01 21:00:16 +0000
@@ -73,8 +73,6 @@
 StaticTuple_intern(StaticTuple *self)
 {
     PyObject *unique_key = NULL;
-    fprintf(stderr, "In StaticTuple_intern @%x @%x\n", StaticTuple_intern,
-    &StaticTuple_intern);
 
     if (_interned_tuples == NULL) {
         Py_INCREF(self);
@@ -140,7 +138,6 @@
 StaticTuple_New(Py_ssize_t size)
 {
     StaticTuple *stuple;
-    fprintf(stderr, "in StaticTuple_New @%x  ", &StaticTuple_New);
     if (size < 0) {
         PyErr_BadInternalCall();
         return NULL;
@@ -150,7 +147,6 @@
         Py_INCREF(_empty_tuple);
         return _empty_tuple;
     }
-    fprintf(stderr, "Creating new StaticTuple with size %d\n", size);
     /* Note that we use PyObject_NewVar because we want to allocate a variable
      * width entry. However we *aren't* truly a PyVarObject because we don't
      * use a long for ob_size. Instead we use a plain 'size' that is an int,
@@ -741,11 +737,9 @@
         goto bad;
     if (PyDict_SetItemString(d, funcname, c_obj) < 0)
         goto bad;
-    fprintf(stderr, "Exported %s@%x\n", funcname, func);
     Py_DECREF(d);
     return 0;
 bad:
-    fprintf(stderr, "Failed to export %s@%x\n", funcname, func);
     Py_XDECREF(c_obj);
     Py_XDECREF(d);
     return -1;
@@ -754,7 +748,6 @@
 static void
 setup_c_api(PyObject *m)
 {
-    fprintf(stderr, "exporting %s\n", _C_API_NAME);
     _export_function(m, "StaticTuple_New", StaticTuple_New,
         "StaticTuple *(Py_ssize_t)");
     _export_function(m, "StaticTuple_intern", StaticTuple_intern,

=== modified file 'bzrlib/_static_tuple_c.h'
--- a/bzrlib/_static_tuple_c.h	2009-10-01 20:57:55 +0000
+++ b/bzrlib/_static_tuple_c.h	2009-10-01 21:00:16 +0000
@@ -122,11 +122,9 @@
         goto bad;
     }
     *f = PyCObject_AsVoidPtr(c_obj);
-    fprintf(stderr, "Imported function %s @%x\n", funcname, *f);
     Py_DECREF(d);
     return 0;
 bad:
-    fprintf(stderr, "Returning -1\n");
     Py_XDECREF(d);
     return -1;
 }



More information about the bazaar-commits mailing list