summaryrefslogtreecommitdiff
path: root/ext/phar/phar_internal.h
diff options
context:
space:
mode:
authorSteph Fox <sfox@php.net>2008-05-14 21:29:51 +0000
committerSteph Fox <sfox@php.net>2008-05-14 21:29:51 +0000
commit6a0682d986c8e7fa16b51a8c3fd8f7cc01660426 (patch)
tree3f4902979371a318d695b6a09dc003c95b6a0258 /ext/phar/phar_internal.h
parentb3b5126954689c93baddbbe48f714594bf7dac13 (diff)
downloadphp-git-6a0682d986c8e7fa16b51a8c3fd8f7cc01660426.tar.gz
- MFH
- Make internal code forward-compatible. This included a binary cast in the default stub, hence test updates.
Diffstat (limited to 'ext/phar/phar_internal.h')
-rwxr-xr-xext/phar/phar_internal.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h
index 1aa5425125..cec12ead31 100755
--- a/ext/phar/phar_internal.h
+++ b/ext/phar/phar_internal.h
@@ -354,8 +354,17 @@ extern char *(*phar_save_resolve_path)(const char *filename, int filename_len TS
# endif
#endif
-BEGIN_EXTERN_C()
+#if PHP_VERSION_ID >= 60000
+typedef zstr phar_zstr;
+#define PHAR_STR(a, b) \
+ spprintf(&b, 0, "%r", a.s);
+#else
+typedef char *phar_zstr;
+#define PHAR_STR(a, b) \
+ b = a;
+#endif
+BEGIN_EXTERN_C()
#ifdef PHP_WIN32
char *tsrm_strtok_r(char *s, const char *delim, char **last);