X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_misc.h;fp=src%2Fphp_http_misc.h;h=481fb8c5b71b88a04c8258ff00750196864a6efa;hp=99660ea98ada5caf0ddc74105c3e72d0b60a17a7;hb=f1b9163c7c8f71c833b21974975a15444cd5e24a;hpb=4e5f36bd0b770444c8e5151c498fa96326e261c5 diff --git a/src/php_http_misc.h b/src/php_http_misc.h index 99660ea..481fb8c 100644 --- a/src/php_http_misc.h +++ b/src/php_http_misc.h @@ -102,6 +102,11 @@ static inline const char *php_http_locate_bin_eol(const char *bin, size_t len, i # define HASH_OF(p) ((HashTable*)(Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties(Z_OBJ_P(p)) : NULL)))) #endif +#if PHP_VERSION_ID >= 80100 +# define php_http_mem_stream_open(type, zstr) php_stream_memory_open((type), (zstr)) +#else +# define php_http_mem_stream_open(type, zstr) php_stream_memory_open((type), (zstr)->val, (zstr)->len) +#endif #define HT_IS_RECURSIVE(ht) GC_IS_RECURSIVE(ht) #define HT_PROTECT_RECURSION(ht) GC_PROTECT_RECURSION(ht)