]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sendf: Curl_client_write(), make passed in buf const
authorStefan Eissing <stefan@eissing.org>
Tue, 6 Feb 2024 11:10:19 +0000 (12:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 26 Feb 2024 08:43:47 +0000 (09:43 +0100)
docs/CLIENT-WRITERS.md
lib/sendf.c
lib/sendf.h

index 7a928826caf5fd2fd6ff7445c3b66ecadd2f57bf..a2a175b72c5796dccc53ad41eac8cac02931d55f 100644 (file)
@@ -14,7 +14,7 @@ With this naming established, client writers are concerned with writing response
 All code in `libcurl` that handles response data is ultimately expected to forward this data via `Curl_client_write()` to the application. The exact prototype of this function is:
 
 ```
-CURLcode Curl_client_write(struct Curl_easy *data, int type, char *buf, size_t blen);
+CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf, size_t blen);
 ```
 The `type` argument specifies what the bytes in `buf` actually are. The following bits are defined:
 
index 8accc179648847ba04bc4a06768f5a670a6518ed..f37cee5d935a4b3a52491bbe85cd821a89a19d7e 100644 (file)
@@ -296,7 +296,7 @@ static CURLcode chop_write(struct Curl_easy *data,
    The defines are in sendf.h of course.
  */
 CURLcode Curl_client_write(struct Curl_easy *data,
-                           int type, char *buf, size_t blen)
+                           int type, const char *buf, size_t blen)
 {
   CURLcode result;
 
index 7deae2ac3cacdff94d966f8716358b2c2daa2dc8..4d4f01e4f58e0a924ce7b3513496b48193780cfe 100644 (file)
@@ -55,7 +55,7 @@
  * Write `len` bytes at `prt` to the client. `type` indicates what
  * kind of data is being written.
  */
-CURLcode Curl_client_write(struct Curl_easy *data, int type, char *ptr,
+CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *ptr,
                            size_t len) WARN_UNUSED_RESULT;
 
 /**