Commit f62074e2 authored by Ian Henriksen's avatar Ian Henriksen Committed by Stefan Behnel

Add test for passing in define macro without a value to distutils

via distutils comment directives in a Cython source file.
parent 3573565a
#distutils: define_macros = DEFINE_NO_VALUE, DEFINE_WITH_VALUE=0
cdef extern from "define_macro_helper.h" nogil:
int VAL;
def test():
"""
>>> test()
1
"""
return VAL
#pragma once
#ifdef DEFINE_NO_VALUE
#define VAL (DEFINE_WITH_VALUE + 1)
#else
#define VAL DEFINE_WITH_VALUE
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment