如何使用C中的宏来解释嵌套函数调用

时间:2018-04-20 18:27:51

标签: c function macros header

我遇到了如下的宏定义。宏RVS_E(_I,_E)的定义是否有效? 宏RVS_C()如何工作(因为它依赖于RVS_E)以及RVS_C的输出是什么

if ( ( rvs_tmp_k_362=0,  RVS_DM(362,&rvs_tmp_k_362,(unsigned int)(RVS_CM(&rvs_tmp_k_362,2,(unsigned int)((nvHist_Queue.DataPtr != (uint8*)&nvHist_QData)))
{
 .....
}     

以下是使用这些宏的示例代码(它是一个自动生成的"检测的"代码,因此看起来有点疯狂)

class Job(models.Model):
    type = models.CharField(max_length=32, choices=JobChoices)
    guid = models.CharField(max_length=32)
    title = models.CharField(max_length=256)
    started_time = models.DateTimeField()
    ended_time = models.DateTimeField(blank=True, null=True)
    enabled = models.BooleanField(default=False)
    running = models.BooleanField(default=False)
    working_job_status = models.CharField(max_length=32, choices=StatusCoices)
    working_job_length = models.IntegerField(blank=True, null=True)
    working_job_progress = models.IntegerField(blank=True, null=True)
    working_job_eta_sec = models.IntegerField(blank=True, null=True)

RepeatUnit = (
    ('s', 'Second'),
    ('m', 'Minute'),
    ('h', 'Hour'),
    ('d', 'Day'),
    ('W', 'Week'),
    ('M', 'Month'),
    ('Y', 'Year'),
)

class Schedule(models.Model):
    title = models.CharField(max_length=128)
    job = models.ManyToManyField(Job, blank=True, null=True)
    start_time = models.DateTimeField(null=False)
    end_time = models.DateTimeField(blank=True, null=True)
    repeat_unit = models.CharField(blank=True, null=True, max_length=1, choices=RepeatUnit)
    repeat_every = models.IntegerField(blank=True, null=True)
    repeat_max_count = models.IntegerField(blank=True, null=True)

    def __unicode__(self):
        return f'{self.title}'

0 个答案:

没有答案