[issue1150] Rename PyBUF_WRITEABLE to PyBUF_WRITABLE

2007-09-17 Thread Sean Reifschneider

Sean Reifschneider added the comment:

Comitted as revision 58182, with additional change mentioned by Guido.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1150] Rename PyBUF_WRITEABLE to PyBUF_WRITABLE

2007-09-17 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1150] Rename PyBUF_WRITEABLE to PyBUF_WRITABLE

2007-09-17 Thread Guido van Rossum

Guido van Rossum added the comment:

Looks good.  Check it in, with one small addition: add

#define PyBUF_WRITEABLE PyBUF_WRITABLE

for those NumPy folks who can't help writing the alternate spelling
('writeable' *is* in some dictionaries, though it is consistently
flagged as invalid by spell checkers).

--
assignee: gvanrossum -> jafo
resolution:  -> accepted

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1150] Rename PyBUF_WRITEABLE to PyBUF_WRITABLE

2007-09-17 Thread Sean Reifschneider

Sean Reifschneider added the comment:

Attached is a patch that fixes "writeable".  I'm thinking, close this if
the patch looks ok, and open another for a general "identify
non-englishisms" ticket, once they're identified a ticket could be
opened to fix them.

I fixed only the PyBUF instances but also documents and comments and doc
strings and printfs where it occurred.  Yes?  Let me know if it looks
good to commit.

Does this need a fix in 2to3?

--
assignee:  -> gvanrossum
keywords: +patch
nosy: +jafo
priority:  -> low

__
Tracker <[EMAIL PROTECTED]>

__Index: Include/abstract.h
===
--- Include/abstract.h	(revision 58179)
+++ Include/abstract.h	(working copy)
@@ -524,9 +524,9 @@
 	Py_ssize_t *buffer_len);
 
/* 
-	  Takes an arbitrary object which must support the (writeable,
+	  Takes an arbitrary object which must support the (writable,
 	  single segment) buffer interface and returns a pointer to a
-	  writeable memory location in buffer of size buffer_len.
+	  writable memory location in buffer of size buffer_len.
 
 	  0 is returned on success.  buffer and buffer_len are only
 	  set in case no error occurrs. Otherwise, -1 is returned and
Index: Include/object.h
===
--- Include/object.h	(revision 58179)
+++ Include/object.h	(working copy)
@@ -162,7 +162,7 @@
 /* Flags for getting buffers */
 #define PyBUF_SIMPLE 0
 #define PyBUF_CHARACTER 1
-#define PyBUF_WRITEABLE 0x0002
+#define PyBUF_WRITABLE 0x0002
 #define PyBUF_LOCKDATA 0x0004
 #define PyBUF_FORMAT 0x0008
 #define PyBUF_ND 0x0010
@@ -172,19 +172,19 @@
 #define PyBUF_ANY_CONTIGUOUS (0x0100 | PyBUF_STRIDES)
 #define PyBUF_INDIRECT (0x0200 | PyBUF_STRIDES)
 
-#define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITEABLE)
+#define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITABLE)
 #define PyBUF_CONTIG_RO (PyBUF_ND)
 #define PyBUF_CONTIG_LCK (PyBUF_ND | PyBUF_LOCKDATA)
 
-#define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITEABLE)
+#define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITABLE)
 #define PyBUF_STRIDED_RO (PyBUF_STRIDES)
 #define PyBUF_STRIDED_LCK (PyBUF_STRIDES | PyBUF_LOCKDATA)
 
-#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITEABLE | PyBUF_FORMAT)
+#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_FORMAT)
 #define PyBUF_RECORDS_RO (PyBUF_STRIDES | PyBUF_FORMAT)
 #define PyBUF_RECORDS_LCK (PyBUF_STRIDES | PyBUF_LOCKDATA | PyBUF_FORMAT)
 
-#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITEABLE | PyBUF_FORMAT)
+#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FORMAT)
 #define PyBUF_FULL_RO (PyBUF_INDIRECT | PyBUF_FORMAT)
 #define PyBUF_FULL_LCK (PyBUF_INDIRECT | PyBUF_LOCKDATA | PyBUF_FORMAT)
 
Index: Include/memoryobject.h
===
--- Include/memoryobject.h	(revision 58179)
+++ Include/memoryobject.h	(working copy)
@@ -33,15 +33,15 @@
 
The buffertype argument can be PyBUF_READ, PyBUF_WRITE,
PyBUF_UPDATEIFCOPY to determine whether the returned buffer
-   should be READONLY, WRITEABLE, or set to update the
+   should be READONLY, WRITABLE, or set to update the
original buffer if a copy must be made.  If buffertype is
PyBUF_WRITE and the buffer is not contiguous an error will
be raised.  In this circumstance, the user can use
-   PyBUF_UPDATEIFCOPY to ensure that a a writeable temporary
+   PyBUF_UPDATEIFCOPY to ensure that a a writable temporary
contiguous buffer is returned.  The contents of this
contiguous buffer will be copied back into the original
object after the memoryview object is deleted as long as
-   the original object is writeable and allows setting its
+   the original object is writable and allows setting its
memory to "readonly".  If this is not allowed by the
original object, then a BufferError is raised.
 	   
Index: Objects/abstract.c
===
--- Objects/abstract.c	(revision 58179)
+++ Objects/abstract.c	(working copy)
@@ -304,9 +304,9 @@
 	pb = obj->ob_type->tp_as_buffer;
 	if (pb == NULL ||
 pb->bf_getbuffer == NULL ||
-((*pb->bf_getbuffer)(obj, &view, PyBUF_WRITEABLE) != 0)) {
+((*pb->bf_getbuffer)(obj, &view, PyBUF_WRITABLE) != 0)) {
 		PyErr_SetString(PyExc_TypeError, 
-"expected an object with a writeable buffer interface");
+"expected an object with a writable buffer interface");
 		return -1;
 	}
 
@@ -659,10 +659,10 @@
 "Cannot make this object read-only.");
 return -1;
 }
-if (((flags & PyBUF_WRITEABLE) == PyBUF_WRITEAB

[issue1150] Rename PyBUF_WRITEABLE to PyBUF_WRITABLE

2007-09-11 Thread Guido van Rossum

New submission from Guido van Rossum:

Because writeable is not an English word; writable is.

Other names should be fixed as well.

--
messages: 55830
nosy: gvanrossum
severity: normal
status: open
title: Rename PyBUF_WRITEABLE to PyBUF_WRITABLE
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com