590c2c904982ee552cd5181d4243c1bd84921ea3
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 +--------------------------------------------------------------------+
18 # include "php_config.h"
25 int zend_declare_property_double(zend_class_entry
*ce
, char *name
, int name_length
, double value
, int access_type TSRMLS_DC
)
27 zval
*property
= pemalloc(sizeof(zval
), ce
->type
& ZEND_INTERNAL_CLASS
);
29 ZVAL_DOUBLE(property
, value
);
30 return zend_declare_property(ce
, name
, name_length
, property
, access_type TSRMLS_CC
);
33 void zend_update_property_double(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, double value TSRMLS_DC
)
35 zval
*tmp
= ecalloc(1, sizeof(zval
));
36 ZVAL_DOUBLE(tmp
, value
);
37 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
40 int zend_declare_property_bool(zend_class_entry
*ce
, char *name
, int name_length
, long value
, int access_type TSRMLS_DC
)
42 zval
*property
= pemalloc(sizeof(zval
), ce
->type
& ZEND_INTERNAL_CLASS
);
44 ZVAL_BOOL(property
, value
);
45 return zend_declare_property(ce
, name
, name_length
, property
, access_type TSRMLS_CC
);
48 void zend_update_property_bool(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, long value TSRMLS_DC
)
50 zval
*tmp
= ecalloc(1, sizeof(zval
));
51 ZVAL_BOOL(tmp
, value
);
52 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
55 void zend_update_property_stringl(zend_class_entry
*scope
, zval
*object
, char *name
, int name_length
, char *value
, int value_len TSRMLS_DC
)
62 ZVAL_STRINGL(tmp
, value
, value_len
, 1);
63 zend_update_property(scope
, object
, name
, name_length
, tmp TSRMLS_CC
);
73 * vim600: noet sw=4 ts=4 fdm=marker
74 * vim<600: noet sw=4 ts=4