X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_body_api.h;h=2a9559f3ee6d3d31e55f05f5914747bceee3e3f8;hp=0dc12528f55f6d889a4ddf4b68dbe80613d3cbcd;hb=669d2e6a8bdc642b6b52693f4593f199ddd7e8d2;hpb=649aada485583ccac67928e0700cb5f1b963f4e8 diff --git a/php_http_request_body_api.h b/php_http_request_body_api.h index 0dc1252..2a9559f 100644 --- a/php_http_request_body_api.h +++ b/php_http_request_body_api.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2005, Michael Wallner | + | Copyright (c) 2004-2006, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -17,12 +17,14 @@ #ifdef HTTP_HAVE_CURL +#define HTTP_REQUEST_BODY_EMPTY 0 #define HTTP_REQUEST_BODY_CSTRING 1 #define HTTP_REQUEST_BODY_CURLPOST 2 #define HTTP_REQUEST_BODY_UPLOADFILE 3 -typedef struct { - uint type:31; +typedef struct _http_request_body_t { + uint type:3; uint free:1; + uint priv:28; void *data; size_t size; } http_request_body; @@ -31,6 +33,7 @@ typedef struct { #define http_request_body_new() http_request_body_init(NULL) #define http_request_body_init(b) http_request_body_init_ex((b), 0, NULL, 0, 0) #define http_request_body_init_ex(b, t, d, l, f) _http_request_body_init_ex((b), (t), (d), (l), (f) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) +#define http_request_body_init_rel(b, t, d, l, f) _http_request_body_init_ex((b), (t), (d), (l), (f) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC TSRMLS_CC) PHP_HTTP_API http_request_body *_http_request_body_init_ex(http_request_body *body, int type, void *data, size_t len, zend_bool free ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC); #define http_request_body_fill(b, fields, files) _http_request_body_fill((b), (fields), (files) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC)