summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2018-02-08 17:27:36 +0100
committerMatěj Cepl <mcepl@cepl.eu>2018-02-08 17:52:42 +0100
commitb2500880eb3a9df88790ab22b07bd903f72de6b7 (patch)
tree3e43f0a0535f0eb0637e0b5928b873412fc789fe
parent9d79ac666605211107c099e530823792a4c4ecea (diff)
downloadm2crypto-0.28.0.tar.gz
Generated C code0.28.0
-rw-r--r--SWIG/_m2crypto_wrap.c235
1 files changed, 140 insertions, 95 deletions
diff --git a/SWIG/_m2crypto_wrap.c b/SWIG/_m2crypto_wrap.c
index c262a28..512e182 100644
--- a/SWIG/_m2crypto_wrap.c
+++ b/SWIG/_m2crypto_wrap.c
@@ -4286,6 +4286,36 @@ int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder,
#if PY_MAJOR_VERSION >= 3
+FILE* PyFile_AsFile(PyObject *pyfile) {
+ FILE* fp;
+ int fd;
+ const char *mode_str = NULL;
+ PyObject *mode_obj;
+
+ if ((fd = PyObject_AsFileDescriptor(pyfile)) == -1) {
+ PyErr_SetString(PyExc_BlockingIOError,
+ "Cannot find file handler for the Python file!");
+ return NULL;
+ }
+
+ if ((mode_obj = PyObject_GetAttrString(pyfile, "mode")) == NULL) {
+ mode_str = "rb";
+ PyErr_Clear();
+ }
+ else {
+ /* convert to plain string
+ * note that error checking is embedded in the function
+ */
+ mode_str = PyUnicode_AsUTF8AndSize(mode_obj, NULL);
+ }
+
+ if((fp = fdopen(fd, mode_str)) == NULL) {
+ PyErr_SetFromErrno(PyExc_IOError);
+ }
+
+ Py_XDECREF(mode_obj);
+ return fp;
+}
#else /* PY2K */
@@ -4413,20 +4443,20 @@ static int m2_PyObject_GetBufferInt(PyObject *obj, Py_buffer *view, int flags)
int ret;
if (PyObject_CheckBuffer(obj))
- ret = PyObject_GetBuffer(obj, view, flags);
+ ret = PyObject_GetBuffer(obj, view, flags);
else {
- const void *buf;
+ const void *buf;
- ret = PyObject_AsReadBuffer(obj, &buf, &view->len);
- if (ret == 0)
- view->buf = (void *)buf;
+ ret = PyObject_AsReadBuffer(obj, &buf, &view->len);
+ if (ret == 0)
+ view->buf = (void *)buf;
}
if (ret)
- return ret;
+ return ret;
if (view->len > INT_MAX) {
- PyErr_SetString(PyExc_ValueError, "object too large");
- m2_PyBuffer_Release(obj, view);
- return -1;
+ PyErr_SetString(PyExc_ValueError, "object too large");
+ m2_PyBuffer_Release(obj, view);
+ return -1;
}
return 0;
@@ -4437,7 +4467,7 @@ m2_PyObject_AsBIGNUM(PyObject* value, PyObject* _py_exc)
{
BIGNUM* bn;
const void* vbuf;
- int vlen;
+ int vlen = 0;
if (m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
return NULL;
@@ -4453,7 +4483,7 @@ m2_PyObject_AsBIGNUM(PyObject* value, PyObject* _py_exc)
static void m2_PyBuffer_Release(PyObject *obj, Py_buffer *view)
{
if (PyObject_CheckBuffer(obj))
- PyBuffer_Release(view);
+ PyBuffer_Release(view);
/* else do nothing, view->buf comes from PyObject_AsReadBuffer */
}
@@ -4475,6 +4505,18 @@ m2_PyString_AsStringAndSizeInt(PyObject *obj, char **s, int *len)
return 0;
}
+/* Works as PyFile_Name, but always returns a new object. */
+PyObject *m2_PyFile_Name(PyObject *pyfile) {
+ PyObject *out = NULL;
+#if PY_MAJOR_VERSION >= 3
+ out = PyObject_GetAttrString(pyfile, "name");
+#else
+ out = PyFile_Name(pyfile);
+ Py_XINCREF(out);
+#endif
+ return out;
+}
+
#define m2_PyErr_Msg(type) m2_PyErr_Msg_Caller(type, __func__)
static void m2_PyErr_Msg_Caller(PyObject *err_type, const char* caller) {
@@ -4535,11 +4577,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) {
_x509_store_ctx_swigptr = SWIG_NewPointerObj((void *)ctx, SWIGTYPE_p_X509_STORE_CTX, 0);
_x509_store_ctx_obj = Py_BuildValue("(Oi)", _x509_store_ctx_swigptr, 0);
-#if PY_MAJOR_VERSION >= 3
- _x509_store_ctx_inst = PyType_GenericNew(_klass, _x509_store_ctx_obj, NULL);
-#else
- _x509_store_ctx_inst = PyInstance_New(_klass, _x509_store_ctx_obj, NULL);
-#endif // PY_MAJOR_VERSION >= 3
+ _x509_store_ctx_inst = PyObject_CallObject(_klass, _x509_store_ctx_obj);
argv = Py_BuildValue("(iO)", ok, _x509_store_ctx_inst);
} else {
@@ -4608,11 +4646,7 @@ int x509_store_verify_callback(int ok, X509_STORE_CTX *ctx) {
_x509_store_ctx_swigptr = SWIG_NewPointerObj((void *)ctx, SWIGTYPE_p_X509_STORE_CTX, 0);
_x509_store_ctx_obj = Py_BuildValue("(Oi)", _x509_store_ctx_swigptr, 0);
-#if PY_MAJOR_VERSION >= 3
- _x509_store_ctx_inst = PyType_GenericNew(_klass, _x509_store_ctx_obj, NULL);
-#else
- _x509_store_ctx_inst = PyInstance_New(_klass, _x509_store_ctx_obj, NULL);
-#endif // PY_MAJOR_VERSION >= 3
+ _x509_store_ctx_inst = PyObject_CallObject(_klass, _x509_store_ctx_obj);
argv = Py_BuildValue("(iO)", ok, _x509_store_ctx_inst);
@@ -4767,7 +4801,7 @@ void lib_init() {
warrant a separate file. */
PyObject *bn_to_mpi(const BIGNUM *bn) {
- int len;
+ int len = 0;
unsigned char *mpi;
PyObject *pyo;
@@ -4786,7 +4820,7 @@ PyObject *bn_to_mpi(const BIGNUM *bn) {
const BIGNUM *mpi_to_bn(PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
if (m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
return NULL;
@@ -4795,7 +4829,7 @@ const BIGNUM *mpi_to_bn(PyObject *value) {
}
PyObject *bn_to_bin(BIGNUM *bn) {
- int len;
+ int len = 0;
unsigned char *bin;
PyObject *pyo;
@@ -4814,7 +4848,7 @@ PyObject *bn_to_bin(BIGNUM *bn) {
const BIGNUM *bin_to_bn(PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
if (m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
return NULL;
@@ -4825,7 +4859,7 @@ const BIGNUM *bin_to_bn(PyObject *value) {
PyObject *bn_to_hex(BIGNUM *bn) {
char *hex;
PyObject *pyo;
- Py_ssize_t len;
+ Py_ssize_t len = 0;
hex = BN_bn2hex(bn);
if (!hex) {
@@ -4843,7 +4877,7 @@ PyObject *bn_to_hex(BIGNUM *bn) {
BIGNUM *hex_to_bn(PyObject *value) {
const void *vbuf;
- Py_ssize_t vlen;
+ Py_ssize_t vlen = 0;
BIGNUM *bn;
if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
@@ -4863,7 +4897,7 @@ BIGNUM *hex_to_bn(PyObject *value) {
BIGNUM *dec_to_bn(PyObject *value) {
const void *vbuf;
- Py_ssize_t vlen;
+ Py_ssize_t vlen = 0;
BIGNUM *bn;
if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
@@ -4995,48 +5029,27 @@ BIO * bio_new_file(const char *filename, const char *mode) {
BIO *bio_new_pyfile(PyObject *pyfile, int bio_close) {
FILE *fp = NULL;
-#if PY_MAJOR_VERSION >= 3
- if (PyObject_HasAttrString(pyfile, "fileno")) {
- int fd = (int)PyLong_AsLong(PyObject_CallMethod(pyfile, "fileno", NULL));
- if (PyObject_HasAttrString(pyfile, "mode")) {
- char *mode = PyUnicode_AsUTF8AndSize(
- PyObject_CallMethod(pyfile, "mode", NULL), NULL);
- fp = fdopen(fd, mode);
- }
- else {
- PyErr_Format(_bio_err,
- "File doesn’t have mode attribute!");
- return NULL;
- }
- }
- else {
- PyErr_Format(_bio_err, "File doesn’t have fileno method!");
- return NULL;
- }
-#else
fp = PyFile_AsFile(pyfile);
-#endif
- BIO *bio = BIO_new_fp(fp, bio_close); /* returns NULL if error occurred */
+ BIO *bio = BIO_new_fp(fp, bio_close);
+
+ /* returns NULL if error occurred */
if (bio == NULL) {
- char *name = "";
-#if PY_MAJOR_VERSION >= 3
- if (PyObject_HasAttrString(pyfile, "name")) {
- char *name = PyUnicode_AsUTF8AndSize(
- PyObject_CallMethod(pyfile, "name", NULL), NULL);
+ /* Find out the name of the file so we can have good error
+ * message. */
+ PyObject *pyname = m2_PyFile_Name(pyfile);
+ char *name = PyBytes_AsString(pyname);
+
+ if (name == NULL) {
+ PyErr_Format(_bio_err,
+ "Opening of the new BIO on file failed!");
}
else {
PyErr_Format(_bio_err,
- "File doesn’t have name attribute!");
- return NULL;
+ "Opening of the new BIO on file %s failed!", name);
}
-#else
- name = PyString_AsString(PyFile_Name(pyfile));
-#endif
- PyErr_Format(PyExc_MemoryError,
- "Opening of the new BIO on file %s failed!", name);
- return NULL;
+ Py_DECREF(pyname);
}
return bio;
}
@@ -5097,7 +5110,7 @@ PyObject *bio_gets(BIO *bio, int num) {
int bio_write(BIO *bio, PyObject *from) {
const void *fbuf;
- int flen, ret;
+ int flen = 0, ret;
if (m2_PyObject_AsReadBufferInt(from, &fbuf, &flen) == -1)
return -1;
@@ -5544,7 +5557,8 @@ PyObject *bn_rand_range(PyObject *range)
BIGNUM *rng = NULL;
PyObject *ret, *tuple;
PyObject *format, *rangePyString;
- char *randhex, *rangehex;
+ char *randhex; /* PyLong_FromString is unhappy with const */
+ const char *rangehex;
/* Wow, it's a lot of work to convert into a hex string in C! */
format = PyUnicode_FromString("%x");
@@ -5573,11 +5587,7 @@ PyObject *bn_rand_range(PyObject *range)
Py_DECREF(format);
Py_DECREF(tuple);
-#if PY_MAJOR_VERSION >= 3
- rangehex = PyUnicode_AsUTF8(rangePyString);
-#else
- rangehex = PyString_AsString(rangePyString);
-#endif // PY_MAJOR_VERSION >= 3
+ rangehex = (const char*)PyUnicode_AsUTF8(rangePyString);
if (!BN_hex2bn(&rng, rangehex)) {
/*Custom errors?*/
@@ -5628,7 +5638,7 @@ void rand_init(PyObject *rand_err) {
PyObject *rand_seed(PyObject *seed) {
const void *buf;
- int len;
+ int len = 0;
m2_PyObject_AsReadBufferInt(seed, &buf, &len);
@@ -5638,7 +5648,7 @@ PyObject *rand_seed(PyObject *seed) {
PyObject *rand_add(PyObject *blob, double entropy) {
const void *buf;
- int len;
+ int len = 0;
m2_PyObject_AsReadBufferInt(blob, &buf, &len);
@@ -5811,7 +5821,7 @@ PyObject *pkcs5_pbkdf2_hmac_sha1(PyObject *pass,
unsigned char *saltbuf;
char *passbuf;
PyObject *ret;
- int passlen, saltlen;
+ int passlen = 0, saltlen = 0;
if (m2_PyObject_AsReadBufferInt(pass, (const void **)&passbuf,
&passlen) == -1)
@@ -5892,7 +5902,7 @@ void hmac_ctx_free(HMAC_CTX *ctx) {
PyObject *hmac_init(HMAC_CTX *ctx, PyObject *key, const EVP_MD *md) {
const void *kbuf;
- int klen;
+ int klen = 0;
if (m2_PyObject_AsReadBufferInt(key, &kbuf, &klen) == -1)
return NULL;
@@ -5942,7 +5952,7 @@ PyObject *hmac_final(HMAC_CTX *ctx) {
PyObject *hmac(PyObject *key, PyObject *data, const EVP_MD *md) {
const void *kbuf, *dbuf;
void *blob;
- int klen;
+ int klen = 0;
unsigned int blen;
Py_ssize_t dlen;
PyObject *ret;
@@ -5985,7 +5995,7 @@ PyObject *bytes_to_key(const EVP_CIPHER *cipher, EVP_MD *md,
int iter) {
unsigned char key[EVP_MAX_KEY_LENGTH];
const void *dbuf, *sbuf;
- int dlen, klen;
+ int dlen = 0, klen;
Py_ssize_t slen;
PyObject *ret;
@@ -6022,7 +6032,7 @@ PyObject *cipher_init(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
PyObject *cipher_update(EVP_CIPHER_CTX *ctx, PyObject *blob) {
const void *buf;
- int len, olen;
+ int len = 0, olen;
void *obuf;
PyObject *ret;
@@ -6118,7 +6128,7 @@ int verify_update(EVP_MD_CTX *ctx, PyObject *blob) {
int verify_final(EVP_MD_CTX *ctx, PyObject *blob, EVP_PKEY *pkey) {
unsigned char *kbuf;
- int len;
+ int len = 0;
if (m2_PyObject_AsReadBufferInt(blob, (const void **)&kbuf, &len) == -1)
return -1;
@@ -6403,7 +6413,7 @@ void rc4_free(RC4_KEY *key) {
PyObject *rc4_set_key(RC4_KEY *key, PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
if (m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
return NULL;
@@ -6503,7 +6513,7 @@ int dh_check(DH *dh) {
PyObject *dh_compute_key(DH *dh, PyObject *pubkey) {
const void *pkbuf;
- int pklen, klen;
+ int pklen = 0, klen;
void *key;
BIGNUM *pk;
PyObject *ret;
@@ -6743,7 +6753,7 @@ PyObject *rsa_set_en(RSA *rsa, PyObject *eval, PyObject* nval) {
static BIGNUM* PyObject_Bin_AsBIGNUM(PyObject* value) {
BIGNUM* bn;
const void* vbuf;
- int vlen;
+ int vlen = 0;
if (m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
return NULL;
@@ -6776,7 +6786,7 @@ PyObject *rsa_set_en_bin(RSA *rsa, PyObject *eval, PyObject* nval) {
PyObject *rsa_private_encrypt(RSA *rsa, PyObject *from, int padding) {
const void *fbuf;
void *tbuf;
- int flen, tlen;
+ int flen = 0, tlen;
PyObject *ret;
if (m2_PyObject_AsReadBufferInt(from, &fbuf, &flen) == -1)
@@ -6803,7 +6813,7 @@ PyObject *rsa_private_encrypt(RSA *rsa, PyObject *from, int padding) {
PyObject *rsa_public_decrypt(RSA *rsa, PyObject *from, int padding) {
const void *fbuf;
void *tbuf;
- int flen, tlen;
+ int flen = 0, tlen = 0;
PyObject *ret;
if (m2_PyObject_AsReadBufferInt(from, &fbuf, &flen) == -1)
@@ -6833,7 +6843,7 @@ PyObject *rsa_public_decrypt(RSA *rsa, PyObject *from, int padding) {
PyObject *rsa_public_encrypt(RSA *rsa, PyObject *from, int padding) {
const void *fbuf;
void *tbuf;
- int flen, tlen;
+ int flen = 0, tlen;
PyObject *ret;
if (m2_PyObject_AsReadBufferInt(from, &fbuf, &flen) == -1)
@@ -6860,7 +6870,7 @@ PyObject *rsa_public_encrypt(RSA *rsa, PyObject *from, int padding) {
PyObject *rsa_private_decrypt(RSA *rsa, PyObject *from, int padding) {
const void *fbuf;
void *tbuf;
- int flen, tlen;
+ int flen = 0, tlen;
PyObject *ret;
if (m2_PyObject_AsReadBufferInt(from, &fbuf, &flen) == -1)
@@ -7248,7 +7258,7 @@ PyObject *dsa_set_pqg(DSA *dsa, PyObject *pval, PyObject* qval, PyObject* gval)
PyObject *dsa_set_pub(DSA *dsa, PyObject *value) {
BIGNUM *bn;
const void *vbuf;
- int vlen;
+ int vlen = 0;
if (m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
return NULL;
@@ -7303,7 +7313,7 @@ int dsa_write_pub_key_bio(DSA* dsa, BIO* f) {
PyObject *dsa_sign(DSA *dsa, PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
PyObject *tuple;
DSA_SIG *sig;
@@ -7327,7 +7337,7 @@ PyObject *dsa_sign(DSA *dsa, PyObject *value) {
int dsa_verify(DSA *dsa, PyObject *value, PyObject *r, PyObject *s) {
const void *vbuf, *rbuf, *sbuf;
- int vlen, rlen, slen;
+ int vlen = 0, rlen = 0, slen = 0;
DSA_SIG *sig;
BIGNUM* pr, *ps;
int ret;
@@ -7369,7 +7379,7 @@ int dsa_verify(DSA *dsa, PyObject *value, PyObject *r, PyObject *s) {
PyObject *dsa_sign_asn1(DSA *dsa, PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
void *sigbuf;
unsigned int siglen;
PyObject *ret;
@@ -7396,7 +7406,7 @@ PyObject *dsa_sign_asn1(DSA *dsa, PyObject *value) {
int dsa_verify_asn1(DSA *dsa, PyObject *value, PyObject *sig) {
const void *vbuf;
void *sbuf;
- int vlen, slen, ret;
+ int vlen = 0, slen = 0, ret = 0;
if ((m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
|| (m2_PyObject_AsReadBufferInt(sig, (const void **)&sbuf, &slen)
@@ -7570,7 +7580,7 @@ void ssl_ctx_set_verify(SSL_CTX *ctx, int mode, PyObject *pyfunc) {
int ssl_ctx_set_session_id_context(SSL_CTX *ctx, PyObject *sid_ctx) {
const void *buf;
- int len;
+ int len = 0;
if (m2_PyObject_AsReadBufferInt(sid_ctx, &buf, &len) == -1)
return -1;
@@ -7650,7 +7660,7 @@ void ssl_set_client_CA_list_from_context(SSL *ssl, SSL_CTX *ctx) {
int ssl_set_session_id_context(SSL *ssl, PyObject *sid_ctx) {
const void *buf;
- int len;
+ int len = 0;
if (m2_PyObject_AsReadBufferInt(sid_ctx, &buf, &len) == -1)
return -1;
@@ -8533,6 +8543,10 @@ int asn1_integer_set(ASN1_INTEGER *asn1, PyObject *value) {
BIGNUM *bn = NULL;
PyObject *fmt, *args, *hex;
+/* Despite all hopes to the contrary, we cannot survive here with
+ * PyLong_AsLong shims as provided in
+ * /usr/include/python2.7/longobject.h.
+ */
#if PY_MAJOR_VERSION >= 3
if (PyLong_Check(value))
return ASN1_INTEGER_set(asn1, PyLong_AsLong(value));
@@ -9060,7 +9074,7 @@ PyObject *ecdsa_sig_get_s(ECDSA_SIG *ecdsa_sig) {
PyObject *ecdsa_sign(EC_KEY *key, PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
PyObject *tuple;
ECDSA_SIG *sig;
@@ -9084,7 +9098,7 @@ PyObject *ecdsa_sign(EC_KEY *key, PyObject *value) {
int ecdsa_verify(EC_KEY *key, PyObject *value, PyObject *r, PyObject *s) {
const void *vbuf, *rbuf, *sbuf;
- int vlen, rlen, slen;
+ int vlen = 0, rlen = 0, slen = 0;
ECDSA_SIG *sig;
int ret;
BIGNUM* pr, *ps;
@@ -9127,7 +9141,7 @@ int ecdsa_verify(EC_KEY *key, PyObject *value, PyObject *r, PyObject *s) {
PyObject *ecdsa_sign_asn1(EC_KEY *key, PyObject *value) {
const void *vbuf;
- int vlen;
+ int vlen = 0;
void *sigbuf;
unsigned int siglen;
PyObject *ret;
@@ -9154,7 +9168,7 @@ PyObject *ecdsa_sign_asn1(EC_KEY *key, PyObject *value) {
int ecdsa_verify_asn1(EC_KEY *key, PyObject *value, PyObject *sig) {
const void *vbuf;
void *sbuf;
- int vlen, slen, ret;
+ int vlen = 0, slen = 0, ret;
if ((m2_PyObject_AsReadBufferInt(value, &vbuf, &vlen) == -1)
|| (m2_PyObject_AsReadBufferInt(sig, (const void **)&sbuf, &slen)
@@ -10963,6 +10977,36 @@ fail:
}
+SWIGINTERN PyObject *_wrap_bio_eof(PyObject *self, PyObject *args) {
+ PyObject *resultobj = 0;
+ BIO *arg1 = (BIO *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+ int result;
+
+ if(!PyArg_UnpackTuple(args,(char *)"bio_eof",1,1,&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BIO, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bio_eof" "', argument " "1"" of type '" "BIO *""'");
+ }
+ arg1 = (BIO *)(argp1);
+ {
+ if (!arg1) {
+ SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
+ }
+ }
+ result = (int)BIO_eof(arg1);
+ {
+ resultobj=PyLong_FromLong(result);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN int Swig_var__bio_err_set(PyObject *_val) {
{
void *argp = 0;
@@ -29010,6 +29054,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"bio_dup_chain", _wrap_bio_dup_chain, METH_VARARGS, NULL},
{ (char *)"bio_push", _wrap_bio_push, METH_VARARGS, NULL},
{ (char *)"bio_pop", _wrap_bio_pop, METH_VARARGS, NULL},
+ { (char *)"bio_eof", _wrap_bio_eof, METH_VARARGS, NULL},
{ (char *)"bio_init", _wrap_bio_init, METH_VARARGS, NULL},
{ (char *)"bio_free", _wrap_bio_free, METH_VARARGS, NULL},
{ (char *)"bio_new_file", _wrap_bio_new_file, METH_VARARGS, NULL},