[Python-checkins] r62343 - python/branches/py3k/Objects/bytesobject.c

alexandre.vassalotti python-checkins at python.org
Mon Apr 14 22:53:13 CEST 2008


Author: alexandre.vassalotti
Date: Mon Apr 14 22:53:13 2008
New Revision: 62343
Log:
Re-indented bytes_getbuffer() and bytes_releasebuffer() to 4-space
indents.
Modified:
 python/branches/py3k/Objects/bytesobject.c
Modified: python/branches/py3k/Objects/bytesobject.c
==============================================================================
--- python/branches/py3k/Objects/bytesobject.c	(original)
+++ python/branches/py3k/Objects/bytesobject.c	Mon Apr 14 22:53:13 2008
@@ -52,27 +52,27 @@
 static int
 bytes_getbuffer(PyBytesObject *obj, Py_buffer *view, int flags)
 {
- int ret;
- void *ptr;
- if (view == NULL) {
- obj->ob_exports++;
- return 0;
- }
- if (obj->ob_bytes == NULL)
- ptr = "";
- else
- ptr = obj->ob_bytes;
- ret = PyBuffer_FillInfo(view, ptr, Py_SIZE(obj), 0, flags);
- if (ret >= 0) {
- obj->ob_exports++;
- }
- return ret;
+ int ret;
+ void *ptr;
+ if (view == NULL) {
+ obj->ob_exports++;
+ return 0;
+ }
+ if (obj->ob_bytes == NULL)
+ ptr = "";
+ else
+ ptr = obj->ob_bytes;
+ ret = PyBuffer_FillInfo(view, ptr, Py_SIZE(obj), 0, flags);
+ if (ret >= 0) {
+ obj->ob_exports++;
+ }
+ return ret;
 }
 
 static void
 bytes_releasebuffer(PyBytesObject *obj, Py_buffer *view)
 {
- obj->ob_exports--;
+ obj->ob_exports--;
 }
 
 static Py_ssize_t


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /