用c写一个python的module, 突然出现以下警告,
warning: "_POSIX_C_SOURCE" redefined
虽然程序可以运行,但看到警告心里面总是不爽。后来搜索发现,只要把#include <Python.h>放到代码的最上面,让它先加载python头文件,然后才是,
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <stdbool.h>
15 #include <string.h>
就OK。