# Path: Cython/Utils.py
# def replace_suffix(path, newsuf):
# def open_new_file(path):
# def castrate_file(path, st):
# def file_newer_than(path, time):
# def path_exists(path):
# def decode_filename(filename):
# def detect_file_encoding(source_filename):
#   def __init__(self, stream):
#   def read(self, count=-1):
#   def readlines(self):
# def open_source_file(source_filename, mode="r",
#                      encoding=None, error_handling=None,
#                      require_normalised_newlines=True):
# def open_source_from_loader(loader,
#                             source_filename,
#                             encoding=None, error_handling=None,
#                             require_normalised_newlines=True):
# def str_to_number(value):
# def long_literal(value):
#     def all(items):
#     def any(items):
# class NormalisedNewlineStream(object):


import cython
import os
import re
import sys
import operator
import Naming
import Options
import StringEncoding
import DebugFlags
                import zipfile
        import PyrexTypes
            import Nodes
                import MemoryView
        import MemoryView
        import MemoryView
        import ExprNodes
from string import Template
from Cython import Utils
from Scanning import SourceDescriptor
from Cython.StringIOTree import StringIOTree
    from __builtin__ import basestring
    from builtins import str as basestring
    from Cython.Tempita import sub
        from ExprNodes import get_name_interned_utility_code
        from Cython.Tempita import sub
        from Cython.Tempita import sub
        from PyrexTypes import py_object_type, typecast
        from PyrexTypes import py_object_type, typecast
        from PyrexTypes import py_object_type, typecast
        from TypeSlots import method_coexist
    def putln_openmp(self, string):
        self.putln("#ifdef _OPENMP")
        self.putln(string)
        self.putln("#endif /* _OPENMP */")

    def undef_builtin_expect(self, cond):
        """
        Redefine the macros likely() and unlikely to no-ops, depending on
        condition 'cond'
        """
        self.putln("#if %s" % cond)
        self.putln("    #undef likely")
        self.putln("    #undef unlikely")
        self.putln("    #define likely(x)   (x)")
        self.putln("    #define unlikely(x) (x)")
        self.putln("#endif")

    def redef_builtin_expect(self, cond):
        self.putln("#if %s" % cond)
        self.putln("    #undef likely")
        self.putln("    #undef unlikely")
        self.putln("    #define likely(x)   __builtin_expect(!!(x), 1)")
        self.putln("    #define unlikely(x) __builtin_expect(!!(x), 0)")
        self.putln("#endif")

class PyrexCodeWriter(object):
    # f                file      output file
    # level            int       indentation level

    def __init__(self, outfile_name):

# Path: Cython/Utils.py
# def replace_suffix(path, newsuf):
# def open_new_file(path):
# def castrate_file(path, st):
# def file_newer_than(path, time):
# def path_exists(path):
# def decode_filename(filename):
# def detect_file_encoding(source_filename):
#   def __init__(self, stream):
#   def read(self, count=-1):
#   def readlines(self):
# def open_source_file(source_filename, mode="r",
#                      encoding=None, error_handling=None,
#                      require_normalised_newlines=True):
# def open_source_from_loader(loader,
#                             source_filename,
#                             encoding=None, error_handling=None,
#                             require_normalised_newlines=True):
# def str_to_number(value):
# def long_literal(value):
#     def all(items):
#     def any(items):
# class NormalisedNewlineStream(object):


# Path: Cython/Compiler/Code.py
import cython
import os
import re
import sys
import operator
import Naming
import Options
import StringEncoding
import DebugFlags
                import zipfile
        import PyrexTypes
            import Nodes
                import MemoryView
        import MemoryView
        import MemoryView
        import ExprNodes
from string import Template
from Cython import Utils
from Scanning import SourceDescriptor
from Cython.StringIOTree import StringIOTree
    from __builtin__ import basestring
    from builtins import str as basestring
    from Cython.Tempita import sub
        from ExprNodes import get_name_interned_utility_code
        from Cython.Tempita import sub
        from Cython.Tempita import sub
        from PyrexTypes import py_object_type, typecast
        from PyrexTypes import py_object_type, typecast
        from PyrexTypes import py_object_type, typecast
        from TypeSlots import method_coexist

    def putln_openmp(self, string):
        self.putln("#ifdef _OPENMP")
        self.putln(string)
        self.putln("#endif /* _OPENMP */")

    def undef_builtin_expect(self, cond):
        """
        Redefine the macros likely() and unlikely to no-ops, depending on
        condition 'cond'
        """
        self.putln("#if %s" % cond)
        self.putln("    #undef likely")
        self.putln("    #undef unlikely")
        self.putln("    #define likely(x)   (x)")
        self.putln("    #define unlikely(x) (x)")
        self.putln("#endif")

    def redef_builtin_expect(self, cond):
        self.putln("#if %s" % cond)
        self.putln("    #undef likely")
        self.putln("    #undef unlikely")
        self.putln("    #define likely(x)   __builtin_expect(!!(x), 1)")
        self.putln("    #define unlikely(x) __builtin_expect(!!(x), 0)")
        self.putln("#endif")

class PyrexCodeWriter(object):
    # f                file      output file
    # level            int       indentation level

    def __init__(self, outfile_name):

        self.f = Utils.open_new_file(outfile_name)