Backport from xs.

This commit is contained in:
default 2023-10-14 10:04:40 +02:00
parent 3b88cfe992
commit fbb773ae72
3 changed files with 4 additions and 4 deletions

View file

@ -448,7 +448,7 @@ static void *job_thread(void *arg)
/* it's a socket */ /* it's a socket */
FILE *f = NULL; FILE *f = NULL;
xs_data_get(job, &f); xs_data_get(&f, job);
if (f != NULL) if (f != NULL)
httpd_connection(f); httpd_connection(f);

4
xs.h
View file

@ -115,7 +115,7 @@ const char *xs_number_str(const xs_number *v);
xs_data *xs_data_new(const void *data, int size); xs_data *xs_data_new(const void *data, int size);
int xs_data_size(const xs_data *value); int xs_data_size(const xs_data *value);
void xs_data_get(const xs_data *value, void *data); void xs_data_get(void *data, const xs_data *value);
void *xs_memmem(const char *haystack, int h_size, const char *needle, int n_size); void *xs_memmem(const char *haystack, int h_size, const char *needle, int n_size);
@ -1153,7 +1153,7 @@ int xs_data_size(const xs_data *value)
} }
void xs_data_get(const xs_data *value, void *data) void xs_data_get(void *data, const xs_data *value)
/* copies the raw data stored inside value into data */ /* copies the raw data stored inside value into data */
{ {
memcpy(data, &value[4], xs_data_size(value)); memcpy(data, &value[4], xs_data_size(value));

View file

@ -1 +1 @@
/* 0b8d1591403ac07d83de975db6afa27e353f958c */ /* a9cd3893c427bbcc478c5680245d435e415fd58a */