From 86f375d1dde8abbd4ee170eaa7ae010032f50606 Mon Sep 17 00:00:00 2001 From: codinghuang <2812240764@qq.com> Date: Thu, 30 May 2019 21:54:43 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=E6=9B=B4=E6=96=B0=E3=80=8A=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E8=A7=84=E8=8C=83=E3=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7\347\250\213-\350\247\204\350\214\203.md" | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git "a/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" "b/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" index b9c58fd..3f7a8e9 100644 --- "a/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" +++ "b/docs/\343\200\212PHP\346\211\251\345\261\225\345\274\200\345\217\221\343\200\213-\345\215\217\347\250\213-\350\247\204\350\214\203.md" @@ -20,4 +20,21 @@ static PHP_METHOD(study_coroutine, test); 4、只在项目根目录下的`study_*.cc`文件里面使用`Zend API`,不在`src`目录的代码里面使用`Zend API`。 -(待补充) \ No newline at end of file +5、用到的标准库函数都在`include/study.h`里面引入。 + +6、为了防止重复引入头文件,增加如下条件编译。例如,在`study.h`头文件里面写入: + +```c++ +#ifndef STUDY_H_ +#define STUDY_H_ + + +#endif /* STUDY_H_ */ +``` + +注意宏的命名规范。 + +7、只在`php_study.h`头文件里面引入`PHP`相关的头文件。`study_*.cc`只引入`php_study.h`文件,不去引入`include/study.h`文件。`study.h`文件是被`php_study.h`引入的。 + +(待补充) + -- GitLab