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.

61 lines
2.3 KiB

23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
23 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2009 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. | Authors: Marcus Boerger <helly@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef SPL_ENGINE_H
  20. #define SPL_ENGINE_H
  21. #include "php.h"
  22. #include "php_spl.h"
  23. #include "zend_interfaces.h"
  24. PHPAPI void spl_instantiate(zend_class_entry *pce, zval **object, int alloc TSRMLS_DC);
  25. PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC);
  26. /* {{{ spl_instantiate_arg_ex1 */
  27. static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval **retval, int alloc, zval *arg1 TSRMLS_DC)
  28. {
  29. spl_instantiate(pce, retval, alloc TSRMLS_CC);
  30. zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 1, arg1, NULL TSRMLS_CC);
  31. return 0;
  32. }
  33. /* }}} */
  34. /* {{{ spl_instantiate_arg_ex2 */
  35. static inline int spl_instantiate_arg_ex2(zend_class_entry *pce, zval **retval, int alloc, zval *arg1, zval *arg2 TSRMLS_DC)
  36. {
  37. spl_instantiate(pce, retval, alloc TSRMLS_CC);
  38. zend_call_method(retval, pce, &pce->constructor, pce->constructor->common.function_name, strlen(pce->constructor->common.function_name), NULL, 2, arg1, arg2 TSRMLS_CC);
  39. return 0;
  40. }
  41. /* }}} */
  42. #endif /* SPL_ENGINE_H */
  43. /*
  44. * Local Variables:
  45. * c-basic-offset: 4
  46. * tab-width: 4
  47. * End:
  48. * vim600: fdm=marker
  49. * vim: noet sw=4 ts=4
  50. */