php_twig.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Twig Extension |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2011 Derick Rethans |
  6. +----------------------------------------------------------------------+
  7. | Redistribution and use in source and binary forms, with or without |
  8. | modification, are permitted provided that the conditions mentioned |
  9. | in the accompanying LICENSE file are met (BSD, revised). |
  10. +----------------------------------------------------------------------+
  11. | Author: Derick Rethans <derick@derickrethans.nl> |
  12. +----------------------------------------------------------------------+
  13. */
  14. #ifndef PHP_TWIG_H
  15. #define PHP_TWIG_H
  16. #include "php.h"
  17. extern zend_module_entry twig_module_entry;
  18. #define phpext_twig_ptr &twig_module_entry
  19. #ifdef PHP_WIN32
  20. #define PHP_TWIG_API __declspec(dllexport)
  21. #else
  22. #define PHP_TWIG_API
  23. #endif
  24. #ifdef ZTS
  25. #include "TSRM.h"
  26. #endif
  27. PHP_FUNCTION(twig_template_get_attributes);
  28. PHP_MINIT_FUNCTION(twig);
  29. PHP_MSHUTDOWN_FUNCTION(twig);
  30. PHP_RINIT_FUNCTION(twig);
  31. PHP_RSHUTDOWN_FUNCTION(twig);
  32. PHP_MINFO_FUNCTION(twig);
  33. #ifdef ZTS
  34. #define TWIG_G(v) TSRMG(twig_globals_id, zend_twig_globals *, v)
  35. #else
  36. #define TWIG_G(v) (twig_globals.v)
  37. #endif
  38. #endif