Przeglądaj źródła

Use long long instead of int64_t in the public interface for consistency

bel 9 lat temu
rodzic
commit
0475d20f68
4 zmienionych plików z 5 dodań i 5 usunięć
  1. 1 1
      examples/embedded_c/embedded_c.c
  2. 1 1
      include/civetweb.h
  3. 1 1
      src/civetweb.c
  4. 2 2
      src/handle_form.inl

+ 1 - 1
examples/embedded_c/embedded_c.c

@@ -231,7 +231,7 @@ field_get(const char *key, const char *value, size_t valuelen, void *user_data)
 
 
 int
-field_stored(const char *path, size_t file_size, void *user_data)
+field_stored(const char *path, long long file_size, void *user_data)
 {
 	struct mg_connection *conn = (struct mg_connection *)user_data;
 

+ 1 - 1
include/civetweb.h

@@ -814,7 +814,7 @@ struct mg_form_data_handler {
 	 * Return value:
 	 *   TODO: Needs to be defined.
 	 */
-	int (*field_store)(const char *path, size_t file_size, void *user_data);
+	int (*field_store)(const char *path, long long file_size, void *user_data);
 
 	/* User supplied argument, passed to all callback functions. */
 	void *user_data;

+ 1 - 1
src/civetweb.c

@@ -9319,7 +9319,7 @@ mg_upload_field_get(const char *key,
 
 /* Helper function for deprecated mg_upload. */
 static int
-mg_upload_field_stored(const char *path, size_t file_size, void *user_data)
+mg_upload_field_stored(const char *path, long long file_size, void *user_data)
 {
 	struct mg_upload_user_data *fud = (struct mg_upload_user_data *)user_data;
 	(void)file_size;

+ 2 - 2
src/handle_form.inl

@@ -117,7 +117,7 @@ url_encoded_field_get(const struct mg_connection *conn,
 static int
 field_stored(const struct mg_connection *conn,
              const char *path,
-             size_t file_size,
+             long long file_size,
              struct mg_form_data_handler *fdh)
 {
 	/* Equivalent to "upload" callback of "mg_upload". */
@@ -162,7 +162,7 @@ mg_handle_form_request(struct mg_connection *conn,
 	int r;
 	int field_count = 0;
 	struct file fstore = STRUCT_FILE_INITIALIZER;
-	size_t file_size = 0; /* init here, to a avoid a false positive
+	int64_t file_size = 0; /* init here, to a avoid a false positive
 	                         "uninitialized variable used" warning */
 
 	int has_body_data =