~sileht/pyopenssl/pyopenssl

« back to all changes in this revision

Viewing changes to OpenSSL/crypto/x509.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:
883
883
        return 0;
884
884
    }
885
885
 
 
886
    /* PyModule_AddObject steals a reference.
 
887
     */
 
888
    Py_INCREF((PyObject *)&crypto_X509_Type);
886
889
    if (PyModule_AddObject(module, "X509", (PyObject *)&crypto_X509_Type) != 0) {
887
890
        return 0;
888
891
    }
889
892
 
 
893
    Py_INCREF((PyObject *)&crypto_X509_Type);
890
894
    if (PyModule_AddObject(module, "X509Type", (PyObject *)&crypto_X509_Type) != 0) {
891
895
        return 0;
892
896
    }