~stepankk/pyopenssl/bug-845445

« back to all changes in this revision

Viewing changes to OpenSSL/crypto/pkcs12.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:
552
552
        return 0;
553
553
    }
554
554
 
 
555
    /* PyModule_AddObject steals a reference.
 
556
     */
 
557
    Py_INCREF((PyObject *)&crypto_PKCS12_Type);
555
558
    if (PyModule_AddObject(module, "PKCS12", (PyObject *)&crypto_PKCS12_Type) != 0) {
556
559
        return 0;
557
560
    }
558
561
 
 
562
    /* PyModule_AddObject steals a reference.
 
563
     */
 
564
    Py_INCREF((PyObject *)&crypto_PKCS12_Type);
559
565
    if (PyModule_AddObject(module, "PKCS12Type", (PyObject *)&crypto_PKCS12_Type) != 0) {
560
566
        return 0;
561
567
    }