~myers-1/pyopenssl/npn

« back to all changes in this revision

Viewing changes to OpenSSL/crypto/pkey.c

  • Committer: Jean-Paul Calderone
  • Date: 2011-04-25 23:41:32 UTC
  • mfrom: (128.2.10 run-on-pypy)
  • Revision ID: exarkun@divmod.com-20110425234132-0f76yf59poaegjxu
Various fixes which make pyOpenSSL more likely to work with PyPy

  * Fix a consistent refcounting bug across most modules
  * switch from tp_setattr to tp_setattro
  * Fix a general bug in error handling when setting invalid X509Name attributes

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
        return 0;
253
253
    }
254
254
 
 
255
    /* PyModule_AddObject steals a reference.
 
256
     */
 
257
    Py_INCREF((PyObject *)&crypto_PKey_Type);
255
258
    if (PyModule_AddObject(module, "PKey", (PyObject *)&crypto_PKey_Type) != 0) {
256
259
        return 0;
257
260
    }
258
261
 
 
262
    /* PyModule_AddObject steals a reference.
 
263
     */
 
264
    Py_INCREF((PyObject *)&crypto_PKey_Type);
259
265
    if (PyModule_AddObject(module, "PKeyType", (PyObject *)&crypto_PKey_Type) != 0) {
260
266
        return 0;
261
267
    }