SF bug #1155938: Missing None check for __init__().
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index c1bd00d..7eea465 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3965,6 +3965,18 @@
     import gc; gc.collect()
     vereq(hasattr(c, 'attr'), False)
 
+def test_init():
+    # SF 1155938
+    class Foo(object):
+        def __init__(self):
+            return 10
+    try:
+        Foo()
+    except TypeError:
+        pass
+    else:
+        raise TestFailed, "did not test __init__() for None return"
+
 
 def test_main():
     weakref_segfault() # Must be first, somehow
@@ -4058,6 +4070,7 @@
     carloverre()
     filefault()
     vicious_descriptor_nonsense()
+    test_init()
 
     if verbose: print "All OK"
 
diff --git a/Misc/NEWS b/Misc/NEWS
index baf3445..5bf2e51 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 Core and builtins
 -----------------
 
+- Bug #1155938: new style classes did not check that __init__() was
+  returning None.
+
 - Patch #802188: Report characters after line continuation character 
   ('\') with a specific error message.
 
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 600dca5..6c31c73 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4753,6 +4753,12 @@
 	Py_DECREF(meth);
 	if (res == NULL)
 		return -1;
+	if (res != Py_None) {
+		PyErr_SetString(PyExc_TypeError,
+			   "__init__() should return None");
+		Py_DECREF(res);
+		return -1;
+	}
 	Py_DECREF(res);
 	return 0;
 }