cvs: ZendEngine2(PHP_5_2) / zend_operators.h
| From: | Derick Rethans | Date: | Tue, 08 Aug 2006 09:46:46 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_operators.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5177@lists.php.net to get a copy of this message | ||
derick Tue Aug 8 09:46:46 2006 UTC
Modified files: (Branch: PHP_5_2)
/ZendEngine2 zend_operators.h
Log:
- Added some docs here so that nobody needs to figure it out once more.
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.h?r1=1.94.2.4.2.2&r2=1.94.2.4.2.3&diff_format=u
Index: ZendEngine2/zend_operators.h
diff -u ZendEngine2/zend_operators.h:1.94.2.4.2.2 ZendEngine2/zend_operators.h:1.94.2.4.2.3
--- ZendEngine2/zend_operators.h:1.94.2.4.2.2 Tue Aug 8 09:41:09 2006
+++ ZendEngine2/zend_operators.h Tue Aug 8 09:46:46 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.h,v 1.94.2.4.2.2 2006/08/08 09:41:09 tony2001 Exp $ */
+/* $Id: zend_operators.h,v 1.94.2.4.2.3 2006/08/08 09:46:46 derick Exp $ */
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
@@ -66,6 +66,15 @@
ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce
TSRMLS_DC);
END_EXTERN_C()
+/**
+ * Checks whether the string "str" with the length "length" is a numeric
string.
+ *
+ * The function returns 0 if the string did not contain a string; IS_LONG if
+ * the string contained a number that fits in the integer range and IS_DOUBLE
+ * in case it did not. The long value is returned into the pointer *lval if
+ * that pointer was not NULL or into the pointer *dval if that pointer was not
+ * NULL.
+ */
static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, int
allow_errors)
{
long local_lval;