Skip to content

Commit 4ee447a

Browse files
committed
Add const qualifier to fix compiler warnings
1 parent a5152be commit 4ee447a

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Modules/_ssl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name)
11581158

11591159
static PyObject *
11601160
_create_tuple_for_attribute(_sslmodulestate *state,
1161-
ASN1_OBJECT *name, ASN1_STRING *value)
1161+
const ASN1_OBJECT *name, const ASN1_STRING *value)
11621162
{
11631163
Py_ssize_t buflen;
11641164
PyObject *pyattr;
@@ -1187,16 +1187,16 @@ _create_tuple_for_attribute(_sslmodulestate *state,
11871187
}
11881188

11891189
static PyObject *
1190-
_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname)
1190+
_create_tuple_for_X509_NAME (_sslmodulestate *state, const X509_NAME *xname)
11911191
{
11921192
PyObject *dn = NULL; /* tuple which represents the "distinguished name" */
11931193
PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */
11941194
PyObject *rdnt;
11951195
PyObject *attr = NULL; /* tuple to hold an attribute */
11961196
int entry_count = X509_NAME_entry_count(xname);
1197-
X509_NAME_ENTRY *entry;
1198-
ASN1_OBJECT *name;
1199-
ASN1_STRING *value;
1197+
const X509_NAME_ENTRY *entry;
1198+
const ASN1_OBJECT *name;
1199+
const ASN1_STRING *value;
12001200
int index_counter;
12011201
int rdn_level = -1;
12021202
int retcode;

Modules/_ssl/cert.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self)
128128
}
129129

130130
static PyObject*
131-
_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags)
131+
_x509name_print(_sslmodulestate *state, const X509_NAME *name,
132+
int indent, unsigned long flags)
132133
{
133134
PyObject *res;
134135
BIO *biobuf;

0 commit comments

Comments
 (0)