Ticket #8848: trac_8848-fix_interpreters.patch

File trac_8848-fix_interpreters.patch, 2.7 KB (added by mhansen, 9 years ago)
  • sage/ext/gen_interpreters.py

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1274766748 25200
    # Node ID 15479095b1d903fa7e396c8741fb84e14297ec85
    # Parent  5bc3a3b467c6ddaa63354e95376d9a9aca3b2900
    Trac #8848: the fast eval interpreters do not build on Cygwin
    
    diff -r 5bc3a3b467c6 -r 15479095b1d9 sage/ext/gen_interpreters.py
    a b  
    23012301        self.header = """
    23022302#include <stdlib.h>
    23032303#include <complex.h>
    2304 #include "wrapper_cdf.h"
    23052304
    23062305typedef double complex double_complex;
    23072306
     2307extern int cdf_py_call_helper(PyObject*, int, double complex*, double complex*);
     2308
    23082309"""
    23092310        self.pxd_header = """
    23102311# This is to work around a header ordering bug in Cython < 0.11
     
    24332434
    24342435            sage: print interp.header
    24352436            #include <mpfr.h>
    2436             #include "wrapper_rr.h"
     2437            extern int rr_py_call_helper(PyObject*, PyObject*, int, mpfr_t*, mpfr_t*);
    24372438
    2438         in wrapper_rr.h.  This file is automatically generated by Cython
    2439         from wrapper_rr.pyx, which is automatically generated from
    2440         this spec; in particular, rr_py_call_helper comes from:
     2439        In particular, rr_py_call_helper comes from:
    24412440           
    24422441            sage: print interp.pyx_header
    24432442            cdef public bint rr_py_call_helper(object domain, object fn,
     
    24732472        self.pg = pg
    24742473        self.header = """
    24752474#include <mpfr.h>
    2476 #include "wrapper_rr.h"
    2477 """
     2475extern int rr_py_call_helper(PyObject*, PyObject*, int, mpfr_t*, mpfr_t*);
     2476""".strip()
     2477
    24782478        self.pxd_header = """
    24792479from sage.rings.real_mpfr cimport RealField_class, RealNumber
    24802480from sage.libs.mpfr cimport *
     
    26912691                       self.mc_domain_info, self.mc_code]
    26922692        self.header = """
    26932693#include <Python.h>
    2694 #include "wrapper_el.h"
     2694
     2695extern PyObject* el_check_element(PyObject*, PyObject*);
    26952696
    26962697#define CHECK(x) do_check(&(x), domain)
    26972698
     
    32263227            /* Automatically generated by ext/gen_interpreters.py.  Do not edit! */
    32273228            #include <Python.h>
    32283229            #include <mpfr.h>
    3229             #include "wrapper_rr.h"
    32303230            ...
    32313231
    32323232        Next is the function header, with one argument per memory chunk
     
    38533853             
    38543854    Extension('sage.ext.interpreters.wrapper_cdf',
    38553855              sources = ['sage/ext/interpreters/wrapper_cdf.pyx',
    3856                          'sage/ext/interpreters/interp_cdf.c']
     3856                         'sage/ext/interpreters/interp_cdf.c'],
     3857              libraries = (['mc', 'md'] if 'CYGWIN' in os.uname()[0] else []),
    38573858              ),
    38583859
    38593860    Extension('sage.ext.interpreters.wrapper_rr',