classification
Title: Would you mind renaming object.h to pyobject.h?
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, atropashko
Priority: low Keywords: patch

Created on 2007-01-03 00:03 by atropashko, last changed 2009-04-25 21:39 by ajaksu2. This issue is now closed.

Files
File name Uploaded Description Edit
patch.objecth atropashko, 2007-01-03 00:03 patch for 2.4.4
Messages (3)
msg30887 - (view) Author: Anton Tropashko (atropashko) Date: 2007-01-03 00:03
Would be nice if you could change object.h
to pyobject.h or something like that.
object.h is a common name found in kjs
and Qt :-(
Thank you!

The patch is against 2.4

--- Makefile.pre.in	2 Jan 2007 20:03:09 -0000	1.3
+++ Makefile.pre.in	2 Jan 2007 23:52:47 -0000
@@ -522,7 +522,7 @@
 		Include/methodobject.h \
 		Include/modsupport.h \
 		Include/moduleobject.h \
-		Include/object.h \
+		Include/pyobject.h \
 		Include/objimpl.h \
 		Include/patchlevel.h \
 		Include/pydebug.h \
Index: configure
===================================================================
RCS file: /cvsroot/faultline/python/configure,v
retrieving revision 1.2
diff -d -u -r1.2 configure
--- configure	30 Dec 2006 02:55:53 -0000	1.2
+++ configure	2 Jan 2007 23:52:49 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.1.1.1 .
+# From configure.in Revision: 1.2 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for python 2.4.
 #
@@ -274,7 +274,7 @@
 PACKAGE_STRING='python 2.4'
 PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
 
-ac_unique_file="Include/object.h"
+ac_unique_file="Include/pyobject.h"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
Index: configure.in
===================================================================
RCS file: /cvsroot/faultline/python/configure.in,v
retrieving revision 1.2
diff -d -u -r1.2 configure.in
--- configure.in	30 Dec 2006 02:55:53 -0000	1.2
+++ configure.in	2 Jan 2007 23:52:49 -0000
@@ -6,7 +6,7 @@
 AC_REVISION($Revision: 1.2 $)
 AC_PREREQ(2.53)
 AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
-AC_CONFIG_SRCDIR([Include/object.h])
+AC_CONFIG_SRCDIR([Include/pyobject.h])
 AC_CONFIG_HEADER(pyconfig.h)
 
 dnl This is for stuff that absolutely must end up in pyconfig.h.
Index: Include/Python.h
===================================================================
RCS file: /cvsroot/faultline/python/Include/Python.h,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 Python.h
--- Include/Python.h	28 Dec 2006 18:35:20 -0000	1.1.1.1
+++ Include/Python.h	2 Jan 2007 23:52:51 -0000
@@ -73,7 +73,7 @@
 #endif
 #include "pymem.h"
 
-#include "object.h"
+#include "pyobject.h"
 #include "objimpl.h"
 
 #include "pydebug.h"
Index: Parser/tokenizer.h
===================================================================
RCS file: /cvsroot/faultline/python/Parser/tokenizer.h,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 tokenizer.h
--- Parser/tokenizer.h	28 Dec 2006 18:35:31 -0000	1.1.1.1
+++ Parser/tokenizer.h	2 Jan 2007 23:52:54 -0000
@@ -4,7 +4,7 @@
 extern "C" {
 #endif
 
-#include "object.h"
+#include "pyobject.h"
 
 /* Tokenizer interface */
msg30888 - (view) Author: Anton Tropashko (atropashko) Date: 2007-01-19 18:47
slots member conflicts with Qt. I renamed it also. Patch follows:

--- Include/pyobject.h	3 Jan 2007 00:06:11 -0000	1.1
+++ Include/pyobject.h	19 Jan 2007 18:43:13 -0000
@@ -340,7 +340,7 @@
 					  a given operator (e.g. __getitem__).
 					  see add_operators() in typeobject.c . */
 	PyBufferProcs as_buffer;
-	PyObject *name, *slots;
+	PyObject *name, *slots_;
 	/* here are optional user slots, followed by the members. */
 } PyHeapTypeObject;
 
Index: Objects/typeobject.c
===================================================================
RCS file: /cvsroot/faultline/python/Objects/typeobject.c,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 typeobject.c
--- Objects/typeobject.c	28 Dec 2006 18:35:24 -0000	1.1.1.1
+++ Objects/typeobject.c	19 Jan 2007 18:43:13 -0000
@@ -1811,7 +1811,7 @@
 	et = (PyHeapTypeObject *)type;
 	Py_INCREF(name);
 	et->name = name;
-	et->slots = slots;
+	et->slots_ = slots;
 
 	/* Initialize tp_flags */
 	type->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE |
@@ -2116,7 +2116,7 @@
 	Py_XDECREF(type->tp_subclasses);
 	PyObject_Free(type->tp_doc);
 	Py_XDECREF(et->name);
-	Py_XDECREF(et->slots);
+	Py_XDECREF(et->slots_);
 	type->ob_type->tp_free((PyObject *)type);
 }
msg84611 - (view) Author: Daniel Diniz (ajaksu2) (Python triager) Date: 2009-03-30 18:48
I don't see the slightest change of this happening. Will close unless
opposition is voiced.
History
Date User Action Args
2009-04-25 21:39:29ajaksu2setstatus: pending -> closed
resolution: not a bug
stage: resolved
2009-03-30 18:48:25ajaksu2setstatus: open -> pending
priority: normal -> low

versions: + Python 3.1, Python 2.7
keywords: + patch
nosy: + ajaksu2

messages: + msg84611
2007-01-03 00:03:00atropashkocreate