File: zend_execute_locks.h

package info (click to toggle)
php4 4.0.3pl1-0potato3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 15,168 kB
  • ctags: 20,556
  • sloc: ansic: 155,237; php: 10,827; sh: 9,608; yacc: 1,874; lex: 1,742; makefile: 788; java: 424; awk: 359; cpp: 335; perl: 181; xml: 57
file content (22 lines) | stat: -rw-r--r-- 758 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef ZEND_EXECUTE_LOCKS_H
#define ZEND_EXECUTE_LOCKS_H

#define PZVAL_LOCK(z)	((z)->refcount++)
#define PZVAL_UNLOCK(z)	{ ((z)->refcount--);								\
							if (!(z)->refcount) {							\
								(z)->refcount = 1;							\
								(z)->is_ref = 0;							\
								if (EG(garbage_ptr) == 4) {					\
									zval_ptr_dtor(&EG(garbage)[0]);			\
									zval_ptr_dtor(&EG(garbage)[1]);			\
									EG(garbage)[0] = EG(garbage)[2];		\
									EG(garbage)[1] = EG(garbage)[3];		\
									EG(garbage_ptr) -= 2;					\
								}											\
								EG(garbage)[EG(garbage_ptr)++] = (z);		\
							}												\
						}

#define SELECTIVE_PZVAL_LOCK(pzv, pzn)		if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }

#endif /* ZEND_EXECUTE_LOCKS_H */