php_wxwork_finance_sdk.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef PHP_WXWORK_FINANCE_SDK_H
  20. #define PHP_WXWORK_FINANCE_SDK_H
  21. extern zend_module_entry wxwork_finance_sdk_module_entry;
  22. #define phpext_wxwork_finance_sdk_ptr &wxwork_finance_sdk_module_entry
  23. #define PHP_WXWORK_FINANCE_SDK_VERSION "0.1.0" /* Replace with version number for your extension */
  24. #ifdef PHP_WIN32
  25. # define PHP_WXWORK_FINANCE_SDK_API __declspec(dllexport)
  26. #elif defined(__GNUC__) && __GNUC__ >= 4
  27. # define PHP_WXWORK_FINANCE_SDK_API __attribute__ ((visibility("default")))
  28. #else
  29. # define PHP_WXWORK_FINANCE_SDK_API
  30. #endif
  31. #ifdef ZTS
  32. #include "TSRM.h"
  33. #endif
  34. /*
  35. Declare any global variables you may need between the BEGIN
  36. and END macros here:
  37. ZEND_BEGIN_MODULE_GLOBALS(wxwork_finance_sdk)
  38. zend_long global_value;
  39. char *global_string;
  40. ZEND_END_MODULE_GLOBALS(wxwork_finance_sdk)
  41. */
  42. /* Always refer to the globals in your function as WXWORK_FINANCE_SDK_G(variable).
  43. You are encouraged to rename these macros something shorter, see
  44. examples in any other php module directory.
  45. */
  46. #define WXWORK_FINANCE_SDK_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(wxwork_finance_sdk, v)
  47. #if defined(ZTS) && defined(COMPILE_DL_WXWORK_FINANCE_SDK)
  48. ZEND_TSRMLS_CACHE_EXTERN()
  49. #endif
  50. #include "zend_exceptions.h"
  51. #include "ext/spl/spl_exceptions.h"
  52. #include "WeWorkFinanceSdk_C.h"
  53. #define TRACE(fmt, ...) do { trace(__FILE__, __LINE__, __FUNCTION__, fmt, ##__VA_ARGS__); } while (0)
  54. static inline void trace(const char *file, int line, const char* function, const char *fmt, ...) {
  55. fprintf(stderr, "%s(%s:%d) - ", function, file, line);
  56. va_list args;
  57. va_start(args, fmt);
  58. vfprintf(stderr, fmt, args);
  59. fprintf(stderr, "\n");
  60. va_end(args);
  61. }
  62. #endif /* PHP_WXWORK_FINANCE_SDK_H */
  63. /*
  64. * Local variables:
  65. * tab-width: 4
  66. * c-basic-offset: 4
  67. * End:
  68. * vim600: noet sw=4 ts=4 fdm=marker
  69. * vim<600: noet sw=4 ts=4
  70. */