- add flag parameter to http_build_url(); slightly breaks parameter order
[m6w6/ext-http] / missing.c
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
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 +--------------------------------------------------------------------+
11 */
12
13 /* $Id$ */
14
15 #ifdef HAVE_CONFIG_H
16 # include "config.h"
17 #else
18 # include "php_config.h"
19 #endif
20
21 #include "php.h"
22 #include "missing.h"
23
24 #ifdef WONKY
25 int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC)
26 {
27 zval *property = pemalloc(sizeof(zval), ce->type & ZEND_INTERNAL_CLASS);
28 INIT_PZVAL(property);
29 ZVAL_DOUBLE(property, value);
30 return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
31 }
32
33 void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC)
34 {
35 zval *tmp = ecalloc(1, sizeof(zval));
36 ZVAL_DOUBLE(tmp, value);
37 zend_update_property(scope, object, name, name_length, tmp TSRMLS_CC);
38 }
39
40 int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC)
41 {
42 zval *property = pemalloc(sizeof(zval), ce->type & ZEND_INTERNAL_CLASS);
43 INIT_PZVAL(property);
44 ZVAL_BOOL(property, value);
45 return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
46 }
47
48 void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC)
49 {
50 zval *tmp = ecalloc(1, sizeof(zval));
51 ZVAL_BOOL(tmp, value);
52 zend_update_property(scope, object, name, name_length, tmp TSRMLS_CC);
53 }
54
55 void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC)
56 {
57 zval *tmp;
58
59 ALLOC_ZVAL(tmp);
60 tmp->is_ref = 0;
61 tmp->refcount = 0;
62 ZVAL_STRINGL(tmp, value, value_len, 1);
63 zend_update_property(scope, object, name, name_length, tmp TSRMLS_CC);
64 }
65
66 #endif
67
68 /*
69 * Local variables:
70 * tab-width: 4
71 * c-basic-offset: 4
72 * End:
73 * vim600: noet sw=4 ts=4 fdm=marker
74 * vim<600: noet sw=4 ts=4
75 */
76