- 论坛徽章:
- 0
|
C语言的双目操作符 ##
php 源码里到处可见《C语言教程》上这么写:
双目操作符“##”用于合并标记。下面是一例
#define X(i) x ## i
X(1) = X(2) = X(3);
经过预处理器处理之后,它变成下面这行代码:
x1 = x2 = x3;
再看php源码
# define ZEND_MM_LONG_CONST(x) (x##i64)
#define ZEND_MM_TYPE_MASK ZEND_MM_LONG_CONST(0x3)
下一行宏应该解释为:?
#define ZEND_MM_TYPE_MASK ox3[color="#ff0000"]i64 [color="#009900"]/*晕倒*/
#include stdio.h>
#define X(x) (x##64) /*不加i就没事*/
#define Y X(0x3)
void main(){
printf("%d",Y);
getch();
}
![]()
文件:
(M)2007-8-22.rar
大小:
73KB
下载:
下载
keywords:GUID,Lex&Yacc,ARM,PECL,foo,bar
1.guid:global unique identifier;
解读php source:function php_logo_guid(),uniqid,mt_rand,
生成guid的php class guid.class.php
---php_logo_guid()分析 ?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
standard/info.h
#define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42"
PHPFUNCTION(php_logo_guid);
standard/info.c
PHP_FUNCTION(php_logo_guid) /*line:1082*/
2.get_defined_constants();
3.GLOBALS
调试是把 2.3.通通print_r出来
写得有点乱,大概了解了这些,不知道自己的路走得对不对,不过C是肯定要上的,知道点‘底层’的运行机制做起事来确实爽得多。2007/8/24-25
![]()
文件:
2007-8-24.rar
大小:
138KB
下载:
下载
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/10152/showart_365520.html |
|