summaryrefslogtreecommitdiff
path: root/ext/phar/phar_internal.h
diff options
context:
space:
mode:
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);