OpenSSL.SSL mostly builds cleanly now
diff --git a/OpenSSL/ssl/context.c b/OpenSSL/ssl/context.c
index 98cc01c..bfd8ffe 100644
--- a/OpenSSL/ssl/context.c
+++ b/OpenSSL/ssl/context.c
@@ -115,7 +115,7 @@
 	goto out;
     }
 
-    if (!PyString_Check(ret)) {
+    if (!PyBytes_Check(ret)) {
         /*
          * XXX Returned something that wasn't a string.  This is bogus.  We'll
          * return 0 and OpenSSL will treat it as an error, resulting in an
@@ -125,7 +125,7 @@
         goto out;
     }
 
-    len = PyString_Size(ret);
+    len = PyBytes_Size(ret);
     if (len > maxlen) {
         /*
          * Returned more than we said they were allowed to return.  Just
@@ -135,7 +135,7 @@
         len = maxlen;
     }
 
-    str = PyString_AsString(ret);
+    str = PyBytes_AsString(ret);
     strncpy(buf, str, len);
     Py_XDECREF(ret);
 
@@ -723,7 +723,7 @@
         return NULL;
 
     mode = SSL_CTX_get_verify_mode(self->ctx);
-    return PyInt_FromLong((long)mode);
+    return PyLong_FromLong((long)mode);
 }
 
 static char ssl_Context_get_verify_depth_doc[] = "\n\
@@ -740,7 +740,7 @@
         return NULL;
 
     depth = SSL_CTX_get_verify_depth(self->ctx);
-    return PyInt_FromLong((long)depth);
+    return PyLong_FromLong((long)depth);
 }
 
 static char ssl_Context_load_tmp_dh_doc[] = "\n\
@@ -1042,7 +1042,7 @@
     if (!PyArg_ParseTuple(args, "l:set_options", &options))
         return NULL;
 
-    return PyInt_FromLong(SSL_CTX_set_options(self->ctx, options));
+    return PyLong_FromLong(SSL_CTX_set_options(self->ctx, options));
 }
 
 
@@ -1243,8 +1243,7 @@
 
 
 PyTypeObject ssl_Context_Type = {
-    PyObject_HEAD_INIT(NULL)
-    0,
+    PyVarObject_HEAD_INIT(&PyType_Type, 0)
     "OpenSSL.SSL.Context",
     sizeof(ssl_ContextObj),
     0,