0cc26193d49b72f102da7692699a4d7ec69d29a1
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-2006, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
23 int zend_declare_property_double(zend_class_entry
*ce
, char *name
, int name_length
, double value
, int access_type TSRMLS_DC
)
25 zval
*property
= pemalloc(sizeof(zval
), ce
->type
& ZEND_INTERNAL_CLASS
);
27 ZVAL_DOUBLE(property
, value
);
28 return zend_declare_property(ce
, name
, name_length
, property
, access_type TSRMLS_CC
);
31 void zend_update_property_double(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, double value TSRMLS_DC
)
33 zval
*tmp
= ecalloc(1, sizeof(zval
));
34 ZVAL_DOUBLE(tmp
, value
);
35 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
38 int zend_declare_property_bool(zend_class_entry
*ce
, char *name
, int name_length
, long value
, int access_type TSRMLS_DC
)
40 zval
*property
= pemalloc(sizeof(zval
), ce
->type
& ZEND_INTERNAL_CLASS
);
42 ZVAL_BOOL(property
, value
);
43 return zend_declare_property(ce
, name
, name_length
, property
, access_type TSRMLS_CC
);
46 void zend_update_property_bool(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, long value TSRMLS_DC
)
48 zval
*tmp
= ecalloc(1, sizeof(zval
));
49 ZVAL_BOOL(tmp
, value
);
50 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
53 void zend_update_property_stringl(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, char *value
, int value_len TSRMLS_DC
)
60 ZVAL_STRINGL(tmp
, value
, value_len
, 1);
61 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
71 * vim600: noet sw=4 ts=4 fdm=marker
72 * vim<600: noet sw=4 ts=4