Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'date': datetime.now()}
mod = PythonModule(module_name, docstrings, metainfo)
mod.add_to_includes(
Include("pythonic/core.hpp"),
Include("pythonic/python/core.hpp"),
# FIXME: only include these when needed
Include("pythonic/types/bool.hpp"),
Include("pythonic/types/int.hpp"),
Line("#ifdef _OPENMP\n#include \n#endif")
)
mod.add_to_includes(*[Include(inc) for inc in
_extract_specs_dependencies(specs)])
mod.add_to_includes(*content.body)
mod.add_to_includes(
Include("pythonic/python/exception_handler.hpp"),
)
def warded(module_name, internal_name):
return pythran_ward + '{0}::{1}'.format(module_name, internal_name)
for function_name, signatures in specs.functions.items():
internal_func_name = cxxid(function_name)
# global variables are functions with no signatures :-)
if not signatures:
mod.add_global_var(function_name,
"{}()()".format(warded(module_name,
internal_func_name)))
for sigid, signature in enumerate(signatures):
numbered_function_name = "{0}{1}".format(internal_func_name,
sigid)
if isinstance(code, bytes):
code_bytes = code
else:
code_bytes = code.encode('ascii', 'ignore')
metainfo = {'hash': hashlib.sha256(code_bytes).hexdigest(),
'version': __version__,
'date': datetime.now()}
mod = PythonModule(module_name, docstrings, metainfo)
mod.add_to_includes(
Include("pythonic/core.hpp"),
Include("pythonic/python/core.hpp"),
# FIXME: only include these when needed
Include("pythonic/types/bool.hpp"),
Include("pythonic/types/int.hpp"),
Line("#ifdef _OPENMP\n#include \n#endif")
)
mod.add_to_includes(*[Include(inc) for inc in
_extract_specs_dependencies(specs)])
mod.add_to_includes(*content.body)
mod.add_to_includes(
Include("pythonic/python/exception_handler.hpp"),
)
def warded(module_name, internal_name):
return pythran_ward + '{0}::{1}'.format(module_name, internal_name)
for function_name, signatures in specs.functions.items():
internal_func_name = cxxid(function_name)
# global variables are functions with no signatures :-)
if not signatures:
check_specs(specs, types)
specs.to_docstrings(docstrings)
check_exports(ir, specs)
if isinstance(code, bytes):
code_bytes = code
else:
code_bytes = code.encode('ascii', 'ignore')
metainfo = {'hash': hashlib.sha256(code_bytes).hexdigest(),
'version': __version__,
'date': datetime.now()}
mod = PythonModule(module_name, docstrings, metainfo)
mod.add_to_includes(
Include("pythonic/core.hpp"),
Include("pythonic/python/core.hpp"),
# FIXME: only include these when needed
Include("pythonic/types/bool.hpp"),
Include("pythonic/types/int.hpp"),
Line("#ifdef _OPENMP\n#include \n#endif")
)
mod.add_to_includes(*[Include(inc) for inc in
_extract_specs_dependencies(specs)])
mod.add_to_includes(*content.body)
mod.add_to_includes(
Include("pythonic/python/exception_handler.hpp"),
)
def warded(module_name, internal_name):
return pythran_ward + '{0}::{1}'.format(module_name, internal_name)
check_exports(ir, specs)
if isinstance(code, bytes):
code_bytes = code
else:
code_bytes = code.encode('ascii', 'ignore')
metainfo = {'hash': hashlib.sha256(code_bytes).hexdigest(),
'version': __version__,
'date': datetime.now()}
mod = PythonModule(module_name, docstrings, metainfo)
mod.add_to_includes(
Include("pythonic/core.hpp"),
Include("pythonic/python/core.hpp"),
# FIXME: only include these when needed
Include("pythonic/types/bool.hpp"),
Include("pythonic/types/int.hpp"),
Line("#ifdef _OPENMP\n#include \n#endif")
)
mod.add_to_includes(*[Include(inc) for inc in
_extract_specs_dependencies(specs)])
mod.add_to_includes(*content.body)
mod.add_to_includes(
Include("pythonic/python/exception_handler.hpp"),
)
def warded(module_name, internal_name):
return pythran_ward + '{0}::{1}'.format(module_name, internal_name)
for function_name, signatures in specs.functions.items():
internal_func_name = cxxid(function_name)
# global variables are functions with no signatures :-)
else:
code_bytes = code.encode('ascii', 'ignore')
metainfo = {'hash': hashlib.sha256(code_bytes).hexdigest(),
'version': __version__,
'date': datetime.now()}
mod = PythonModule(module_name, docstrings, metainfo)
mod.add_to_includes(
Include("pythonic/core.hpp"),
Include("pythonic/python/core.hpp"),
# FIXME: only include these when needed
Include("pythonic/types/bool.hpp"),
Include("pythonic/types/int.hpp"),
Line("#ifdef _OPENMP\n#include \n#endif")
)
mod.add_to_includes(*[Include(inc) for inc in
_extract_specs_dependencies(specs)])
mod.add_to_includes(*content.body)
mod.add_to_includes(
Include("pythonic/python/exception_handler.hpp"),
)
def warded(module_name, internal_name):
return pythran_ward + '{0}::{1}'.format(module_name, internal_name)
for function_name, signatures in specs.functions.items():
internal_func_name = cxxid(function_name)
# global variables are functions with no signatures :-)
if not signatures:
mod.add_global_var(function_name,
"{}()()".format(warded(module_name,
internal_func_name)))