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.

38 lines
606 B

  1. #include "xc_ini.h"
  2. PHP_INI_MH(xcache_OnUpdateDummy)
  3. {
  4. return SUCCESS;
  5. }
  6. PHP_INI_MH(xcache_OnUpdateULong)
  7. {
  8. zend_ulong *p = (zend_ulong *) mh_arg1;
  9. *p = (zend_ulong) atoi(new_value);
  10. return SUCCESS;
  11. }
  12. PHP_INI_MH(xcache_OnUpdateBool)
  13. {
  14. zend_bool *p = (zend_bool *)mh_arg1;
  15. if (strncasecmp("on", new_value, sizeof("on"))) {
  16. *p = (zend_bool) atoi(new_value);
  17. }
  18. else {
  19. *p = (zend_bool) 1;
  20. }
  21. return SUCCESS;
  22. }
  23. PHP_INI_MH(xcache_OnUpdateString)
  24. {
  25. char **p = (char**)mh_arg1;
  26. if (*p) {
  27. pefree(*p, 1);
  28. }
  29. *p = pemalloc(strlen(new_value) + 1, 1);
  30. strcpy(*p, new_value);
  31. return SUCCESS;
  32. }