[英]What does this C language statement mean?
int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx)
I find this code piece, not sure how to understand it.我找到了这段代码,不知道如何理解它。 I think EVP_MD_meth_get_cleanup is the name of the function pointer type, return int , but not understand the argument part.我认为EVP_MD_meth_get_cleanup是 function 指针类型的名称,返回int ,但不明白参数部分。
EVP_MD_meth_get_cleanup
is a function, that takes const EVP_MD *md
as an argument, and returns a function pointer . EVP_MD_meth_get_cleanup
是一个 function,它以const EVP_MD *md
作为参数,并返回一个 function 指针。 That function pointer takes EVP_MD_CTX *ctx
and returns an int
.该 function 指针采用EVP_MD_CTX *ctx
并返回一个int
。
Nothing better than an example:没有什么比一个例子更好的了:
int somefunction(EVP_MD_CTX *ctx) {
stuff();
}
int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx) {
return somefunction;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.