]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Rename UniaryFunctor to UnaryFunctor
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 28 Jun 2016 12:37:16 +0000 (00:37 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 28 Jun 2016 12:37:16 +0000 (00:37 +1200)
src/base/MakeFunctor.h
src/security/Session.h
src/ssl/gadgets.h

index 836c6b27ea6cb1bc045a22fdfe0c282e520bb604..23eae57722c17e9d136331a8b4925f10b6fedaf2 100644 (file)
@@ -9,15 +9,15 @@
 #ifndef SQUID_BASE_MAKEFUNCTOR_H
 #define SQUID_BASE_MAKEFUNCTOR_H
 
-// Macro to be used to define a C++ functor of an extern "C"
-// function. The C++ functor is suffixed with the _functor extension
-#define UniaryFunctor(function, argument_type) \
+// Macro to be used to define a C++ functor for a function with one argument.
+// The functor is suffixed with the _functor extension
+#define UnaryFunctor(function, argument_type) \
         struct function ## _functor { \
             void operator()(argument_type a) { function(a); } \
         }
 
-/// DeAllocator functor for pointers that need free(3) from the std C library
-UniaryFunctor(xfree, char *);
+/// DeAllocator functor for pointers that need free(3)
+UnaryFunctor(xfree, char *);
 
 #endif // SQUID_BASE_MAKEFUNCTOR_H
 
index 60ad4bf3e3c584017b7f423c7f66d63a0612e120..6394a9313f8181448dc251e7264c9d7117517dfd 100644 (file)
@@ -35,7 +35,7 @@ typedef LockingPointer<SSL, Security::SSL_free_cpp, CRYPTO_LOCK_SSL> SessionPoin
 
 #elif USE_GNUTLS
 typedef gnutls_session_t SessionPtr;
-UniaryFunctor(gnutls_deinit, gnutls_session_t);
+UnaryFunctor(gnutls_deinit, gnutls_session_t);
 // TODO: Convert to Locking pointer.
 // Locks can be implemented attaching locks counter to gnutls_session_t
 // objects using the gnutls_session_set_ptr()/gnutls_session_get_ptr ()
index a662a0b0bb008d2c7025a5f105b5026745fa92ce..c1b0f2beead8fb5d75669ca679bbb4ba646b2553 100644 (file)
@@ -47,43 +47,43 @@ typedef std::unique_ptr<STACK_OF(X509), sk_X509_free_wrapper> X509_STACK_Pointer
 CtoCpp1(EVP_PKEY_free, EVP_PKEY *)
 typedef Security::LockingPointer<EVP_PKEY, EVP_PKEY_free_cpp, CRYPTO_LOCK_EVP_PKEY> EVP_PKEY_Pointer;
 
-UniaryFunctor(BN_free, BIGNUM *);
+UnaryFunctor(BN_free, BIGNUM *);
 typedef std::unique_ptr<BIGNUM, BN_free_functor> BIGNUM_Pointer;
 
-UniaryFunctor(BIO_free, BIO *);
+UnaryFunctor(BIO_free, BIO *);
 typedef std::unique_ptr<BIO, BIO_free_functor> BIO_Pointer;
 
-UniaryFunctor(ASN1_INTEGER_free, ASN1_INTEGER *);
+UnaryFunctor(ASN1_INTEGER_free, ASN1_INTEGER *);
 typedef std::unique_ptr<ASN1_INTEGER, ASN1_INTEGER_free_functor> ASN1_INT_Pointer;
 
-UniaryFunctor(ASN1_OCTET_STRING_free, ASN1_OCTET_STRING *);
+UnaryFunctor(ASN1_OCTET_STRING_free, ASN1_OCTET_STRING *);
 typedef std::unique_ptr<ASN1_OCTET_STRING, ASN1_OCTET_STRING_free_functor> ASN1_OCTET_STRING_Pointer;
 
-UniaryFunctor(TXT_DB_free, TXT_DB *);
+UnaryFunctor(TXT_DB_free, TXT_DB *);
 typedef std::unique_ptr<TXT_DB, TXT_DB_free_functor> TXT_DB_Pointer;
 
-UniaryFunctor(X509_NAME_free, X509_NAME *);
+UnaryFunctor(X509_NAME_free, X509_NAME *);
 typedef std::unique_ptr<X509_NAME, X509_NAME_free_functor> X509_NAME_Pointer;
 
-UniaryFunctor(RSA_free, RSA *);
+UnaryFunctor(RSA_free, RSA *);
 typedef std::unique_ptr<RSA, RSA_free_functor> RSA_Pointer;
 
-UniaryFunctor(X509_REQ_free, X509_REQ *);
+UnaryFunctor(X509_REQ_free, X509_REQ *);
 typedef std::unique_ptr<X509_REQ, X509_REQ_free_functor> X509_REQ_Pointer;
 
 sk_dtor_wrapper(sk_X509_NAME, STACK_OF(X509_NAME) *, X509_NAME_free);
 typedef std::unique_ptr<STACK_OF(X509_NAME), sk_X509_NAME_free_wrapper> X509_NAME_STACK_Pointer;
 
-UniaryFunctor(AUTHORITY_KEYID_free, AUTHORITY_KEYID *);
+UnaryFunctor(AUTHORITY_KEYID_free, AUTHORITY_KEYID *);
 typedef std::unique_ptr<AUTHORITY_KEYID, AUTHORITY_KEYID_free_functor> AUTHORITY_KEYID_Pointer;
 
 sk_dtor_wrapper(sk_GENERAL_NAME, STACK_OF(GENERAL_NAME) *, GENERAL_NAME_free);
 typedef std::unique_ptr<STACK_OF(GENERAL_NAME), sk_GENERAL_NAME_free_wrapper> GENERAL_NAME_STACK_Pointer;
 
-UniaryFunctor(GENERAL_NAME_free, GENERAL_NAME *);
+UnaryFunctor(GENERAL_NAME_free, GENERAL_NAME *);
 typedef std::unique_ptr<GENERAL_NAME, GENERAL_NAME_free_functor> GENERAL_NAME_Pointer;
 
-UniaryFunctor(X509_EXTENSION_free, X509_EXTENSION *);
+UnaryFunctor(X509_EXTENSION_free, X509_EXTENSION *);
 typedef std::unique_ptr<X509_EXTENSION, X509_EXTENSION_free_functor> X509_EXTENSION_Pointer;
 
 /**