- better inline docs, part #2 and #3
[m6w6/ext-http] / http_headers_api.c
index 8a4ecc5591f8d9a9ee8c2b4e918a755c56facd4d..b7295ef59b65ca1d0c8c919c9f9507f22f384b1c 100644 (file)
@@ -37,6 +37,18 @@ ZEND_EXTERN_MODULE_GLOBALS(http);
 #      define HTTP_DBG_NEG 0
 #endif
 
+/* {{{ STATUS http_headers_global_init() */
+STATUS _http_headers_global_init(INIT_FUNC_ARGS)
+{
+       HTTP_LONG_CONSTANT("HTTP_REDIRECT", HTTP_REDIRECT);
+       HTTP_LONG_CONSTANT("HTTP_REDIRECT_PERM", HTTP_REDIRECT_PERM);
+       HTTP_LONG_CONSTANT("HTTP_REDIRECT_POST", HTTP_REDIRECT_POST);
+       HTTP_LONG_CONSTANT("HTTP_REDIRECT_TEMP", HTTP_REDIRECT_TEMP);
+       
+       return SUCCESS;
+}
+/* }}} */
+
 /* {{{ static int http_sort_q(const void *, const void *) */
 static int http_sort_q(const void *a, const void *b TSRMLS_DC)
 {
@@ -154,7 +166,7 @@ PHP_HTTP_API HashTable *_http_negotiate_q(const char *header, HashTable *support
                                        
                                        while (*++ptr && !isdigit(*ptr));
                                        
-                                       quality = strtod(ptr, NULL);
+                                       quality = atof(ptr);
                                        identifier = estrndup(Z_STRVAL_PP(entry), separator - Z_STRVAL_PP(entry));
                                } else {
                                        quality = 1000.0 - i++;