Skip to content

Commit 4e0fddf

Browse files
committed
Remove unused functions and macros
1 parent 15286a1 commit 4e0fddf

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

phongo_compat.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@
2424
/* Our Compatability header */
2525
#include "phongo_compat.h"
2626

27-
28-
void *x509_from_zval(zval *zval TSRMLS_DC) {
29-
#if PHP_VERSION_ID >= 70000
30-
return Z_RES_P(zval)->ptr;
31-
#else
32-
int resource_type;
33-
int type;
34-
35-
zend_list_find(Z_LVAL_P(zval), &resource_type);
36-
return zend_fetch_resource(&zval TSRMLS_CC, -1, "OpenSSL X.509", &type, 1, resource_type);
37-
#endif
38-
}
39-
4027
void phongo_add_exception_prop(const char *prop, int prop_len, zval *value TSRMLS_DC)
4128
{
4229
if (EG(exception)) {
@@ -49,7 +36,6 @@ void phongo_add_exception_prop(const char *prop, int prop_len, zval *value TSRML
4936
EXCEPTION_P(EG(exception), ex);
5037
zend_update_property(Z_OBJCE_P(ex), ex, prop, prop_len, value TSRMLS_CC);
5138
#endif
52-
5339
}
5440
}
5541

phongo_compat.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,32 +71,14 @@
7171
}
7272
#endif
7373

74-
/* There was a very bad bug in 5.6.0 through 5.6.6 downgrading
75-
* METHOD_SSLv23 to SSLv2 and SSLv3 exclusively */
76-
#if PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50607
77-
# define PHONGO_CRYPTO_METHOD STREAM_CRYPTO_METHOD_ANY_CLIENT
78-
#else
79-
# define PHONGO_CRYPTO_METHOD STREAM_CRYPTO_METHOD_SSLv23_CLIENT
80-
#endif
81-
8274
#if defined(__GNUC__)
8375
# define ARG_UNUSED __attribute__ ((unused))
8476
#else
8577
# define ARG_UNUSED
8678
#endif
8779

88-
#ifndef php_ignore_value
89-
# if defined(__GNUC__) && __GNUC__ >= 4
90-
# define php_ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
91-
# else
92-
# define php_ignore_value(x) ((void) (x))
93-
# endif
94-
#endif
95-
9680
#if PHP_VERSION_ID >= 70000
9781
# define phongo_char zend_string
98-
# define phongo_char_pdup(str) pestrdup(filename->val, 1)
99-
# define phongo_char_free(str) zend_string_release(str)
10082
# define phongo_long zend_long
10183
#if SIZEOF_ZEND_LONG == 8
10284
# define PHONGO_LONG_FORMAT PRId64
@@ -112,7 +94,6 @@
11294
# define SUPPRESS_UNUSED_WARNING(x)
11395
# define DECLARE_RETURN_VALUE_USED int return_value_used = 1;
11496
# define EXCEPTION_P(_ex, _zp) ZVAL_OBJ(&_zp, _ex)
115-
# define PHONGO_STREAM_ID(stream) stream->res ? stream->res->handle : -1
11697
# define ADD_ASSOC_STRING(_zv, _key, _value) add_assoc_string_ex(_zv, ZEND_STRL(_key), (char *)(_value));
11798
# define ADD_ASSOC_STRINGL(_zv, _key, _value, _len) add_assoc_stringl_ex(_zv, ZEND_STRL(_key), (char *)(_value), _len);
11899
# define ADD_ASSOC_STRING_EX(_zv, _key, _key_len, _value, _value_len) add_assoc_stringl_ex(_zv, _key, _key_len, (char *)(_value), _value_len);
@@ -132,8 +113,6 @@
132113
# define PHONGO_RETVAL_SMART_STR(val) PHONGO_RETVAL_STRINGL(ZSTR_VAL((val).s), ZSTR_LEN((val).s));
133114
#else
134115
# define phongo_char char
135-
# define phongo_char_pdup(str) pestrdup(filename, 1)
136-
# define phongo_char_free(str) _efree(str ZEND_FILE_LINE_CC ZEND_FILE_LINE_CC)
137116
# define phongo_long long
138117
# define PHONGO_LONG_FORMAT "ld"
139118
# define SIZEOF_PHONGO_LONG SIZEOF_LONG
@@ -144,7 +123,6 @@
144123
# define SUPPRESS_UNUSED_WARNING(x) (void)x;
145124
# define DECLARE_RETURN_VALUE_USED
146125
# define EXCEPTION_P(_ex, _zp) _zp = _ex
147-
# define PHONGO_STREAM_ID(stream) stream->rsrc_id
148126
# define ADD_ASSOC_STRING(_zv, _key, _value) add_assoc_string_ex(_zv, ZEND_STRS(_key), (char *)(_value), 1);
149127
# define ADD_ASSOC_STRINGL(_zv, _key, _value, _len) add_assoc_stringl_ex(_zv, ZEND_STRS(_key), (char *)(_value), _len, 1);
150128
# define ADD_ASSOC_STRING_EX(_zv, _key, _key_len, _value, _value_len) add_assoc_stringl_ex(_zv, _key, _key_len+1, (char *)(_value), _value_len, 1);
@@ -164,7 +142,6 @@
164142
# define PHONGO_RETVAL_STRING(s) RETVAL_STRING(s, 1)
165143
# define PHONGO_RETURN_STRING(s) RETURN_STRING(s, 1)
166144
# define PHONGO_RETVAL_SMART_STR(val) PHONGO_RETVAL_STRINGL((val).c, (val).len);
167-
# define PHP_STREAM_CONTEXT(stream) ((php_stream_context*) (stream)->context)
168145
#endif
169146

170147
#if SIZEOF_PHONGO_LONG == 8
@@ -197,7 +174,6 @@
197174
# error Unsupported architecture (integers are neither 32-bit nor 64-bit)
198175
#endif
199176

200-
void *x509_from_zval(zval *zval TSRMLS_DC);
201177
void phongo_add_exception_prop(const char *prop, int prop_len, zval *value TSRMLS_DC);
202178

203179

0 commit comments

Comments
 (0)