XCache is a fast, stable PHP opcode cacher that has been proven and is now running on production servers under high load. https://xcache.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
491 B

  1. #define MAX_DUP_STR_LEN 256
  2. static inline size_t xc_zstrlen_char(const_zstr s) /* {{{ */
  3. {
  4. return strlen(ZSTR_S(s));
  5. }
  6. /* }}} */
  7. #ifdef IS_UNICODE
  8. static inline size_t xc_zstrlen_uchar(zstr s) /* {{{ */
  9. {
  10. return u_strlen(ZSTR_U(s));
  11. }
  12. /* }}} */
  13. static inline size_t xc_zstrlen(int type, const_zstr s) /* {{{ */
  14. {
  15. return type == IS_UNICODE ? xc_zstrlen_uchar(s) : xc_zstrlen_char(s);
  16. }
  17. /* }}} */
  18. #else
  19. /* {{{ xc_zstrlen */
  20. #define xc_zstrlen(dummy, s) xc_zstrlen_char(s)
  21. /* }}} */
  22. #endif