const struct _test array 注意看这里一个十分神奇的方法

#include <stdio.h>
#include <sys/acct.h>


typedef struct _zend_refcounted_h {
    uint32_t         refcount;			/* reference counter 32-bit */
    union {
        uint32_t type_info;
    } u;
} zend_refcounted_h;

struct _test{
    zend_refcounted_h gc;
}test;
#define HT_MIN_MASK ((uint32_t) -2)
#define GC_SET_REFCOUNT(p, rc)		zend_gc_set_refcount(&(p)->gc, rc)
#define HT_HASH_SIZE(nTableMask) \
	(((size_t)(uint32_t)-(int32_t)(nTableMask)) * sizeof(uint32_t))

const struct _test array ={
	        .gc.refcount = 1;
	};
int main()
{

}
发布了93 篇原创文章 · 获赞 2 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_32783703/article/details/103152280