- update Makefile fragments
[m6w6/ext-http] / missing.c
1
2 #include "php.h"
3 #include "missing.h"
4
5 int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC)
6 {
7 zval *property;
8
9 if (ce->type & ZEND_INTERNAL_CLASS) {
10 property = malloc(sizeof(zval));
11 } else {
12 ALLOC_ZVAL(property);
13 }
14 INIT_PZVAL(property);
15 ZVAL_DOUBLE(property, value);
16 return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
17 }
18
19 void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC)
20 {
21 zval *tmp;
22
23 ALLOC_ZVAL(tmp);
24 tmp->is_ref = 0;
25 tmp->refcount = 0;
26 ZVAL_DOUBLE(tmp, value);
27 zend_update_property(scope, object, name, name_length, tmp TSRMLS_CC);
28 }
29
30 /*
31 * Local variables:
32 * tab-width: 4
33 * c-basic-offset: 4
34 * End:
35 * vim600: noet sw=4 ts=4 fdm=marker
36 * vim<600: noet sw=4 ts=4
37 */
38