2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2005, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
19 int zend_declare_property_double(zend_class_entry
*ce
, char *name
, int name_length
, double value
, int access_type TSRMLS_DC
)
21 zval
*property
= pemalloc(sizeof(zval
), ce
->type
& ZEND_INTERNAL_CLASS
);
23 ZVAL_DOUBLE(property
, value
);
24 return zend_declare_property(ce
, name
, name_length
, property
, access_type TSRMLS_CC
);
27 void zend_update_property_double(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, double value TSRMLS_DC
)
29 zval
*tmp
= ecalloc(1, sizeof(zval
));
30 ZVAL_DOUBLE(tmp
, value
);
31 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
34 int zend_declare_property_bool(zend_class_entry
*ce
, char *name
, int name_length
, long value
, int access_type TSRMLS_DC
)
36 zval
*property
= pemalloc(sizeof(zval
), ce
->type
& ZEND_INTERNAL_CLASS
);
38 ZVAL_BOOL(property
, value
);
39 return zend_declare_property(ce
, name
, name_length
, property
, access_type TSRMLS_CC
);
42 void zend_update_property_bool(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, long value TSRMLS_DC
)
44 zval
*tmp
= ecalloc(1, sizeof(zval
));
45 ZVAL_BOOL(tmp
, value
);
46 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
49 void zend_update_property_stringl(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, char *value
, int value_len TSRMLS_DC
)
56 ZVAL_STRINGL(tmp
, value
, value_len
, 1);
57 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
67 * vim600: noet sw=4 ts=4 fdm=marker
68 * vim<600: noet sw=4 ts=4