[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 176/205: CURLINFO_SCHEME.3: fix variable type
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 176/205: CURLINFO_SCHEME.3: fix variable type |
Date: |
Thu, 20 Apr 2017 16:21:56 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit fa66403280acf4a7df99e676c95c3c3c7e283135
Author: Jay Satiro <address@hidden>
AuthorDate: Sat Apr 8 15:44:39 2017 -0400
CURLINFO_SCHEME.3: fix variable type
- Change documented param type to char ** from incorrect long *.
---
docs/libcurl/opts/CURLINFO_SCHEME.3 | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/docs/libcurl/opts/CURLINFO_SCHEME.3
b/docs/libcurl/opts/CURLINFO_SCHEME.3
index 78c3d6886..38a3d15ba 100644
--- a/docs/libcurl/opts/CURLINFO_SCHEME.3
+++ b/docs/libcurl/opts/CURLINFO_SCHEME.3
@@ -26,14 +26,15 @@ CURLINFO_SCHEME \- get the URL scheme (sometimes called
protocol) used in the co
.SH SYNOPSIS
#include <curl/curl.h>
-CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, long *p);
+CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, char **scheme);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive the pointer to a zero-terminated
-string holding the URL scheme used for the most recent connection done with
this
-\fBcurl\fP handle.
+string holding the URL scheme used for the most recent connection done with
+this CURL \fBhandle\fP.
-The \fBid\fP pointer will be NULL or pointing to private read-only memory you
-MUST NOT free or modify.
+The \fBscheme\fP pointer will be NULL or pointing to private memory you MUST
+NOT free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
+corresponding CURL handle.
.SH PROTOCOLS
All
.SH EXAMPLE
@@ -44,8 +45,10 @@ if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl);
if(res == CURLE_OK) {
- char * scheme;
+ char *scheme = NULL;
curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme);
+ if(scheme)
+ printf("scheme: %s\\n", scheme); /* scheme: HTTP */
}
curl_easy_cleanup(curl);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 151/205: llist: replace Curl_llist_alloc with Curl_llist_init, (continued)
- [GNUnet-SVN] [gnurl] 151/205: llist: replace Curl_llist_alloc with Curl_llist_init, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 164/205: INSTALL.cmake: more problems, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 133/205: gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context], gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 148/205: include: curl/system.h is a run-time version of curlbuild.h, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 160/205: tool_operate: move filetime code to its own function, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 170/205: sspi: print out InitializeSecurityContext() error message, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 180/205: RELEASE-NOTES: synced with f9d1e9a27f7e1, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 162/205: Revert "configure: prefer 'long long' to int64_t for curl_off_t", gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 166/205: system.h: set sizeof long to 4 on "default 32 bit" systems, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 195/205: configure.ac: ignore CR after version numbers, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 176/205: CURLINFO_SCHEME.3: fix variable type,
gnunet <=
- [GNUnet-SVN] [gnurl] 193/205: unit1303: fix compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 201/205: TLS: Fix switching off SSL session id when client cert is used, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 154/205: url: don't free postponed data on connection reuse, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 69/205: http_proxy: Ignore TE and CL in CONNECT 2xx responses, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 202/205: nss: fix MinGW compiler warnings, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 159/205: configure: prefer 'long long' to int64_t for curl_off_t, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 197/205: code: fix typos and style in comments, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 149/205: docs: minor typo in write-out.d, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 181/205: nss: load CA certificates even with --insecure, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 186/205: Curl_expire_latest: ignore already expired timers, gnunet, 2017/04/20